AliPhysics  b555aef (b555aef)

Plot analysis QA histograms from EMCal PWG-GA wagon. More...

#include <TFile.h>
#include <TDirectoryFile.h>
#include <TList.h>
#include <TString.h>
#include <TROOT.h>
#include <TStyle.h>
#include <TH1F.h>
#include <TH2F.h>
#include <TCanvas.h>
#include <TPad.h>
#include <TLegend.h>
#include <TObject.h>
#include <TAxis.h>
#include <TGaxis.h>
#include <TLine.h>
#include <TF1.h>
#include <TMath.h>
#include <TLatex.h>
Include dependency graph for DrawAnaCaloTrackQA.C:

Go to the source code of this file.

Functions

void ProcessTrigger (TString trigName="default", Bool_t checkList=kTRUE)
 
void CaloQA (Int_t icalo)
 
void TrackQA ()
 
void Pi0QA (Int_t icalo)
 
void IsolQA (Int_t icalo)
 
void CorrelQA (Int_t icalo)
 
void MCQA (Int_t icalo)
 
void ScaleAxis (TAxis *a, Double_t scale)
 
void ScaleXaxis (TH1 *h, Double_t scale)
 
void MyLatexMakeUp (TLatex *currentLatex, Int_t textfont, Double_t textsize, Int_t textcolor)
 Latex settings. More...
 
TObjectGetHisto (TString histoName)
 
void SaveHisto (TObject *histo, Bool_t tag=kTRUE)
 
void SaveCanvas (TCanvas *canvas)
 
Bool_t GetList (TString trigName)
 
void DrawAnaCaloTrackQA (TString listName="Pi0IM_GammaTrackCorr_EMCAL", TString fileName="AnalysisResults.root", Int_t exportTo=1, TString fileFormat="eps", TString outFileName="CaloTrackCorrQA_output", Bool_t okFlag=kTRUE)
 

Variables

TDirectoryFile * dir = 0
 
TListhistArr = 0
 TDirectory file where lists per trigger are stored in train ouput. More...
 
TFile * file = 0
 TList with histograms for a given trigger. More...
 
TFile * fout = 0
 input train file More...
 
TString histoTag = ""
 output file with plots or extracted histograms More...
 
TString format = "eps"
 file names tag, basically the trigger and calorimeter combination More...
 
Int_t exportToFile = 0
 plots format: eps, pdf, etc. More...
 
TLatex * text [5]
 option to what and if export to output file More...
 
Double_t nEvents = 0.
 plot quality messages More...
 
Bool_t addOkFlag = kTRUE
 number of events analyzed More...
 
Int_t color [] ={kBlack,kRed,kOrange+1,kYellow+1,kGreen+2,kBlue,kCyan+1,kViolet,kMagenta+2,kGray,kCyan-2,kViolet-2}
 print message on plot with ok/not ok More...
 

Detailed Description

Plot analysis QA histograms from EMCal PWG-GA wagon.

Macro to plot few selected histograms to QA data productions at 0th order Analysis performed with the wagon AddTaskPi0IMGammaCorrQA.C It generates 8 plots, each containing 2 to 4 pads, see the comments on the methods below to know what is plotted.

To execute: root -q -b -l DrawAnaCaloTrackQA.C'("Pi0IM_GammaTrackCorr_EMCAL","AnalysisResults.root")'

The trigger name might change depending on the wagon / data type In simulations only the "default" case is available On data, there can be different triggers, depending on the period

  • default : min bias like triggers, kINT7, kINT1, kMB
  • EMCAL_L0: kEMC7 L0 EMCal
  • DCAL_L0 : kEMC7 L0 DCal
  • EMCAL_L1: kEMCEGA L1 EG1 EMCal
  • DCAL_L1 : kEMCEGA L1 EG1 DCal
  • EMCAL_L2: kEMCEGA L1 EG2 EMCal
  • DCAL_L2 : kEMCEGA L1 EG2 DCal A plot will be produced for each of the triggers, if they existed in the data.

If requested, a guiding message on the quality of the plot for non experts can be asked. The checks done are very basic and only very strange behavior is spotted. The current possible messages are:

  • OK: plot is good
  • NOT OK: plot is not good, there is a problem
  • Likely OK: there is a problem, but maybe not important or it is known
  • Expert plot: No need to look at
  • Low stat: Plot might be good but statistic is low to discriminate

