AliPhysics  2c6b7ad (2c6b7ad)
AliAnalysisTaskNeutralMesonToPiPlPiMiNeutralMeson.h
Go to the documentation of this file.
1 
2 #ifndef AliAnalysisTaskNeutralMesonToPiPlPiMiNeutralMeson_H
3 #define AliAnalysisTaskNeutralMesonToPiPlPiMiNeutralMeson_H
4 
5 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6  * See cxx source for full Copyright notice */
7 
8 
9 #include "AliAnalysisTaskSE.h"
10 #include "AliV0ReaderV1.h"
11 #include "AliKFConversionPhoton.h"
12 #include "AliPrimaryPionSelector.h"
13 #include "AliConversionMesonCuts.h"
14 #include "AliConvEventCuts.h"
15 #include "AliCaloPhotonCuts.h"
17 #include "TProfile2D.h"
18 #include <vector>
19 
20 class AliESDInputHandler;
21 class AliMCEventHandler;
22 class AliESDEvent;
23 class AliESDtrack;
24 class AliESDtrackCuts;
25 class AliESDpidCuts;
26 class AliTriggerAnalysis;
27 
29 {
30  public:
31 
35 
36  virtual void UserExec(Option_t *);
37  virtual void UserCreateOutputObjects();
38  virtual Bool_t Notify();
39  virtual void Terminate(const Option_t *);
40 
41  void SetV0ReaderName(TString name){fV0ReaderName=name; return;}
42 
44  void SetIsHeavyIon(Int_t flag){
45  if (flag == 1 || flag ==2 ){
46  fIsHeavyIon = 1;
47  } else {
48  fIsHeavyIon = 0;
49  }
50  }
51 
53  void SetLightOutput(Bool_t flag){fDoLightOutput = flag;}
54  void SetEventCutList(Int_t nCuts, TList *CutArray){
55  fnCuts= nCuts;
56  fEventCutArray = CutArray;
57  }
58  void SetConversionCutList(TList *CutArray){ fGammaCutArray = CutArray;}
59  void SetClusterCutList(TList *CutArray){ fClusterCutArray = CutArray;}
60  void SetPionCutList(TList *CutArray){ fPionCutArray = CutArray;}
62  void SetMesonCutList(TList *CutArray){ fMesonCutArray = CutArray; }
63  void SetDoMesonQA(Int_t flag){ fDoMesonQA = flag; }
67 
68  private:
69 
70  void InitBack();
71 
72  // routines for photon selection from conversions
75 
76  // routines for photon selection from clusters
79 
80  void ProcessTrueMesonCandidates(AliAODConversionMother *Pi0Candidate, AliAODConversionMother *TrueNeutralPionCandidate, AliAODConversionPhoton *TrueVirtualGammaCandidate);
82 
84 
85  // routines for neutral pion candidates from pure conversion
89 
90  // routines for neutral pion candidates from pure calo
92  void ProcessTrueNeutralPionCandidatesPureCalo(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1);
93 
94  // routines for neutral pion candidates from mixed conv + calo
96  void ProcessTrueNeutralPionCandidatesMixedConvCalo( AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1);
97 
98  void ProcessPionCandidates();
99  void ProcessMCParticles();
101  void CalculateBackground();
102  void UpdateEventByEventData();
103 
104  Bool_t IsPiPlPiMiPiZeroDecay(TParticle *fMCMother) const;
105  Bool_t IsPiPlPiMiEtaDecay(TParticle *fMCMother) const;
109  Bool_t IsD0PiPlPiMiPiZeroDaughter( Int_t label ) const;
111 
112  Bool_t CheckVectorForDoubleCount(vector<Int_t> &vec, Int_t tobechecked);
113 
115 
116 
117  AliV0ReaderV1* fV0Reader; // V0Reader for basic conversion photon selection
119  AliPrimaryPionSelector* fPionSelector; // primary charged pion selector, basic selection of pi+,pi-
122  AliESDEvent* fESDEvent; // current event
123  AliMCEvent* fMCEvent; // current MC event
124  TList** fCutFolder; // list of output folders with main cut name
125  TList** fESDList; // list with main output histograms for data
126  TList** fTrueList; // list with validated reconstructed MC histograms
127  TList** fTrueTreeList; // list containing TTree's for MC True
128  TList** fMCList; // list with pure MC histograms
129  TList* fOutputContainer; // output container
130  TClonesArray* fReaderGammas; // array with photon from fV0Reader
131  vector<Int_t> fSelectorNegPionIndex; // array with pion indices for negative pions from fPionSelector
132  vector<Int_t> fSelectorPosPionIndex; // array with pion indices for positive pions from fPionSelector
133  TList* fGoodConvGammas; // good conv gammas after selection
135  TList* fNeutralDecayParticleCandidates; // good neutral pion candidates
136  TList* fNeutralDecayParticleSidebandCandidates; // good neutral pion candidates from sideband
137  TList* fPosPionCandidates; // good positive pion candidates
138  TList* fNegPionCandidates; // good negative pion candidates
139  TList* fGoodVirtualParticles; // combination of pi+pi- candidates
140  TList* fEventCutArray; // array with event cuts
141  TList* fGammaCutArray; // array with Conversion Cuts
142  TList* fClusterCutArray; // array with Cluster Cuts
143  TList* fPionCutArray; // array with charged pion cuts
144  TList* fNeutralDecayMesonCutArray; // array with neutral pion cuts
145  TList* fMesonCutArray; // array with neutral meson cuts
146  AliConvEventCuts* fEventCuts; // current event cuts
147  AliConversionPhotonCuts* fConversionCuts; // current conversion cuts
148  AliCaloPhotonCuts* fClusterCuts; // current cluster cuts
149 
150  // TTrees
151  TTree** fTreePiPiSameMother; // Tree containing info about the mother of two pions who have the same mother,
152  // if ID isn't covered by current implementations
153  TTree** fTreePiPiPiSameMother; // Tree containing info about the mother of three pions who have the same mother,
154  TTree** fTreeEventInfoHNM; // Tree containing information about an event where eta->pi+pi-pi0 was found
155  // if ID isn't covered by current implementations
156  Short_t fCasePiPi; // 0:PiPlPiMi 1:PiMiPiZero 1:PiPlPiZero
157  Float_t fSamePiPiMotherID; // ID of mother of two pions
158  Float_t fSamePiPiMotherInvMass; // Invariant mass of mother of two pions
159  Float_t fSamePiPiMotherPt; // pT of mother of two pions
160  Float_t fSamePiPiPiMotherID; // ID of mother of two pions
161  Float_t fSamePiPiPiMotherInvMass; // Invariant mass of mother of two pions
162  Float_t fSamePiPiPiMotherPt; // pT of mother of two pions
163  Float_t fV0MultiplicityHNMEvent; // V0 multiplicity of an event where a true Eta was found
164  Float_t fTrackMultiplicityHNMEvent; // track multiplicity of an event where a true Eta was found
165  Float_t fZVertexHNMEvent; // z position of primary vertex of an event where a true Eta was found
166  Float_t fPtHNM; // pT of a true Eta
167  Float_t fPDGMassNDM; // PDG mass of either pi0 or eta
168  Int_t fPDGCodeNDM; // PDG code of either pi0 or eta
169  Int_t fPDGCodeAnalyzedMeson; // PDG code of the analyzed heavy netural meson
170  // reconstructed particles
171  TH1F** fHistoConvGammaPt; // array of histos of conversion photon, pt
172  TH1F** fHistoConvGammaEta; // array of histos of conversion photon, eta
173  TH1F** fHistoClusterGammaPt; // array of histos of Cluster photon, pt
174  TH1F** fHistoClusterGammaEta; // array of histos of Cluster photon, eta
175  TH1F** fHistoNegPionPt; // array of histos of negative pion, pt
176  TH1F** fHistoPosPionPt; // array of histos of positive pion, pt
177  TH1F** fHistoNegPionPhi; // array of histos of negative pion, phi
178  TH1F** fHistoPosPionPhi; // array of histos of positive pion, phi
179  TH1F** fHistoNegPionEta; // array of histos of negative pion, eta
180  TH1F** fHistoPosPionEta; // array of histos of positive pion, eta
181  TH2F** fHistoNegPionClsTPC; // array of histos of negative pion, findable tpc cluster, pT
182  TH2F** fHistoPosPionClsTPC; // array of histos of positive pion, findable tpc cluster, pT
183  TH2F** fHistoPionDCAxy; // array of histos of pion, dca_xy, pT
184  TH2F** fHistoPionDCAz; // array of histos of pion, dca_z, pT
185  TH2F** fHistoPionTPCdEdxNSigma; // array of histos of pion, p, TPC nSigma dEdx pion
186  TH2F** fHistoPionTPCdEdx; // array of histos of pion, p, TPC dEdx
187  TH2F** fHistoPionPionInvMassPt; // array of histos of pion pion, invMass, pT_{pi+pi-}
188  TH2F** fHistoGammaGammaInvMassPt; // array of histos of gamma-gamma, invMass, pT_{gamma gamma}
189  TH2F** fHistoGammaGammaInvMassPtBeforeCuts; // array of histos of gamma-gamma, invMass, pT_{gamma gamma}
190  TH2F** fHistoMotherInvMassPt; // array of histos of pi+pi-pi0 same event, invMass, pT_{pi+pi-pi0}
191  TH2F** fHistoMotherInvMassPtRejectedKinematic; // array of histos of rejected pi+pi-pi0 same event, invMass, pT_{pi+pi-pi0}
192  TH2F** fHistoBackInvMassPtGroup1; // Event mixing background group 1 (pi+ and pi- from same event)
193  TH2F** fHistoBackInvMassPtGroup2; // Event mixing background group 2 (pi+ and pi0 from same event)
194  TH2F** fHistoBackInvMassPtGroup3; // Event mixing background group 3 (pi- and pi0 from same event)
195  TH2F** fHistoBackInvMassPtGroup4; // Event mixing background group 4 (no pion from same event)
196  TH2F** fHistoMotherLikeSignBackInvMassPt; // array of histos of pi+pi+pi0 likesign mixed event, invMass, pT_{pi+pi-pi0}
197 
198  // angle distributions
199  TH2F** fHistoAngleHNMesonPiPlPiMi; // angle between combined Pi+ and Pi- and omega
200  TH2F** fHistoAngleHNMesonNDM; // angle between Pi0 and omega
201  TH2F** fHistoAngleHNMesonPiPl; // angle between Pi+ and omega
202  TH2F** fHistoAngleHNMesonPiMi; // angle between Pi- and omega
203  TH2F** fHistoAnglePiPlPiMi; // angle between Pi+ and Pi-
204  TH2F** fHistoAngleNDMPiMi; // angle between Pi0 and Pi-
205  TH2F** fHistoAnglePiPlNDM; // angle between Pi+ and Pi0
206  TH2F** fHistoAngleSum; // angle between omega and Pi0 + angle between Pi+ and Pi- + angle between Pi0 and Pi-
208 
209  TH2F** fHistoMotherInvMassSubNDM; // invariant mass of (pi+,pi-,pi0) - invariant mass of pi0
210  TH2F** fHistoBackInvMassPtGroup1SubNDM; // background group 1, invMass-invMass(pi0), pT_{pi+pi-pi0} (pi+ and pi- from same event)
211  TH2F** fHistoBackInvMassPtGroup2SubNDM; // background group 2, invMass-invMass(pi0), pT_{pi+pi-pi0} (pi+ and pi0 from same event)
212  TH2F** fHistoBackInvMassPtGroup3SubNDM; // background group 3, invMass-invMass(pi0), pT_{pi+pi-pi0} (pi+ and pi0 from same event)
213  TH2F** fHistoBackInvMassPtGroup4SubNDM; // background group 4, invMass-invMass(pi0), pT_{pi+pi-pi0} (no pion from same event)
214  TH2F** fHistoMotherLikeSignBackInvMassSubNDMPt; // array of histos of pi+pi+pi0 likesign mixed event, invMass-invMass(pi0), pT_{pi+pi-pi0}
215 
216  TH2F** fHistoMotherInvMassFixedPzNDM; // invariant mass of (pi+,pi-,pi0) - invariant mass of pi0
217  TH2F** fHistoBackInvMassPtGroup1FixedPzNDM; // background group 1 mixed event, invMass, pT_{pi+pi-pi0}, the Pz of the pi0 was fixed such that
218  // its invMass matches the PDG value
219  TH2F** fHistoBackInvMassPtGroup2FixedPzNDM; // background group 2 mixed event, invMass, pT_{pi+pi-pi0}, the Pz of the pi0 was fixed such that
220  // its invMass matches the PDG value
221  TH2F** fHistoBackInvMassPtGroup3FixedPzNDM; // background group 3 mixed event, invMass, pT_{pi+pi-pi0}, the Pz of the pi0 was fixed such that
222  // its invMass matches the PDG value
223  TH2F** fHistoBackInvMassPtGroup4FixedPzNDM; // background group 4 mixed event, invMass, pT_{pi+pi-pi0}, the Pz of the pi0 was fixed such that
224  // its invMass matches the PDG value
225  TH2F** fHistoMotherLikeSignBackInvMassFixedPzNDMPt; // array of histos of pi+pi+pi0 likesign mixed event, invMass, pT_{pi+pi+pi0}, the Pz of the pi0 was fixed such that
226  // its invMass matches the PDG value
227  // pure MC properties
228  TH1F** fHistoMCAllGammaPt; // array of histos of all produced gammas in the specified y range
229  TH1F** fHistoMCConvGammaPt; // array of histos of all converted gammas in the specified y range
230  TH1F** fHistoMCAllPosPionsPt; // array of histos with all produced primary positive pions in the specified y range
231  TH1F** fHistoMCAllNegPionsPt; // array of histos with all produced primary negative pions in the specified y range
232  TH1F** fHistoMCGammaFromNeutralMesonPt; // array of histos of all produced gammas from omega or eta via pi+pi-pi0 in the specified y range/
233  TH1F** fHistoMCPosPionsFromNeutralMesonPt; // array of histos of all produced positive pions from omega or eta via pi+pi-pi0 in the specified y range/
234  TH1F** fHistoMCNegPionsFromNeutralMesonPt; // array of histos of all produced negative pions from omega or eta via pi+pi-pi0 in the specified y range/
235  TH1F** fHistoMCHNMPiPlPiMiNDMPt; // array of histos of produced etas via pi+pi-pi0 in the specified y range
236  TH1F** fHistoMCHNMPiPlPiMiNDMInAccPt; // array of histos of produced etas via pi+pi-pi0 in the specified y range,
237  // with decay products in respective y, eta ranges
238 
239  // reconstructed particles MC validated
240  TH2F** fHistoTrueMotherPiPlPiMiNDMInvMassPt; // histos with reconstructed validated eta or omega, inv mass, pT
241  TH2F** fHistoTrueMotherHNMPiPlPiMiNDMInvMassPt; // histos with reconstructed validated eta, inv mass, pT
242  TH2F** fHistoTrueMotherGammaGammaInvMassPt; // histos with reconstructed validated pi0, inv mass, pT
243  TH2F** fHistoTrueMotherGammaGammaFromHNMInvMassPt; // histos with reconstructed validated pi0, inv mass, pT
244  TH1F** fHistoTrueConvGammaPt; // histos with reconstructed validated conv gamma, pT
245  TH1F** fHistoTrueConvGammaFromNeutralMesonPt; // histos with reconstructed validated conv gamma from eta or omega via pi0, pT
246  TH1F** fHistoTrueClusterGammaPt; // histos with reconstructed validated cluster gamma, pT
247  TH1F** fHistoTrueClusterGammaFromNeutralMesonPt; // histos with reconstructed validated cluster gamma from eta or omega via pi0, pT
248  TH1F** fHistoTruePosPionPt; // histos with reconstructed validated positive pion, pT
249  TH1F** fHistoTruePosPionFromNeutralMesonPt; // histos with reconstructed validated positive pion from eta or omega, pT
250  TH1F** fHistoTrueNegPionPt; // histos with reconstructed validated negative pion, pT
251  TH1F** fHistoTrueNegPionFromNeutralMesonPt; // histos with reconstructed validated negative pion from eta or omega, pT
252  TH2F** fHistoTruePionPionInvMassPt; // histos with reconstructed validated two pion, invariant mass, pT
253  TH2F** fHistoTruePionPionFromSameMotherInvMassPt; // histos with reconstructed validated two pion from same mother, invariant mass, pT
254  TH2F** fHistoTruePionPionFromHNMInvMassPt; // histos with reconstructed validated two pion from eta , invariant mass, pT
255 
256  TH2F** fHistoTruePiPlPiMiSameMotherFromEtaInvMassPt; // histos with reconstructed validated pi+ pi- from omega, invariant mass, pT
257  TH2F** fHistoTruePiPlPiMiSameMotherFromOmegaInvMassPt; // histos with reconstructed validated pi+ pi- from eta, invariant mass, pT
258  TH2F** fHistoTruePiPlPiMiSameMotherFromRhoInvMassPt; // histos with reconstructed validated pi+ pi- from rho0, invariant mass, pT
259  TH2F** fHistoTruePiPlPiMiSameMotherFromEtaPrimeInvMassPt; // histos with reconstructed validated pi+ pi- from etaprime, invariant mass, pT
260  TH2F** fHistoTruePiPlPiMiSameMotherFromK0sInvMassPt; // histos with reconstructed validated pi+ pi- from K0s, invariant mass, pT
261  TH2F** fHistoTruePiPlPiMiSameMotherFromK0lInvMassPt; // histos with reconstructed validated pi+ pi- from K0s, invariant mass, pT
262 
263  TH2F** fHistoTruePiMiPiZeroSameMotherFromEtaInvMassPt; // histos with reconstructed validated pi0 pi- from omega, invariant mass, pT
264  TH2F** fHistoTruePiMiPiZeroSameMotherFromOmegaInvMassPt; // histos with reconstructed validated pi0 pi- from eta, invariant mass, pT
265  TH2F** fHistoTruePiMiPiZeroSameMotherFromRhoInvMassPt; // histos with reconstructed validated pi0 pi- from rho0, invariant mass, pT
266  TH2F** fHistoTruePiMiPiZeroSameMotherFromK0lInvMassPt; // histos with reconstructed validated pi0 pi- from rho0, invariant mass, pT
267 
268  TH2F** fHistoTruePiPlPiZeroSameMotherFromEtaInvMassPt; // histos with reconstructed validated pi0 pi+ from omega, invariant mass, pT
269  TH2F** fHistoTruePiPlPiZeroSameMotherFromOmegaInvMassPt; // histos with reconstructed validated pi0 pi+ from eta, invariant mass, pT
270  TH2F** fHistoTruePiPlPiZeroSameMotherFromRhoInvMassPt; // histos with reconstructed validated pi0 pi+ from rho0, invariant mass, pT
271  TH2F** fHistoTruePiPlPiZeroSameMotherFromK0lInvMassPt; // histos with reconstructed validated pi0 pi+ from K0l, invariant mass, pT
272  TH2F** fHistoTruePiPlPiMiNDMPureCombinatoricalInvMassPt; // histos with reconstructed validated pi+pi-pi0 that are pure combinatorical (do not share a mother)
273  TH2F** fHistoTruePiPlPiMiNDMContaminationInvMassPt; // histos with reconstructed pi+pi-pi0 that are not actually pions
274 
281  // Event properties
282  TH1I** fHistoNEvents; // histo for event counting
283  TH1I** fHistoNGoodESDTracks; // histo number of reconstructed primary tracks
284  TProfile** fProfileEtaShift; // profile for eta shift bookkeeping
286 
287 
288  TRandom3 fRandom; // random number
289  Int_t fnCuts; // number of cuts to be run in parallel
290  Int_t fiCut; // current cut
291  Int_t fNumberOfESDTracks; // integer with number of primary tracks in this event
292  Bool_t fMoveParticleAccordingToVertex; // Flag to move parice to the vertex
293  Int_t fIsHeavyIon; // Flag for collision system 0: pp, 1: PbPb, 2: pPb
294  Bool_t fDoMesonAnalysis; // Flag for switching on meson analysis
295  Int_t fDoMesonQA; // Switching for meson QA 0: no QA 1: small QA 2: big QA
296  Bool_t fIsFromMBHeader; // Flag for particle whether it belongs to accepted header
297  Bool_t fIsMC; // Flag for MC
298  Int_t fSelectedHeavyNeutralMeson; // Flag for running eta prime
299  Bool_t fDoLightOutput; // Flag to turn on light output
300  Int_t fNDMRecoMode; // Flag how neutral pion is reconstructed 0=PCM-PCM, 1=PCM-Calo, 2=Calo-Calo
301  Double_t fTolerance; // tolerance in rad for angle cuts
302 private:
305 
307 };
308 
309 #endif // AliAnalysisTaskNeutralMesonToPiPlPiMiNeutralMeson_H
310 
Bool_t KinematicCut(AliAODConversionMother *negpion, AliAODConversionMother *pospion, AliAODConversionMother *neutpion, AliAODConversionMother *omega)
void ProcessTrueMesonCandidates(AliAODConversionMother *Pi0Candidate, AliAODConversionMother *TrueNeutralPionCandidate, AliAODConversionPhoton *TrueVirtualGammaCandidate)
double Double_t
Definition: External.C:58
Definition: External.C:236
void MoveParticleAccordingToVertex(AliAODConversionMother *particle, const AliGammaConversionAODBGHandler::GammaConversionVertex *vertex)
void ProcessTrueNeutralPionCandidatesPureCalo(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1)
TH2F ** fHistoDoubleCountTrueHNMInvMassPt
array of histos with double counted pi0s, invMass, pT
int Int_t
Definition: External.C:63
Class handling all kinds of selection cuts for Gamma Calo analysis.
Definition: External.C:204
float Float_t
Definition: External.C:68
void ProcessTrueNeutralPionCandidatesPureConversionsAOD(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1)
TH2F ** fHistoDoubleCountTrueConvGammaRPt
array of histos with double counted etas, invMass, pT
vector< Int_t > fVectorDoubleCountTrueHNMs
vector containing labels of validated pi0
Class handling all kinds of selection cuts for Gamma Conversion analysis.
Int_t mode
Definition: anaM.C:41
vector< Int_t > fVectorDoubleCountTruePi0s
array of histos with double counted photons, R, pT
short Short_t
Definition: External.C:23
Bool_t isMC
vector< Int_t > fVectorDoubleCountTrueConvGammas
vector containing labels of validated eta
TRandom3 fRandom
array of histos with SPD tracklets vs SPD clusters for background rejection
Class handling all kinds of selection cuts for Gamma Conversion analysis.
const char Option_t
Definition: External.C:48
AliAnalysisTaskNeutralMesonToPiPlPiMiNeutralMeson & operator=(const AliAnalysisTaskNeutralMesonToPiPlPiMiNeutralMeson &)
bool Bool_t
Definition: External.C:53
void ProcessTrueNeutralPionCandidatesPureConversions(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1)
void ProcessTrueNeutralPionCandidatesMixedConvCalo(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1)