AliPhysics  bdbde52 (bdbde52)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskNeutralMesonToPiPlPiMiPiZero.h
Go to the documentation of this file.
1 
2 #ifndef ALIANALYSISTASKNEUTRALMESONTOPIPLPIMIPIZERO_H
3 #define ALIANALYSISTASKNEUTRALMESONTOPIPLPIMIPIZERO_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;}
61  void SetNeutralPionCutList(TList *CutArray){ fNeutralPionMesonCutArray = CutArray; }
62  void SetMesonCutList(TList *CutArray){ fMesonCutArray = CutArray; }
63  void SetDoMesonQA(Int_t flag){ fDoMesonQA = flag; }
66 
67  private:
68 
69  void InitBack();
70 
71  // routines for photon selection from conversions
74 
75  // routines for photon selection from clusters
78 
79  void ProcessTrueMesonCandidates(AliAODConversionMother *Pi0Candidate, AliAODConversionMother *TrueNeutralPionCandidate, AliAODConversionPhoton *TrueVirtualGammaCandidate);
81 
83 
84  // routines for neutral pion candidates from pure conversion
88 
89  // routines for neutral pion candidates from pure calo
91  void ProcessTrueNeutralPionCandidatesPureCalo(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1);
92 
93  // routines for neutral pion candidates from mixed conv + calo
95  void ProcessTrueNeutralPionCandidatesMixedConvCalo( AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1);
96 
97  void ProcessPionCandidates();
98  void ProcessMCParticles();
100  void CalculateBackground();
101  void UpdateEventByEventData();
102 
103  Bool_t IsPiPlPiMiPiZeroDecay(TParticle *fMCMother) const;
107 
108  Bool_t CheckVectorForDoubleCount(vector<Int_t> &vec, Int_t tobechecked);
109 
111 
112 
113  AliV0ReaderV1* fV0Reader; // V0Reader for basic conversion photon selection
115  AliPrimaryPionSelector* fPionSelector; // primary charged pion selector, basic selection of pi+,pi-
118  AliESDEvent* fESDEvent; // current event
119  AliMCEvent* fMCEvent; // current MC event
120  TList** fCutFolder; // list of output folders with main cut name
121  TList** fESDList; // list with main output histograms for data
122  TList** fTrueList; // list with validated reconstructed MC histograms
123  TList** fTrueTreeList; // list containing TTree's for MC True
124  TList** fMCList; // list with pure MC histograms
125  TList* fOutputContainer; // output container
126  TClonesArray* fReaderGammas; // array with photon from fV0Reader
127  vector<Int_t> fSelectorNegPionIndex; // array with pion indices for negative pions from fPionSelector
128  vector<Int_t> fSelectorPosPionIndex; // array with pion indices for positive pions from fPionSelector
129  TList* fGoodConvGammas; // good conv gammas after selection
131  TList* fNeutralPionCandidates; // good neutral pion candidates
132  TList* fNeutralPionSidebandCandidates; // good neutral pion candidates from sideband
133  TList* fPosPionCandidates; // good positive pion candidates
134  TList* fNegPionCandidates; // good negative pion candidates
135  TList* fGoodVirtualParticles; // combination of pi+pi- candidates
136  TList* fEventCutArray; // array with event cuts
137  TList* fGammaCutArray; // array with Conversion Cuts
138  TList* fClusterCutArray; // array with Cluster Cuts
139  TList* fPionCutArray; // array with charged pion cuts
140  TList* fNeutralPionMesonCutArray; // array with neutral pion cuts
141  TList* fMesonCutArray; // array with neutral meson cuts
142  AliConvEventCuts* fEventCuts; // current event cuts
143  AliConversionPhotonCuts* fConversionCuts; // current conversion cuts
144  AliCaloPhotonCuts* fClusterCuts; // current cluster cuts
145 
146  // TTrees
147  TTree** fTreePiPiSameMother; // Tree containing info about the mother of two pions who have the same mother,
148  // if ID isn't covered by current implementations
149  TTree** fTreePiPiPiSameMother; // Tree containing info about the mother of three pions who have the same mother,
150  // if ID isn't covered by current implementations
151  Short_t fCasePiPi; // 0:PiPlPiMi 1:PiMiPiZero 1:PiPlPiZero
152  Float_t fSamePiPiMotherID; // ID of mother of two pions
153  Float_t fSamePiPiMotherInvMass; // Invariant mass of mother of two pions
154  Float_t fSamePiPiMotherPt; // pT of mother of two pions
155  Float_t fSamePiPiPiMotherID; // ID of mother of two pions
156  Float_t fSamePiPiPiMotherInvMass; // Invariant mass of mother of two pions
157  Float_t fSamePiPiPiMotherPt; // pT of mother of two pions
158  // reconstructed particles
159  TH1F** fHistoConvGammaPt; // array of histos of conversion photon, pt
160  TH1F** fHistoConvGammaEta; // array of histos of conversion photon, eta
161  TH1F** fHistoClusterGammaPt; // array of histos of Cluster photon, pt
162  TH1F** fHistoClusterGammaEta; // array of histos of Cluster photon, eta
163  TH1F** fHistoNegPionPt; // array of histos of negative pion, pt
164  TH1F** fHistoPosPionPt; // array of histos of positive pion, pt
165  TH1F** fHistoNegPionPhi; // array of histos of negative pion, phi
166  TH1F** fHistoPosPionPhi; // array of histos of positive pion, phi
167  TH1F** fHistoNegPionEta; // array of histos of negative pion, eta
168  TH1F** fHistoPosPionEta; // array of histos of positive pion, eta
169  TH2F** fHistoNegPionClsTPC; // array of histos of negative pion, findable tpc cluster, pT
170  TH2F** fHistoPosPionClsTPC; // array of histos of positive pion, findable tpc cluster, pT
171  TH2F** fHistoPionDCAxy; // array of histos of pion, dca_xy, pT
172  TH2F** fHistoPionDCAz; // array of histos of pion, dca_z, pT
173  TH2F** fHistoPionTPCdEdxNSigma; // array of histos of pion, p, TPC nSigma dEdx pion
174  TH2F** fHistoPionTPCdEdx; // array of histos of pion, p, TPC dEdx
175  TH2F** fHistoPionPionInvMassPt; // array of histos of pion pion, invMass, pT_{pi+pi-}
176  TH2F** fHistoGammaGammaInvMassPt; // array of histos of gamma-gamma, invMass, pT_{gamma gamma}
177  TH2F** fHistoMotherInvMassPt; // array of histos of pi+pi-pi0 same event, invMass, pT_{pi+pi-pi0}
178  TH2F** fHistoMotherInvMassPtRejectedKinematic; // array of histos of rejected pi+pi-pi0 same event, invMass, pT_{pi+pi-pi0}
179  TH2F** fHistoMotherSameDiff1Diff2BackInvMassPt; // array of histos of pi+pi-pi0 mixed event, invMass, pT_{pi+pi-pi0}
180  TH2F** fHistoMotherSameDiff1Diff1BackInvMassPt; // array of histos of pi+pi-pi0 mixed event, invMass, pT_{pi+pi-pi0}
181  TH2F** fHistoMotherSameSameDiff2BackInvMassPt; // array of histos of pi+pi-pi0 mixed event, invMass, pT_{pi+pi-pi0}
182  TH2F** fHistoMotherSameDiff1SameBackInvMassPt; // array of histos of pi+pi-pi0 mixed event, invMass, pT_{pi+pi-pi0}
183  TH2F** fHistoMotherLikeSignBackInvMassPt; // array of histos of pi+pi+pi0 likesign mixed event, invMass, pT_{pi+pi-pi0}
184 
185  // angle distributions
186  TH2F** fHistoAngleOmegaPiPlPiMi; // angle between combined Pi+ and Pi- and omega
187  TH2F** fHistoAngleOmegaPiZero; // angle between Pi0 and omega
188  TH2F** fHistoAngleOmegaPiPl; // angle between Pi+ and omega
189  TH2F** fHistoAngleOmegaPiMi; // angle between Pi- and omega
190  TH2F** fHistoAnglePiPlPiMi; // angle between Pi+ and Pi-
191  TH2F** fHistoAnglePiZeroPiMi; // angle between Pi0 and Pi-
192  TH2F** fHistoAnglePiPlPiZero; // angle between Pi+ and Pi0
193  TH2F** fHistoAngleSum; // angle between omega and Pi0 + angle between Pi+ and Pi- + angle between Pi0 and Pi-
195 
196  TH2F** fHistoMotherInvMassSubPi0; // invariant mass of (pi+,pi-,pi0) - invariant mass of pi0
197  TH2F** fHistoMotherSameDiff1Diff2BackInvMassSubPi0Pt; // array of histos of pi+pi-pi0 mixed event, invMass-invMass(pi0), pT_{pi+pi-pi0}
198  TH2F** fHistoMotherSameDiff1Diff1BackInvMassSubPi0Pt; // array of histos of pi+pi-pi0 mixed event, invMass-invMass(pi0), pT_{pi+pi-pi0}
199  TH2F** fHistoMotherSameSameDiff2BackInvMassSubPi0Pt; // array of histos of pi+pi-pi0 mixed event, invMass-invMass(pi0), pT_{pi+pi-pi0}
200  TH2F** fHistoMotherSameDiff1SameBackInvMassSubPi0Pt; // array of histos of pi+pi-pi0 mixed event, invMass-invMass(pi0), pT_{pi+pi-pi0}
201  TH2F** fHistoMotherLikeSignBackInvMassSubPi0Pt; // array of histos of pi+pi+pi0 likesign mixed event, invMass-invMass(pi0), pT_{pi+pi-pi0}
202 
203  TH2F** fHistoMotherInvMassFixedPzPi0; // invariant mass of (pi+,pi-,pi0) - invariant mass of pi0
204  TH2F** fHistoMotherSameDiff1Diff2BackInvMassFixedPzPi0Pt; // array of histos of pi+pi-pi0 mixed event, invMass, pT_{pi+pi-pi0}, the Pz of the pi0 was fixed such that
205  // its invMass matches the PDG value
206  TH2F** fHistoMotherSameDiff1Diff1BackInvMassFixedPzPi0Pt; // array of histos of pi+pi-pi0 mixed event, invMass, pT_{pi+pi-pi0}, the Pz of the pi0 was fixed such that
207  // its invMass matches the PDG value
208  TH2F** fHistoMotherSameSameDiff2BackInvMassFixedPzPi0Pt; // array of histos of pi+pi-pi0 mixed event, invMass, pT_{pi+pi-pi0}, the Pz of the pi0 was fixed such that
209  // its invMass matches the PDG value
210  TH2F** fHistoMotherSameDiff1SameBackInvMassFixedPzPi0Pt; // array of histos of pi+pi-pi0 mixed event, invMass, pT_{pi+pi-pi0}, the Pz of the pi0 was fixed such that
211  // its invMass matches the PDG value
212  TH2F** fHistoMotherLikeSignBackInvMassFixedPzPi0Pt; // array of histos of pi+pi+pi0 likesign mixed event, invMass, pT_{pi+pi+pi0}, the Pz of the pi0 was fixed such that
213  // its invMass matches the PDG value
214  // pure MC properties
215  TH1F** fHistoMCAllGammaPt; // array of histos of all produced gammas in the specified y range
216  TH1F** fHistoMCConvGammaPt; // array of histos of all converted gammas in the specified y range
217  TH1F** fHistoMCAllPosPionsPt; // array of histos with all produced primary positive pions in the specified y range
218  TH1F** fHistoMCAllNegPionsPt; // array of histos with all produced primary negative pions in the specified y range
219  TH1F** fHistoMCGammaFromNeutralMesonPt; // array of histos of all produced gammas from omega or eta via pi+pi-pi0 in the specified y range/
220  TH1F** fHistoMCPosPionsFromNeutralMesonPt; // array of histos of all produced positive pions from omega or eta via pi+pi-pi0 in the specified y range/
221  TH1F** fHistoMCNegPionsFromNeutralMesonPt; // array of histos of all produced negative pions from omega or eta via pi+pi-pi0 in the specified y range/
222  TH1F** fHistoMCEtaPiPlPiMiPiZeroPt; // array of histos of produced etas via pi+pi-pi0 in the specified y range
223  TH1F** fHistoMCEtaPiPlPiMiPiZeroInAccPt; // array of histos of produced etas via pi+pi-pi0 in the specified y range,
224  // with decay products in respective y, eta ranges
225  TH1F** fHistoMCOmegaPiPlPiMiPiZeroPt; // array of histos of produced omegas via pi+pi-pi0 in the specified y range
226  TH1F** fHistoMCOmegaPiPlPiMiPiZeroInAccPt; // array of histos of produced omegas via pi+pi-pi0 in the specified y range,
227  // with decay products in respective y, eta ranges
228 
229  // reconstructed particles MC validated
230  TH2F** fHistoTrueMotherPiPlPiMiPiZeroInvMassPt; // histos with reconstructed validated eta or omega, inv mass, pT
231  TH2F** fHistoTrueMotherOmegaPiPlPiMiPiZeroInvMassPt; // histos with reconstructed validated omega, inv mass, pT
232  TH2F** fHistoTrueMotherEtaPiPlPiMiPiZeroInvMassPt; // histos with reconstructed validated eta, inv mass, pT
233  TH2F** fHistoTrueMotherGammaGammaInvMassPt; // histos with reconstructed validated pi0, inv mass, pT
234  TH2F** fHistoTrueMotherGammaGammaFromEtaInvMassPt; // histos with reconstructed validated pi0, inv mass, pT
235  TH2F** fHistoTrueMotherGammaGammaFromOmegaInvMassPt; // histos with reconstructed validated pi0, inv mass, pT
236  TH1F** fHistoTrueConvGammaPt; // histos with reconstructed validated conv gamma, pT
237  TH1F** fHistoTrueConvGammaFromNeutralMesonPt; // histos with reconstructed validated conv gamma from eta or omega via pi0, pT
238  TH1F** fHistoTrueClusterGammaPt; // histos with reconstructed validated cluster gamma, pT
239  TH1F** fHistoTrueClusterGammaFromNeutralMesonPt; // histos with reconstructed validated cluster gamma from eta or omega via pi0, pT
240  TH1F** fHistoTruePosPionPt; // histos with reconstructed validated positive pion, pT
241  TH1F** fHistoTruePosPionFromNeutralMesonPt; // histos with reconstructed validated positive pion from eta or omega, pT
242  TH1F** fHistoTrueNegPionPt; // histos with reconstructed validated negative pion, pT
243  TH1F** fHistoTrueNegPionFromNeutralMesonPt; // histos with reconstructed validated negative pion from eta or omega, pT
244  TH2F** fHistoTruePionPionInvMassPt; // histos with reconstructed validated two pion, invariant mass, pT
245  TH2F** fHistoTruePionPionFromSameMotherInvMassPt; // histos with reconstructed validated two pion from same mother, invariant mass, pT
246  TH2F** fHistoTruePionPionFromEtaInvMassPt; // histos with reconstructed validated two pion from eta , invariant mass, pT
247  TH2F** fHistoTruePionPionFromOmegaInvMassPt; // histos with reconstructed validated two pion from omega, invariant mass, pT
248 
249  TH2F** fHistoTruePiPlPiMiSameMotherFromEtaInvMassPt; // histos with reconstructed validated pi+ pi- from omega, invariant mass, pT
250  TH2F** fHistoTruePiPlPiMiSameMotherFromOmegaInvMassPt; // histos with reconstructed validated pi+ pi- from eta, invariant mass, pT
251  TH2F** fHistoTruePiPlPiMiSameMotherFromRhoInvMassPt; // histos with reconstructed validated pi+ pi- from rho0, invariant mass, pT
252  TH2F** fHistoTruePiPlPiMiSameMotherFromEtaPrimeInvMassPt; // histos with reconstructed validated pi+ pi- from etaprime, invariant mass, pT
253  TH2F** fHistoTruePiPlPiMiSameMotherFromK0sInvMassPt; // histos with reconstructed validated pi+ pi- from K0s, invariant mass, pT
254  TH2F** fHistoTruePiPlPiMiSameMotherFromK0lInvMassPt; // histos with reconstructed validated pi+ pi- from K0s, invariant mass, pT
255 
256  TH2F** fHistoTruePiMiPiZeroSameMotherFromEtaInvMassPt; // histos with reconstructed validated pi0 pi- from omega, invariant mass, pT
257  TH2F** fHistoTruePiMiPiZeroSameMotherFromOmegaInvMassPt; // histos with reconstructed validated pi0 pi- from eta, invariant mass, pT
258  TH2F** fHistoTruePiMiPiZeroSameMotherFromRhoInvMassPt; // histos with reconstructed validated pi0 pi- from rho0, invariant mass, pT
259  TH2F** fHistoTruePiMiPiZeroSameMotherFromK0lInvMassPt; // histos with reconstructed validated pi0 pi- from rho0, invariant mass, pT
260 
261  TH2F** fHistoTruePiPlPiZeroSameMotherFromEtaInvMassPt; // histos with reconstructed validated pi0 pi+ from omega, invariant mass, pT
262  TH2F** fHistoTruePiPlPiZeroSameMotherFromOmegaInvMassPt; // histos with reconstructed validated pi0 pi+ from eta, invariant mass, pT
263  TH2F** fHistoTruePiPlPiZeroSameMotherFromRhoInvMassPt; // histos with reconstructed validated pi0 pi+ from rho0, invariant mass, pT
264  TH2F** fHistoTruePiPlPiZeroSameMotherFromK0lInvMassPt; // histos with reconstructed validated pi0 pi+ from K0l, invariant mass, pT
265  TH2F** fHistoTruePiPlPiMiPiZeroPureCombinatoricalInvMassPt; // histos with reconstructed validated pi+pi-pi0 that are pure combinatorical (do not share a mother)
266  TH2F** fHistoTruePiPlPiMiPiZeroContaminationInvMassPt; // histos with reconstructed pi+pi-pi0 that are not actually pions
267 
276  // Event properties
277  TH1I** fHistoNEvents; // histo for event counting
278  TH1I** fHistoNGoodESDTracks; // histo number of reconstructed primary tracks
279  TProfile** fProfileEtaShift; // profile for eta shift bookkeeping
281 
282 
283  TRandom3 fRandom; // random number
284  Int_t fnCuts; // number of cuts to be run in parallel
285  Int_t fiCut; // current cut
286  Int_t fNumberOfESDTracks; // integer with number of primary tracks in this event
287  Bool_t fMoveParticleAccordingToVertex; // Flag to move parice to the vertex
288  Int_t fIsHeavyIon; // Flag for collision system 0: pp, 1: PbPb, 2: pPb
289  Bool_t fDoMesonAnalysis; // Flag for switching on meson analysis
290  Int_t fDoMesonQA; // Switching for meson QA 0: no QA 1: small QA 2: big QA
291  Bool_t fIsFromMBHeader; // Flag for particle whether it belongs to accepted header
292  Bool_t fIsMC; // Flag for MC
293  Bool_t fDoLightOutput; // Flag to turn on light output
294  Int_t fNeutralPionMode; // Flag how neutral pion is reconstructed 0=PCM-PCM, 1=PCM-Calo, 2=Calo-Calo
295  Double_t fTolerance; // tolerance in rad for angle cuts
296 private:
299 
301 };
302 
303 #endif // ALIANALYSISTASKNEUTRALMESONTOPIPLPIMIPIZERO_H
304 
AliAnalysisTaskNeutralMesonToPiPlPiMiPiZero & operator=(const AliAnalysisTaskNeutralMesonToPiPlPiMiPiZero &)
void ProcessTrueNeutralPionCandidatesPureCalo(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1)
double Double_t
Definition: External.C:58
vector< Int_t > fVectorDoubleCountTruePi0s
array of histos with double counted photons, R, pT
Definition: External.C:236
vector< Int_t > fVectorDoubleCountTrueOmegas
vector containing labels of validated eta
vector< Int_t > fVectorDoubleCountTrueEtas
vector containing labels of validated pi0
void ProcessTrueMesonCandidates(AliAODConversionMother *Pi0Candidate, AliAODConversionMother *TrueNeutralPionCandidate, AliAODConversionPhoton *TrueVirtualGammaCandidate)
int Int_t
Definition: External.C:63
Class handling all kinds of selection cuts for Gamma Calo analysis.
Definition: External.C:204
void ProcessTrueCaloPhotonCandidates(AliAODConversionPhoton *TruePhotonCandidate)
float Float_t
Definition: External.C:68
TRandom3 fRandom
array of histos with SPD tracklets vs SPD clusters for background rejection
TH1I ** fHistoNEvents
vector containing labels of validated photons
Class handling all kinds of selection cuts for Gamma Conversion analysis.
TH2F ** fHistoDoubleCountTrueConvGammaRPt
array of histos with double counted omegas, invMass, pT
Int_t mode
Definition: anaM.C:41
short Short_t
Definition: External.C:23
void ProcessTrueNeutralPionCandidatesPureConversions(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1)
Bool_t isMC
vector< Int_t > fVectorDoubleCountTrueConvGammas
vector containing labels of validated omega
TH2F ** fHistoDoubleCountTrueEtaInvMassPt
array of histos with double counted pi0s, invMass, pT
TH2F ** fHistoDoubleCountTrueOmegaInvMassPt
array of histos with double counted etas, invMass, pT
Bool_t KinematicCut(AliAODConversionMother *negpion, AliAODConversionMother *pospion, AliAODConversionMother *neutpion, AliAODConversionMother *omega)
Class handling all kinds of selection cuts for Gamma Conversion analysis.
const char Option_t
Definition: External.C:48
void MoveParticleAccordingToVertex(AliAODConversionMother *particle, const AliGammaConversionAODBGHandler::GammaConversionVertex *vertex)
bool Bool_t
Definition: External.C:53
void ProcessTrueNeutralPionCandidatesMixedConvCalo(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1)
Bool_t CheckVectorForDoubleCount(vector< Int_t > &vec, Int_t tobechecked)
void ProcessTrueNeutralPionCandidatesPureConversionsAOD(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1)