In case output file is too large, possiblity to dump the list content in a sepate file: exportToFile = kTRUE

Author
Gustavo Conesa Balbastre Gusta.nosp@m.vo.C.nosp@m.onesa.nosp@m..Bal.nosp@m.bastr.nosp@m.e@ce.nosp@m.rn.ch, (LPSC-CNRS)

Definition in file DrawAnaCaloTrackQA.C.

Function Documentation

void CaloQA ( Int_t  icalo)

Plot basic calorimeter QA histograms. 3 canvases with 4 pads

  • cluster/cell pT spectra, ratio of cluster spectra after matching and PID cuts, and track matching residuals
  • cell and cluster hit maps: cell hit, cell energy mean, cluster hit low energy, cluster hit high energy
  • cluster time vs pT, cluster long axis vs E, number of cells in cluster vs E, cells in cluster E vs cluster E
Parameters
icalo0 EMCal, 1 DCal

Plot basic calorimeter QA histograms. 2 canvases with 2-4 pads

  • cluster spectra after matching and PID cuts, and their ratio to different productions
  • cluster track matching residuals in eta and phi directions, and their ratio to different productions

To be updated

Parameters
icalo0 EMCal, 1 DCal

Definition at line 307 of file DrawAnaCaloTrackQA.C.

Referenced by ProcessTrigger().

void CorrelQA ( Int_t  icalo)

Plot basic cluster-track correlation histograms in 2 pads:

  • Azimuthal correlation of high pT trigger cluster and tracks in 4 associated pT bins
  • xE distribution of tracks correlated to a high pT cluster, in the opposite side or in perpendicular region (UE)
Parameters
icalo0 EMCal, 1 DCal

cluster-track correlation

To be updated

Parameters
icalo0 EMCal, 1 DCal

Definition at line 2166 of file DrawAnaCaloTrackQA.C.

Referenced by ProcessTrigger().

void DrawAnaCaloTrackQA ( TString  listName = "Pi0IM_GammaTrackCorr_EMCAL",
TString  fileName = "AnalysisResults.root",
Int_t  exportTo = 1,
TString  fileFormat = "eps",
TString  outFileName = "CaloTrackCorrQA_output",
Bool_t  okFlag = kTRUE 
)

Main method, produce the plots for the 7 different types of triggers:

  • Calorimeter QA: cluster/cell spectra, acceptance, track matching residuals in CaloQA method
  • Track QA in TrackQA method
  • Invariant mass plots in Pi0QA method
  • Cluster isolation, tracks and clusters pT and sum pT in cone, in IsolQA method
  • Cluster-track correlation plots, azimuthal and xE, in CorrelQA method
  • Dedicated generated particles QA in MCQA method

Input:

Parameters
listNameName of list with histograms in file
fileNameFile name
exportTo0 - do not export; 1 - export generated plots to file; 2 - export extracted lists to file
fileFormatdefine the type of figures: eps, pdf, etc.
okFlagadd to the figures ok/not ok info.

Definition at line 121 of file DrawAnaCaloTrackQA.C.

TObject * GetHisto ( TString  histoName)

Check if the list is available, if not get the histo directly from file

Returns
the histogram with the provided name
Parameters
histoNamehistogram name

Definition at line 2712 of file DrawAnaCaloTrackQA.C.

Referenced by CaloQA(), CorrelQA(), IsolQA(), MCQA(), Pi0QA(), ProcessTrigger(), and TrackQA().

Bool_t GetList ( TString  trigName)

Open the file and list containing the histograms

Parameters
trigNamename of list of histograms for a particular trigger
exportToFileput the list of histograms in a separate file if true

Definition at line 2676 of file DrawAnaCaloTrackQA.C.

Referenced by ProcessTrigger().

void IsolQA ( Int_t  icalo)

Plot basic candidate cluster isolation histograms in 2 pads:

  • Cluster spectra, isolated and not isolated
  • pT distribution of tracks or clusters or both in the isolation cone, or perpendicular cones or eta-band out of cone
  • sum pT distribution of tracks or clusters or both in the isolation cone, or perpendicular cones or eta-band out of cone
  • sum pT distribution of tracks or clusters or both in the isolation cone whith subtracted eta-band sum pT

