]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/totEt/AliAnalysisEtMonteCarlo.h
Adding lots of track matching histos and cutting on matched track quality
[u/mrichter/AliRoot.git] / PWGLF / totEt / AliAnalysisEtMonteCarlo.h
1 #ifndef ALIANALYSISETMONTECARLO_H
2 #define ALIANALYSISETMONTECARLO_H
3 //_________________________________________________________________________
4 //  Utility Class for transverse energy studies
5 //  Base class for MC analysis
6 //  - MC output
7 //
8 //*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL)
9 //_________________________________________________________________________
10 #include "AliAnalysisEt.h"
11 class TParticle;
12 class TH3F;
13 class TH2I;
14 class AliPHOSGeoUtils;
15 class AliPHOSGeometry;
16 class AliStack;
17 //class AliMCEvent;
18 //class AliESDEvent;
19
20 class AliAnalysisEtMonteCarlo : public AliAnalysisEt
21 {
22
23 public:
24
25     AliAnalysisEtMonteCarlo();
26     virtual ~AliAnalysisEtMonteCarlo();
27
28     virtual Int_t AnalyseEvent(AliVEvent* event);
29     virtual Int_t AnalyseEvent(AliVEvent* event, AliVEvent* event2);
30     //virtual Int_t AnalyseEvent(AliMCEvent* event, AliESDEvent* event2);
31
32     virtual void Init();
33     virtual void ResetEventValues();
34     virtual void CreateHistograms();
35     virtual void FillOutputList(TList* list);
36
37     virtual void FillHistograms();
38
39     void CalcTrackMatchVsMult(){fCalcTrackMatchVsMult = kTRUE;}
40     void CalcForKaonCorrection(){fCalcForKaonCorrection = kTRUE;}
41     void IsData(){fIsMC = kFALSE;}
42
43 protected:
44
45     virtual bool TrackHitsCalorimeter(TParticle *part, Double_t magField=0.5);
46
47
48     Int_t GetPrimMother(Int_t partIdx, AliStack *stack);
49
50     Int_t GetK0InFamily(Int_t partIdx, AliStack *stack);
51
52     Int_t PrintFamilyTree(Int_t partIdx, AliStack *stack);
53     Int_t PrintMothers(Int_t partIdx, AliStack *stack, Int_t gen);
54
55
56
57 protected:
58     Bool_t fIsMC;//if we are running over data, we still need this object to exist but we don't want to do anything.
59
60     Double_t fImpactParameter; // b(fm), for Hijing; 0 otherwise
61     Int_t fNcoll; // Ncoll, for Hijing; 1 otherwise
62     Int_t fNpart; // Ncoll, for Hijing; 2 otherwise
63
64     TTree *fPrimaryTree; // Tree holding info on primaries
65
66     Double_t fTotEtWithSecondaryRemoved; // enter comment here
67     Double_t fTotEtSecondaryFromEmEtPrimary; // enter comment here
68     Double_t fTotEtSecondary; // enter comment here
69     
70     Int_t fPrimaryCode; // enter comment here
71     Int_t fPrimaryCharge; // enter comment here
72
73     Double_t fPrimaryE; // enter comment here
74     Double_t fPrimaryEt; // enter comment here
75
76     Double_t fPrimaryPx; // enter comment here
77     Double_t fPrimaryPy; // enter comment here
78     Double_t fPrimaryPz; // enter comment here
79     
80     Double_t fPrimaryVx; // enter comment here
81     Double_t fPrimaryVy; // enter comment here
82     Double_t fPrimaryVz; // enter comment here
83     
84     Bool_t fPrimaryAccepted; // enter comment here
85     Bool_t fPrimaryMatched;
86     Int_t fDepositedCode; // enter comment here Double_t fDepositedEt; // enter comment here
87     Double_t fDepositedE;
88     Double_t fDepositedEt;
89     Int_t fDepositedCharge; // enter comment here
90
91     Double_t fDepositedVx; // enter comment here
92     Double_t fDepositedVy; // enter comment here
93     Double_t fDepositedVz; // enter comment here
94
95     Bool_t fSecondary;
96
97     Double_t fReconstructedE;
98     Double_t fReconstructedEt;
99     
100     Double_t fTotPx;
101     Double_t fTotPy;
102     Double_t fTotPz;
103     
104
105     Int_t fClusterMult;
106
107     TH3F *fHistDecayVertexNonRemovedCharged; // Decay vertex for non-removed charged particles
108     TH3F *fHistDecayVertexRemovedCharged; // Decay vertex for non-removed charged particles
109     TH3F *fHistDecayVertexNonRemovedNeutral; // Decay vertex for non-removed charged particles
110     TH3F *fHistDecayVertexRemovedNeutral; // Decay vertex for non-removed charged particles
111
112     TH2F *fHistRemovedOrNot; // If charged/neutral particles were removed or not
113
114     TH2F *fHistEtNonRemovedProtons; // enter comment here
115     TH2F *fHistEtNonRemovedAntiProtons; // enter comment here
116     TH2F *fHistEtNonRemovedPiPlus; // enter comment here
117     TH2F *fHistEtNonRemovedPiMinus; // enter comment here
118     TH2F *fHistEtNonRemovedKaonPlus; // enter comment here
119     TH2F *fHistEtNonRemovedKaonMinus; // enter comment here
120     TH2F *fHistEtNonRemovedK0s; // enter comment here
121     TH2F *fHistEtNonRemovedK0L; // enter comment here
122     TH2F *fHistEtNonRemovedLambdas; // enter comment here
123     TH2F *fHistEtNonRemovedElectrons; // enter comment here
124     TH2F *fHistEtNonRemovedPositrons; // enter comment here
125     TH2F *fHistEtNonRemovedMuPlus; // enter comment here
126     TH2F *fHistEtNonRemovedMuMinus; // enter comment here
127     TH2F *fHistEtNonRemovedNeutrons; // enter comment here
128     TH2F *fHistEtNonRemovedAntiNeutrons; // enter comment here
129     TH2F *fHistEtNonRemovedGammas; // enter comment here
130     TH2F *fHistEtNonRemovedGammasFromPi0; // enter comment here
131
132     TH2F *fHistEtRemovedGammas; // enter comment here
133     TH2F *fHistEtRemovedNeutrons; // enter comment here
134     TH2F *fHistEtRemovedAntiNeutrons; // enter comment here
135
136     TH2F *fHistEtRemovedCharged; // enter comment here
137     TH2F *fHistEtRemovedNeutrals; // enter comment here
138
139     TH2F *fHistEtNonRemovedCharged; // enter comment here
140     TH2F *fHistEtNonRemovedNeutrals; // enter comment here
141
142     TH2F *fHistMultNonRemovedProtons; // enter comment here
143     TH2F *fHistMultNonRemovedAntiProtons; // enter comment here
144     TH2F *fHistMultNonRemovedPiPlus; // enter comment here
145     TH2F *fHistMultNonRemovedPiMinus; // enter comment here
146     TH2F *fHistMultNonRemovedKaonPlus; // enter comment here
147     TH2F *fHistMultNonRemovedKaonMinus; // enter comment here
148     TH2F *fHistMultNonRemovedK0s; // enter comment here
149     TH2F *fHistMultNonRemovedK0L; // enter comment here
150     TH2F *fHistMultNonRemovedLambdas; // enter comment here
151     TH2F *fHistMultNonRemovedElectrons; // enter comment here
152     TH2F *fHistMultNonRemovedPositrons; // enter comment here
153     TH2F *fHistMultNonRemovedMuPlus; // enter comment here
154     TH2F *fHistMultNonRemovedMuMinus; // enter comment here
155     TH2F *fHistMultNonRemovedNeutrons; // enter comment here
156     TH2F *fHistMultNonRemovedAntiNeutrons; // enter comment here
157     TH2F *fHistMultNonRemovedGammas; // enter comment here
158
159     TH2F *fHistMultRemovedGammas; // enter comment here
160     TH2F *fHistMultRemovedNeutrons; // enter comment here
161     TH2F *fHistMultRemovedAntiNeutrons; // enter comment here
162
163     TH2F *fHistMultRemovedCharged; // enter comment here
164     TH2F *fHistMultRemovedNeutrals; // enter comment here
165
166     TH2F *fHistMultNonRemovedCharged; // enter comment here
167     TH2F *fHistMultNonRemovedNeutrals; // enter comment here
168
169     TH2F *fHistTrackMultvsNonRemovedCharged; // enter comment here
170     TH2F *fHistTrackMultvsNonRemovedNeutral; // enter comment here
171     TH2F *fHistTrackMultvsRemovedGamma; // enter comment here
172
173     TH2F *fHistClusterMultvsNonRemovedCharged; // enter comment here
174     TH2F *fHistClusterMultvsNonRemovedNeutral; // enter comment here
175     TH2F *fHistClusterMultvsRemovedGamma; // enter comment here
176
177     TH2F *fHistMultvsNonRemovedChargedE; // enter comment here
178     TH2F *fHistMultvsNonRemovedNeutralE; // enter comment here
179     TH2F *fHistMultvsRemovedGammaE; // enter comment here
180
181     Bool_t fCalcForKaonCorrection;//turns on and off creation of kaon correction histograms
182     TH3F *fHistK0EDepositsVsPtInAcceptance; // enter comment here
183     TH3F *fHistK0EGammaVsPtInAcceptance; // enter comment here
184     TH3F *fHistK0EDepositsVsPtOutOfAcceptance; // enter comment here
185     TH3F *fHistK0EGammaVsPtOutOfAcceptance; // enter comment here
186     TH1F *fHistSimKaonsInAcceptance;// enter comment here
187     TH1F *fHistSimK0SInAcceptance;// enter comment here
188     TH1F *fHistSimKPlusInAcceptance;// enter comment here
189     TH1F *fHistSimKMinusInAcceptance;// enter comment here
190     TH1F *fHistSimK0LInAcceptance;// enter comment here
191     TH1F *fHistSimKaonsOutOfAcceptance;// enter comment here
192     TH1F *fHistSimKaonsInAcceptanceWithDepositsPrimaries;// enter comment here
193     TH1F *fHistSimKaonsOutOfAcceptanceWithDepositsSecondaries;// enter comment here
194     TH1F *fHistSimKaonsOutOfAcceptanceWithDepositsPrimaries;// enter comment here
195
196     Float_t fEtNonRemovedProtons; // enter comment here
197     Float_t fEtNonRemovedAntiProtons; // enter comment here
198     Float_t fEtNonRemovedPiPlus; // enter comment here
199     Float_t fEtNonRemovedPiMinus; // enter comment here
200     Float_t fEtNonRemovedKaonPlus; // enter comment here
201     Float_t fEtNonRemovedKaonMinus; // enter comment here
202     Float_t fEtNonRemovedK0S; // enter comment here
203     Float_t fEtNonRemovedK0L; // enter comment here
204     Float_t fEtNonRemovedLambdas; // enter comment here
205     Float_t fEtNonRemovedElectrons; // enter comment here
206     Float_t fEtNonRemovedPositrons; // enter comment here
207     Float_t fEtNonRemovedMuMinus; // enter comment here
208     Float_t fEtNonRemovedMuPlus; // enter comment here
209     Float_t fEtNonRemovedGammas; // enter comment here
210     Float_t fEtNonRemovedGammasFromPi0; // enter comment here
211     Float_t fEtNonRemovedNeutrons; // enter comment here
212     Float_t fEtNonRemovedAntiNeutrons; // enter comment here
213
214     Float_t fEtRemovedProtons; // enter comment here
215     Float_t fEtRemovedAntiProtons; // enter comment here
216     Float_t fEtRemovedPiPlus; // enter comment here
217     Float_t fEtRemovedPiMinus; // enter comment here
218     Float_t fEtRemovedKaonPlus; // enter comment here
219     Float_t fEtRemovedKaonMinus; // enter comment here
220     Float_t fEtRemovedK0s; // enter comment here
221     Float_t fEtRemovedK0L; // enter comment here
222     Float_t fEtRemovedLambdas; // enter comment here
223     Float_t fEtRemovedElectrons; // enter comment here
224     Float_t fEtRemovedPositrons; // enter comment here
225     Float_t fEtRemovedMuMinus; // enter comment here
226     Float_t fEtRemovedMuPlus; // enter comment here
227
228     Float_t fEtRemovedGammasFromPi0; // enter comment here
229     Float_t fEtRemovedGammas; // enter comment here
230     Float_t fEtRemovedNeutrons; // enter comment here
231     Float_t fEtRemovedAntiNeutrons; // enter comment here
232
233     Int_t fMultNonRemovedProtons; // enter comment here
234     Int_t fMultNonRemovedAntiProtons; // enter comment here
235     Int_t fMultNonRemovedPiPlus; // enter comment here
236     Int_t fMultNonRemovedPiMinus; // enter comment here
237     Int_t fMultNonRemovedKaonPlus; // enter comment here
238     Int_t fMultNonRemovedKaonMinus; // enter comment here
239     Int_t fMultNonRemovedK0s; // enter comment here
240     Int_t fMultNonRemovedK0L; // enter comment here
241     Int_t fMultNonRemovedLambdas; // enter comment here
242     Int_t fMultNonRemovedElectrons; // enter comment here
243     Int_t fMultNonRemovedPositrons; // enter comment here
244     Int_t fMultNonRemovedMuMinus; // enter comment here
245     Int_t fMultNonRemovedMuPlus; // enter comment here
246     Int_t fMultNonRemovedGammas; // enter comment here
247     Int_t fMultNonRemovedNeutrons; // enter comment here
248     Int_t fMultNonRemovedAntiNeutrons; // enter comment here
249
250     Int_t fMultRemovedProtons; // enter comment here
251     Int_t fMultRemovedAntiProtons; // enter comment here
252     Int_t fMultRemovedPiPlus; // enter comment here
253     Int_t fMultRemovedPiMinus; // enter comment here
254     Int_t fMultRemovedKaonPlus; // enter comment here
255     Int_t fMultRemovedKaonMinus; // enter comment here
256     Int_t fMultRemovedK0s; // enter comment here
257     Int_t fMultRemovedK0L; // enter comment here
258
259     Int_t fMultRemovedLambdas; // enter comment here
260     Int_t fMultRemovedElectrons; // enter comment here
261     Int_t fMultRemovedPositrons; // enter comment here
262     Int_t fMultRemovedMuMinus; // enter comment here
263     Int_t fMultRemovedMuPlus; // enter comment here
264
265     Int_t fMultRemovedGammas; // enter comment here
266     Int_t fMultRemovedNeutrons; // enter comment here
267     Int_t fMultRemovedAntiNeutrons; // enter comment here
268
269     Int_t fTrackMultInAcc; // enter comment here
270
271
272     TH2F *fHistDxDzNonRemovedCharged; // enter comment here
273     TH2F *fHistDxDzRemovedCharged; // enter comment here
274     TH2F *fHistDxDzNonRemovedNeutral; // enter comment here
275     TH2F *fHistDxDzRemovedNeutral; // enter comment here
276
277     TH1F *fHistPiPlusMult; // enter comment here
278     TH1F *fHistPiMinusMult; // enter comment here
279     TH1F *fHistPiZeroMult; // enter comment here
280
281     TH1F *fHistPiPlusMultAcc; // enter comment here
282     TH1F *fHistPiMinusMultAcc; // enter comment here
283     TH1F *fHistPiZeroMultAcc; // enter comment here
284
285    // Int_t fPiPlusMult; // enter comment here
286    // Int_t fPiMinusMult; // enter comment here
287     
288     Int_t fPiZeroMult; // enter comment here
289
290     Int_t fPiPlusMultAcc; // enter comment here
291     Int_t fPiMinusMultAcc; // enter comment here
292     Int_t fPiZeroMultAcc; // enter comment here
293
294
295     Int_t fNeutralRemoved; // number of neutral particles that where removed by track matching
296     Int_t fChargedRemoved; // number of charged particles that where removed by track matching
297     Int_t fChargedNotRemoved; // number of charged particles that were not removed
298     Int_t fNeutralNotRemoved; // number of neutral particles that were not removed
299     Int_t fGammaRemoved; // number of gammas removed
300
301     Int_t fSecondaryNotRemoved;
302
303     Double_t fEnergyNeutralRemoved; // energy of neutral particles that where removed by track matching
304     Double_t fEnergyChargedRemoved; // energy of charged particles that where removed by track matching
305     Double_t fEnergyChargedNotRemoved; // energy of charged particles that were not removed
306     Double_t fEnergyNeutralNotRemoved; // energy of neutral particles that were not removed
307     Double_t fEnergyGammaRemoved; // energy of gammas that were removed
308
309     Int_t fNClusters; // Number of clusters in event
310
311     Double_t fTotNeutralEtAfterMinEnergyCut; // enter comment here
312     
313     Bool_t fCalcTrackMatchVsMult;
314     TH1F *fHistGammasFound;
315     TH1F *fHistGammasGenerated;
316     TH1F *fHistChargedTracksCut;
317     TH1F *fHistChargedTracksAccepted;
318     TH1F *fHistGammasCut;
319     TH1F *fHistGammasAccepted;
320     TH2F *fHistChargedTracksCutMult;
321     TH2F *fHistChargedTracksAcceptedMult;
322     TH2F *fHistGammasCutMult;
323     TH2F *fHistGammasAcceptedMult;
324     TH1F *fHistBadTrackMatches;
325     TH2F *fHistMatchedTracksEvspTBkgd;
326     TH2F *fHistMatchedTracksEvspTSignal;
327     TH2F *fHistMatchedTracksEvspTBkgdPeripheral;
328     TH2F *fHistMatchedTracksEvspTSignalPeripheral;
329     TH3F *fHistMatchedTracksEvspTBkgdvsMult;
330     TH3F *fHistMatchedTracksEvspTSignalvsMult;
331     TH1F *fHistChargedTracksCutPeripheral;
332     TH1F *fHistChargedTracksAcceptedPeripheral;
333     TH1F *fHistGammasCutPeripheral;
334     TH1F *fHistGammasAcceptedPeripheral;
335     TH2F *fHistBadTrackMatchesdPhidEta;
336     TH2F *fHistGoodTrackMatchesdPhidEta;
337     TH1F *fHistHadronDepositsAll;
338     TH1F *fHistHadronDepositsReco;
339     TH2F *fHistHadronDepositsAllMult;
340     TH2F *fHistHadronDepositsRecoMult;
341
342
343 private:
344
345     //Declare it private to avoid compilation warning
346     AliAnalysisEtMonteCarlo & operator = (const AliAnalysisEtMonteCarlo & g) ;//cpy assignment
347     AliAnalysisEtMonteCarlo(const AliAnalysisEtMonteCarlo & g) ; // cpy ctor
348     ClassDef(AliAnalysisEtMonteCarlo, 2);
349 };
350
351 #endif // ALIANALYSISETMONTECARLO_H