AliPhysics  4646b6b (4646b6b)
 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; }
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;
108 
109  Bool_t CheckVectorForDoubleCount(vector<Int_t> &vec, Int_t tobechecked);
110 
112 
113 
114  AliV0ReaderV1* fV0Reader; // V0Reader for basic conversion photon selection
116  AliPrimaryPionSelector* fPionSelector; // primary charged pion selector, basic selection of pi+,pi-
119  AliESDEvent* fESDEvent; // current event
120  AliMCEvent* fMCEvent; // current MC event
121  TList** fCutFolder; // list of output folders with main cut name
122  TList** fESDList; // list with main output histograms for data
123  TList** fTrueList; // list with validated reconstructed MC histograms
124  TList** fTrueTreeList; // list containing TTree's for MC True
125  TList** fMCList; // list with pure MC histograms
126  TList* fOutputContainer; // output container
127  TClonesArray* fReaderGammas; // array with photon from fV0Reader
128  vector<Int_t> fSelectorNegPionIndex; // array with pion indices for negative pions from fPionSelector
129  vector<Int_t> fSelectorPosPionIndex; // array with pion indices for positive pions from fPionSelector
130  TList* fGoodConvGammas; // good conv gammas after selection
132  TList* fNeutralPionCandidates; // good neutral pion candidates
133  TList* fNeutralPionSidebandCandidates; // good neutral pion candidates from sideband
134  TList* fPosPionCandidates; // good positive pion candidates
135  TList* fNegPionCandidates; // good negative pion candidates
136  TList* fGoodVirtualParticles; // combination of pi+pi- candidates
137  TList* fEventCutArray; // array with event cuts
138  TList* fGammaCutArray; // array with Conversion Cuts
139  TList* fClusterCutArray; // array with Cluster Cuts
140  TList* fPionCutArray; // array with charged pion cuts
141  TList* fNeutralPionMesonCutArray; // array with neutral pion cuts
142  TList* fMesonCutArray; // array with neutral meson cuts
143  AliConvEventCuts* fEventCuts; // current event cuts
144  AliConversionPhotonCuts* fConversionCuts; // current conversion cuts
145  AliCaloPhotonCuts* fClusterCuts; // current cluster cuts
146 
147  // TTrees
148  TTree** fTreePiPiSameMother; // Tree containing info about the mother of two pions who have the same mother,
149  // if ID isn't covered by current implementations
150  TTree** fTreePiPiPiSameMother; // Tree containing info about the mother of three pions who have the same mother,
151  // if ID isn't covered by current implementations
152  Short_t fCasePiPi; // 0:PiPlPiMi 1:PiMiPiZero 1:PiPlPiZero
153  Float_t fSamePiPiMotherID; // ID of mother of two pions
154  Float_t fSamePiPiMotherInvMass; // Invariant mass of mother of two pions
155  Float_t fSamePiPiMotherPt; // pT of mother of two pions
156  Float_t fSamePiPiPiMotherID; // ID of mother of two pions
157  Float_t fSamePiPiPiMotherInvMass; // Invariant mass of mother of two pions
158  Float_t fSamePiPiPiMotherPt; // pT of mother of two pions
159  // reconstructed particles
160  TH1F** fHistoConvGammaPt; // array of histos of conversion photon, pt
161  TH1F** fHistoConvGammaEta; // array of histos of conversion photon, eta
162  TH1F** fHistoClusterGammaPt; // array of histos of Cluster photon, pt
163  TH1F** fHistoClusterGammaEta; // array of histos of Cluster photon, eta
164  TH1F** fHistoNegPionPt; // array of histos of negative pion, pt
165  TH1F** fHistoPosPionPt; // array of histos of positive pion, pt
166  TH1F** fHistoNegPionPhi; // array of histos of negative pion, phi
167  TH1F** fHistoPosPionPhi; // array of histos of positive pion, phi
168  TH1F** fHistoNegPionEta; // array of histos of negative pion, eta
169  TH1F** fHistoPosPionEta; // array of histos of positive pion, eta
170  TH2F** fHistoNegPionClsTPC; // array of histos of negative pion, findable tpc cluster, pT
171  TH2F** fHistoPosPionClsTPC; // array of histos of positive pion, findable tpc cluster, pT
172  TH2F** fHistoPionDCAxy; // array of histos of pion, dca_xy, pT
173  TH2F** fHistoPionDCAz; // array of histos of pion, dca_z, pT
174  TH2F** fHistoPionTPCdEdxNSigma; // array of histos of pion, p, TPC nSigma dEdx pion
175  TH2F** fHistoPionTPCdEdx; // array of histos of pion, p, TPC dEdx
176  TH2F** fHistoPionPionInvMassPt; // array of histos of pion pion, invMass, pT_{pi+pi-}
177  TH2F** fHistoGammaGammaInvMassPt; // array of histos of gamma-gamma, invMass, pT_{gamma gamma}
178  TH2F** fHistoMotherInvMassPt; // array of histos of pi+pi-pi0 same event, invMass, pT_{pi+pi-pi0}
179  TH2F** fHistoMotherInvMassPtRejectedKinematic; // array of histos of rejected pi+pi-pi0 same event, invMass, pT_{pi+pi-pi0}
180  TH2F** fHistoBackInvMassPtGroup1; // Event mixing background group 1 (pi+ and pi- from same event)
181  TH2F** fHistoBackInvMassPtGroup2; // Event mixing background group 2 (pi+ and pi0 from same event)
182  TH2F** fHistoBackInvMassPtGroup3; // Event mixing background group 3 (pi- and pi0 from same event)
183  TH2F** fHistoBackInvMassPtGroup4; // Event mixing background group 4 (no pion from same event)
184  TH2F** fHistoMotherLikeSignBackInvMassPt; // array of histos of pi+pi+pi0 likesign mixed event, invMass, pT_{pi+pi-pi0}
185 
186  // angle distributions
187  TH2F** fHistoAngleOmegaPiPlPiMi; // angle between combined Pi+ and Pi- and omega
188  TH2F** fHistoAngleOmegaPiZero; // angle between Pi0 and omega
189  TH2F** fHistoAngleOmegaPiPl; // angle between Pi+ and omega
190  TH2F** fHistoAngleOmegaPiMi; // angle between Pi- and omega
191  TH2F** fHistoAnglePiPlPiMi; // angle between Pi+ and Pi-
192  TH2F** fHistoAnglePiZeroPiMi; // angle between Pi0 and Pi-
193  TH2F** fHistoAnglePiPlPiZero; // angle between Pi+ and Pi0
194  TH2F** fHistoAngleSum; // angle between omega and Pi0 + angle between Pi+ and Pi- + angle between Pi0 and Pi-
196 
197  TH2F** fHistoMotherInvMassSubPi0; // invariant mass of (pi+,pi-,pi0) - invariant mass of pi0
198  TH2F** fHistoBackInvMassPtGroup1SubPi0; // background group 1, invMass-invMass(pi0), pT_{pi+pi-pi0} (pi+ and pi- from same event)
199  TH2F** fHistoBackInvMassPtGroup2SubPi0; // background group 2, invMass-invMass(pi0), pT_{pi+pi-pi0} (pi+ and pi0 from same event)
200  TH2F** fHistoBackInvMassPtGroup3SubPi0; // background group 3, invMass-invMass(pi0), pT_{pi+pi-pi0} (pi+ and pi0 from same event)
201  TH2F** fHistoBackInvMassPtGroup4SubPi0; // background group 4, invMass-invMass(pi0), pT_{pi+pi-pi0} (no pion from same event)
202  TH2F** fHistoMotherLikeSignBackInvMassSubPi0Pt; // array of histos of pi+pi+pi0 likesign mixed event, invMass-invMass(pi0), pT_{pi+pi-pi0}
203 
204  TH2F** fHistoMotherInvMassFixedPzPi0; // invariant mass of (pi+,pi-,pi0) - invariant mass of pi0
205  TH2F** fHistoBackInvMassPtGroup1FixedPzPi0; // background group 1 mixed event, invMass, pT_{pi+pi-pi0}, the Pz of the pi0 was fixed such that
206  // its invMass matches the PDG value
207  TH2F** fHistoBackInvMassPtGroup2FixedPzPi0; // background group 2 mixed event, invMass, pT_{pi+pi-pi0}, the Pz of the pi0 was fixed such that
208  // its invMass matches the PDG value
209  TH2F** fHistoBackInvMassPtGroup3FixedPzPi0; // background group 3 mixed event, invMass, pT_{pi+pi-pi0}, the Pz of the pi0 was fixed such that
210  // its invMass matches the PDG value
211  TH2F** fHistoBackInvMassPtGroup4FixedPzPi0; // background group 4 mixed event, invMass, pT_{pi+pi-pi0}, the Pz of the pi0 was fixed such that
212  // its invMass matches the PDG value
213  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
214  // its invMass matches the PDG value
215  // pure MC properties
216  TH1F** fHistoMCAllGammaPt; // array of histos of all produced gammas in the specified y range
217  TH1F** fHistoMCConvGammaPt; // array of histos of all converted gammas in the specified y range
218  TH1F** fHistoMCAllPosPionsPt; // array of histos with all produced primary positive pions in the specified y range
219  TH1F** fHistoMCAllNegPionsPt; // array of histos with all produced primary negative pions in the specified y range
220  TH1F** fHistoMCGammaFromNeutralMesonPt; // array of histos of all produced gammas from omega or eta via pi+pi-pi0 in the specified y range/
221  TH1F** fHistoMCPosPionsFromNeutralMesonPt; // array of histos of all produced positive pions from omega or eta via pi+pi-pi0 in the specified y range/
222  TH1F** fHistoMCNegPionsFromNeutralMesonPt; // array of histos of all produced negative pions from omega or eta via pi+pi-pi0 in the specified y range/
223  TH1F** fHistoMCEtaPiPlPiMiPiZeroPt; // array of histos of produced etas via pi+pi-pi0 in the specified y range
224  TH1F** fHistoMCEtaPiPlPiMiPiZeroInAccPt; // array of histos of produced etas via pi+pi-pi0 in the specified y range,
225  // with decay products in respective y, eta ranges
226  TH1F** fHistoMCOmegaPiPlPiMiPiZeroPt; // array of histos of produced omegas via pi+pi-pi0 in the specified y range
227  TH1F** fHistoMCOmegaPiPlPiMiPiZeroInAccPt; // array of histos of produced omegas via pi+pi-pi0 in the specified y range,
228  // with decay products in respective y, eta ranges
229 
230  // reconstructed particles MC validated
231  TH2F** fHistoTrueMotherPiPlPiMiPiZeroInvMassPt; // histos with reconstructed validated eta or omega, inv mass, pT
232  TH2F** fHistoTrueMotherOmegaPiPlPiMiPiZeroInvMassPt; // histos with reconstructed validated omega, inv mass, pT
233  TH2F** fHistoTrueMotherEtaPiPlPiMiPiZeroInvMassPt; // histos with reconstructed validated eta, inv mass, pT
234  TH2F** fHistoTrueMotherGammaGammaInvMassPt; // histos with reconstructed validated pi0, inv mass, pT
235  TH2F** fHistoTrueMotherGammaGammaFromEtaInvMassPt; // histos with reconstructed validated pi0, inv mass, pT
236  TH2F** fHistoTrueMotherGammaGammaFromOmegaInvMassPt; // histos with reconstructed validated pi0, inv mass, pT
237  TH1F** fHistoTrueConvGammaPt; // histos with reconstructed validated conv gamma, pT
238  TH1F** fHistoTrueConvGammaFromNeutralMesonPt; // histos with reconstructed validated conv gamma from eta or omega via pi0, pT
239  TH1F** fHistoTrueClusterGammaPt; // histos with reconstructed validated cluster gamma, pT
240  TH1F** fHistoTrueClusterGammaFromNeutralMesonPt; // histos with reconstructed validated cluster gamma from eta or omega via pi0, pT
241  TH1F** fHistoTruePosPionPt; // histos with reconstructed validated positive pion, pT
242  TH1F** fHistoTruePosPionFromNeutralMesonPt; // histos with reconstructed validated positive pion from eta or omega, pT
243  TH1F** fHistoTrueNegPionPt; // histos with reconstructed validated negative pion, pT
244  TH1F** fHistoTrueNegPionFromNeutralMesonPt; // histos with reconstructed validated negative pion from eta or omega, pT
245  TH2F** fHistoTruePionPionInvMassPt; // histos with reconstructed validated two pion, invariant mass, pT
246  TH2F** fHistoTruePionPionFromSameMotherInvMassPt; // histos with reconstructed validated two pion from same mother, invariant mass, pT
247  TH2F** fHistoTruePionPionFromEtaInvMassPt; // histos with reconstructed validated two pion from eta , invariant mass, pT
248  TH2F** fHistoTruePionPionFromOmegaInvMassPt; // histos with reconstructed validated two pion from omega, invariant mass, pT
249 
250  TH2F** fHistoTruePiPlPiMiSameMotherFromEtaInvMassPt; // histos with reconstructed validated pi+ pi- from omega, invariant mass, pT
251  TH2F** fHistoTruePiPlPiMiSameMotherFromOmegaInvMassPt; // histos with reconstructed validated pi+ pi- from eta, invariant mass, pT
252  TH2F** fHistoTruePiPlPiMiSameMotherFromRhoInvMassPt; // histos with reconstructed validated pi+ pi- from rho0, invariant mass, pT
253  TH2F** fHistoTruePiPlPiMiSameMotherFromEtaPrimeInvMassPt; // histos with reconstructed validated pi+ pi- from etaprime, invariant mass, pT
254  TH2F** fHistoTruePiPlPiMiSameMotherFromK0sInvMassPt; // histos with reconstructed validated pi+ pi- from K0s, invariant mass, pT
255  TH2F** fHistoTruePiPlPiMiSameMotherFromK0lInvMassPt; // histos with reconstructed validated pi+ pi- from K0s, invariant mass, pT
256 
257  TH2F** fHistoTruePiMiPiZeroSameMotherFromEtaInvMassPt; // histos with reconstructed validated pi0 pi- from omega, invariant mass, pT
258  TH2F** fHistoTruePiMiPiZeroSameMotherFromOmegaInvMassPt; // histos with reconstructed validated pi0 pi- from eta, invariant mass, pT
259  TH2F** fHistoTruePiMiPiZeroSameMotherFromRhoInvMassPt; // histos with reconstructed validated pi0 pi- from rho0, invariant mass, pT
260  TH2F** fHistoTruePiMiPiZeroSameMotherFromK0lInvMassPt; // histos with reconstructed validated pi0 pi- from rho0, invariant mass, pT
261 
262  TH2F** fHistoTruePiPlPiZeroSameMotherFromEtaInvMassPt; // histos with reconstructed validated pi0 pi+ from omega, invariant mass, pT
263  TH2F** fHistoTruePiPlPiZeroSameMotherFromOmegaInvMassPt; // histos with reconstructed validated pi0 pi+ from eta, invariant mass, pT
264  TH2F** fHistoTruePiPlPiZeroSameMotherFromRhoInvMassPt; // histos with reconstructed validated pi0 pi+ from rho0, invariant mass, pT
265  TH2F** fHistoTruePiPlPiZeroSameMotherFromK0lInvMassPt; // histos with reconstructed validated pi0 pi+ from K0l, invariant mass, pT
266  TH2F** fHistoTruePiPlPiMiPiZeroPureCombinatoricalInvMassPt; // histos with reconstructed validated pi+pi-pi0 that are pure combinatorical (do not share a mother)
267  TH2F** fHistoTruePiPlPiMiPiZeroContaminationInvMassPt; // histos with reconstructed pi+pi-pi0 that are not actually pions
268 
277  // Event properties
278  TH1I** fHistoNEvents; // histo for event counting
279  TH1I** fHistoNGoodESDTracks; // histo number of reconstructed primary tracks
280  TProfile** fProfileEtaShift; // profile for eta shift bookkeeping
282 
283 
284  TRandom3 fRandom; // random number
285  Int_t fnCuts; // number of cuts to be run in parallel
286  Int_t fiCut; // current cut
287  Int_t fNumberOfESDTracks; // integer with number of primary tracks in this event
288  Bool_t fMoveParticleAccordingToVertex; // Flag to move parice to the vertex
289  Int_t fIsHeavyIon; // Flag for collision system 0: pp, 1: PbPb, 2: pPb
290  Bool_t fDoMesonAnalysis; // Flag for switching on meson analysis
291  Int_t fDoMesonQA; // Switching for meson QA 0: no QA 1: small QA 2: big QA
292  Bool_t fIsFromMBHeader; // Flag for particle whether it belongs to accepted header
293  Bool_t fIsMC; // Flag for MC
294  Bool_t fDoLightOutput; // Flag to turn on light output
295  Int_t fNeutralPionMode; // Flag how neutral pion is reconstructed 0=PCM-PCM, 1=PCM-Calo, 2=Calo-Calo
296  Double_t fTolerance; // tolerance in rad for angle cuts
297  Double_t fNeutralPionPtMin; // min. pT fpr NeutralPion candidates
298 private:
301 
303 };
304 
305 #endif // ALIANALYSISTASKNEUTRALMESONTOPIPLPIMIPIZERO_H
306 
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.
const Double_t ptmin
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)