Definition at line 1638 of file DrawAnaCaloTrackQA.C.

Referenced by ProcessTrigger().

void MCQA ( Int_t  icalo)

Plot basic generated particle distribution histograms in 4 pads:

  • pT spectra of generated and reconstructed clusters from photon, photon from pi0, photon from eta, eta and pi0
  • ratio of pT spectra of reconstructed over generated
  • azimuthal distribution of generated particles
  • pseudorapidity distribution of generated particles
Parameters
icalo0 EMCal, 1 DCal

Definition at line 2396 of file DrawAnaCaloTrackQA.C.

Referenced by ProcessTrigger().

void MyLatexMakeUp ( TLatex *  currentLatex,
Int_t  textfont,
Double_t  textsize,
Int_t  textcolor 
)

Latex settings.

Definition at line 2796 of file DrawAnaCaloTrackQA.C.

Referenced by DrawAnaCaloTrackQA().

void Pi0QA ( Int_t  icalo)

Plot basic invariant mass QA in 4 pads:

  • Invariant mass vs pT
  • Invariant mass real/mixed pairs, in pi0 region
  • Invariant mass real/mixed pairs, in pi0 region per super module
  • Invariant mass real/mixed pairs, in eta region
Parameters
icalo0 EMCal, 1 DCal

Definition at line 1197 of file DrawAnaCaloTrackQA.C.

Referenced by ProcessTrigger().

void ProcessTrigger ( TString  trigName,
Bool_t  checkList 
)

Produce the plots per trigger, options are:

  • default : min bias like triggers, kINT7, kINT1, kMB
  • EMCAL_L0: kEMC7 L0 EMCal
  • DCAL_L0 : kEMC7 L0 DCal
  • EMCAL_L1: kEMCEGA L1 EG1 EMCal
  • DCAL_L1 : kEMCEGA L1 EG1 DCal
  • EMCAL_L2: kEMCEGA L1 EG2 EMCal
  • DCAL_L2 : kEMCEGA L1 EG2 DCal

Input:

Parameters
trigNametrigger case name
checklistget the list from file, in case not exported

This method can be executed directly instead od DrawAnaCaloTrackQA if the list with histograms were exported previously into a separate file and checkList is set to false.

Definition at line 222 of file DrawAnaCaloTrackQA.C.

Referenced by DrawAnaCaloTrackQA().

void SaveCanvas ( TCanvas *  canvas)

Save canvas in new file. Name should have been differenciated for the different triggers

Definition at line 2748 of file DrawAnaCaloTrackQA.C.

Referenced by CaloQA(), CorrelQA(), IsolQA(), MCQA(), Pi0QA(), and TrackQA().

void SaveHisto ( TObject histo,
Bool_t  tag 
)

Save recovered histogram in new file. Add a tag name if needed to differenciate different triggers.

Parameters
histohistogram TObject
tagadd to the histogram name when saving the trigger/calo tag or not.

Definition at line 2733 of file DrawAnaCaloTrackQA.C.

Referenced by CaloQA(), CorrelQA(), GetHisto(), IsolQA(), MCQA(), Pi0QA(), and TrackQA().

void ScaleAxis ( TAxis a,
Double_t  scale 
)

Scale axis by a constant factor used just to scale degrees to rad in a single histogram in the MC case

Definition at line 2757 of file DrawAnaCaloTrackQA.C.

Referenced by ScaleXaxis().

void ScaleXaxis ( TH1 h,
Double_t  scale 
)

Scale x axis by a constant factor used just to scale degrees to rad in a single histogram in the MC case

Definition at line 2785 of file DrawAnaCaloTrackQA.C.

Referenced by MCQA().

void TrackQA ( )

Plot basic hybrid tracks histograms in 4 pads:

  • tracks eta vs phi
  • track phi distribution per hybrid track component
  • track TOF
  • track pT per hybrid track component

Hybrid Tracks distributions To be updated

Definition at line 971 of file DrawAnaCaloTrackQA.C.

Referenced by ProcessTrigger().

Variable Documentation

Bool_t addOkFlag = kTRUE

number of events analyzed

Definition at line 96 of file DrawAnaCaloTrackQA.C.

Referenced by CaloQA(), CorrelQA(), DrawAnaCaloTrackQA(), IsolQA(), MCQA(), Pi0QA(), and TrackQA().

