AliPhysics  aaf9c62 (aaf9c62)
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;
110 
111  Bool_t CheckVectorForDoubleCount(vector<Int_t> &vec, Int_t tobechecked);
112 
114 
115 
116  AliV0ReaderV1* fV0Reader; // V0Reader for basic conversion photon selection
118  AliPrimaryPionSelector* fPionSelector; // primary charged pion selector, basic selection of pi+,pi-
121  AliESDEvent* fESDEvent; // current event
122  AliMCEvent* fMCEvent; // current MC event
123  TList** fCutFolder; // list of output folders with main cut name
124  TList** fESDList; // list with main output histograms for data
125  TList** fTrueList; // list with validated reconstructed MC histograms
126  TList** fTrueTreeList; // list containing TTree's for MC True
127  TList** fMCList; // list with pure MC histograms
128  TList* fOutputContainer; // output container
129  TClonesArray* fReaderGammas; // array with photon from fV0Reader
130  vector<Int_t> fSelectorNegPionIndex; // array with pion indices for negative pions from fPionSelector
131  vector<Int_t> fSelectorPosPionIndex; // array with pion indices for positive pions from fPionSelector
132  TList* fGoodConvGammas; // good conv gammas after selection
134  TList* fNeutralDecayParticleCandidates; // good neutral pion candidates
135  TList* fNeutralDecayParticleSidebandCandidates; // good neutral pion candidates from sideband
136  TList* fPosPionCandidates; // good positive pion candidates
137  TList* fNegPionCandidates; // good negative pion candidates
138  TList* fGoodVirtualParticles; // combination of pi+pi- candidates
139  TList* fEventCutArray; // array with event cuts
140  TList* fGammaCutArray; // array with Conversion Cuts
141  TList* fClusterCutArray; // array with Cluster Cuts
142  TList* fPionCutArray; // array with charged pion cuts
143  TList* fNeutralDecayMesonCutArray; // array with neutral pion cuts
144  TList* fMesonCutArray; // array with neutral meson cuts
145  AliConvEventCuts* fEventCuts; // current event cuts
146  AliConversionPhotonCuts* fConversionCuts; // current conversion cuts
147  AliCaloPhotonCuts* fClusterCuts; // current cluster cuts
148 
149  // TTrees
150  TTree** fTreePiPiSameMother; // Tree containing info about the mother of two pions who have the same mother,
151  // if ID isn't covered by current implementations
152  TTree** fTreePiPiPiSameMother; // Tree containing info about the mother of three pions who have the same mother,
153  TTree** fTreeEventInfoHNM; // Tree containing information about an event where eta->pi+pi-pi0 was found
154  // if ID isn't covered by current implementations
155  Short_t fCasePiPi; // 0:PiPlPiMi 1:PiMiPiZero 1:PiPlPiZero
156  Float_t fSamePiPiMotherID; // ID of mother of two pions
157  Float_t fSamePiPiMotherInvMass; // Invariant mass of mother of two pions
158  Float_t fSamePiPiMotherPt; // pT of mother of two pions
159  Float_t fSamePiPiPiMotherID; // ID of mother of two pions
160  Float_t fSamePiPiPiMotherInvMass; // Invariant mass of mother of two pions
161  Float_t fSamePiPiPiMotherPt; // pT of mother of two pions
162  Float_t fV0MultiplicityHNMEvent; // V0 multiplicity of an event where a true Eta was found
163  Float_t fTrackMultiplicityHNMEvent; // track multiplicity of an event where a true Eta was found
164  Float_t fZVertexHNMEvent; // z position of primary vertex of an event where a true Eta was found
165  Float_t fPtHNM; // pT of a true Eta
166  Float_t fPDGMassNDM; // PDG mass of either pi0 or eta
167  Int_t fPDGCodeNDM; // PDG code of either pi0 or eta
168  Int_t fPDGCodeAnalyzedMeson; // PDG code of the analyzed heavy netural meson
169  // reconstructed particles
170  TH1F** fHistoConvGammaPt; // array of histos of conversion photon, pt
171  TH1F** fHistoConvGammaEta; // array of histos of conversion photon, eta
172  TH1F** fHistoClusterGammaPt; // array of histos of Cluster photon, pt
173  TH1F** fHistoClusterGammaEta; // array of histos of Cluster photon, eta
174  TH1F** fHistoNegPionPt; // array of histos of negative pion, pt
175  TH1F** fHistoPosPionPt; // array of histos of positive pion, pt
176  TH1F** fHistoNegPionPhi; // array of histos of negative pion, phi
177  TH1F** fHistoPosPionPhi; // array of histos of positive pion, phi
178  TH1F** fHistoNegPionEta; // array of histos of negative pion, eta
179  TH1F** fHistoPosPionEta; // array of histos of positive pion, eta
180  TH2F** fHistoNegPionClsTPC; // array of histos of negative pion, findable tpc cluster, pT
181  TH2F** fHistoPosPionClsTPC; // array of histos of positive pion, findable tpc cluster, pT
182  TH2F** fHistoPionDCAxy; // array of histos of pion, dca_xy, pT
183  TH2F** fHistoPionDCAz; // array of histos of pion, dca_z, pT
184  TH2F** fHistoPionTPCdEdxNSigma; // array of histos of pion, p, TPC nSigma dEdx pion
185  TH2F** fHistoPionTPCdEdx; // array of histos of pion, p, TPC dEdx
186  TH2F** fHistoPionPionInvMassPt; // array of histos of pion pion, invMass, pT_{pi+pi-}
187  TH2F** fHistoGammaGammaInvMassPt; // array of histos of gamma-gamma, invMass, pT_{gamma gamma}
188  TH2F** fHistoMotherInvMassPt; // array of histos of pi+pi-pi0 same event, invMass, pT_{pi+pi-pi0}
189  TH2F** fHistoMotherInvMassPtRejectedKinematic; // array of histos of rejected pi+pi-pi0 same event, invMass, pT_{pi+pi-pi0}
190  TH2F** fHistoBackInvMassPtGroup1; // Event mixing background group 1 (pi+ and pi- from same event)
191  TH2F** fHistoBackInvMassPtGroup2; // Event mixing background group 2 (pi+ and pi0 from same event)
192  TH2F** fHistoBackInvMassPtGroup3; // Event mixing background group 3 (pi- and pi0 from same event)
193  TH2F** fHistoBackInvMassPtGroup4; // Event mixing background group 4 (no pion from same event)
194  TH2F** fHistoMotherLikeSignBackInvMassPt; // array of histos of pi+pi+pi0 likesign mixed event, invMass, pT_{pi+pi-pi0}
195 
196  // angle distributions
197  TH2F** fHistoAngleHNMesonPiPlPiMi; // angle between combined Pi+ and Pi- and omega
198  TH2F** fHistoAngleHNMesonNDM; // angle between Pi0 and omega
199  TH2F** fHistoAngleHNMesonPiPl; // angle between Pi+ and omega
200  TH2F** fHistoAngleHNMesonPiMi; // angle between Pi- and omega
201  TH2F** fHistoAnglePiPlPiMi; // angle between Pi+ and Pi-
202  TH2F** fHistoAngleNDMPiMi; // angle between Pi0 and Pi-
203  TH2F** fHistoAnglePiPlNDM; // angle between Pi+ and Pi0
204  TH2F** fHistoAngleSum; // angle between omega and Pi0 + angle between Pi+ and Pi- + angle between Pi0 and Pi-
206 
207  TH2F** fHistoMotherInvMassSubNDM; // invariant mass of (pi+,pi-,pi0) - invariant mass of pi0
208  TH2F** fHistoBackInvMassPtGroup1SubNDM; // background group 1, invMass-invMass(pi0), pT_{pi+pi-pi0} (pi+ and pi- from same event)
209  TH2F** fHistoBackInvMassPtGroup2SubNDM; // background group 2, invMass-invMass(pi0), pT_{pi+pi-pi0} (pi+ and pi0 from same event)
210  TH2F** fHistoBackInvMassPtGroup3SubNDM; // background group 3, invMass-invMass(pi0), pT_{pi+pi-pi0} (pi+ and pi0 from same event)
211  TH2F** fHistoBackInvMassPtGroup4SubNDM; // background group 4, invMass-invMass(pi0), pT_{pi+pi-pi0} (no pion from same event)
212  TH2F** fHistoMotherLikeSignBackInvMassSubNDMPt; // array of histos of pi+pi+pi0 likesign mixed event, invMass-invMass(pi0), pT_{pi+pi-pi0}
213 
214  TH2F** fHistoMotherInvMassFixedPzNDM; // invariant mass of (pi+,pi-,pi0) - invariant mass of pi0
215  TH2F** fHistoBackInvMassPtGroup1FixedPzNDM; // background group 1 mixed event, invMass, pT_{pi+pi-pi0}, the Pz of the pi0 was fixed such that
216  // its invMass matches the PDG value
217  TH2F** fHistoBackInvMassPtGroup2FixedPzNDM; // background group 2 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** fHistoBackInvMassPtGroup3FixedPzNDM; // background group 3 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** fHistoBackInvMassPtGroup4FixedPzNDM; // background group 4 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** 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
224  // its invMass matches the PDG value
225  // pure MC properties
226  TH1F** fHistoMCAllGammaPt; // array of histos of all produced gammas in the specified y range
227  TH1F** fHistoMCConvGammaPt; // array of histos of all converted gammas in the specified y range
228  TH1F** fHistoMCAllPosPionsPt; // array of histos with all produced primary positive pions in the specified y range
229  TH1F** fHistoMCAllNegPionsPt; // array of histos with all produced primary negative pions in the specified y range
230  TH1F** fHistoMCGammaFromNeutralMesonPt; // array of histos of all produced gammas from omega or eta via pi+pi-pi0 in the specified y range/
231  TH1F** fHistoMCPosPionsFromNeutralMesonPt; // array of histos of all produced positive pions from omega or eta via pi+pi-pi0 in the specified y range/
232  TH1F** fHistoMCNegPionsFromNeutralMesonPt; // array of histos of all produced negative pions from omega or eta via pi+pi-pi0 in the specified y range/
233  TH1F** fHistoMCHNMPiPlPiMiNDMPt; // array of histos of produced etas via pi+pi-pi0 in the specified y range
234  TH1F** fHistoMCHNMPiPlPiMiNDMInAccPt; // array of histos of produced etas via pi+pi-pi0 in the specified y range,
235  // with decay products in respective y, eta ranges
236 
237  // reconstructed particles MC validated
238  TH2F** fHistoTrueMotherPiPlPiMiNDMInvMassPt; // histos with reconstructed validated eta or omega, inv mass, pT
239  TH2F** fHistoTrueMotherHNMPiPlPiMiNDMInvMassPt; // histos with reconstructed validated eta, inv mass, pT
240  TH2F** fHistoTrueMotherGammaGammaInvMassPt; // histos with reconstructed validated pi0, inv mass, pT
241  TH2F** fHistoTrueMotherGammaGammaFromHNMInvMassPt; // histos with reconstructed validated pi0, inv mass, pT
242  TH1F** fHistoTrueConvGammaPt; // histos with reconstructed validated conv gamma, pT
243  TH1F** fHistoTrueConvGammaFromNeutralMesonPt; // histos with reconstructed validated conv gamma from eta or omega via pi0, pT
244  TH1F** fHistoTrueClusterGammaPt; // histos with reconstructed validated cluster gamma, pT
245  TH1F** fHistoTrueClusterGammaFromNeutralMesonPt; // histos with reconstructed validated cluster gamma from eta or omega via pi0, pT
246  TH1F** fHistoTruePosPionPt; // histos with reconstructed validated positive pion, pT
247  TH1F** fHistoTruePosPionFromNeutralMesonPt; // histos with reconstructed validated positive pion from eta or omega, pT
248  TH1F** fHistoTrueNegPionPt; // histos with reconstructed validated negative pion, pT
249  TH1F** fHistoTrueNegPionFromNeutralMesonPt; // histos with reconstructed validated negative pion from eta or omega, pT
250  TH2F** fHistoTruePionPionInvMassPt; // histos with reconstructed validated two pion, invariant mass, pT
251  TH2F** fHistoTruePionPionFromSameMotherInvMassPt; // histos with reconstructed validated two pion from same mother, invariant mass, pT
252  TH2F** fHistoTruePionPionFromHNMInvMassPt; // histos with reconstructed validated two pion from eta , invariant mass, pT
253 
254  TH2F** fHistoTruePiPlPiMiSameMotherFromEtaInvMassPt; // histos with reconstructed validated pi+ pi- from omega, invariant mass, pT
255  TH2F** fHistoTruePiPlPiMiSameMotherFromOmegaInvMassPt; // histos with reconstructed validated pi+ pi- from eta, invariant mass, pT
256  TH2F** fHistoTruePiPlPiMiSameMotherFromRhoInvMassPt; // histos with reconstructed validated pi+ pi- from rho0, invariant mass, pT
257  TH2F** fHistoTruePiPlPiMiSameMotherFromEtaPrimeInvMassPt; // histos with reconstructed validated pi+ pi- from etaprime, invariant mass, pT
258  TH2F** fHistoTruePiPlPiMiSameMotherFromK0sInvMassPt; // histos with reconstructed validated pi+ pi- from K0s, invariant mass, pT
259  TH2F** fHistoTruePiPlPiMiSameMotherFromK0lInvMassPt; // histos with reconstructed validated pi+ pi- from K0s, invariant mass, pT
260 
261  TH2F** fHistoTruePiMiPiZeroSameMotherFromEtaInvMassPt; // histos with reconstructed validated pi0 pi- from omega, invariant mass, pT
262  TH2F** fHistoTruePiMiPiZeroSameMotherFromOmegaInvMassPt; // histos with reconstructed validated pi0 pi- from eta, invariant mass, pT
263  TH2F** fHistoTruePiMiPiZeroSameMotherFromRhoInvMassPt; // histos with reconstructed validated pi0 pi- from rho0, invariant mass, pT
264  TH2F** fHistoTruePiMiPiZeroSameMotherFromK0lInvMassPt; // histos with reconstructed validated pi0 pi- from rho0, invariant mass, pT
265 
266  TH2F** fHistoTruePiPlPiZeroSameMotherFromEtaInvMassPt; // histos with reconstructed validated pi0 pi+ from omega, invariant mass, pT
267  TH2F** fHistoTruePiPlPiZeroSameMotherFromOmegaInvMassPt; // histos with reconstructed validated pi0 pi+ from eta, invariant mass, pT
268  TH2F** fHistoTruePiPlPiZeroSameMotherFromRhoInvMassPt; // histos with reconstructed validated pi0 pi+ from rho0, invariant mass, pT
269  TH2F** fHistoTruePiPlPiZeroSameMotherFromK0lInvMassPt; // histos with reconstructed validated pi0 pi+ from K0l, invariant mass, pT
270  TH2F** fHistoTruePiPlPiMiNDMPureCombinatoricalInvMassPt; // histos with reconstructed validated pi+pi-pi0 that are pure combinatorical (do not share a mother)
271  TH2F** fHistoTruePiPlPiMiNDMContaminationInvMassPt; // histos with reconstructed pi+pi-pi0 that are not actually pions
272 
279  // Event properties
280  TH1I** fHistoNEvents; // histo for event counting
281  TH1I** fHistoNGoodESDTracks; // histo number of reconstructed primary tracks
282  TProfile** fProfileEtaShift; // profile for eta shift bookkeeping
284 
285 
286  TRandom3 fRandom; // random number
287  Int_t fnCuts; // number of cuts to be run in parallel
288  Int_t fiCut; // current cut
289  Int_t fNumberOfESDTracks; // integer with number of primary tracks in this event
290  Bool_t fMoveParticleAccordingToVertex; // Flag to move parice to the vertex
291  Int_t fIsHeavyIon; // Flag for collision system 0: pp, 1: PbPb, 2: pPb
292  Bool_t fDoMesonAnalysis; // Flag for switching on meson analysis
293  Int_t fDoMesonQA; // Switching for meson QA 0: no QA 1: small QA 2: big QA
294  Bool_t fIsFromMBHeader; // Flag for particle whether it belongs to accepted header
295  Bool_t fIsMC; // Flag for MC
296  Int_t fSelectedHeavyNeutralMeson; // Flag for running eta prime
297  Bool_t fDoLightOutput; // Flag to turn on light output
298  Int_t fNDMRecoMode; // Flag how neutral pion is reconstructed 0=PCM-PCM, 1=PCM-Calo, 2=Calo-Calo
299  Double_t fTolerance; // tolerance in rad for angle cuts
300 private:
303 
305 };
306 
307 #endif // AliAnalysisTaskNeutralMesonToPiPlPiMiNeutralMeson_H
308 
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)