AliPhysics  b555aef (b555aef)
AliAnalysisTaskOmegaToPiZeroGamma.h
Go to the documentation of this file.
1 #ifndef ALIANLYSISTASKOMEGATOPIZEROGAMMA_cxx
2 #define ALIANLYSISTASKOMEGATOPIZEROGAMMA_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 "THnSparse.h"
19 #include <vector>
20 #include <map>
21 
23  public:
24 
26  AliAnalysisTaskOmegaToPiZeroGamma(const char *name);
28 
29  virtual void UserCreateOutputObjects();
30  virtual Bool_t Notify();
31  virtual void UserExec(Option_t *);
32  virtual void Terminate(const Option_t*);
33  void InitBack();
34 
35  void SetV0ReaderName(TString name){fV0ReaderName=name; return;}
36  void SetIsHeavyIon(Int_t flag){
37  fIsHeavyIon = flag;
38  }
39 
40  // base functions for selecting photon and meson candidates in reconstructed data
41  void ProcessClusters();
44 
45  // MC functions
46  void SetIsMC ( Int_t isMC) { fIsMC = isMC ;}
47  void ProcessMCParticles ();
48  void ProcessAODMCParticles ();
49  void ProcessTruePhotonCandidates ( AliAODConversionPhoton* TruePhotonCandidate);
50  void ProcessTruePhotonCandidatesAOD ( AliAODConversionPhoton* TruePhotonCandidate);
51  void ProcessTrueClusterCandidates ( AliAODConversionPhoton* TruePhotonCandidate);
52  void ProcessTrueClusterCandidatesAOD( AliAODConversionPhoton* TruePhotonCandidate);
55  AliAODConversionPhoton *TrueGammaCandidate0,
56  AliAODConversionPhoton *TrueGammaCandidate1,
57  AliAODConversionPhoton *TrueGammaCandidate2);
59  AliAODConversionPhoton *TrueGammaCandidate0,
60  AliAODConversionPhoton *TrueGammaCandidate1,
61  AliAODConversionPhoton *TrueGammaCandidate2);
62 
63  // switches for additional analysis streams or outputs
64  void SetDoMesonQA ( Int_t flag ) { fDoMesonQA = flag ;}
65  void SetDoPhotonQA ( Int_t flag ) { fDoPhotonQA = flag ;}
66  void SetPlotHistsExtQA ( Bool_t flag ) { fSetPlotHistsExtQA = flag ;}
67 
68  // Setting the cut lists for the conversion photons
69  void SetEventCutList ( Int_t nCuts,
70  TList *CutArray) {
71  fnCuts = nCuts ;
72  fEventCutArray = CutArray ;
73  }
74 
75  // Setting the cut lists for the conversion photons
76  void SetConversionCutList ( Int_t nCuts,
77  TList *CutArray) {
78  fnCuts = nCuts ;
79  fCutArray = CutArray ;
80  }
81 
82  // Setting the cut lists for the calo photons
83  void SetCaloCutList ( Int_t nCuts,
84  TList *CutArray) {
85  fnCuts = nCuts ;
86  fClusterCutArray = CutArray ;
87  }
88 
89  // Setting cut lists for the neutral pion
91  TList *CutArray) {
92  fnCuts = nCuts ;
93  fNeutralPionCutArray = CutArray ;
94  }
95 
96  // Setting cut lists for the (omega) meson
97  void SetMesonCutList ( Int_t nCuts,
98  TList *CutArray) {
99  fnCuts = nCuts ;
100  fMesonCutArray = CutArray ;
101  }
102 
103  // BG HandlerSettings
104  void CalculateBackground ();
110  void UpdateEventByEventData ();
111 
112  // Additional functions for convenience
113  void SetLogBinningXTH2 ( TH2* histoRebin );
115  Int_t pdgCode );
116  Bool_t CheckVectorOnly ( vector<Int_t> &vec,
117  Int_t tobechecked );
118  Bool_t CheckVectorForDoubleCount ( vector<Int_t> &vec,
119  Int_t tobechecked );
120 
121  void FillMultipleCountMap ( map<Int_t,Int_t> &ma,
122  Int_t tobechecked );
124  Int_t> &ma,
125  TH1F* hist );
126 
127  // Function to enable MC label sorting
128  void SetEnableSortingOfMCClusLabels (Bool_t enableSort) { fEnableSortForClusMC = enableSort;}
129 
130  // set reconstruction method
131  void SetReconMethod (Int_t ReconMethod) { fReconMethod = ReconMethod;}
132 
133  // set flag for doing pi0-gamma angle cut
134  void SetDoPiZeroGammaAngleCut (Bool_t DoPiZeroGammaAngleCut){ fDoPiZeroGammaAngleCut = DoPiZeroGammaAngleCut;}
135 
136  // set scaling factors for pi0-gamma angle cut
137  void SetlowerFactor (Double_t lowerFactor){ flowerFactor = lowerFactor;}
138  void SetupperFactor (Double_t upperFactor){ fupperFactor = upperFactor;}
139 
140  protected:
141  AliV0ReaderV1* fV0Reader; // basic photon Selection Task
143  AliGammaConversionAODBGHandler** fBGHandler; // BG handler for Conversion
144  AliGammaConversionAODBGHandler** fBGClusHandler; // BG handler for Cluster
146  AliVEvent* fInputEvent; // current event
147  AliMCEvent* fMCEvent; // corresponding MC event
148  TList** fCutFolder; // Array of lists for containers belonging to cut
149  TList** fESDList; // Array of lists with histograms with reconstructed properties
150  TList** fTrueList; // Array of lists with histograms with MC validated reconstructed properties
151  TList** fMCList; // Array of lists with histograms with pure MC information
153  TList* fOutputContainer; // Output container
154  TClonesArray* fReaderGammas; // Array with conversion photons selected by V0Reader Cut
155  TList* fGammaCandidates; // current list of photon candidates
158  TList* fEventCutArray; // List with Event Cuts
159  AliConvEventCuts* fEventCuts; // EventCutObject
160  TList* fCutArray; // List with Conversion Cuts
161  AliConversionPhotonCuts* fConversionCuts; // ConversionCutObject
162  TList* fClusterCutArray; // List with Cluster Cuts
163  AliCaloPhotonCuts* fCaloPhotonCuts; // CaloPhotonCutObject
164  TList* fNeutralPionCutArray; // List with neutral pion cuts
165  TList* fMesonCutArray; // List with meson cuts
166 
167  //histograms for Conversions reconstructed quantities
171  // 0: garbage,
172  // 1: background
173  // 2: secondary photon not from eta or k0s,
174  // 3: secondary photon from eta,
175  // 4: secondary photon from k0s,
176  // 5: dalitz
177  // 6: primary gamma
178 
179  //histograms for mesons reconstructed quantities
198 
199  // BG histograms
202 
203  // histograms for rec photon clusters
206 
207  //histograms for pure MC quantities
213  TH1F** fHistoMCPi0Pt;
250 
251  // MC validated reconstructed quantities mesons
267 
268  vector<Int_t> fVectorRecTruePi0s;
271  map<Int_t,Int_t> fMapMultipleCountTruePi0s;
272  // event histograms
273  TH1F** fHistoNEvents;
278  TH1F** fHistoVertexZ;
284  TProfile** fProfileEtaShift;
287 
288  // additional variables
289  Double_t fEventPlaneAngle; // EventPlaneAngle
290  Int_t fNGammaCandidates; // number of gamma candidates in event
291  Double_t* fUnsmearedPx; //[fNGammaCandidates]
292  Double_t* fUnsmearedPy; //[fNGammaCandidates]
293  Double_t* fUnsmearedPz; //[fNGammaCandidates]
294  Double_t* fUnsmearedE; //[fNGammaCandidates]
295  Int_t* fMCEventPos; //[fNGammaCandidates]
296  Int_t* fMCEventNeg; //[fNGammaCandidates]
297  Int_t* fESDArrayPos; //[fNGammaCandidates]
298  Int_t* fESDArrayNeg; //[fNGammaCandidates]
299  Int_t fnCuts; // number of cuts to be analysed in parallel
300  Int_t fiCut; // current cut
301  Bool_t fMoveParticleAccordingToVertex; // boolean for BG calculation
302  Int_t fIsHeavyIon; // switch for pp = 0, PbPb = 1, pPb = 2
303  Int_t fDoMesonQA; // flag for meson QA
304  Int_t fDoPhotonQA; // flag for photon QA
305  Bool_t fIsFromMBHeader; // flag for MC headers
306  Bool_t fIsOverlappingWithOtherHeader; // flag for particles in MC overlapping between headers
307  Int_t fIsMC; // flag for MC information
308  Bool_t fSetPlotHistsExtQA; // flag for extended QA hists
309  Double_t fWeightJetJetMC; // weight for Jet-Jet MC
310  Bool_t fEnableSortForClusMC; // switch on sorting for MC labels in cluster
311  Int_t fReconMethod; // switch for combining photons: PCM-cal,cal = 0; PCM-cal,PCM = 1; cal-cal,cal = 2;
312  // cal-cal,PCM = 3; PCM-PCM,cal = 4; PCM-PCM,PCM = 5
313  Double_t flowerFactor; // factor maxfit is multiplied by to get lower limit for pi0-gamma angle cut
314  Double_t fupperFactor; // factor maxfit is multiplied by to get upper limit for pi0-gamma angle cut
315  Double_t fMinPi0Pt; // Min Pi0 Pt cut in GeV
316  TF1* fmaxfit; // function describing location of max. points in the distribution of pi0-gamma angle vs. pT
317 
318  Bool_t fDoPiZeroGammaAngleCut; // flag for pi0-gamma angle cut
319 
320  private:
321  AliAnalysisTaskOmegaToPiZeroGamma(const AliAnalysisTaskOmegaToPiZeroGamma&); // Prevent copy-construction
323 
324  ClassDef(AliAnalysisTaskOmegaToPiZeroGamma, 11);
325 };
326 
327 #endif
TH2F ** fHistoPhotonPairMatchedInvMassPt
array of histogram with signal + BG for same event photon pairs, inv Mass, pt
Double_t fEventPlaneAngle
array of histos with ntrials for jetjet
TH2F ** fHistoMotherYPt
array of histograms with invariant mass and Pt of omega candidates rejected by pi0-gamma angle cut ...
TH1F ** fHistoMCPi0Pt
array of histos with converted gamma, Eta
TH2F ** fHistoMCAllOmegaPiZeroAnglePt
array of histos with eta and phi of all true omegas in acceptance
TH2F ** fHistoPhotonPairAlphaPt
array of histograms with invariant mass cut of 0.05 && pi0cand->M() < 0.17, pt, Y ...
TH2F ** fHistoSamePi0DiffGammaBackInvMassPt
array of histograms with background generated by combining pi0&#39;s from the handler and photons from th...
TH2F ** fHistoMotherGammaAnglePt
array of histograms with angle between omega candidates and pi0 candidates
TH2F ** fHistoMCOmegaInvMassPt
array of histos with true omegas in acceptance, Inv Mass, pT
Int_t GetSourceClassification(Int_t daughter, Int_t pdgCode)
TH2F ** fHistoMCPi0FromAllOmegaAlphaPt
array of histos with pT, alpha of omegas in acceptance which decayed into pi0+gamma ...
TH2F ** fHistoTrueOmegaPtPi0Pt
array of histos with eta, phi of reconstructed true omegas
TH2F ** fHistoMCPi0PtY
array of histos without weight pi0 in acceptance, pT
double Double_t
Definition: External.C:58
TH2F ** fHistoMotherAlphaPt
array of histograms for Y of omega candidates
TH2F ** fHistoMotherInvMassPt
array of histograms with invariant mass cut of 0.05 && pi0cand->M() < 0.17 ,eta/phi of conversion pho...
Definition: External.C:236
AliGammaConversionAODBGHandler ** fBGClusHandler
TH2F ** fHistoMCPi0FromOmegaInAccYPt
array of histos with pT, Y of pi0s from all true omegas
TH2F ** fHistoMCOmegaInAccInvMassPt
array of histos with pT & Inv Mass of pi0s which are daughters of omegas
void SetEventCutList(Int_t nCuts, TList *CutArray)
TH2F ** fHistoDiffPi0SameGammaBackInvMassPt
array of histograms with pT of gammas from omega candidates
TH1F ** fHistoMCOmegaDecayChannels
array of histos with no. of events containing the minimum number of EMCal/PCM photons for each recons...
vector< Int_t > fVectorDoubleCountTruePi0s
array of strings containing the stack position of the reconstructed validated pi0 ...
TH1F ** fHistoNClusterCandidates
array of histos with number of gamma candidates per event
TH2F ** fHistoMCOmegaInAccEtaPhi
array of histos with eta and phi of all true omegas
void ProcessTruePhotonCandidatesAOD(AliAODConversionPhoton *TruePhotonCandidate)
TH1F ** fHistoMCPi0WOWeightPt
array of histos with weighted pi0, pT
map< Int_t, Int_t > fMapMultipleCountTruePi0s
array of histos how often TruePi0s are counted
TList * fOutputContainer
Array of lists of output histograms for cluster photons.
TH1F ** fHistoMCPi0InAccPt
array of histos without event weights pi0, pT
TH2F ** fHistoMCAllPiZeroGammaAnglePt
array of histos with angle between true omega and pi0 daughter and pT of omega
TH1F ** fHistoMCPi0WOEvtWeightPt
array of histos with unweighted pi0, pT
TH2F ** fHistoMCInAccOmegaPtGammaPt
array of histos with pT of all omegas and those of their gamma daughters
TH1F ** fHistoNEvents
map containing pi0 labels that are counted at least twice
TH2F ** fHistoMCPi0PtJetPt
array of histos with weighted pi0, pT, alpha
TH1F ** fHistoNEventsMinGamma
array of histos with event information
vector< Int_t > fVectorRecTruePi0s
array of histos with pT of photons from validated omegas
TH1F ** fHistoMCPi0WOWeightInAccPt
array of histos with weighted pi0 in acceptance, pT
TH2F ** fHistoMCAllOmegaPtGammaPt
array of histos with pT of omegas in acceptance and that of their pi0 daughters
TH1F ** fHistoMCGammaFromAllOmegaPt
array of histos with weighted pi0, pT, hardest jet pt
TH2F ** fHistoTrueOmegaYPt
array of histos with reconstructed true omegas, invMass, pT
TH2F ** fHistoPhotonPairYPt
array of histogram with signal + BG for same event photon pairs, inv Mass, pt
Bool_t CheckVectorOnly(vector< Int_t > &vec, Int_t tobechecked)
TH1F ** fHistoJetJetNTrials
array of profiles with xsection for jetjet
void SetCaloCutList(Int_t nCuts, TList *CutArray)
TH1F ** fHistoMCAllGammaEMCALAccPt
array of histos with all gamma, pT
TH1F ** fHistoConvGammaR
histogram conversion photon pT
TH2F ** fHistoMotherMatchedInvMassPt
array of histograms for invariant mass of omega candidates
TH2F ** fHistoMCAllOmegaEtaPhi
array of histos with eta and phi of pi0s from omegas in acceptance
TList * fPi0Candidates
current list of cluster candidates
void ProcessTrueClusterCandidatesAOD(AliAODConversionPhoton *TruePhotonCandidate)
TH2F ** fHistoTrueOmegaPi0AnglePt
array of histos with pT, opening angle of pi0s fro reconstructed true omegas
TH2F ** fHistoMCPi0FromOmegaInAccAlphaPt
array of histos with pT, alpha of pi0s which are daughters of omegas
void SetNeutralPionCutList(Int_t nCuts, TList *CutArray)
AliGammaConversionAODBGHandler ** fBGPi0Handler
TH2F ** fHistoPhotonPairOpenAnglePt
array of histograms with invariant mass cut of 0.05 && pi0cand->M() < 0.17, pt, alpha ...
TH2F ** fHistoMotherConvPhotonEtaPhi
array of histograms with Eta, Phi of pi0 candidates
int Int_t
Definition: External.C:63
TH1F ** fHistoNGoodESDTracks
array of histos with event information without event weights
Class handling all kinds of selection cuts for Gamma Calo analysis.
void SetConversionCutList(Int_t nCuts, TList *CutArray)
void MoveParticleAccordingToVertex(AliAODConversionPhoton *particle, const AliGammaConversionAODBGHandler::GammaConversionVertex *vertex)
TH2F ** fHistoTrueOmegaInvMassPt
array of histos with pT of omegas in acceptance and those of their gamma daughters ...
TH1F ** fHistoMCAllGammaPt
array of histos with cluster, pt overlapping with other headers
TH2F ** fHistoTruePi0FromOmegaEtaPhi
array of histos with pT, alpha of pi0s from reconstructed true omegas
TH2F ** fHistoMCPi0PtAlpha
array of histos with weighted pi0, pT, Y
TH2F ** fHistoSPDClusterTrackletBackground
array of histos with number of good tracks vs gamma candidates
TH2F ** fHistoPi0GammaAnglePt
array of histograms with angle between omega candidates and combined gammas
TH2F ** fHistoMCPi0FromOmegaInAccEtaPhi
array of histos with eta and phi of pi0s from all true omegas
TH1F ** fHistoNEventsWOWeight
array of histos with no. of true omegas in each decay channel
Bool_t CheckVectorForDoubleCount(vector< Int_t > &vec, Int_t tobechecked)
TH2F ** fHistoPhotonPairInvMassPt
histogram conversion photon Eta
TH2F ** fHistoMCPi0FromOmegaInAccInvMassPt
array of histos with pT, Y of pi0s from omegas in acceptance
void ProcessTrueMesonCandidatesAOD(AliAODConversionMother *OmegaCandidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1, AliAODConversionPhoton *TrueGammaCandidate2)
TH1F ** fHistoGammaFromMotherPt
array of histograms with angle between pi0 candidates and combined gammas
TH1F ** fHistoMCConvGammaR
array of histos with converted gamma, pT
AliGammaConversionAODBGHandler ** fBGHandler
TH1F ** fHistoNV0Tracks
array of histos with SPD tracklets vs SPD clusters for background rejection
Class handling all kinds of selection cuts for Gamma Conversion analysis.
TH2F ** fHistoTruePi0FromOmegaAlphaPt
array of histos with reconstructed true pi0s which are decay products of true omegas, invMass, pT
Int_t mode
Definition: anaM.C:41
TH2F ** fHistoTrueOmegaPtGammaPt
array of histos with pT of validated omegas against pT of pi0s from validated omegas ...
void SetDoPiZeroGammaAngleCut(Bool_t DoPiZeroGammaAngleCut)
TH1F ** fHistoVertexZ
array of histos with number of good tracks (2010 Standard track cuts)
TProfile ** fProfileJetJetXSection
array of profiles with eta shift
void SetMesonCutList(Int_t nCuts, TList *CutArray)
TH2F ** fHistoMCAllOmegaInvMassPt
array of histos with angle between true omega in acc. and gamma daughter
TH2F ** fHistoMCOmegaInAccAlphaPt
array of histos with pT, alpha of omegas which decayed into pi0+gamma
TH2F ** fHistoTruePi0FromOmegaYPt
array of histos with pT, Alpha of reconstructed true omegas
TH2F ** fHistoMotherEtaPhi
array of histograms with pT, Alpha of omega candidates
TH2F ** fHistoMCPi0FromAllOmegaEtaPhi
array of histos with Inv Mass, pT of pi0s from omegas in acceptance
void FillMultipleCountMap(map< Int_t, Int_t > &ma, Int_t tobechecked)
Bool_t isMC
TH2F ** fHistoPhotonPairEtaPhi
array of histograms with invariant mass cut of 0.05 && pi0cand->M() < 0.17, pt, openAngle ...
TH1F ** fHistoConvGammaEta
histogram conversion photon R
AliAnalysisTaskOmegaToPiZeroGamma & operator=(const AliAnalysisTaskOmegaToPiZeroGamma &)
void ProcessTruePhotonCandidates(AliAODConversionPhoton *TruePhotonCandidate)
TProfile ** fProfileEtaShift
array of histos with V0 counts
Definition: External.C:220
TH2F ** fHistoMCInAccOmegaPtPi0Pt
array of histos with pT of all omegas and that of their pi0 daughters
TH2F ** fHistoMCAllOmegaAlphaPt
array of histos with pT, Y of true omegas in acceptance
TH2F ** fHistoMCInAccOmegaGammaAnglePt
array of histos with angle between pi0 and gamma daughters of true omega in acc.
TH1F ** fHistoMCGammaFromOmegaInAccPt
array of histos with pT of photons which are decay products of omegas
void FillMultipleCountHistoAndClear(map< Int_t, Int_t > &ma, TH1F *hist)
TH2F ** fHistoTrueOmegaEtaPhi
array of histos with pT, angle between pi0 and gamma from reconstructed true omegas ...
TH1F ** fHistoMCConvGammaEta
array of histos with converted gamma, R
TH2F ** fHistoMCOmegaInAccYPt
array of histos with pT, Y of all true omegas
TH2F ** fHistoTrueOmegaGammaAnglePt
array of histos with pT, angle between reconstructed true omegas and pi0 daughters ...
TH2F ** fHistoMCPi0FromAllOmegaYPt
array of histos with pT, alpha of pi0s which are daughters of omegas in acceptance ...
TH1F ** fHistoClusGammaPt
array of histograms with background generated by combining pi0&#39;s from the current event and photons f...
void ProcessTrueClusterCandidates(AliAODConversionPhoton *TruePhotonCandidate)
Class handling all kinds of selection cuts for Gamma Conversion analysis.
const char Option_t
Definition: External.C:48
TList * fEventCutArray
current list of pi0 candidates
TH2F ** fHistoMotherPi0AnglePt
array of histograms with Eta and Phi of omega candidates
TH2F ** fHistoNGoodESDTracksVsNGammaCandidates
array of histos with number of cluster candidates per event
TH1F ** fHistoMultipleCountTruePi0
vector containing labels of validated pi0
TH2F ** fHistoMCPi0FromAllOmegaInvMassPt
array of histos with pT of photons from omegas in acceptance
bool Bool_t
Definition: External.C:53
TH1F ** fHistoClusOverlapHeadersGammaPt
array of histos with cluster, pt
TH2F ** fHistoTruePi0FromOmegaInvMassPt
array of histos with pT, Y of pi0s from reconstructed true omegas
TH2F ** fHistoMCInAccOmegaPiZeroAnglePt
array of histos with angle between true omega and gamma daughter and pT of omega
TH2F ** fHistoMCAllOmegaYPt
array of histos with pT of true omegas within rapidity window, for acceptance correction ...
void ProcessTrueMesonCandidates(AliAODConversionMother *OmegaCandidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1, AliAODConversionPhoton *TrueGammaCandidate2)
TH2F ** fHistoTruePi0FromOmegaOpenAnglePt
array of histos with eta, phi of pi0s from reconstructed true omegas
TH1F ** fHistoMCConvGammaPt
array of histos with all gamma in EMCAL acceptance, pT
TH2F ** fHistoTruePi0GammaAnglePt
array of histos with pT, angle between reconstructed true omegas and gamma daughters ...
TH1F ** fHistoTrueGammaFromOmegaPt
array of histos with pT of validated omegas against pT of gammas from validated omegas ...
TH2F ** fHistoMCAllOmegaGammaAnglePt
array of histos with angle between pi0 and gamma daughters of true omega and pT of omega ...
TH2F ** fHistoMCAllOmegaPtPi0Pt
array of histos with all true omegas, invMass, pT
TH1F ** fHistoNGammaCandidates
array of histos with vertex z distribution for selected events
TH2F ** fHistoMCInAccPiZeroGammaAnglePt
array of histos with angle between true omega in acc. and pi0 daughter
TH2F ** fHistoTrueOmegaAlphaPt
array of histos with pT, Y of reconstructed true omegas