TDirectoryFile* dir = 0

Definition at line 87 of file DrawAnaCaloTrackQA.C.

Referenced by AliFMDMCDensityCalculator::AliFMDMCDensityCalculator(), AODMerge(), AppendPath(), ParUtilities::Build(), charmCutsOptimization(), Combine(), Convert(), ConvertOne(), AliMTRChEffAnalysis::CopyLocally(), CreateFileCollection(), DrawAnaCaloTrackQA(), DrawOccupancy(), DrawPossibilities(), DrawRun(), DetailsComparer::DrawStack(), Extractor::Extract(), ExtractGSEs(), AliDJetTHnReader::ExtractInputMassPlotEffScale(), AliDJetTHnReader::ExtractInputMassPlotSideband(), NormExtractor::ExtractNorm(), DetailsComparer::FillStacks(), AliForwarddNdetaTask::Finalize(), GraphSysErr::FindFwhm(), AliTrackletdNdetaPost::FindSub(), AliTrackletdNdeta::FindSub(), fitD0(), ForBin(), ExtractProd::GetDir(), GetHistos(), FastSim::GetKine(), GetList(), GetListOfFiles(), GetO(), ExtractProd::GetPathPass(), AliFMDMCSharingFilter::GetTrackDensity(), GridDownloadAODs(), AliBasedNdetaTask::CentralityBin::IsInclusiveBin(), LoadD0toKpiHistos(), LoadDplusHistos(), LoadDsHistos(), LoadDstarD0piHistos(), MakeAODInputChain(), ParUtilities::MakeAuxFilePAR(), MakeCorrRepository(), ParUtilities::MakeScriptPAR(), VirtualTrain::Merge(), Merge2Bins(), AliAnalysisHelperJetTasks::MergeOutputDirs(), BadChannelAna::MergeRuns(), FastSim::MoveAliceFiles(), Trend::NextFile(), TupleSelector::PlotOne(), AliAnalysisHelperJetTasks::PrintDirectorySize(), Unfolder::ProcessBin(), DetailsComparer::ProcessCentBin(), DetailsComparer::ProcessCentDelta(), DetailsComparer::ProcessCentResult(), Unfolder::ProcessType(), QAMerge(), ReadFile(), ReadFileMore(), ReadFilesForCompilation(), MultCutDrawer::Run(), DeltaCalculations::Run(), AliFMDSharingFilter::SetIgnoreESDWhenAngleCorrecting(), AliFMDMCCorrector::SetSecondaryForMC(), AliFMDEnergyFitter::SetSkips(), setupPar(), FastSim::SetupRun(), AliMCTreeTools::SetWDir(), SimpleCorrect(), OutputUtilities::StartXrootd(), TestF::StepIt(), trendingCluster(), UpdateTag(), and WithSysError().

Int_t exportToFile = 0

plots format: eps, pdf, etc.

Definition at line 93 of file DrawAnaCaloTrackQA.C.

Referenced by CaloQA(), CorrelQA(), DrawAnaCaloTrackQA(), GetList(), IsolQA(), MCQA(), Pi0QA(), and TrackQA().

TFile* file = 0

TList with histograms for a given trigger.

Definition at line 89 of file DrawAnaCaloTrackQA.C.

