]>
Commit | Line | Data |
---|---|---|
76ce4b5b | 1 | //////////////////////////////////////////////////////////////////////////////// |
2 | // // | |
3 | // AliFemtoCutMonitorEventMult - the cut monitor for particles to study // | |
4 | // the difference between reconstructed and true momentum // | |
5 | // // | |
6 | //////////////////////////////////////////////////////////////////////////////// | |
7 | #include "AliFemtoCutMonitorEventMult.h" | |
8 | #include "AliFemtoModelHiddenInfo.h" | |
9 | #include "AliFemtoEvent.h" | |
10 | #include <TH1D.h> | |
11 | #include <TH2D.h> | |
12 | #include <TList.h> | |
13 | ||
14 | AliFemtoCutMonitorEventMult::AliFemtoCutMonitorEventMult(): | |
15 | fEvMult(0), | |
16 | fNormEvMult(0), | |
17 | fSPDMult(0), | |
18 | fMultSumPt(0), | |
19 | freadMC(kFALSE), | |
20 | faddhists(kFALSE), | |
21 | fEstimateITSTPC(0), | |
22 | fEstimateTracklets(0), | |
23 | fEstimateITSPure(0), | |
24 | fEst1Est2(0), | |
25 | fEst1Est3(0), | |
26 | fEst2Est3(0), | |
27 | fEst1Norm(0), | |
28 | fEst2Norm(0), | |
5e2038a9 | 29 | fEst3Norm(0), |
30 | fPsiVZERO(0) | |
76ce4b5b | 31 | { |
32 | // Default constructor | |
33 | fEvMult = new TH1D("EvMult", "Event Multiplicity", 5001, -0.5, 5000.5); | |
34 | fMultSumPt = new TH2D("EvMultSumPt","Event Multiplicity vs Total pT",5001,-0.5,5000.5,1000,0.0,100.0); | |
35 | } | |
36 | ||
4eac0b05 | 37 | AliFemtoCutMonitorEventMult::AliFemtoCutMonitorEventMult(const char *aName, int nBins): |
76ce4b5b | 38 | AliFemtoCutMonitor(), |
39 | fEvMult(0), | |
40 | fNormEvMult(0), | |
41 | fSPDMult(0), | |
42 | fMultSumPt(0), | |
43 | freadMC(kFALSE), | |
44 | faddhists(kFALSE), | |
45 | fEstimateITSTPC(0), | |
46 | fEstimateTracklets(0), | |
47 | fEstimateITSPure(0), | |
48 | fEst1Est2(0), | |
49 | fEst1Est3(0), | |
50 | fEst2Est3(0), | |
51 | fEst1Norm(0), | |
52 | fEst2Norm(0), | |
5e2038a9 | 53 | fEst3Norm(0), |
54 | fPsiVZERO(0) | |
55 | ||
76ce4b5b | 56 | { |
57 | // Normal constructor | |
58 | char name[200]; | |
59 | snprintf(name, 200, "EvMult%s", aName); | |
1330f885 | 60 | fEvMult = new TH1D(name, "Event Multiplicity", nBins+1, -0.5, 5000.5); |
76ce4b5b | 61 | |
62 | snprintf(name, 200, "NormEvMult%s", aName); | |
1330f885 | 63 | fNormEvMult = new TH1D(name, "Normalized Event Multiplicity", nBins+1, -0.5, 5000.5); |
76ce4b5b | 64 | |
5e2038a9 | 65 | |
66 | ||
76ce4b5b | 67 | if(!freadMC) { |
68 | snprintf(name, 200, "SPDEvMult%s", aName); | |
1330f885 | 69 | fSPDMult = new TH1D(name, "SPD Tracklet Multiplicity", nBins+1, -0.5, 5000.5); |
76ce4b5b | 70 | } |
71 | ||
72 | snprintf(name, 200, "EvMultTotPt%s", aName); | |
73 | fMultSumPt = new TH2D(name,"Event Multiplicity vs Total pT",501,-0.5,500.5,1000,0.0,100.0); | |
74 | ||
973a91f8 | 75 | |
76 | ||
76ce4b5b | 77 | if(faddhists) |
78 | { | |
79 | snprintf(name, 200, "EvMultEstITSTPC%s", aName); | |
80 | fEstimateITSTPC = new TH1D(name, "ITS+TPC Multiplicity Estimate", 5001, -0.5, 5000.5); | |
81 | ||
82 | snprintf(name, 200, "EvMultEstTracklets%s", aName); | |
83 | fEstimateTracklets = new TH1D(name, "Tracklets Multiplicity Estimate", 5001, -0.5, 5000.5); | |
84 | ||
85 | snprintf(name, 200, "EvMultEstITSPure%s", aName); | |
86 | fEstimateITSPure = new TH1D(name, "ITS Pure Multiplicity Estimate", 8001, -0.5, 8000.5); | |
87 | ||
88 | snprintf(name, 200, "EstITSTPCEstTracklet%s", aName); | |
89 | fEst1Est2 = new TH2D(name,"ITS+TPC vs Tracklets",501,-0.5,5000.5,501,-0.5,500.5); | |
90 | ||
91 | snprintf(name, 200, "EstITSTPCEstITSPure%s", aName); | |
92 | fEst1Est3 = new TH2D(name,"ITS+TPC vs ITS Pure",501,-0.5,5000.5,801,-0.5,8000.5); | |
93 | ||
94 | snprintf(name, 200, "EstTrackletEstITSPure%s", aName); | |
95 | fEst2Est3 = new TH2D(name,"Tracklets vs ITS Pure",501,-0.5,5000.5,801,-0.5,8000.5); | |
96 | ||
97 | snprintf(name, 200, "EstITSTPCNormMult%s", aName); | |
98 | fEst1Norm = new TH2D(name,"ITS+TPC vs Normalized Mult",501,-0.5,5000.5,501,-0.5,5000.5); | |
99 | ||
100 | snprintf(name, 200, "EstTrackletsNormMult%s", aName); | |
101 | fEst2Norm = new TH2D(name,"Tracklets vs Normalized Mult",501,-0.5,5000.5,501,-0.5,5000.5); | |
102 | ||
103 | snprintf(name, 200, "EstITSPureNormMult%s", aName); | |
104 | fEst3Norm = new TH2D(name,"ITS Pure vs Normalized Mult",501,-0.5,5000.5,501,-0.5,5000.5); | |
105 | } | |
106 | ||
5e2038a9 | 107 | snprintf(name, 200, "PsiEPVZERO%s", aName); |
108 | fPsiVZERO = new TH1D(name, "event plane angle from vzero", 157, -1.575, 1.565); | |
76ce4b5b | 109 | } |
110 | ||
111 | AliFemtoCutMonitorEventMult::AliFemtoCutMonitorEventMult(const AliFemtoCutMonitorEventMult &aCut): | |
112 | AliFemtoCutMonitor(), | |
113 | fEvMult(0), | |
114 | fNormEvMult(0), | |
115 | fSPDMult(0), | |
116 | fMultSumPt(0), | |
117 | freadMC(kFALSE), | |
118 | faddhists(kFALSE), | |
119 | fEstimateITSTPC(0), | |
120 | fEstimateTracklets(0), | |
121 | fEstimateITSPure(0), | |
122 | fEst1Est2(0), | |
123 | fEst1Est3(0), | |
124 | fEst2Est3(0), | |
125 | fEst1Norm(0), | |
126 | fEst2Norm(0), | |
5e2038a9 | 127 | fEst3Norm(0), |
128 | fPsiVZERO(0) | |
129 | ||
76ce4b5b | 130 | { |
131 | // copy constructor | |
132 | if (fEvMult) delete fEvMult; | |
133 | fEvMult = new TH1D(*aCut.fEvMult); | |
134 | ||
135 | if (fNormEvMult) delete fNormEvMult; | |
136 | fNormEvMult = new TH1D(*aCut.fNormEvMult); | |
137 | ||
1330f885 | 138 | |
139 | ||
76ce4b5b | 140 | if(!freadMC){ |
141 | if (fSPDMult) delete fSPDMult; | |
142 | fSPDMult = new TH1D(*aCut.fSPDMult); | |
143 | } | |
144 | ||
145 | if (fMultSumPt) delete fMultSumPt; | |
146 | fMultSumPt = new TH2D(*aCut.fMultSumPt); | |
147 | ||
148 | ||
149 | if(faddhists) | |
150 | { | |
151 | if (fEstimateITSTPC) delete fEstimateITSTPC; | |
152 | fEstimateITSTPC = new TH1D(*aCut.fEstimateITSTPC); | |
153 | ||
154 | if (fEstimateTracklets) delete fEstimateTracklets; | |
155 | fEstimateTracklets = new TH1D(*aCut.fEstimateTracklets); | |
156 | ||
157 | if (fEstimateITSPure) delete fEstimateITSPure; | |
158 | fEstimateITSPure = new TH1D(*aCut.fEstimateITSPure); | |
159 | ||
160 | if (fEst1Est2) delete fEst1Est2; | |
161 | fEst1Est2 = new TH2D(*aCut.fEst1Est2); | |
162 | ||
163 | if (fEst1Est3) delete fEst1Est3; | |
164 | fEst1Est3 = new TH2D(*aCut.fEst1Est3); | |
165 | ||
166 | if (fEst2Est3) delete fEst2Est3; | |
167 | fEst2Est3 = new TH2D(*aCut.fEst2Est3); | |
168 | ||
169 | if (fEst1Norm) delete fEst1Norm; | |
170 | fEst1Norm = new TH2D(*aCut.fEst1Norm); | |
171 | ||
172 | if (fEst2Norm) delete fEst2Norm; | |
173 | fEst2Norm = new TH2D(*aCut.fEst2Norm); | |
174 | ||
175 | if (fEst3Norm) delete fEst3Norm; | |
176 | fEst3Norm = new TH2D(*aCut.fEst3Norm); | |
177 | } | |
973a91f8 | 178 | |
5e2038a9 | 179 | if (fPsiVZERO) delete fPsiVZERO; |
180 | fPsiVZERO = new TH1D(*aCut.fPsiVZERO); | |
181 | ||
76ce4b5b | 182 | } |
183 | ||
184 | AliFemtoCutMonitorEventMult::~AliFemtoCutMonitorEventMult() | |
185 | { | |
186 | // Destructor | |
187 | delete fEvMult; | |
188 | delete fNormEvMult; | |
5e2038a9 | 189 | |
76ce4b5b | 190 | if(!freadMC){ |
191 | delete fSPDMult; | |
192 | } | |
193 | delete fMultSumPt; | |
194 | ||
195 | if(faddhists) | |
196 | { | |
197 | delete fEstimateITSTPC; | |
198 | delete fEstimateTracklets; | |
199 | delete fEstimateITSPure; | |
200 | delete fEst1Est2; | |
201 | delete fEst1Est3; | |
202 | delete fEst2Est3; | |
203 | delete fEst1Norm; | |
204 | delete fEst2Norm; | |
205 | delete fEst3Norm; | |
1330f885 | 206 | } |
5e2038a9 | 207 | |
208 | delete fPsiVZERO; | |
209 | ||
76ce4b5b | 210 | } |
211 | ||
212 | AliFemtoCutMonitorEventMult& AliFemtoCutMonitorEventMult::operator=(const AliFemtoCutMonitorEventMult& aCut) | |
213 | { | |
214 | // assignment operator | |
1330f885 | 215 | if (this == &aCut) |
76ce4b5b | 216 | return *this; |
217 | ||
218 | if (fEvMult) delete fEvMult; | |
219 | fEvMult = new TH1D(*aCut.fEvMult); | |
1330f885 | 220 | |
76ce4b5b | 221 | if (fNormEvMult) delete fNormEvMult; |
222 | fNormEvMult = new TH1D(*aCut.fNormEvMult); | |
1330f885 | 223 | |
224 | ||
5e2038a9 | 225 | if (fPsiVZERO) delete fPsiVZERO; |
226 | fPsiVZERO = new TH1D(*aCut.fPsiVZERO); | |
1330f885 | 227 | |
76ce4b5b | 228 | if(!freadMC){ |
229 | if (fSPDMult) delete fSPDMult; | |
230 | fSPDMult = new TH1D(*aCut.fSPDMult); | |
231 | } | |
1330f885 | 232 | |
76ce4b5b | 233 | if (fMultSumPt) delete fMultSumPt; |
234 | fMultSumPt = new TH2D(*aCut.fMultSumPt); | |
235 | ||
236 | ||
237 | if(faddhists) | |
238 | { | |
239 | if (fEstimateITSTPC) delete fEstimateITSTPC; | |
240 | fEstimateITSTPC = new TH1D(*aCut.fEstimateITSTPC); | |
241 | ||
242 | if (fEstimateTracklets) delete fEstimateTracklets; | |
243 | fEstimateTracklets = new TH1D(*aCut.fEstimateTracklets); | |
244 | ||
245 | if (fEstimateITSPure) delete fEstimateITSPure; | |
246 | fEstimateITSPure = new TH1D(*aCut.fEstimateITSPure); | |
247 | ||
248 | if (fEst1Est2) delete fEst1Est2; | |
249 | fEst1Est2 = new TH2D(*aCut.fEst1Est2); | |
250 | ||
251 | if (fEst1Est3) delete fEst1Est3; | |
252 | fEst1Est3 = new TH2D(*aCut.fEst1Est3); | |
253 | ||
254 | if (fEst2Est3) delete fEst2Est3; | |
255 | fEst2Est3 = new TH2D(*aCut.fEst2Est3); | |
256 | ||
257 | if (fEst1Norm) delete fEst1Norm; | |
258 | fEst1Norm = new TH2D(*aCut.fEst1Norm); | |
259 | ||
260 | if (fEst2Norm) delete fEst2Norm; | |
261 | fEst2Norm = new TH2D(*aCut.fEst2Norm); | |
262 | ||
263 | if (fEst3Norm) delete fEst3Norm; | |
264 | fEst3Norm = new TH2D(*aCut.fEst3Norm); | |
265 | } | |
266 | ||
267 | return *this; | |
268 | } | |
269 | ||
1330f885 | 270 | AliFemtoString AliFemtoCutMonitorEventMult::Report(){ |
76ce4b5b | 271 | // Prepare report from the execution |
1330f885 | 272 | string stemp = "*** AliFemtoCutMonitorEventMult report"; |
76ce4b5b | 273 | AliFemtoString returnThis = stemp; |
1330f885 | 274 | return returnThis; |
76ce4b5b | 275 | } |
276 | ||
277 | void AliFemtoCutMonitorEventMult::Fill(const AliFemtoEvent* aEvent) | |
278 | { | |
279 | // Fill in the monitor histograms with the values from the current track | |
280 | fEvMult->Fill(aEvent->NumberOfTracks()); | |
281 | fNormEvMult->Fill(aEvent->UncorrectedNumberOfPrimaries()); | |
76ce4b5b | 282 | |
5e2038a9 | 283 | double epvzero = aEvent->ReactionPlaneAngle(); |
284 | ||
285 | fPsiVZERO->Fill(epvzero); | |
286 | ||
287 | ||
288 | // if(!freadMC){ | |
289 | // fSPDMult->Fill(aEvent->SPDMultiplicity()); | |
290 | // } | |
291 | // fMultSumPt->Fill(aEvent->UncorrectedNumberOfPrimaries(), aEvent->ZDCEMEnergy()); | |
292 | ||
293 | // if(faddhists) | |
294 | // { | |
295 | // fEstimateITSTPC->Fill(aEvent->MultiplicityEstimateITSTPC()); | |
296 | // fEstimateTracklets->Fill(aEvent->MultiplicityEstimateTracklets()); | |
297 | // fEstimateITSPure->Fill(aEvent->MultiplicityEstimateITSPure()); | |
298 | // fEst1Est2->Fill(aEvent->MultiplicityEstimateITSTPC(),aEvent->MultiplicityEstimateTracklets()); | |
299 | // fEst1Est3->Fill(aEvent->MultiplicityEstimateITSTPC(),aEvent->MultiplicityEstimateITSPure()); | |
300 | // fEst2Est3->Fill(aEvent->MultiplicityEstimateTracklets(),aEvent->MultiplicityEstimateITSPure()); | |
301 | // fEst1Norm->Fill(aEvent->MultiplicityEstimateITSTPC(),aEvent->UncorrectedNumberOfPrimaries()); | |
302 | // fEst2Norm->Fill(aEvent->MultiplicityEstimateTracklets(),aEvent->UncorrectedNumberOfPrimaries()); | |
303 | // fEst3Norm->Fill(aEvent->MultiplicityEstimateITSPure(),aEvent->UncorrectedNumberOfPrimaries()); | |
304 | // } | |
76ce4b5b | 305 | |
306 | } | |
307 | ||
308 | void AliFemtoCutMonitorEventMult::Write() | |
309 | { | |
310 | // Write out the relevant histograms | |
2bcd4b96 | 311 | fEvMult->Write(); |
76ce4b5b | 312 | fNormEvMult->Write(); |
5e2038a9 | 313 | fPsiVZERO->Write(); |
314 | ||
315 | // if(!freadMC){ | |
316 | // fSPDMult->Write(); | |
317 | // } | |
318 | // fMultSumPt->Write(); | |
319 | ||
320 | // if(faddhists) | |
321 | // { | |
322 | // fEstimateITSTPC->Write(); | |
323 | // fEstimateTracklets->Write(); | |
324 | // fEstimateITSPure->Write(); | |
325 | // fEst1Est2->Write(); | |
326 | // fEst1Est3->Write(); | |
327 | // fEst2Est3->Write(); | |
328 | // fEst1Norm->Write(); | |
329 | // fEst2Norm->Write(); | |
330 | // fEst3Norm->Write(); | |
331 | // } | |
76ce4b5b | 332 | |
333 | } | |
334 | ||
335 | TList *AliFemtoCutMonitorEventMult::GetOutputList() | |
336 | { | |
337 | TList *tOutputList = new TList(); | |
1330f885 | 338 | tOutputList->Add(fEvMult); |
76ce4b5b | 339 | tOutputList->Add(fNormEvMult); |
5e2038a9 | 340 | tOutputList->Add(fPsiVZERO); |
341 | // tOutputList->Add(fSPDMult); | |
342 | // tOutputList->Add(fMultSumPt); | |
343 | ||
344 | // if(faddhists) | |
345 | // { | |
346 | // tOutputList->Add(fEstimateITSTPC); | |
347 | // tOutputList->Add(fEstimateTracklets); | |
348 | // tOutputList->Add(fEstimateITSPure); | |
349 | // tOutputList->Add(fEst1Est2); | |
350 | // tOutputList->Add(fEst1Est3); | |
351 | // tOutputList->Add(fEst2Est3); | |
352 | // tOutputList->Add(fEst1Norm); | |
353 | // tOutputList->Add(fEst2Norm); | |
354 | // tOutputList->Add(fEst3Norm); | |
355 | // } | |
76ce4b5b | 356 | return tOutputList; |
357 | } | |
358 | ||
359 | void AliFemtoCutMonitorEventMult::SetReadMC(Bool_t mc) | |
360 | { | |
361 | freadMC=mc; | |
362 | } | |
363 | ||
364 | void AliFemtoCutMonitorEventMult::AdditionalMultHistsOn(Bool_t addhists) | |
365 | { | |
366 | faddhists=addhists; | |
367 | } | |
368 |