AliPhysics  aaf9c62 (aaf9c62)
AliAnalysisTaskGammaCaloMerged.h
Go to the documentation of this file.
1 #ifndef ALIANLYSISTASKGAMMACALOMERGED_cxx
2 #define ALIANLYSISTASKGAMMACALOMERGED_cxx
3 
4 #include "AliAnalysisTaskSE.h"
5 #include "AliESDtrack.h"
6 #include "AliV0ReaderV1.h"
10 #include "AliCaloPhotonCuts.h"
11 #include "AliConvEventCuts.h"
13 #include "AliConversionMesonCuts.h"
14 #include "AliAnalysisManager.h"
15 #include "TProfile2D.h"
16 #include "TH3.h"
17 #include "TH3F.h"
18 #include <vector>
19 #include <map>
20 
22  public:
23 
25  AliAnalysisTaskGammaCaloMerged(const char *name);
27 
28  virtual void UserCreateOutputObjects();
29  virtual Bool_t Notify();
30  virtual void UserExec(Option_t *);
31  virtual void Terminate(const Option_t*);
32 
33  void SetV0ReaderName(TString name) {
34  fV0ReaderName = name ;
35  return ;
36  }
37  void SetIsHeavyIon(Int_t flag) { fIsHeavyIon = flag ; }
38 
39  // Function to set correction task setting
40  void SetCorrectionTaskSetting(TString setting) { fCorrTaskSetting = setting ; }
41  // base functions for selecting photon and meson candidates in reconstructed data
42  void ProcessClusters();
43 
44  // MC functions
45  void SetIsMC(Int_t isMC) { fIsMC = isMC ; }
46  void SetSelectedMesonID(Int_t anaMeson) { fSelectedMesonID = anaMeson ; }
47 
48  void ProcessMCParticles();
49  void ProcessAODMCParticles();
50  // determine source according to pdg code of mother
51  Int_t GetSourceClassification(Int_t daughter, Int_t pdgCode);
52 
53  void ProcessTrueClusterCandidates( AliAODConversionPhoton* TruePhotonCandidate, Float_t m02, AliAODConversionPhoton *TrueSubClusterCandidate1,
54  AliAODConversionPhoton *TrueSubClusterCandidate2);
55  void ProcessTrueClusterCandidatesAOD( AliAODConversionPhoton* TruePhotonCandidate, Float_t m02, AliAODConversionPhoton *TrueSubClusterCandidate1,
56  AliAODConversionPhoton *TrueSubClusterCandidate2);
57 // // void ProcessTrueMesonCandidates( AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1);
58 
59  // switches for additional analysis streams or outputs
60  void SetLightOutput( Bool_t flag ) { fDoLightOutput = flag;}
61  void SetDoMesonQA(Int_t flag) { fDoMesonQA = flag ; }
62  void SetDoClusterQA(Int_t flag) { fDoClusterQA = flag ; }
64 
65  // Setting the cut lists for the conversion photons
66  void SetEventCutList(Int_t nCuts, TList *CutArray) {
67  fnCuts = nCuts ;
68  fEventCutArray = CutArray ;
69  }
70 
71  // Setting the cut lists for the calo photons
72  void SetCaloCutList(Int_t nCuts, TList *CutArray) {
73  fnCuts = nCuts ;
74  fClusterCutArray = CutArray ;
75  }
76 
77  // Setting the cut lists for the calo photons
78  void SetCaloMergedCutList(Int_t nCuts, TList *CutArray){
79  fnCuts = nCuts ;
80  fClusterMergedCutArray = CutArray ;
81  }
82 
83  // Setting the cut lists for the meson
84  void SetMesonCutList(Int_t nCuts, TList *CutArray) {
85  fnCuts = nCuts ;
86  fMesonCutArray = CutArray ;
87  }
88 
90 
91  // Additional functions for convenience
92  void SetLogBinningXTH2(TH2* histoRebin);
93 
94  Bool_t CheckVectorForDoubleCount(vector<Int_t> &vec, Int_t tobechecked);
95  void FillMultipleCountMap(map<Int_t,Int_t> &ma, Int_t tobechecked);
96  void FillMultipleCountHistoAndClear(map<Int_t,Int_t> &ma, TH1F* hist);
97 
98  // Function to enable detailed printouts
100 
101  // Function to enable MC label sorting
102  void SetEnableSortingOfMCClusLabels(Bool_t enableSort) { fEnableSortForClusMC = enableSort ; }
103 
104  // FUnction to enable very detailed M02 distribution
105  void SetEnableDetailedM02Distribtuon(Bool_t enableDetM02) { fDoDetailedM02 = enableDetM02 ; }
106 
107  protected:
108  AliV0ReaderV1* fV0Reader; // basic photon Selection Task
111  Bool_t fDoLightOutput; // switch for running light output, kFALSE -> normal mode, kTRUE -> light mode
112  AliVEvent* fInputEvent; // current event
113  AliMCEvent* fMCEvent; // corresponding MC event
114  TList** fCutFolder; // Array of lists for containers belonging to cut
115  TList** fESDList; // Array of lists with histograms with reconstructed properties
116  TList** fTrueList; // Array of lists with histograms with MC validated reconstructed properties
117  TList** fMCList; // Array of lists with histograms with pure MC information
118  TList** fHeaderNameList; // Array of lists with header names for MC header selection
119  TList* fOutputContainer; // Output container
122  TList* fEventCutArray; // List with Event Cuts
123  AliConvEventCuts* fEventCuts; // EventCutObject
124  TList* fClusterCutArray; // List with Cluster Cuts
125  TList* fClusterMergedCutArray; // List with Cluster Cuts for merged clusters
126  TList* fMesonCutArray; // List with Meson Cuts
127  AliConversionMesonCuts* fMesonCuts; // MesonCutObject
128 
129  //histograms for mesons reconstructed quantities
133 
134  // histograms for rec photon clusters/pi0 candidate
148 
149  //histograms for pure MC quantities
151  TH1F** fHistoMCPi0Pt;
154  TH1F** fHistoMCEtaPt;
171 
180 
181  // MC validated cluster histos
201 
217 // TH2F** fHistoTrueClusElectronPtvsMotherID; //!
218 // TH2F** fHistoTrueClusElectronPtvsTopMotherID; //!
219 // TH2F** fHistoTrueClusElectronPtvsConvPhotonTopMotherID; //!
221 
222  // MC validated reconstructed quantities mesons
231 
238 
239  // MC validated reconstructed quantities photons
245 
246  // event histograms
247  TH1F** fHistoNEvents;
250  TH1F** fHistoVertexZ;
256  TProfile** fProfileEtaShift;
259 
260  // additional variables
261  TRandom3 fRandom; // random
262  Int_t fnCuts; // number of cuts to be analysed in parallel
263  Int_t fiCut; // current cut
264  Int_t fIsHeavyIon; // switch for pp = 0, PbPb = 1, pPb = 2
265  Int_t fDoMesonQA; // flag for meson QA
266  Int_t fDoClusterQA; // flag for cluster QA
267  Bool_t fIsFromMBHeader; // flag for MC headers
268  Bool_t fIsOverlappingWithOtherHeader; // flag for particles in MC overlapping between headers
269  Int_t fIsMC; // flag for MC information
270  Bool_t fSetPlotHistsExtQA; // flag for extended QA hists
271  Double_t fWeightJetJetMC; // weight for Jet-Jet MC
272  Int_t fSelectedMesonID; // switch for meson analysis
273  Bool_t fEnableDetailedPrintOut; // switch on detailed print outs
274  Bool_t fEnableSortForClusMC; // switch on sorting for MC labels in cluster
275  TTree* tBrokenFiles; // tree for keeping track of broken files
276  TObjString* fFileNameBroken; // string object for broken file name
277  Bool_t fDoDetailedM02; // detailed M02 distribution
278 
279  private:
280  AliAnalysisTaskGammaCaloMerged(const AliAnalysisTaskGammaCaloMerged&); // Prevent copy-construction
282 
283  ClassDef(AliAnalysisTaskGammaCaloMerged, 27);
284 };
285 
286 #endif
TH2F ** fHistoClusMergedNCellsPt
array of histos with cluster NCells vs Pt
TH1F ** fHistoNGoodESDTracks
array of histos with event information without event weights
TH1F ** fHistoMCPi0DalitzInAccPt
array of histos without evt weight eta in acceptance, pT
void SetMesonCutList(Int_t nCuts, TList *CutArray)
TH2F ** fHistoTruePrimaryEtaMCPtResolPt
array of histos with validated weighted primary pi0, MCpt, resol pt
void SetEventCutList(Int_t nCuts, TList *CutArray)
TH2F ** fHistoClusMergedNCellsAroundPt
array of histos with merged cluster N MC paricles in cluster vs Pt
TH2F ** fHistoTruePi0PtAlpha
array of histos with validated eta, pt, Y
TH1F ** fHistoClusOverlapHeadersGammaPt
array of histos with cluster, E
double Double_t
Definition: External.C:58
void FillMultipleCountHistoAndClear(map< Int_t, Int_t > &ma, TH1F *hist)
Definition: External.C:236
TH2F ** fHistoMotherPtAlpha
array of histograms with signal +BG pt, Y
TH1F ** fHistoMCPi0InAccPt
array of histos without event weights eta Dalitz, pT
TH2F ** fHistoTruePrimaryPi0MergedPartConvMCPtResolPt
array of histos with validated weighted primary pi0, MCpt, resol pt
TH1F ** fHistoMCEtaDalitzWOWeightPt
array of histos with weighted eta Dalitz, pT
TH2F ** fHistoTrueEtaPtAlpha
array of histos with validated pi0, pt, alpha
TH1F ** fHistoMCPi0DalitzPt
array of histos without event weights eta, pT
TH1F ** fHistoMCAllGammaPt
array of histos with weighted decay gamma
void SetCaloMergedCutList(Int_t nCuts, TList *CutArray)
void SetEnableDetailedM02Distribtuon(Bool_t enableDetM02)
TH1F ** fHistoClusGammaE
array of histos with cluster, pt
TH2F ** fHistoMCPrimaryPtvsSource
array of histos with weighted eta, pT, hardest jet pt
TH2F ** fHistoSPDClusterTrackletBackground
array of histos with number of good tracks vs gamma candidates
TH2F ** fHistoMCSecPi0InAccPtvsSource
array of histos with weighted pi0 from sec, pT for different sources
TH1F ** fHistoNEvents
vector containing labels of validated eta
TH2F ** fHistoTrueClusEtaEM02
array of histos with validated pi0, E, m02
TH1F ** fHistoNEventsWOWeight
array of histos with event information
void SetEnableSortingOfMCClusLabels(Bool_t enableSort)
TH2F ** fHistoClusMergedNCellsAroundAndInPt
array of histos with number of cells surrounding merged cluster vs merged cluster Pt ...
TH1F ** fHistoClusGammaPt
array of histograms with signal +BG pt, alpha
TH1F ** fHistoMCEtaWOEvtWeightPt
array of histos with unweighted eta, pT
TH1I ** fHistoMCHeaders
array of histos with E surrounding merged cluster vs merged cluster E
TH1F ** fHistoMCDecayGammaPt
array of histos with weighted primary particles, Y vs source
TH2F ** fHistoClusNCellsPt
array of histos with cluster merged accepted mesons, E vs M02
TH1F ** fHistoMCPi0DalitzWOWeightPt
array of histos with weighted pi0 Dalitz, pT
TH2F ** fHistoClusMergedEvsM02Accepted
array of histos with cluster merged accepted mesons, pt vs M02
void SetCaloCutList(Int_t nCuts, TList *CutArray)
int Int_t
Definition: External.C:63
TH2F ** fHistoClusMergedPtvsM02Accepted
array of histos with cluster merged, pt vs M02
TH1F ** fHistoMCEtaDalitzPt
array of histos without event weights pi0 Dalitz, pT
TH2F ** fHistoClusMergedEAroundE
array of histos with number of cells surrounding merged cluster + Ncells in clus vs merged cluster Pt...
Definition: External.C:204
TH1F ** fHistoNClusterMergedCandidates
array of histos with number of cluster candidates per event
TH2F ** fHistoMCPrimaryYvsSource
array of histos with weighted primary particles, pT vs source
TH1F ** fHistoMCEtaDalitzWOEvtWeightPt
array of histos with unweighted eta Dalitz, pT
float Float_t
Definition: External.C:68
TH1F ** fHistoMCPi0WOWeightPt
array of histos with weighted pi0, pT
Bool_t CheckVectorForDoubleCount(vector< Int_t > &vec, Int_t tobechecked)
TH1F ** fHistoMCPi0WOEvtWeightPt
array of histos with unweighted pi0, pT
TH1F ** fHistoNClusterCandidates
array of histos with vertex z distribution for selected events
Int_t fNClusterMergedCandidates
current number of cluster candidates
TH1F ** fHistoMCPi0WOEvtWeightInAccPt
array of histos with weighted eta in acceptance, pT
TH2F ** fHistoMotherPtY
array of histogram with signal + BG for same event photon pairs, inv Mass, pt
void ProcessTrueClusterCandidatesAOD(AliAODConversionPhoton *TruePhotonCandidate, Float_t m02, AliAODConversionPhoton *TrueSubClusterCandidate1, AliAODConversionPhoton *TrueSubClusterCandidate2)
TH2F ** fHistoMCPi0PtJetPt
array of histos with weighted pi0 from sec in acceptance, pT for different sources ...
TH1F ** fHistoNV0Tracks
array of histos with SPD tracklets vs SPD clusters for background rejection
TH2F ** fHistoTrueSecondaryPi0MCPtResolPt
array of histos with validated weighted primary eta, MCpt, resol pt
TH1F ** fHistoJetJetNTrials
array of profiles with xsection for jetjet
TH2F ** fHistoTruePrimaryPi01GammaMCPtResolPt
array of histos with validated weighted primary pi0, MCpt, resol pt
TH1F ** fHistoMCEtaDalitzInAccPt
array of histos with weighted pi0 dalitz in acceptance, pT
TH1F ** fHistoMCPi0Pt
array of histos for header names
TH1F ** fHistoMCEtaDalitzWOEvtWeightInAccPt
array of histos without evt weight pi0 in acceptance, pT
TH2F ** fHistoTrueClusPi0EM02
array of histos with validated electrons, E, m02
TH2F ** fHistoClusMergedNParticlePt
array of histos with merged cluster NCells vs Pt
TH1F ** fHistoMCEtaWOEvtWeightInAccPt
array of histos without evt weight pi0 in acceptance, pT
Int_t GetSourceClassification(Int_t daughter, Int_t pdgCode)
TRandom3 fRandom
array of histos with ntrials for jetjet
TH2F ** fHistoTrueClusGammaEM02
array of histos with validated eta, pt, alpha
AliAnalysisTaskGammaCaloMerged & operator=(const AliAnalysisTaskGammaCaloMerged &)
Bool_t isMC
TH2F ** fHistoDoubleCountTrueEtaPtvsM02
array of histos with double counted secondary pi0s, pT, M02
TH2F ** fHistoClusMergedPtvsM02
array of histos with cluster NLM vs Pt
TProfile ** fProfileEtaShift
array of histos with V0 counts
Definition: External.C:220
Class handling all kinds of selection cuts for Gamma Conversion analysis.
TH2F ** fHistoMCEtaPtJetPt
array of histos with weighted pi0, pT, hardest jet pt
TH2F ** fHistoDoubleCountTruePi0PtvsM02
array of histos with validated weighted secondary pi0, MCpt, resol pt
TH2F ** fHistoTrueClusMergedPtvsM02
array of histos with weighted all gamma
TH1F ** fHistoDoubleCountTrueSecPi0Pt
array of histos with double counted pi0s, pT, M02
TH1F ** fHistoMCEtaPt
array of histos without event weights pi0, pT
TH1F ** fHistoMCEtaWOWeightPt
array of histos with weighted eta, pT
void ProcessTrueClusterCandidates(AliAODConversionPhoton *TruePhotonCandidate, Float_t m02, AliAODConversionPhoton *TrueSubClusterCandidate1, AliAODConversionPhoton *TrueSubClusterCandidate2)
Class handling all kinds of selection cuts for Gamma Conversion analysis.
TH1F ** fHistoMCPi0DalitzWOEvtWeightInAccPt
array of histos with weighted eta dalitz in acceptance, pT
TH2F ** fHistoNGoodESDTracksVsNClusterCandidates
array of histos with number of merged cluster candidates per event
TH2F ** fHistoMCSecPi0PtvsSource
array of histos without evt weight eta in acceptance, pT
TH1F ** fHistoMCPi0DalitzWOEvtWeightPt
array of histos with unweighted pi0 Dalitz, pT
const char Option_t
Definition: External.C:48
TList * fEventCutArray
current number of merged cluster candidates
TH1F ** fHistoMCEtaInAccPt
array of histos with weighted pi0 in acceptance, pT
bool Bool_t
Definition: External.C:53
TH2F ** fHistoTruePrimaryPi01ElectronMCPtResolPt
array of histos with validated weighted primary pi0, MCpt, resol pt
TProfile ** fProfileJetJetXSection
array of profiles with eta shift
vector< Int_t > fVectorDoubleCountTrueEtas
vector containing labels of validated pi0
TH1F ** fHistoVertexZ
array of histos with number of good tracks (2010 Standard track cuts)
vector< Int_t > fVectorDoubleCountTruePi0s
array of histos with double counted etas, pT, M02
TH2F ** fHistoTruePrimaryPi0PureMergedMCPtResolPt
array of histos with validated eta, E, m02
TH2F ** fHistoClusNLMPt
array of histos with cluster, pt overlapping with other headers
TH2F ** fHistoTrueEtaPtY
array of histos with validated pi0, pt, Y
void FillMultipleCountMap(map< Int_t, Int_t > &ma, Int_t tobechecked)
TH2F ** fHistoTrueClusElectronEM02
array of histos with validated gamma, E, m02