Referenced by AddTrigVars(), AliKFParticleTest(), ProofRailway::AuxFile(), CheckEF(), CheckMergedOverlap(), CheckNoisePeakVariationWithTimeCut(), CheckQAFile(), AliOADBForward::Close(), EventTimeSorter::CloseInput(), CompareSubs(), Convert(), ConvertOne(), FastAnalysis::CopyEgHistogram(), GraphSysErr::CopyKeys(), CreateChain(), DoStandardForDs(), Draw123(), DrawAnaCaloTrackQA(), DrawBeforeAfter(), DrawCorrAcc2(), DrawCorrCentralSecMap2(), DrawCorrELoss(), DrawCorrSecMap2(), DrawCorrVtxBias(), DrawCuts(), DrawDeltas2(), DrawELossPoisson(), DrawEmpirical(), DrawEP(), DrawEvaluateTriggers(), DrawFlowPDF(), DrawKs(), DrawMCResult(), DrawNeighbors(), DrawOccupancy(), DrawRecAnaEloss(), DrawSPDComparison(), DrawSteps(), AliForwarddNdetaTask::CentralityBin::End(), Extract(), ExtractGSE(), ExtractGSE2(), ExtractGSEs(), Extractor::ExtractObject(), AliAnalysisTaskCaloFilter::FillAODHeader(), AliAnalysisTaskEMCALClusterize::FillAODHeader(), fitD0(), FitEmpirical(), GetCent(), GetDeltas(), FastSim::GetGAlice(), GetGraph(), GetHisto(), GetHists(), FastSim::GetKine(), GetMid(), AliJetEmbeddingFromPYTHIATask::GetNextFile(), AliJetEmbeddingFromAODTask::GetNextFile(), GetOne(), GetRunInfo(), GetRunList(), AliOADBForward::GetTables(), Unfolder::GetTop(), SummaryMCTrackDrawer::Init(), SummaryAODDrawer::Init(), FastAnalysis::Init(), EPosSim::Init(), AliAnalysisTaskEMCALTriggerQA::InitGeometry(), AliConversionPhotonCuts::InitializeMaterialBudgetWeights(), LoadAnalysisManager(), AliAnalysisTaskEmcalDijetImbalance::LoadBackgroundScalingHistogram(), LoadHandler(), AliAnalysisTaskRhoBase::LoadRhoFunction(), AliAnalysisTaskRhoBaseDev::LoadRhoFunction(), AliLatexTable::LoadTeXFromFileAndPrintASCII(), main(), MakeCorrSecMap(), MakeELossFit::MakeELossFit(), AliStarEventReader::MakeFileListFromFile(), MakeReferenceSM(), DetailsComparer::MakeTitlePage(), QAPlotter::MakeTree(), MakeTriggerSlide(), FastSim::MoveAliceFiles(), Trend::NextFile(), AliAnalysisTaskJetMatching::Notify(), AliV0ReaderV1::Notify(), FastAnalysis::Notify(), TupleSelector::Notify(), EPosSim::Notify(), YieldCalculations::One::One(), AliOADBForward::Open(), EmpiricalMaker::OpenFile(), OpenFile(), AliTrackletdNdetaPost::OpenFile(), AliTrackletdNdeta::OpenFile(), AliTrackletAODUtils::OpenFile(), PeriodAnalysis(), PlotEfficiency(), PlotIntegratedMuonEfficiency(), PlotIntegratedMuonEfficiencyPerDE(), PlotIntegratedMuonEfficiencyVsX(), PlotMuonEfficiency(), PlotMuonEfficiencyPerDE(), PlotMuonEfficiencyPerDEVsRun(), PlotMuonEfficiencyVsRun(), PlotMuonEfficiencyVsX(), PlotMuonEfficiencyVsXY(), ELossTimeTrain::PostShellCode(), PrintToPdf(), ProcessFile(), ProcessOne(), AliAnalysisTaskEMCALTimeCalib::ProduceCalibConsts(), AliAnalysisTaskEMCALTimeCalib::ProduceOffsetForSMsV2(), FastAnalysis::ProofLoad(), EMCalTriggerPtAnalysis::AliAnalysisTaskEtaPhiEfficiency::PythiaInfoFromFile(), EMCalTriggerPtAnalysis::AliAnalysisTaskTracksInJet::PythiaInfoFromFile(), AliAnalysisHelperJetTasks::PythiaInfoFromFile(), HighPtTracks::AliHighPtReconstructionEfficiency::PythiaInfoFromFile(), AliAnalysisTaskEmcalLight::PythiaInfoFromFile(), AliAnalysisTaskEmcal::PythiaInfoFromFile(), QAplots(), AliEMCALTriggerOfflineQAPP::ReadFastORBadChannelFromFile(), AliEMCALTriggerOfflineLightQAPP::ReadFastORBadChannelFromFile(), AliEmcalTriggerMakerKernel::ReadFastORBadChannelFromFile(), AliEmcalTriggerMakerKernel::ReadFastORPedestalFromFile(), ReadFCM(), ELossTimeTask::ReadMap(), AliEMCALTriggerOfflineQAPP::ReadOfflineBadChannelFromFile(), AliEmcalTriggerMakerKernel::ReadOfflineBadChannelFromFile(), AliTrackletBaseWeights::ReadWeights(), SummaryMultDistsDrawer::Run(), SummaryUnfoldedDrawer::Run(), Computer::Run(), SummarydNdetaDrawer::Run(), SummaryMCCorrDrawer::Run(), ClusterCalculations::Run(), SummaryMCTrackDrawer::Run(), SummaryAODDrawer::Run(), Calculation::Run(), EmpiricalMaker::Run(), DetailsComparer::Run(), dNdetaDrawer::Run(), FastAnalysis::Run(), EPosSim::Run(), ScalerTrending(), ScanDirectory(), Scanner::ScanDirectory(), ChainBuilder::ScanDirectory(), TupleSelector::ScanDirectory(), SetAndCheckOCDB(), dNdetaDrawer::SetEmpirical(), AliCorrectionManagerBase::SetEnableFallBack(), AliCaloTrackReader::SetEventTriggerBit(), dNdetaDrawer::SetFinalMC(), SimpledNdeta(), AliBaseESDTask::StoreTrainName(), AliBaseAODTask::StoreTrainName(), BadChannelAna::SummarizeResults(), BadChannelAna::SummarizeResultsByFlag(), SummaryAODDrawer::SummarizeSharing(), SummaryAODDrawer::SummarizeSteps(), AliEmcalPhysicsSelectionTask::Terminate(), terminateQA(), TestSPD(), Trending2ELoss(), trendingCluster(), AliOADBForward::Table::Update(), AliOADBForward::Update(), UpdateTag(), AliEsdSkimTask::UserCreateOutputObjects(), AliAnalysisTaskPIDflowQA::UserExec(), AliCopyHeaderTask::UserExec(), EventTimeTask::UserNotify(), WithSysError(), and WriteFCM().

