AliPhysics  4646b6b (4646b6b)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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  // base functions for selecting photon and meson candidates in reconstructed data
40  void ProcessClusters();
41 
42  // MC functions
43  void SetIsMC(Int_t isMC) { fIsMC = isMC ; }
44  void SetSelectedMesonID(Int_t anaMeson) { fSelectedMesonID = anaMeson ; }
45 
46  void ProcessMCParticles();
47  void ProcessAODMCParticles();
48  // determine source according to pdg code of mother
49  Int_t GetSourceClassification(Int_t daughter, Int_t pdgCode);
50 
51  void ProcessTrueClusterCandidates( AliAODConversionPhoton* TruePhotonCandidate, Float_t m02, AliAODConversionPhoton *TrueSubClusterCandidate1,
52  AliAODConversionPhoton *TrueSubClusterCandidate2);
53  void ProcessTrueClusterCandidatesAOD( AliAODConversionPhoton* TruePhotonCandidate, Float_t m02, AliAODConversionPhoton *TrueSubClusterCandidate1,
54  AliAODConversionPhoton *TrueSubClusterCandidate2);
55 // // void ProcessTrueMesonCandidates( AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1);
56 
57  // switches for additional analysis streams or outputs
58  void SetLightOutput( Bool_t flag ) { fDoLightOutput = flag;}
59  void SetDoMesonQA(Int_t flag) { fDoMesonQA = flag ; }
60  void SetDoClusterQA(Int_t flag) { fDoClusterQA = flag ; }
62 
63  // Setting the cut lists for the conversion photons
64  void SetEventCutList(Int_t nCuts, TList *CutArray) {
65  fnCuts = nCuts ;
66  fEventCutArray = CutArray ;
67  }
68 
69  // Setting the cut lists for the calo photons
70  void SetCaloCutList(Int_t nCuts, TList *CutArray) {
71  fnCuts = nCuts ;
72  fClusterCutArray = CutArray ;
73  }
74 
75  // Setting the cut lists for the calo photons
76  void SetCaloMergedCutList(Int_t nCuts, TList *CutArray){
77  fnCuts = nCuts ;
78  fClusterMergedCutArray = CutArray ;
79  }
80 
81  // Setting the cut lists for the meson
82  void SetMesonCutList(Int_t nCuts, TList *CutArray) {
83  fnCuts = nCuts ;
84  fMesonCutArray = CutArray ;
85  }
86 
88 
89  // Additional functions for convenience
90  void SetLogBinningXTH2(TH2* histoRebin);
91 
92  Bool_t CheckVectorForDoubleCount(vector<Int_t> &vec, Int_t tobechecked);
93  void FillMultipleCountMap(map<Int_t,Int_t> &ma, Int_t tobechecked);
94  void FillMultipleCountHistoAndClear(map<Int_t,Int_t> &ma, TH1F* hist);
95 
96  // Function to enable detailed printouts
98 
99  // Function to enable MC label sorting
100  void SetEnableSortingOfMCClusLabels(Bool_t enableSort) { fEnableSortForClusMC = enableSort ; }
101 
102  // FUnction to enable very detailed M02 distribution
103  void SetEnableDetailedM02Distribtuon(Bool_t enableDetM02) { fDoDetailedM02 = enableDetM02 ; }
104 
105  protected:
106  AliV0ReaderV1* fV0Reader; // basic photon Selection Task
108  Bool_t fDoLightOutput; // switch for running light output, kFALSE -> normal mode, kTRUE -> light mode
109  AliVEvent* fInputEvent; // current event
110  AliMCEvent* fMCEvent; // corresponding MC event
111  TList** fCutFolder; // Array of lists for containers belonging to cut
112  TList** fESDList; // Array of lists with histograms with reconstructed properties
113  TList** fTrueList; // Array of lists with histograms with MC validated reconstructed properties
114  TList** fMCList; // Array of lists with histograms with pure MC information
115  TList** fHeaderNameList; // Array of lists with header names for MC header selection
116  TList* fOutputContainer; // Output container
119  TList* fEventCutArray; // List with Event Cuts
120  AliConvEventCuts* fEventCuts; // EventCutObject
121  TList* fClusterCutArray; // List with Cluster Cuts
122  TList* fClusterMergedCutArray; // List with Cluster Cuts for merged clusters
123  TList* fMesonCutArray; // List with Meson Cuts
124  AliConversionMesonCuts* fMesonCuts; // MesonCutObject
125 
126  //histograms for mesons reconstructed quantities
130 
131  // histograms for rec photon clusters/pi0 candidate
145 
146  //histograms for pure MC quantities
148  TH1F** fHistoMCPi0Pt;
151  TH1F** fHistoMCEtaPt;
168 
177 
178  // MC validated cluster histos
198 
215 
216  // MC validated reconstructed quantities mesons
225 
232 
233  // MC validated reconstructed quantities photons
239 
240  // event histograms
241  TH1F** fHistoNEvents;
244  TH1F** fHistoVertexZ;
250  TProfile** fProfileEtaShift;
253 
254  // additional variables
255  TRandom3 fRandom; // random
256  Int_t fnCuts; // number of cuts to be analysed in parallel
257  Int_t fiCut; // current cut
258  Int_t fIsHeavyIon; // switch for pp = 0, PbPb = 1, pPb = 2
259  Int_t fDoMesonQA; // flag for meson QA
260  Int_t fDoClusterQA; // flag for cluster QA
261  Bool_t fIsFromMBHeader; // flag for MC headers
262  Bool_t fIsOverlappingWithOtherHeader; // flag for particles in MC overlapping between headers
263  Int_t fIsMC; // flag for MC information
264  Bool_t fSetPlotHistsExtQA; // flag for extended QA hists
265  Double_t fWeightJetJetMC; // weight for Jet-Jet MC
266  Int_t fSelectedMesonID; // switch for meson analysis
267  Bool_t fEnableDetailedPrintOut; // switch on detailed print outs
268  Bool_t fEnableSortForClusMC; // switch on sorting for MC labels in cluster
269  TTree* tBrokenFiles; // tree for keeping track of broken files
270  TObjString* fFileNameBroken; // string object for broken file name
271  Bool_t fDoDetailedM02; // detailed M02 distribution
272 
273  private:
274  AliAnalysisTaskGammaCaloMerged(const AliAnalysisTaskGammaCaloMerged&); // Prevent copy-construction
276 
277  ClassDef(AliAnalysisTaskGammaCaloMerged, 25);
278 };
279 
280 #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