]>
Commit | Line | Data |
---|---|---|
cf6522d1 | 1 | //_________________________________________________________________________ |
2 | // Utility Class for transverse energy studies | |
3 | // Base class for ESD & MC analysis | |
4 | // - reconstruction and MonteCarlo output | |
5 | // implementation file | |
6 | // | |
7 | //*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL) | |
8 | //_________________________________________________________________________ | |
9 | ||
2fbf38ac | 10 | #include "AliAnalysisEt.h" |
11 | #include "TMath.h" | |
12 | #include "TList.h" | |
13 | #include "TH1F.h" | |
14 | #include "TH2F.h" | |
ce546038 | 15 | #include "TTree.h" |
2fbf38ac | 16 | #include <iostream> |
17 | #include "AliAnalysisEtCuts.h" | |
951efd81 | 18 | #include "AliESDtrackCuts.h" |
f9a4ed81 | 19 | #include "AliESDCaloCluster.h" |
641e1e0c | 20 | #include "AliVEvent.h" |
cf6522d1 | 21 | #include "Rtypes.h" |
0f97be4c | 22 | #include "TString.h" |
1423b942 | 23 | //#include "THnSparse.h" |
641e1e0c | 24 | |
25 | using namespace std; | |
2fbf38ac | 26 | ClassImp(AliAnalysisEt); |
27 | ||
0651f6b4 | 28 | /* Auxiliary Histogram variables */ |
29 | Int_t AliAnalysisEt::fgnumOfEtaBins = 16; | |
30 | Float_t AliAnalysisEt::fgEtaAxis[17]={-0.78, -0.7, -0.58, -0.46, -0.34, -0.22, -0.12, -0.06, -0.0, 0.06, 0.12, 0.22, 0.34, 0.46, 0.58, 0.7, 0.78}; | |
31 | ||
1423b942 | 32 | Int_t AliAnalysisEt::fgNumOfPtBins = 111; |
33 | Float_t AliAnalysisEt::fgPtAxis[117]= | |
34 | {0.0,0.01,0.02,0.03,0.04, 0.05, 0.06,0.07,0.08,0.09, 0.10,0.11, .12,0.13, .14,0.15, .16,0.17, .18,0.19, | |
35 | 0.2, .22, .24, .26, .28, 0.30, 0.32, .34, .36, .38, 0.40, .42, .44, .46, .48, | |
36 | 0.5, .52, .54, .56, .58, 0.60, 0.62, .64, .66, .68, 0.70, .72, .74, .76, .78, | |
37 | .80, .82, .84, .86, .88, 0.90, 0.92, .94, .96, .98, 1.00,1.05, 1.1,1.15, 1.2, | |
38 | 1.25, 1.3,1.35,1.40,1.45, 1.50, 1.55, 1.6,1.65, 1.7, 1.75, 1.8,1.85, 1.9,1.95, | |
39 | 2.0, 2.2, 2.4, 2.6, 2.8, 3.00, 3.20, 3.4, 3.6, 3.8, 4.00, 4.2, 4.4, 4.6, 4.8, | |
40 | 5.0, 5.5, 6.0, 6.5, 7.0, 7.50, 8.00, 8.5, 9.0, 9.5, 10.0,12.0,14.0,16.0,18.0, | |
41 | 20.0,25.0,30.0,35.0,40.0, 45.0, 50.0}; | |
42 | ||
0651f6b4 | 43 | Int_t AliAnalysisEt::fgNumOfEBins = 78; |
44 | Float_t AliAnalysisEt::fgEAxis[79]={0., 0.05, 0.10, 0.15, 0.20, 0.25, 0.30, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, | |
45 | 1.,1.5,2.,2.5,3.,3.5,4.,4.5,5.,5.5,6.,6.5,7.,7.5,8.,8.5,9.,9.5,10.,11., | |
46 | 12.,13.,14.,15.,16.,17.,18.,19.,20.,21.,22.,23.,24.,25.,26.,27.,28.,29.,30.,31., | |
47 | 32.,33.,34.,35.,36.,37.,38.,39.,40.,41.,42.,43.,44.,45.,46.,47.,48.,49.,50.}; | |
48 | ||
1423b942 | 49 | Int_t AliAnalysisEt::fgNumOfRBins = 47; |
50 | Float_t AliAnalysisEt::fgRAxis[48]={-2.,-1.,0.,0.0005,0.001,0.0015,0.002,0.0025,0.003,0.0035,0.004,0.0045,0.005,0.0055,0.006,0.0065,0.007,0.0075,0.008,0.0085,0.009,0.0095,0.01, | |
51 | 0.011,0.012,0.013,0.014,0.015,0.016,0.017,0.018,0.019,0.020,0.022,0.024,0.026,0.028,0.03,0.032,0.034,0.036,0.038,0.04,0.042,0.044,0.046,0.048,0.05}; | |
52 | ||
2fbf38ac | 53 | |
7d2d1773 | 54 | AliAnalysisEt::AliAnalysisEt() : AliAnalysisEtCommon() |
7d2d1773 | 55 | ,fTotEt(0) |
56 | ,fTotEtAcc(0) | |
57 | ,fTotNeutralEt(0) | |
58 | ,fTotNeutralEtAcc(0) | |
59 | ,fTotChargedEt(0) | |
60 | ,fTotChargedEtAcc(0) | |
61 | ,fMultiplicity(0) | |
62 | ,fChargedMultiplicity(0) | |
63 | ,fNeutralMultiplicity(0) | |
64 | ,fBaryonEt(0) | |
65 | ,fAntiBaryonEt(0) | |
66 | ,fMesonEt(0) | |
67 | ,fProtonEt(0) | |
68 | ,fPionEt(0) | |
69 | ,fChargedKaonEt(0) | |
70 | ,fMuonEt(0) | |
71 | ,fElectronEt(0) | |
72 | ,fNeutronEt(0) | |
73 | ,fAntiNeutronEt(0) | |
74 | ,fGammaEt(0) | |
75 | ,fProtonEtAcc(0) | |
76 | ,fPionEtAcc(0) | |
77 | ,fChargedKaonEtAcc(0) | |
78 | ,fMuonEtAcc(0) | |
79 | ,fElectronEtAcc(0) | |
80 | ,fEnergyDeposited(0) | |
81 | ,fEnergyTPC(0) | |
82 | ,fCharge(0) | |
83 | ,fParticlePid(0) | |
84 | ,fPidProb(0) | |
85 | ,fTrackPassedCut(kFALSE) | |
f9a4ed81 | 86 | ,fCentClass(0) |
7d2d1773 | 87 | ,fEtaCut(0) |
88 | ,fEtaCutAcc(0) | |
89 | ,fPhiCutAccMin(0) | |
90 | ,fPhiCutAccMax(0) | |
91 | ,fDetectorRadius(0) | |
92 | ,fClusterEnergyCut(0) | |
93 | ,fSingleCellEnergyCut(0) | |
f9a4ed81 | 94 | ,fTrackDistanceCut(0) |
476828ae | 95 | ,fTrackDxCut(0) |
96 | ,fTrackDzCut(0) | |
7d2d1773 | 97 | ,fHistEt(0) |
98 | ,fHistChargedEt(0) | |
99 | ,fHistNeutralEt(0) | |
100 | ,fHistEtAcc(0) | |
101 | ,fHistChargedEtAcc(0) | |
102 | ,fHistNeutralEtAcc(0) | |
103 | ,fHistMult(0) | |
104 | ,fHistChargedMult(0) | |
105 | ,fHistNeutralMult(0) | |
106 | ,fHistPhivsPtPos(0) | |
107 | ,fHistPhivsPtNeg(0) | |
108 | ,fHistBaryonEt(0) | |
109 | ,fHistAntiBaryonEt(0) | |
110 | ,fHistMesonEt(0) | |
111 | ,fHistProtonEt(0) | |
112 | ,fHistPionEt(0) | |
113 | ,fHistChargedKaonEt(0) | |
114 | ,fHistMuonEt(0) | |
115 | ,fHistElectronEt(0) | |
116 | ,fHistNeutronEt(0) | |
117 | ,fHistAntiNeutronEt(0) | |
118 | ,fHistGammaEt(0) | |
119 | ,fHistProtonEtAcc(0) | |
120 | ,fHistPionEtAcc(0) | |
121 | ,fHistChargedKaonEtAcc(0) | |
122 | ,fHistMuonEtAcc(0) | |
123 | ,fHistElectronEtAcc(0) | |
124 | ,fHistTMDeltaR(0) | |
f9a4ed81 | 125 | ,fHistTMDxDz(0) |
7d2d1773 | 126 | ,fTree(0) |
127 | ,fTreeDeposit(0) | |
5501aa9c | 128 | ,fCentrality(0) |
f9a4ed81 | 129 | ,fDetector(0) |
130 | ,fSparseHistTracks(0) | |
131 | ,fSparseHistClusters(0) | |
132 | ,fSparseHistEt(0) | |
133 | ,fSparseTracks(0) | |
134 | ,fSparseClusters(0) | |
135 | ,fSparseEt(0) | |
136 | ||
0651f6b4 | 137 | {} |
2fbf38ac | 138 | |
139 | AliAnalysisEt::~AliAnalysisEt() | |
464aa50c | 140 | {//Destructor |
951efd81 | 141 | if(fTreeDeposit){ |
142 | fTreeDeposit->Clear(); | |
143 | delete fTreeDeposit; // optional TTree | |
144 | } | |
145 | if(fTree){ | |
146 | fTree->Clear(); | |
147 | delete fTree; // optional TTree | |
148 | } | |
7d2d1773 | 149 | delete fHistEt; //Et spectrum |
150 | delete fHistChargedEt; //Charged Et spectrum | |
151 | delete fHistNeutralEt; //Neutral Et spectrum | |
152 | delete fHistEtAcc; //Et in acceptance | |
153 | delete fHistChargedEtAcc; //Charged Et in acceptance | |
154 | delete fHistNeutralEtAcc; //Et in acceptance | |
155 | delete fHistMult; //Multiplicity | |
156 | delete fHistChargedMult; //Charged multiplicity | |
157 | delete fHistNeutralMult; //Neutral multiplicity | |
158 | delete fHistPhivsPtPos; //phi vs pT plot for positive tracks | |
159 | delete fHistPhivsPtNeg; //phi vs pT plot for negative tracks | |
160 | delete fHistBaryonEt; /** Et of identified baryons */ | |
161 | delete fHistAntiBaryonEt; /** Et of identified anti-baryons */ | |
162 | delete fHistMesonEt; /** Et of identified mesons */ | |
163 | delete fHistProtonEt; /** Et of identified protons */ | |
164 | delete fHistPionEt; /** Et of identified protons */ | |
165 | delete fHistChargedKaonEt; /** Et of identified charged kaons */ | |
166 | delete fHistMuonEt; /** Et of identified muons */ | |
167 | delete fHistElectronEt; /** Et of identified electrons */ | |
168 | delete fHistNeutronEt; /** Et of neutrons (MC only for now) */ | |
169 | delete fHistAntiNeutronEt; /** Et of anti-neutrons (MC only for now) */ | |
170 | delete fHistGammaEt; /** Et of gammas (MC only for now) */ | |
171 | delete fHistProtonEtAcc; /** Et of identified protons in calorimeter acceptance */ | |
172 | delete fHistPionEtAcc; /** Et of identified protons in calorimeter acceptance */ | |
173 | delete fHistChargedKaonEtAcc; /** Et of identified charged kaons in calorimeter acceptance */ | |
174 | delete fHistMuonEtAcc; /** Et of identified muons in calorimeter acceptance */ | |
175 | delete fHistElectronEtAcc; /** Et of identified electrons in calorimeter acceptance */ | |
176 | delete fHistTMDeltaR; /* Track matching plots; Rec only for now */ | |
f9a4ed81 | 177 | delete fHistTMDxDz; /* Track matching plots; Rec only for now */ |
2fbf38ac | 178 | } |
179 | ||
180 | void AliAnalysisEt::FillOutputList(TList *list) | |
cf6522d1 | 181 | { // histograms to be added to output |
2fbf38ac | 182 | list->Add(fHistEt); |
183 | list->Add(fHistChargedEt); | |
184 | list->Add(fHistNeutralEt); | |
185 | ||
186 | list->Add(fHistEtAcc); | |
187 | list->Add(fHistChargedEtAcc); | |
188 | list->Add(fHistNeutralEtAcc); | |
189 | ||
190 | list->Add(fHistMult); | |
191 | list->Add(fHistChargedMult); | |
192 | list->Add(fHistNeutralMult); | |
193 | ||
194 | list->Add(fHistPhivsPtPos); | |
195 | list->Add(fHistPhivsPtNeg); | |
196 | ||
197 | list->Add(fHistBaryonEt); | |
198 | list->Add(fHistAntiBaryonEt); | |
199 | list->Add(fHistMesonEt); | |
200 | ||
43056f1b | 201 | list->Add(fHistProtonEt); |
202 | list->Add(fHistPionEt); | |
203 | list->Add(fHistChargedKaonEt); | |
204 | list->Add(fHistMuonEt); | |
205 | list->Add(fHistElectronEt); | |
206 | ||
207 | list->Add(fHistNeutronEt); | |
208 | list->Add(fHistAntiNeutronEt); | |
209 | list->Add(fHistGammaEt); | |
210 | ||
87efb15c | 211 | list->Add(fHistProtonEtAcc); |
43056f1b | 212 | list->Add(fHistPionEtAcc); |
87efb15c | 213 | list->Add(fHistChargedKaonEtAcc); |
214 | list->Add(fHistMuonEtAcc); | |
215 | list->Add(fHistElectronEtAcc); | |
216 | ||
2fbf38ac | 217 | list->Add(fHistTMDeltaR); |
f9a4ed81 | 218 | list->Add(fHistTMDxDz); |
0651f6b4 | 219 | |
ce546038 | 220 | if (fCuts) { |
221 | if (fCuts->GetHistMakeTree()) { | |
222 | list->Add(fTree); | |
223 | } | |
f9a4ed81 | 224 | if (fCuts->GetHistMakeTreeDeposit()) { |
225 | list->Add(fTreeDeposit); | |
226 | } | |
ce546038 | 227 | } |
f9a4ed81 | 228 | |
229 | list->Add(fSparseHistTracks); | |
230 | list->Add(fSparseHistClusters); | |
231 | list->Add(fSparseHistEt); | |
232 | ||
ce546038 | 233 | |
2fbf38ac | 234 | } |
235 | ||
236 | void AliAnalysisEt::Init() | |
0065531a | 237 | {// clear variables, set up cuts and PDG info |
7d2d1773 | 238 | AliAnalysisEtCommon::Init(); |
0065531a | 239 | ResetEventValues(); |
2fbf38ac | 240 | } |
241 | ||
242 | void AliAnalysisEt::CreateHistograms() | |
cf6522d1 | 243 | { // create histograms.. |
13b0d3c1 | 244 | // histogram binning for E_T, p_T and Multiplicity: defaults for p+p |
f9a4ed81 | 245 | Int_t nbinsEt = 10000; |
246 | Double_t minEt = 0.0; | |
247 | Double_t maxEt = 1000; | |
13b0d3c1 | 248 | Int_t nbinsPt = 200; |
249 | Double_t minPt = 0; | |
250 | Double_t maxPt = 20; | |
251 | Int_t nbinsMult = 200; | |
252 | Double_t minMult = -0.5; // offset -0.5 to have integer bins centered around 0 | |
253 | Double_t maxMult = nbinsMult + minMult; // 1 bin per integer value | |
2fbf38ac | 254 | |
ce546038 | 255 | // see if we should change histogram limits etc, and possibly create a tree |
256 | if (fCuts) { | |
bf4eaf10 | 257 | if (fCuts->GetHistMakeTree()) { |
8ea99ab0 | 258 | CreateTrees(); |
bf4eaf10 | 259 | } |
0fa8c632 | 260 | |
261 | nbinsMult = fCuts->GetHistNbinsMult(); | |
262 | minMult = fCuts->GetHistMinMult(); | |
263 | maxMult = fCuts->GetHistMaxMult(); | |
264 | ||
265 | nbinsEt = fCuts->GetHistNbinsTotEt(); | |
266 | minEt = fCuts->GetHistMinTotEt(); | |
267 | maxEt = fCuts->GetHistMaxTotEt(); | |
268 | ||
269 | nbinsPt = fCuts->GetHistNbinsParticlePt(); | |
270 | minPt = fCuts->GetHistMinParticlePt(); | |
271 | maxPt = fCuts->GetHistMaxParticlePt(); | |
ce546038 | 272 | } |
273 | ||
2fbf38ac | 274 | TString histname = "fHistEt" + fHistogramNameSuffix; |
13b0d3c1 | 275 | fHistEt = new TH1F(histname.Data(), "Total E_{T} Distribution", nbinsEt, minEt, maxEt); |
2fbf38ac | 276 | fHistEt->GetXaxis()->SetTitle("E_{T} (GeV/c^{2})"); |
277 | fHistEt->GetYaxis()->SetTitle("dN/dE_{T} (c^{2}/GeV)"); | |
278 | ||
279 | histname = "fHistChargedEt" + fHistogramNameSuffix; | |
13b0d3c1 | 280 | fHistChargedEt = new TH1F(histname.Data(), "Total Charged E_{T} Distribution", nbinsEt, minEt, maxEt); |
2fbf38ac | 281 | fHistChargedEt->GetXaxis()->SetTitle("E_{T} (GeV/c^{2})"); |
282 | fHistChargedEt->GetYaxis()->SetTitle("dN/dE_{T} (c^{2}/GeV)"); | |
283 | ||
284 | histname = "fHistNeutralEt" + fHistogramNameSuffix; | |
13b0d3c1 | 285 | fHistNeutralEt = new TH1F(histname.Data(), "Total Neutral E_{T} Distribution", nbinsEt, minEt, maxEt); |
2fbf38ac | 286 | fHistNeutralEt->GetXaxis()->SetTitle("E_{T} (GeV/c^{2})"); |
287 | fHistNeutralEt->GetYaxis()->SetTitle("dN/dE_{T} (c^{2}/GeV)"); | |
288 | ||
289 | histname = "fHistEtAcc" + fHistogramNameSuffix; | |
13b0d3c1 | 290 | fHistEtAcc = new TH1F(histname.Data(), "Total E_{T} Distribution in Acceptance", nbinsEt, minEt, maxEt); |
2fbf38ac | 291 | fHistEtAcc->GetXaxis()->SetTitle("E_{T} (GeV/c^{2})"); |
292 | fHistEtAcc->GetYaxis()->SetTitle("dN/dE_{T} (c^{2}/GeV)"); | |
293 | ||
294 | histname = "fHistChargedEtAcc" + fHistogramNameSuffix; | |
13b0d3c1 | 295 | fHistChargedEtAcc = new TH1F(histname.Data(), "Total Charged E_{T} Distribution in Acceptance", nbinsEt, minEt, maxEt); |
2fbf38ac | 296 | fHistChargedEtAcc->GetXaxis()->SetTitle("E_{T} (GeV/c^{2})"); |
297 | fHistChargedEtAcc->GetYaxis()->SetTitle("dN/dE_{T} (c^{2}/GeV)"); | |
298 | ||
299 | histname = "fHistNeutralEtAcc" + fHistogramNameSuffix; | |
13b0d3c1 | 300 | fHistNeutralEtAcc = new TH1F(histname.Data(), "Total Neutral E_{T} Distribution in Acceptance", nbinsEt, minEt, maxEt); |
2fbf38ac | 301 | fHistNeutralEtAcc->GetXaxis()->SetTitle("E_{T} (GeV/c^{2})"); |
302 | fHistNeutralEtAcc->GetYaxis()->SetTitle("dN/dE_{T} (c^{2}/GeV)"); | |
303 | std::cout << histname << std::endl; | |
0651f6b4 | 304 | |
305 | histname = "fHistMult" + fHistogramNameSuffix; | |
13b0d3c1 | 306 | fHistMult = new TH1F(histname.Data(), "Total Multiplicity", nbinsMult, minMult, maxMult); |
2fbf38ac | 307 | fHistMult->GetXaxis()->SetTitle("N"); |
308 | fHistMult->GetYaxis()->SetTitle("Multiplicity"); | |
309 | ||
310 | histname = "fHistChargedMult" + fHistogramNameSuffix; | |
13b0d3c1 | 311 | fHistChargedMult = new TH1F(histname.Data(), "Charged Multiplicity", nbinsMult, minMult, maxMult); |
2fbf38ac | 312 | fHistChargedMult->GetXaxis()->SetTitle("N"); |
313 | fHistChargedMult->GetYaxis()->SetTitle("Multiplicity"); | |
314 | ||
315 | histname = "fHistNeutralMult" + fHistogramNameSuffix; | |
13b0d3c1 | 316 | fHistNeutralMult = new TH1F(histname.Data(), "Neutral Multiplicity", nbinsMult, minMult, maxMult); |
2fbf38ac | 317 | fHistNeutralMult->GetXaxis()->SetTitle("N"); |
318 | fHistNeutralMult->GetYaxis()->SetTitle("Multiplicity"); | |
319 | ||
320 | histname = "fHistPhivsPtPos" + fHistogramNameSuffix; | |
13b0d3c1 | 321 | fHistPhivsPtPos = new TH2F(histname.Data(), "Phi vs pT of positively charged tracks hitting the calorimeter", 200, 0, 2*TMath::Pi(), nbinsPt, minPt, maxPt); |
2fbf38ac | 322 | |
323 | histname = "fHistPhivsPtNeg" + fHistogramNameSuffix; | |
13b0d3c1 | 324 | fHistPhivsPtNeg = new TH2F(histname.Data(), "Phi vs pT of negatively charged tracks hitting the calorimeter", 200, 0, 2*TMath::Pi(), nbinsPt, minPt, maxPt); |
2fbf38ac | 325 | |
326 | histname = "fHistBaryonEt" + fHistogramNameSuffix; | |
13b0d3c1 | 327 | fHistBaryonEt = new TH1F(histname.Data(), "E_{T} for baryons", nbinsEt, minEt, maxEt); |
2fbf38ac | 328 | |
329 | histname = "fHistAntiBaryonEt" + fHistogramNameSuffix; | |
13b0d3c1 | 330 | fHistAntiBaryonEt = new TH1F(histname.Data(), "E_{T} for anti baryons", nbinsEt, minEt, maxEt); |
2fbf38ac | 331 | |
332 | histname = "fHistMesonEt" + fHistogramNameSuffix; | |
13b0d3c1 | 333 | fHistMesonEt = new TH1F(histname.Data(), "E_{T} for mesons", nbinsEt, minEt, maxEt); |
2fbf38ac | 334 | |
87efb15c | 335 | histname = "fHistProtonEt" + fHistogramNameSuffix; |
336 | fHistProtonEt = new TH1F(histname.Data(), "E_{T} for (anti-)protons", nbinsEt, minEt, maxEt); | |
337 | ||
43056f1b | 338 | histname = "fHistPionEt" + fHistogramNameSuffix; |
339 | fHistPionEt = new TH1F(histname.Data(), "E_{T} for #pi^+/#pi^-", nbinsEt, minEt, maxEt); | |
340 | ||
87efb15c | 341 | histname = "fHistKaonEt" + fHistogramNameSuffix; |
342 | fHistChargedKaonEt = new TH1F(histname.Data(), "E_{T} for charged kaons", nbinsEt, minEt, maxEt); | |
343 | ||
344 | histname = "fHistMuonEt" + fHistogramNameSuffix; | |
345 | fHistMuonEt = new TH1F(histname.Data(), "E_{T} for muons", nbinsEt, minEt, maxEt); | |
346 | ||
347 | histname = "fHistElectronEt" + fHistogramNameSuffix; | |
348 | fHistElectronEt = new TH1F(histname.Data(), "E_{T} for electrons/positrons", nbinsEt, minEt, maxEt); | |
349 | ||
43056f1b | 350 | histname = "fHistNeutronEt" + fHistogramNameSuffix; |
351 | fHistNeutronEt = new TH1F(histname.Data(), "E_{T} for neutrons", nbinsEt, minEt, maxEt); | |
352 | ||
353 | histname = "fHistAntiNeutronEt" + fHistogramNameSuffix; | |
354 | fHistAntiNeutronEt = new TH1F(histname.Data(), "E_{T} for anti-neutrons", nbinsEt, minEt, maxEt); | |
355 | ||
356 | histname = "fHistGammaEt" + fHistogramNameSuffix; | |
357 | fHistGammaEt = new TH1F(histname.Data(), "E_{T} for gammas", nbinsEt, minEt, maxEt); | |
358 | ||
87efb15c | 359 | histname = "fHistProtonEtAcc" + fHistogramNameSuffix; |
360 | fHistProtonEtAcc = new TH1F(histname.Data(), "E_{T} for (anti-)protons in calorimeter acceptance", nbinsEt, minEt, maxEt); | |
361 | ||
43056f1b | 362 | histname = "fHistPionEtAcc" + fHistogramNameSuffix; |
363 | fHistPionEtAcc = new TH1F(histname.Data(), "E_{T} for #pi^+/#pi^- in calorimeter acceptance", nbinsEt, minEt, maxEt); | |
364 | ||
87efb15c | 365 | histname = "fHistKaonEtAcc" + fHistogramNameSuffix; |
366 | fHistChargedKaonEtAcc = new TH1F(histname.Data(), "E_{T} for charged kaons in calorimeter acceptance", nbinsEt, minEt, maxEt); | |
367 | ||
368 | histname = "fHistMuonEtAcc" + fHistogramNameSuffix; | |
369 | fHistMuonEtAcc = new TH1F(histname.Data(), "E_{T} for muons in calorimeter acceptance", nbinsEt, minEt, maxEt); | |
370 | ||
371 | histname = "fHistElectronEtAcc" + fHistogramNameSuffix; | |
372 | fHistElectronEtAcc = new TH1F(histname.Data(), "E_{T} for electrons/positrons in calorimeter acceptance", nbinsEt, minEt, maxEt); | |
373 | ||
cf6522d1 | 374 | // |
2fbf38ac | 375 | histname = "fHistTMDeltaR" + fHistogramNameSuffix; |
376 | fHistTMDeltaR = new TH1F(histname.Data(), "#Delta R for calorimeter clusters", 200, 0, 50); | |
f9a4ed81 | 377 | |
378 | histname = "fHistTMDxDz" + fHistogramNameSuffix; | |
379 | fHistTMDxDz = new TH2F(histname.Data(), "#Delta x vs #Delta z for calorimeter clusters", 800, -200, 200, 800, -200, 200); | |
380 | ||
381 | histname = "fSparseHistTracks" + fHistogramNameSuffix; | |
382 | const Int_t stsize = 7; | |
383 | Int_t binsHist[stsize] = { 1001, 7, 200000, 10000, 10000, 100, 11}; | |
384 | Double_t minHist[stsize] = {-500.5, -3.5, 0.0, 0.0, 0.0, -1.5, -0.5}; | |
385 | Double_t maxHist[stsize] = { 499.5, 3.5, 200.0, 100.0, 100.0, 1.5, 10.5}; | |
386 | fSparseTracks = new Double_t[stsize]; | |
387 | fSparseHistTracks = new THnSparseD(histname.Data(), "pid:charge:mass:et:pt:rap:cent", stsize, binsHist, minHist, maxHist); | |
388 | ||
389 | fSparseHistTracks->GetAxis(0)->SetTitle("pid"); | |
390 | fSparseHistTracks->GetAxis(1)->SetTitle("charge"); | |
391 | fSparseHistTracks->GetAxis(2)->SetTitle("mass"); | |
392 | fSparseHistTracks->GetAxis(3)->SetTitle("et"); | |
393 | fSparseHistTracks->GetAxis(4)->SetTitle("pt"); | |
394 | fSparseHistTracks->GetAxis(5)->SetTitle("rap"); | |
395 | fSparseHistTracks->GetAxis(6)->SetTitle("cent"); | |
396 | ||
397 | histname = "fSparseHistClusters" + fHistogramNameSuffix; | |
398 | const Int_t scsize = 11; | |
399 | // pid ch mass et pt eta et_t pt_t eta_t cent dist | |
400 | Int_t scbinsHist[scsize] = { 1001, 7, 200000, 10000, 10000, 100, 10000, 10000, 100, 11, 4000}; | |
401 | Double_t scminHist[scsize] = {-500.5, -3.5, 0.0, 0.0, 0.0, -1.5, 0.0, 0.0, -1.5, -0.5, -200.0}; | |
402 | Double_t scmaxHist[scsize] = { 499.5, 3.5, 200.0, 100.0, 100.0, 1.5, 100.0, 100.0, 1.5, 10.5, 200.0}; | |
403 | fSparseClusters = new Double_t[scsize]; | |
404 | fSparseHistClusters = new THnSparseD(histname.Data(), "pid:charge:mass:et:pt:rap:et_track:pt_track:eta_track:cent:dist_matched", scsize, scbinsHist, scminHist, scmaxHist); | |
405 | ||
406 | fSparseHistClusters->GetAxis(0)->SetTitle("pid"); | |
407 | fSparseHistClusters->GetAxis(1)->SetTitle("charge"); | |
408 | fSparseHistClusters->GetAxis(2)->SetTitle("mass"); | |
409 | fSparseHistClusters->GetAxis(3)->SetTitle("et"); | |
410 | fSparseHistClusters->GetAxis(4)->SetTitle("pt"); | |
411 | fSparseHistClusters->GetAxis(5)->SetTitle("rap"); | |
412 | fSparseHistClusters->GetAxis(6)->SetTitle("et_track"); | |
413 | fSparseHistClusters->GetAxis(7)->SetTitle("pt_track"); | |
414 | fSparseHistClusters->GetAxis(8)->SetTitle("rap_track"); | |
415 | fSparseHistClusters->GetAxis(9)->SetTitle("cent"); | |
416 | fSparseHistClusters->GetAxis(10)->SetTitle("dist_matched"); | |
417 | ||
418 | histname = "fSparseHistEt" + fHistogramNameSuffix; | |
419 | const Int_t etsize = 7; | |
420 | Int_t etbinsHist[etsize] = { 10000, 10000, 10000, 3000, 500, 30000, 11}; | |
421 | Double_t etminHist[etsize] = { 0.0, 0.0, 0.0, -0.5, -0.5, -0.5, -0.5}; | |
422 | Double_t etmaxHist[etsize] = { 200.0, 200.0, 200.0, 2999.5, 499.5, 2999.5, 10.5}; | |
423 | fSparseEt = new Double_t[etsize]; | |
424 | fSparseHistEt = new THnSparseD(histname.Data(), "tot_et:neutral_et:charged_et:tot_mult:neutral_mult:charged_mult:cent", etsize, etbinsHist, etminHist, etmaxHist); | |
425 | ||
426 | fSparseHistEt->GetAxis(0)->SetTitle("tot_et"); | |
427 | fSparseHistEt->GetAxis(1)->SetTitle("neutral_et"); | |
428 | fSparseHistEt->GetAxis(2)->SetTitle("charged_et"); | |
429 | fSparseHistEt->GetAxis(3)->SetTitle("tot_mult"); | |
430 | fSparseHistEt->GetAxis(4)->SetTitle("netral_mult"); | |
431 | fSparseHistEt->GetAxis(5)->SetTitle("charged_mult"); | |
432 | fSparseHistEt->GetAxis(6)->SetTitle("cent"); | |
433 | ||
0651f6b4 | 434 | } |
2fbf38ac | 435 | |
0651f6b4 | 436 | TH2F* AliAnalysisEt::CreateEtaEHisto2D(TString name, TString title, TString ztitle) |
437 | { //creates a 2-d histogram in eta and E and adds it to the list of histograms to be saved | |
1423b942 | 438 | TString histoname = name + fHistogramNameSuffix; |
439 | ||
440 | TH2F *histo = new TH2F(histoname.Data(),title.Data(),fgNumOfEBins, fgEAxis, fgnumOfEtaBins, fgEtaAxis); | |
441 | histo->SetYTitle("#eta"); | |
442 | histo->SetXTitle("E (GeV)"); | |
443 | histo->SetZTitle(ztitle.Data()); | |
444 | histo->Sumw2(); | |
445 | ||
446 | return histo; | |
447 | } | |
448 | ||
449 | ||
450 | TH2F* AliAnalysisEt::CreateEtaPtHisto2D(TString name, TString title, TString ztitle) | |
451 | { //creates a 2-d histogram in eta and phi and adds it to the list of histograms to be saved | |
452 | TString histoname = name + fHistogramNameSuffix; | |
453 | ||
454 | TH2F *histo = new TH2F(histoname.Data(),title.Data(),fgNumOfPtBins, fgPtAxis, fgnumOfEtaBins, fgEtaAxis); | |
455 | histo->SetYTitle("#eta"); | |
456 | histo->SetXTitle("p_{T}"); | |
457 | histo->SetZTitle(ztitle.Data()); | |
458 | histo->Sumw2(); | |
0651f6b4 | 459 | |
1423b942 | 460 | return histo; |
461 | } | |
462 | ||
463 | TH2F* AliAnalysisEt::CreateEtaEtHisto2D(TString name, TString title, TString ztitle) | |
464 | { //creates a 2-d histogram in eta and phi and adds it to the list of histograms to be saved | |
465 | TString histoname = name + fHistogramNameSuffix; | |
0651f6b4 | 466 | |
1423b942 | 467 | TH2F *histo = new TH2F(histoname.Data(),title.Data(),fgNumOfEBins, fgEAxis, fgnumOfEtaBins, fgEtaAxis); |
0651f6b4 | 468 | histo->SetYTitle("#eta"); |
1423b942 | 469 | histo->SetXTitle("E_{T}"); |
470 | histo->SetZTitle(ztitle.Data()); | |
471 | histo->Sumw2(); | |
472 | ||
473 | return histo; | |
474 | } | |
475 | ||
476 | TH2F* AliAnalysisEt::CreateResEHisto2D(TString name, TString title, TString ztitle) | |
477 | { //creates a 2-d histogram in eta and E and adds it to the list of histograms to be saved | |
478 | TString histoname = name + fHistogramNameSuffix; | |
479 | ||
480 | TH2F *histo = new TH2F(histoname.Data(),title.Data(),fgNumOfEBins, fgEAxis, fgNumOfRBins, fgRAxis); | |
481 | histo->SetYTitle("R"); | |
0651f6b4 | 482 | histo->SetXTitle("E (GeV)"); |
1423b942 | 483 | histo->SetZTitle(ztitle.Data()); |
484 | histo->Sumw2(); | |
485 | ||
486 | return histo; | |
487 | } | |
488 | ||
489 | ||
490 | TH2F* AliAnalysisEt::CreateResPtHisto2D(TString name, TString title, TString ztitle) | |
491 | { //creates a 2-d histogram in eta and phi and adds it to the list of histograms to be saved | |
492 | TString histoname = name + fHistogramNameSuffix; | |
493 | ||
494 | TH2F *histo = new TH2F(histoname.Data(),title.Data(),fgNumOfPtBins, fgPtAxis, fgNumOfRBins, fgRAxis); | |
495 | histo->SetYTitle("R"); | |
496 | histo->SetXTitle("p_{T}"); | |
497 | histo->SetZTitle(ztitle.Data()); | |
498 | histo->Sumw2(); | |
499 | ||
500 | return histo; | |
501 | } | |
502 | ||
503 | THnSparseD* AliAnalysisEt::CreateClusterHistoSparse(TString name, TString title) | |
504 | { //creates a 2D sparse histogram | |
505 | TString histoname = name + fHistogramNameSuffix; | |
506 | ||
507 | Int_t nBins[4] = {200,200,240,20}; | |
508 | Double_t min[4] = {0.,-1.,70.,0.5}; | |
509 | Double_t max[4] = {50.,1.,190,20.5}; | |
510 | ||
511 | THnSparseD *histo = new THnSparseD(histoname.Data(),title.Data(),4,nBins,min, max); | |
512 | histo->GetAxis(0)->SetTitle("E"); | |
513 | histo->GetAxis(1)->SetTitle("#eta_{cluster}"); | |
514 | histo->GetAxis(2)->SetTitle("#phi_{cluster}"); | |
515 | histo->GetAxis(3)->SetTitle("n_{cells}"); | |
516 | histo->Sumw2(); | |
517 | ||
518 | return histo; | |
519 | } | |
520 | ||
521 | THnSparseD* AliAnalysisEt::CreateNeutralPartHistoSparse(TString name, TString title) | |
522 | { //creates a sparse neutral particle histogram | |
523 | TString histoname = name + fHistogramNameSuffix; | |
524 | ||
525 | Int_t nBins[6] = {20,200,200,200,240,20}; | |
526 | Double_t min[6] = {-1.,0.,0.,-1.,70.,0.5}; | |
527 | Double_t max[6] = {1.,50.,50.,1.,190,20.5}; | |
528 | ||
529 | THnSparseD *histo = new THnSparseD(histoname.Data(),title.Data(),6,nBins,min, max); | |
530 | histo->GetAxis(0)->SetTitle("#eta"); | |
531 | histo->GetAxis(1)->SetTitle("p_{T}"); | |
532 | histo->GetAxis(2)->SetTitle("E"); | |
533 | histo->GetAxis(3)->SetTitle("#eta_{cluster}"); | |
534 | histo->GetAxis(4)->SetTitle("#phi_{cluster}"); | |
535 | histo->GetAxis(5)->SetTitle("n_{cells}"); | |
536 | histo->Sumw2(); | |
537 | ||
538 | return histo; | |
539 | } | |
540 | ||
541 | THnSparseD* AliAnalysisEt::CreateChargedPartHistoSparse(TString name, TString title) | |
542 | { //creates a sparse charged particle histogram | |
543 | TString histoname = name + fHistogramNameSuffix; | |
544 | ||
545 | Int_t nBins[7] = {20,200,200,200,240,20,100}; | |
546 | Double_t min[7] = {-1.,0.,0.,-1.,70.,0.5,0.}; | |
547 | Double_t max[7] = {1.,50.,50.,1.,190,20.5,0.1}; | |
548 | ||
549 | THnSparseD *histo = new THnSparseD(histoname.Data(),title.Data(),7,nBins,min, max); | |
550 | histo->GetAxis(0)->SetTitle("#eta"); | |
551 | histo->GetAxis(1)->SetTitle("p_{T}"); | |
552 | histo->GetAxis(2)->SetTitle("E"); | |
553 | histo->GetAxis(3)->SetTitle("#eta_{cluster}"); | |
554 | histo->GetAxis(4)->SetTitle("#phi_{cluster}"); | |
555 | histo->GetAxis(5)->SetTitle("n_{cells}"); | |
556 | histo->GetAxis(6)->SetTitle("R_{match}"); | |
0651f6b4 | 557 | histo->Sumw2(); |
0651f6b4 | 558 | |
559 | return histo; | |
2fbf38ac | 560 | } |
561 | ||
0651f6b4 | 562 | |
8ea99ab0 | 563 | void AliAnalysisEt::CreateTrees() |
ce546038 | 564 | { // create tree.. |
565 | TString treename = "fTree" + fHistogramNameSuffix; | |
8ea99ab0 | 566 | if(fCuts->GetHistMakeTree()) |
567 | { | |
568 | ||
569 | fTree = new TTree(treename, treename); | |
570 | fTree->Branch("fTotEt",&fTotEt,"fTotEt/D"); | |
571 | fTree->Branch("fTotEtAcc",&fTotEtAcc,"fTotEtAcc/D"); | |
572 | fTree->Branch("fTotNeutralEt",&fTotNeutralEt,"fTotNeutralEt/D"); | |
573 | fTree->Branch("fTotNeutralEtAcc",&fTotNeutralEtAcc,"fTotNeutralEtAcc/D"); | |
574 | fTree->Branch("fTotChargedEt",&fTotChargedEt,"fTotChargedEt/D"); | |
575 | fTree->Branch("fTotChargedEtAcc",&fTotChargedEtAcc,"fTotChargedEtAcc/D"); | |
576 | fTree->Branch("fMultiplicity",&fMultiplicity,"fMultiplicity/I"); | |
577 | fTree->Branch("fChargedMultiplicity",&fChargedMultiplicity,"fChargedMultiplicity/I"); | |
578 | fTree->Branch("fNeutralMultiplicity",&fNeutralMultiplicity,"fNeutralMultiplicity/I"); | |
f9a4ed81 | 579 | fTree->Branch("fCentClass",&fCentClass,"fCentClass/I"); |
580 | ||
8ea99ab0 | 581 | fTree->Branch("fBaryonEt",&fBaryonEt,"fBaryonEt/D"); |
582 | fTree->Branch("fAntiBaryonEt",&fAntiBaryonEt,"fAntiBaryonEt/D"); | |
583 | fTree->Branch("fMesonEt",&fMesonEt,"fMesonEt/D"); | |
8ea99ab0 | 584 | fTree->Branch("fProtonEt",&fProtonEt,"fProtonEt/D"); |
585 | fTree->Branch("fChargedKaonEt",&fChargedKaonEt,"fChargedKaonEt/D"); | |
586 | fTree->Branch("fMuonEt",&fMuonEt,"fMuonEt/D"); | |
587 | fTree->Branch("fElectronEt",&fElectronEt,"fElectronEt/D"); | |
588 | fTree->Branch("fProtonEtAcc",&fProtonEtAcc,"fProtonEtAcc/D"); | |
589 | fTree->Branch("fChargedKaonEtAcc",&fChargedKaonEtAcc,"fChargedKaonEtAcc/D"); | |
590 | fTree->Branch("fMuonEtAcc",&fMuonEtAcc,"fMuonEtAcc/D"); | |
591 | fTree->Branch("fElectronEtAcc",&fElectronEtAcc,"fElectronEtAcc/D"); | |
592 | } | |
593 | ||
594 | if(fCuts->GetHistMakeTreeDeposit()) | |
595 | { | |
596 | treename = "fTreeDeposit" + fHistogramNameSuffix; | |
597 | fTreeDeposit = new TTree(treename, treename); | |
598 | ||
599 | fTreeDeposit->Branch("fEnergyDeposited", &fEnergyDeposited, "fEnergyDeposited/F"); | |
600 | fTreeDeposit->Branch("fEnergyTPC", &fEnergyTPC, "fEnergyTPC/F"); | |
601 | fTreeDeposit->Branch("fCharge", &fCharge, "fCharge/S"); | |
602 | fTreeDeposit->Branch("fParticlePid", &fParticlePid, "fParticlePid/S"); | |
603 | fTreeDeposit->Branch("fPidProb", &fPidProb, "fPidProb/F"); | |
604 | fTreeDeposit->Branch("fTrackPassedCut", &fTrackPassedCut, "fTrackPassedCut/B"); | |
605 | ||
606 | } | |
7b873813 | 607 | |
ce546038 | 608 | return; |
609 | } | |
2fbf38ac | 610 | void AliAnalysisEt::FillHistograms() |
cf6522d1 | 611 | { // fill histograms.. |
2fbf38ac | 612 | fHistEt->Fill(fTotEt); |
613 | fHistChargedEt->Fill(fTotChargedEt); | |
614 | fHistNeutralEt->Fill(fTotNeutralEt); | |
615 | ||
616 | fHistEtAcc->Fill(fTotEtAcc); | |
617 | fHistChargedEtAcc->Fill(fTotChargedEtAcc); | |
618 | fHistNeutralEtAcc->Fill(fTotNeutralEtAcc); | |
619 | ||
620 | fHistMult->Fill(fMultiplicity); | |
621 | fHistChargedMult->Fill(fChargedMultiplicity); | |
622 | fHistNeutralMult->Fill(fNeutralMultiplicity); | |
623 | ||
ce546038 | 624 | fHistBaryonEt->Fill(fBaryonEt); |
625 | fHistAntiBaryonEt->Fill(fAntiBaryonEt); | |
626 | fHistMesonEt->Fill(fMesonEt); | |
2fbf38ac | 627 | |
87efb15c | 628 | fHistProtonEt->Fill(fProtonEt); |
43056f1b | 629 | fHistPionEt->Fill(fPionEt); |
87efb15c | 630 | fHistChargedKaonEt->Fill(fChargedKaonEt); |
631 | fHistMuonEt->Fill(fMuonEt); | |
632 | fHistElectronEt->Fill(fElectronEt); | |
43056f1b | 633 | fHistNeutronEt->Fill(fNeutronEt); |
634 | fHistAntiNeutronEt->Fill(fAntiNeutronEt); | |
635 | fHistGammaEt->Fill(fGammaEt); | |
87efb15c | 636 | |
637 | fHistProtonEtAcc->Fill(fProtonEtAcc); | |
43056f1b | 638 | fHistPionEtAcc->Fill(fPionEtAcc); |
87efb15c | 639 | fHistChargedKaonEtAcc->Fill(fChargedKaonEtAcc); |
640 | fHistMuonEtAcc->Fill(fMuonEtAcc); | |
641 | fHistElectronEtAcc->Fill(fElectronEtAcc); | |
ce546038 | 642 | |
643 | if (fCuts) { | |
644 | if (fCuts->GetHistMakeTree()) { | |
645 | fTree->Fill(); | |
646 | } | |
647 | } | |
f9a4ed81 | 648 | |
649 | fSparseHistEt->Fill(fSparseEt); | |
2fbf38ac | 650 | } |
0065531a | 651 | |
641e1e0c | 652 | Int_t AliAnalysisEt::AnalyseEvent(AliVEvent *event) |
0065531a | 653 | { //this line is basically here to eliminate a compiler warning that event is not used. Making it a virtual function did not work with the plugin. |
7d2d1773 | 654 | AliAnalysisEtCommon::AnalyseEvent(event); |
0065531a | 655 | ResetEventValues(); |
641e1e0c | 656 | return 0; |
657 | } | |
2fbf38ac | 658 | |
659 | void AliAnalysisEt::ResetEventValues() | |
cf6522d1 | 660 | { // clear |
7d2d1773 | 661 | AliAnalysisEtCommon::ResetEventValues(); |
0065531a | 662 | fTotEt = 0; |
663 | fTotEtAcc = 0; | |
664 | fTotNeutralEt = 0; | |
665 | fTotNeutralEtAcc = 0; | |
666 | fTotChargedEt = 0; | |
667 | fTotChargedEtAcc = 0; | |
668 | fMultiplicity = 0; | |
669 | fChargedMultiplicity = 0; | |
670 | fNeutralMultiplicity = 0; | |
87efb15c | 671 | fBaryonEt = 0; |
672 | fAntiBaryonEt = 0; | |
673 | fMesonEt = 0; | |
87efb15c | 674 | fProtonEt = 0; |
7b873813 | 675 | fPionEt = 0; |
87efb15c | 676 | fChargedKaonEt = 0; |
677 | fMuonEt = 0; | |
678 | fElectronEt = 0; | |
7b873813 | 679 | fNeutronEt = 0; |
680 | fAntiNeutronEt = 0; | |
681 | fGammaEt = 0; | |
87efb15c | 682 | fProtonEtAcc = 0; |
7b873813 | 683 | fPionEtAcc = 0; |
87efb15c | 684 | fChargedKaonEtAcc = 0; |
685 | fMuonEtAcc = 0; | |
ce546038 | 686 | fElectronEtAcc = 0; |
0065531a | 687 | return; |
2fbf38ac | 688 | } |
99a6613d | 689 | |
f9a4ed81 | 690 | Double_t AliAnalysisEt::CalculateTransverseEnergy(AliESDCaloCluster* cluster) |
537e541d | 691 | { // based on cluster energy and cluster pos |
f9a4ed81 | 692 | |
693 | Float_t pos[3]; | |
694 | cluster->GetPosition(pos); | |
695 | TVector3 cp(pos); | |
696 | ||
697 | return cluster->E() * TMath::Sin(cp.Theta()); | |
698 | ||
699 | } |