TList* histArr = 0

TDirectory file where lists per trigger are stored in train ouput.

Definition at line 88 of file DrawAnaCaloTrackQA.C.

Referenced by GetList().

TString histoTag = ""

output file with plots or extracted histograms

Definition at line 91 of file DrawAnaCaloTrackQA.C.

Double_t nEvents = 0.

plot quality messages

Definition at line 95 of file DrawAnaCaloTrackQA.C.

Referenced by AliAnalysisTaskFilteredTest(), CaloQA(), AliAnalysisTaskSEOmegac2eleOmegafromAODtracks::DoEventMixingWithPools(), AliAnalysisTaskSELc2pK0sfromAODtracks::DoEventMixingWithPools(), AliAnalysisTaskCombinHF::DoMixingWithCuts(), AliAnalysisTaskCombinHF::DoMixingWithPools(), AliAnalysisTaskJetV2::DoSimpleSimulation(), AliAnalysisTaskJetV3::DoSimpleSimulation(), FastMonitor::DrawObject(), AliOfflineTrigger::ExtractSelected(), AliAnalysisTaskPSHFE::FillMEDPhiHistos(), AliAnalysisTaskCombinHF::FinishTaskOutput(), AliAnalysisTaskJetV3::GetJetRadius(), AliAnalysisTaskJetV2::GetJetRadius(), AliFMDMCSharingFilter::GetTrackDensity(), AliTrackletAODdNdeta::Histos::GetVeto(), MakeEvaluateTriggers(), AliTrackletdNdetaTask::HistoSet::MasterFinalize(), AliTrackletdNdetaTask::CentBin::MasterFinalize(), AliTrackletAODdNdeta::Histos::MasterFinalize(), AliTrackletdNdetaTask::MasterFinalize(), AliTrackletAODdNdeta::CentBin::MasterFinalize(), AliTrackletAODdNdeta::MasterFinalize(), Railway::OutputLocation(), ProcessTrigger(), AliAnalysisTaskEmcalEmbeddingHelper::PythiaInfoFromCrossSectionFile(), ReadAODVertexingHF(), ReadAODVertexingHFsa(), AliAnalysisTaskPhiFlow::ReconstructionWithEventMixing(), LocalRailway::Run(), LiteRailway::Run(), AAFPluginRailway::Run(), TrainSetup::Run(), GridRailway::Run(), ProofRailway::Run(), AliFMDSharingFilter::SetIgnoreESDWhenAngleCorrecting(), Cumulants::SetTracks(), AliForwardFlowTaskQC::Terminate(), and trendingCluster().