]>
Commit | Line | Data |
---|---|---|
3c40321c | 1 | /* $Id: AliAnalysisTaskPi0V2.cxx 55404 2012-03-29 10:10:19Z fca $ */ |
2 | ||
3c40321c | 3 | #include "AliAnalysisTaskPi0V2.h" |
4 | ||
cd0e5e33 | 5 | #include <Riostream.h> |
6 | #include <TCanvas.h> | |
7 | #include <TChain.h> | |
8 | #include <TClonesArray.h> | |
9 | #include <TH1F.h> | |
10 | #include <TH2F.h> | |
11 | #include <TH3F.h> | |
12 | #include <THnSparse.h> | |
13 | #include <TList.h> | |
14 | #include <TProfile.h> | |
15 | #include <TString.h> | |
16 | #include <TTree.h> | |
3c40321c | 17 | |
04b116e8 | 18 | #include "AliAODEvent.h" |
cd0e5e33 | 19 | #include "AliAnalysisManager.h" |
20 | #include "AliAnalysisTaskSE.h" | |
9ff4e38b | 21 | #include "AliCaloPID.h" |
9ff4e38b | 22 | #include "AliCaloTrackReader.h" |
cd0e5e33 | 23 | #include "AliCalorimeterUtils.h" |
24 | #include "AliEMCALGeometry.h" | |
2fbb6418 | 25 | #include "AliEPFlattener.h" |
cd0e5e33 | 26 | #include "AliESDEvent.h" |
27 | #include "AliESDInputHandler.h" | |
28 | #include "AliESDtrackCuts.h" | |
29 | #include "AliEventplane.h" | |
30 | #include "AliMCEvent.h" | |
79ad78fd | 31 | #include "AliOADBContainer.h" |
cd0e5e33 | 32 | #include "AliStack.h" |
33 | #include "AliVCluster.h" | |
3c40321c | 34 | |
9d6804f4 | 35 | using std::cout; |
36 | using std::endl; | |
37 | ||
3c40321c | 38 | ClassImp(AliAnalysisTaskPi0V2) |
39 | ||
40 | //________________________________________________________________________ | |
cd0e5e33 | 41 | AliAnalysisTaskPi0V2::AliAnalysisTaskPi0V2(const char *name) : |
42 | AliAnalysisTaskSE(name), | |
43 | fOutput(0), | |
44 | fESD(0),fAOD(0), | |
45 | fTracksName("PicoTrack"), fV1ClusName("CaloCluster"), fV2ClusName("CaloCluster"), | |
46 | fTrigClass("CVLN_|CSEMI_|CCENT|CVHN"), | |
47 | fTracks(0), fV1Clus(0), fV2Clus(0), | |
48 | fRunNumber(-999),fInterRunNumber(-999), | |
49 | fVtxCut(15.), | |
50 | fNcellCut(2.), fECut(1.), fEtaCut(0.65), fM02Cut(0.5),fDrCut(0.025), fPi0AsyCut(0), isV1Clus(1), isPhosCali(0), | |
51 | fCentrality(99.), | |
52 | fEPTPC(-999.), | |
53 | fEPTPCreso(0.), | |
54 | fEPV0(-999.), fEPV0A(-999.), fEPV0C(-999.), fEPV0Ar(-999.), fEPV0Cr(-999.), fEPV0r(-999.), | |
55 | fEPV0AR4(-999.), fEPV0AR5(-999.), fEPV0AR6(-999.), fEPV0AR7(-999.), fEPV0CR0(-999.), fEPV0CR1(-999.), fEPV0CR2(-999.), fEPV0CR3(-999.), | |
56 | hEvtCount(0), | |
57 | h2DcosV0A(0), h2DsinV0A(0), h2DcosV0C(0), h2DsinV0C(0), h2DcosTPC(0), h2DsinTPC(0), | |
58 | hEPTPC(0), hresoTPC(0), | |
59 | hEPV0(0), hEPV0A(0), hEPV0C(0), hEPV0Ar(0), hEPV0Cr(0), hEPV0r(0), hEPV0AR4(0), hEPV0AR7(0), hEPV0CR0(0), hEPV0CR3(0), | |
60 | hEPTPCCor(0), hEPV0ACor(0), hEPV0CCor(0), | |
61 | hdifV0Ar_V0Cr(0), hdifV0A_V0CR0(0), hdifV0A_V0CR3(0), hdifV0ACR0_V0CR3(0), hdifV0C_V0AR4(0), hdifV0C_V0AR7(0), hdifV0AR4_V0AR7(0), | |
62 | hdifV0A_V0C(0), hdifV0A_TPC(0), hdifV0C_TPC(0), hdifV0C_V0A(0), | |
63 | hM02vsPtA(0), hM02vsPtB(0), hClusDxDZA(0), hClusDxDZB(0), | |
91d49d74 | 64 | hdifEMC_EPV0A(0), hdifEMC_EPV0C(0), |
65 | hdifful_EPV0A(0), hdifful_EPV0C(0), | |
66 | hdifout_EPV0A(0), hdifout_EPV0C(0), | |
67 | hCv2EMC_EPV0A(0), hCv2EMC_EPV0C(0), hCv2ful_EPV0A(0), hCv2ful_EPV0C(0), hCv2out_EPV0A(0), hCv2out_EPV0C(0), | |
68 | hclusDif_EPV0A(0), hclusDif_EPV0C(0), hclusv2_EPV0A(0), hclusv2_EPV0C(0), | |
cd0e5e33 | 69 | fEPcalibFileName("$ALICE_ROOT/OADB/PHOS/PHOSflat.root"), fTPCFlat(0x0), fV0AFlat(0x0), fV0CFlat(0x0), |
70 | fClusterPbV0(0), fClusterPbV0A(0), fClusterPbV0C(0), fClusterPbTPC(0), | |
d118f9e0 | 71 | fHEPV0A(0x0), fHEPV0C(0x0), fHEPTPC(0x0), |
72 | fHEPV0AM2(0x0), fHEPV0CM2(0x0), fHEPTPCM2(0x0) | |
3c40321c | 73 | { |
cd0e5e33 | 74 | // Dummy constructor ALWAYS needed for I/O. |
75 | DefineInput(0, TChain::Class()); | |
76 | DefineOutput(1, TList::Class()); // for output list | |
3c40321c | 77 | } |
78 | ||
79 | //________________________________________________________________________ | |
cd0e5e33 | 80 | AliAnalysisTaskPi0V2::AliAnalysisTaskPi0V2() : |
81 | AliAnalysisTaskSE("default_name"), | |
82 | fOutput(0), | |
83 | fESD(0),fAOD(0), | |
84 | fTracksName("PicoTrack"), fV1ClusName("CaloCluster"), fV2ClusName("CaloCluster"), | |
85 | fTrigClass("CVLN_|CSEMI_|CCENT|CVHN"), | |
86 | fTracks(0), fV1Clus(0), fV2Clus(0), | |
87 | fRunNumber(-999),fInterRunNumber(-999), | |
88 | fVtxCut(15.), | |
89 | fNcellCut(2.), fECut(1.), fEtaCut(0.65), fM02Cut(0.5), fDrCut(0.025), fPi0AsyCut(0), isV1Clus(1),isPhosCali(0), | |
90 | fCentrality(99.), | |
91 | fEPTPC(-999.), | |
92 | fEPTPCreso(0.), | |
93 | fEPV0(-999.), fEPV0A(-999.), fEPV0C(-999.), fEPV0Ar(-999.), fEPV0Cr(-999.), fEPV0r(-999.), | |
94 | fEPV0AR4(-999.), fEPV0AR5(-999.), fEPV0AR6(-999.), fEPV0AR7(-999.), fEPV0CR0(-999.), fEPV0CR1(-999.), fEPV0CR2(-999.), fEPV0CR3(-999.), | |
95 | hEvtCount(0), | |
96 | h2DcosV0A(0), h2DsinV0A(0), h2DcosV0C(0), h2DsinV0C(0), h2DcosTPC(0), h2DsinTPC(0), | |
97 | hEPTPC(0), hresoTPC(0), | |
98 | hEPV0(0), hEPV0A(0), hEPV0C(0), hEPV0Ar(0), hEPV0Cr(0), hEPV0r(0), hEPV0AR4(0), hEPV0AR7(0), hEPV0CR0(0), hEPV0CR3(0), | |
99 | hEPTPCCor(0), hEPV0ACor(0), hEPV0CCor(0), | |
100 | hdifV0Ar_V0Cr(0), hdifV0A_V0CR0(0), hdifV0A_V0CR3(0), hdifV0ACR0_V0CR3(0), hdifV0C_V0AR4(0), hdifV0C_V0AR7(0), hdifV0AR4_V0AR7(0), | |
101 | hdifV0A_V0C(0), hdifV0A_TPC(0), hdifV0C_TPC(0), hdifV0C_V0A(0), | |
102 | hM02vsPtA(0), hM02vsPtB(0), hClusDxDZA(0), hClusDxDZB(0), | |
91d49d74 | 103 | hdifEMC_EPV0A(0), hdifEMC_EPV0C(0), |
104 | hdifful_EPV0A(0), hdifful_EPV0C(0), | |
105 | hdifout_EPV0A(0), hdifout_EPV0C(0), | |
106 | hCv2EMC_EPV0A(0), hCv2EMC_EPV0C(0), hCv2ful_EPV0A(0), hCv2ful_EPV0C(0), hCv2out_EPV0A(0), hCv2out_EPV0C(0), | |
107 | hclusDif_EPV0A(0), hclusDif_EPV0C(0), hclusv2_EPV0A(0), hclusv2_EPV0C(0), | |
cd0e5e33 | 108 | fEPcalibFileName("$ALICE_ROOT/OADB/PHOS/PHOSflat.root"), fTPCFlat(0x0), fV0AFlat(0x0), fV0CFlat(0x0), |
109 | fClusterPbV0(0), fClusterPbV0A(0), fClusterPbV0C(0), fClusterPbTPC(0), | |
d118f9e0 | 110 | fHEPV0A(0x0), fHEPV0C(0x0), fHEPTPC(0x0), |
111 | fHEPV0AM2(0x0), fHEPV0CM2(0x0), fHEPTPCM2(0x0) | |
3c40321c | 112 | { |
cd0e5e33 | 113 | // Constructor |
114 | // Define input and output slots here (never in the dummy constructor) | |
115 | // Input slot #0 works with a TChain - it is connected to the default input container | |
116 | // Output slot #1 writes into a TH1 container | |
117 | DefineInput(0, TChain::Class()); | |
118 | DefineOutput(1, TList::Class()); // for output list | |
3c40321c | 119 | } |
120 | ||
121 | //________________________________________________________________________ | |
122 | AliAnalysisTaskPi0V2::~AliAnalysisTaskPi0V2() | |
123 | { | |
cd0e5e33 | 124 | // Destructor. Clean-up the output list, but not the histograms that are put inside |
125 | // (the list is owner and will clean-up these histograms). Protect in PROOF case. | |
126 | if (fTPCFlat) | |
127 | delete fTPCFlat; | |
128 | fTPCFlat=0x0; | |
129 | if (fV0AFlat) | |
130 | delete fV0AFlat; | |
131 | fV0AFlat=0x0; | |
132 | if (fV0CFlat) | |
133 | delete fV0CFlat; | |
134 | fV0CFlat=0x0; | |
135 | delete fOutput; | |
3c40321c | 136 | } |
cd0e5e33 | 137 | |
3c40321c | 138 | //_____________________________________________________________________ |
139 | Double_t AliAnalysisTaskPi0V2::GetMaxCellEnergy(const AliVCluster *cluster, Short_t &id) const | |
140 | { | |
141 | // Get maximum energy of attached cell. | |
142 | ||
143 | id = -1; | |
144 | ||
145 | AliVCaloCells *cells = 0; | |
cd0e5e33 | 146 | if (fESD) { |
3c40321c | 147 | cells = fESD->GetEMCALCells(); |
cd0e5e33 | 148 | } else { |
79ad78fd | 149 | cells = fAOD->GetEMCALCells(); |
150 | } | |
3c40321c | 151 | if (!cells) |
152 | return 0; | |
153 | ||
154 | Double_t maxe = 0; | |
155 | const Int_t ncells = cluster->GetNCells(); | |
156 | for (Int_t i=0; i<ncells; i++) { | |
157 | Double_t e = cells->GetCellAmplitude(TMath::Abs(cluster->GetCellAbsId(i))); | |
158 | if (e>maxe) { | |
159 | maxe = e; | |
160 | id = cluster->GetCellAbsId(i); | |
161 | } | |
162 | } | |
163 | return maxe; | |
164 | } | |
cd0e5e33 | 165 | |
3c40321c | 166 | //_____________________________________________________________________ |
167 | Double_t AliAnalysisTaskPi0V2::GetCrossEnergy(const AliVCluster *cluster, Short_t &idmax) const | |
168 | { | |
169 | // Calculate the energy of cross cells around the leading cell. | |
170 | ||
79ad78fd | 171 | AliVCaloCells *cells; |
cd0e5e33 | 172 | if (fESD) { |
3c40321c | 173 | cells = fESD->GetEMCALCells(); |
cd0e5e33 | 174 | } else { |
79ad78fd | 175 | cells = fAOD->GetEMCALCells(); |
176 | } | |
3c40321c | 177 | if (!cells) |
178 | return 0; | |
179 | ||
180 | AliEMCALGeometry *geom = AliEMCALGeometry::GetInstance(); | |
181 | if (!geom) | |
182 | return 0; | |
183 | ||
184 | Int_t iSupMod = -1; | |
185 | Int_t iTower = -1; | |
186 | Int_t iIphi = -1; | |
187 | Int_t iIeta = -1; | |
188 | Int_t iphi = -1; | |
189 | Int_t ieta = -1; | |
190 | Int_t iphis = -1; | |
191 | Int_t ietas = -1; | |
192 | ||
965c985f | 193 | Double_t crossEnergy = 0.; |
3c40321c | 194 | |
195 | geom->GetCellIndex(idmax,iSupMod,iTower,iIphi,iIeta); | |
196 | geom->GetCellPhiEtaIndexInSModule(iSupMod,iTower,iIphi, iIeta,iphis,ietas); | |
197 | ||
198 | Int_t ncells = cluster->GetNCells(); | |
199 | for (Int_t i=0; i<ncells; i++) { | |
200 | Int_t cellAbsId = cluster->GetCellAbsId(i); | |
201 | geom->GetCellIndex(cellAbsId,iSupMod,iTower,iIphi,iIeta); | |
202 | geom->GetCellPhiEtaIndexInSModule(iSupMod,iTower,iIphi, iIeta,iphi,ieta); | |
203 | Int_t aphidiff = TMath::Abs(iphi-iphis); | |
204 | if (aphidiff>1) | |
205 | continue; | |
206 | Int_t aetadiff = TMath::Abs(ieta-ietas); | |
207 | if (aetadiff>1) | |
208 | continue; | |
209 | if ( (aphidiff==1 && aetadiff==0) || | |
210 | (aphidiff==0 && aetadiff==1) ) { | |
211 | crossEnergy += cells->GetCellAmplitude(cellAbsId); | |
212 | } | |
213 | } | |
214 | ||
215 | return crossEnergy; | |
216 | } | |
cd0e5e33 | 217 | |
3c40321c | 218 | //_____________________________________________________________________ |
219 | Bool_t AliAnalysisTaskPi0V2::IsWithinFiducialVolume(Short_t id) const | |
220 | { | |
221 | // Check if cell is within given fiducial volume. | |
222 | ||
223 | Double_t fNFiducial = 1; | |
224 | ||
225 | Int_t iSupMod = -1; | |
226 | Int_t iTower = -1; | |
227 | Int_t iIphi = -1; | |
228 | Int_t iIeta = -1; | |
229 | Int_t iphi = -1; | |
230 | Int_t ieta = -1; | |
231 | ||
232 | Bool_t okrow = kFALSE; | |
233 | Bool_t okcol = kFALSE; | |
234 | ||
04b116e8 | 235 | AliEMCALGeometry *geom = AliEMCALGeometry::GetInstance(); |
3c40321c | 236 | if (!geom) |
237 | return kFALSE; | |
238 | ||
239 | Int_t cellAbsId = id; | |
240 | geom->GetCellIndex(cellAbsId,iSupMod,iTower,iIphi,iIeta); | |
241 | geom->GetCellPhiEtaIndexInSModule(iSupMod,iTower,iIphi, iIeta,iphi,ieta); | |
242 | ||
243 | // Check rows/phi | |
244 | if (iSupMod < 10) { | |
245 | if (iphi >= fNFiducial && iphi < 24-fNFiducial) | |
246 | okrow = kTRUE; | |
247 | } else { | |
248 | if (iphi >= fNFiducial && iphi < 12-fNFiducial) | |
249 | okrow = kTRUE; | |
250 | } | |
251 | // Check columns/eta | |
252 | Bool_t noEMCALBorderAtEta0 = kTRUE; | |
253 | if (!noEMCALBorderAtEta0) { | |
254 | if (ieta > fNFiducial && ieta < 48-fNFiducial) | |
255 | okcol = kTRUE; | |
256 | } else { | |
257 | if (iSupMod%2==0) { | |
258 | if (ieta >= fNFiducial) | |
259 | okcol = kTRUE; | |
260 | } else { | |
261 | if (ieta < 48-fNFiducial) | |
262 | okcol = kTRUE; | |
263 | } | |
264 | } | |
265 | if (okrow && okcol) | |
266 | return kTRUE; | |
267 | ||
268 | return kFALSE; | |
269 | } | |
cd0e5e33 | 270 | |
3c40321c | 271 | //______________________________________________________________________ |
ceba2d0c | 272 | Bool_t AliAnalysisTaskPi0V2::IsGoodCluster(const AliVCluster *c) const |
3c40321c | 273 | { |
cd0e5e33 | 274 | if (!c) |
3c40321c | 275 | return kFALSE; |
276 | ||
670ffa5c | 277 | if(c->GetNCells() < fNcellCut) |
3c40321c | 278 | return kFALSE; |
279 | ||
670ffa5c | 280 | if(c->E() < fECut) |
3c40321c | 281 | return kFALSE; |
3c40321c | 282 | Short_t id = -1; |
283 | Double_t maxE = GetMaxCellEnergy(c, id); | |
965c985f | 284 | if((1. - double(GetCrossEnergy(c,id))/maxE) > 0.97) |
3c40321c | 285 | return kFALSE; |
286 | ||
965c985f | 287 | |
3c40321c | 288 | Float_t pos1[3]; |
289 | c->GetPosition(pos1); | |
290 | TVector3 clsPos(pos1); | |
291 | Double_t eta = clsPos.Eta(); | |
292 | ||
cd0e5e33 | 293 | if (TMath::Abs(eta) > fEtaCut) |
3c40321c | 294 | return kFALSE; |
295 | ||
296 | if (!IsWithinFiducialVolume(id)) | |
297 | return kFALSE; | |
298 | ||
670ffa5c | 299 | if(c->GetM02() >fM02Cut) |
3c40321c | 300 | return kFALSE; |
301 | ||
04b116e8 | 302 | |
3c40321c | 303 | return kTRUE; |
70d53162 | 304 | |
cc57d293 | 305 | } |
306 | //________________________________________________________________________________________________ | |
ceba2d0c | 307 | Bool_t AliAnalysisTaskPi0V2::IsGoodClusterV1(const AliVCluster *c) const |
cc57d293 | 308 | { |
cd0e5e33 | 309 | if (!c) |
cc57d293 | 310 | return kFALSE; |
311 | ||
cd0e5e33 | 312 | if (c->GetNCells() < fNcellCut) |
cc57d293 | 313 | return kFALSE; |
314 | ||
cd0e5e33 | 315 | if (c->E() < fECut) |
cc57d293 | 316 | return kFALSE; |
317 | ||
318 | Short_t id = -1; | |
319 | Double_t maxE = GetMaxCellEnergy(c, id); | |
9ff4e38b | 320 | if((1. - double(GetCrossEnergy(c,id))/maxE) > 0.97) |
cc57d293 | 321 | return kFALSE; |
322 | ||
323 | ||
324 | Float_t pos1[3]; | |
325 | c->GetPosition(pos1); | |
326 | TVector3 clsPos(pos1); | |
327 | Double_t eta = clsPos.Eta(); | |
328 | ||
cd0e5e33 | 329 | if (TMath::Abs(eta) > fEtaCut) |
cc57d293 | 330 | return kFALSE; |
331 | ||
332 | if (!IsWithinFiducialVolume(id)) | |
333 | return kFALSE; | |
334 | ||
cd0e5e33 | 335 | if (c->GetM02() <fM02Cut) |
cc57d293 | 336 | return kFALSE; |
337 | ||
338 | Double_t dr = TMath::Sqrt(c->GetTrackDx()*c->GetTrackDx() + c->GetTrackDz()*c->GetTrackDz()); | |
c45a0734 | 339 | if(dr<fDrCut) |
cc57d293 | 340 | return kFALSE; |
341 | ||
342 | return kTRUE; | |
04b116e8 | 343 | } |
cd0e5e33 | 344 | |
3c40321c | 345 | //_____________________________________________________________________ |
346 | Bool_t AliAnalysisTaskPi0V2::IsGoodPion(const TLorentzVector &p1, const TLorentzVector &p2) const | |
347 | { | |
348 | // Is good pion? | |
349 | ||
670ffa5c | 350 | if(fPi0AsyCut){ |
351 | Double_t asym = TMath::Abs(p1.E()-p2.E())/(p1.E()+p2.E()); | |
352 | if (asym>0.7) | |
353 | return kFALSE; | |
354 | } | |
3c40321c | 355 | TLorentzVector pion; |
356 | pion = p1 + p2; | |
357 | Double_t eta = pion.Eta(); | |
670ffa5c | 358 | if(TMath::Abs(eta) > fEtaCut) |
3c40321c | 359 | return kFALSE; |
360 | ||
361 | return kTRUE; | |
362 | } | |
cd0e5e33 | 363 | |
3c40321c | 364 | //_______________________________________________________________________ |
79ad78fd | 365 | void AliAnalysisTaskPi0V2::FillPion(const TLorentzVector& p1, const TLorentzVector& p2, Double_t EPV0A, Double_t EPV0C, Double_t EPTPC) |
3c40321c | 366 | { |
367 | // Fill histogram. | |
368 | ||
369 | if (!IsGoodPion(p1,p2)) | |
370 | return; | |
371 | TLorentzVector pion; | |
372 | pion = p1 + p2; | |
373 | ||
374 | Double_t mass = pion.M(); | |
375 | Double_t pt = pion.Pt(); | |
376 | Double_t phi = pion.Phi(); | |
377 | ||
3c40321c | 378 | Double_t dphiV0A = phi-EPV0A; |
379 | Double_t dphiV0C = phi-EPV0C; | |
380 | Double_t dphiTPC = phi-EPTPC; | |
381 | ||
1accedbd | 382 | Double_t cos2phiV0A = TMath::Cos(2.*(dphiV0A)); |
383 | Double_t cos2phiV0C = TMath::Cos(2.*(dphiV0C)); | |
384 | Double_t cos2phiTPC = TMath::Cos(2.*(dphiTPC)); | |
385 | ||
c6ee6f73 | 386 | dphiV0A = TVector2::Phi_0_2pi(dphiV0A); if(dphiV0A >TMath::Pi()) dphiV0A -= TMath::Pi(); |
387 | dphiV0C = TVector2::Phi_0_2pi(dphiV0C); if(dphiV0C >TMath::Pi()) dphiV0C -= TMath::Pi(); | |
388 | dphiTPC = TVector2::Phi_0_2pi(dphiTPC); if(dphiTPC >TMath::Pi()) dphiTPC -= TMath::Pi(); | |
3c40321c | 389 | |
d118f9e0 | 390 | Double_t xV0A[4]; // Match ndims in fH V0A EP for method 1 |
3c40321c | 391 | xV0A[0] = mass; |
392 | xV0A[1] = pt; | |
393 | xV0A[2] = fCentrality; | |
394 | xV0A[3] = dphiV0A; | |
3c40321c | 395 | fHEPV0A->Fill(xV0A); |
396 | ||
d118f9e0 | 397 | |
398 | Double_t xV0AM2[4]; // Match ndims in fH V0A EP for method 2 | |
399 | xV0AM2[0] = mass; | |
400 | xV0AM2[1] = pt; | |
401 | xV0AM2[2] = fCentrality; | |
402 | xV0AM2[3] = cos2phiV0A; | |
403 | fHEPV0AM2->Fill(xV0AM2); | |
404 | ||
405 | ||
406 | Double_t xV0C[4]; // Match ndims in fH V0C EP for method 1 | |
3c40321c | 407 | xV0C[0] = mass; |
408 | xV0C[1] = pt; | |
409 | xV0C[2] = fCentrality; | |
410 | xV0C[3] = dphiV0C; | |
3c40321c | 411 | fHEPV0C->Fill(xV0C); |
412 | ||
d118f9e0 | 413 | Double_t xV0CM2[4]; // Match ndims in fH V0C EP for method 2 |
414 | xV0CM2[0] = mass; | |
415 | xV0CM2[1] = pt; | |
416 | xV0CM2[2] = fCentrality; | |
417 | xV0CM2[3] = cos2phiV0C; | |
418 | fHEPV0CM2->Fill(xV0CM2); | |
419 | ||
420 | ||
af1defae | 421 | if (fEPTPC!=-999.){ |
d118f9e0 | 422 | Double_t xTPC[4]; // Match ndims in fH TPC EP for method 1 |
af1defae | 423 | xTPC[0] = mass; |
424 | xTPC[1] = pt; | |
425 | xTPC[2] = fCentrality; | |
91d49d74 | 426 | xTPC[3] = dphiTPC; |
af1defae | 427 | fHEPTPC->Fill(xTPC); |
d118f9e0 | 428 | |
429 | Double_t xTPCM2[4]; // Match ndims in fH TPC EP | |
430 | xTPCM2[0] = mass; | |
431 | xTPCM2[1] = pt; | |
432 | xTPCM2[2] = fCentrality; | |
433 | xTPCM2[3] = cos2phiTPC; | |
434 | fHEPTPCM2->Fill(xTPCM2); | |
435 | ||
af1defae | 436 | } |
7bb82cc2 | 437 | } |
cd0e5e33 | 438 | |
e50db689 | 439 | //________________________________________________________________________________________________________________________________ |
79ad78fd | 440 | void AliAnalysisTaskPi0V2::FillCluster(const TLorentzVector& p1, Double_t EPV0A, Double_t EPV0C, Double_t EPTPC, AliVCluster *c) |
7bb82cc2 | 441 | { |
cd0e5e33 | 442 | // Cluster(photon) v2 method |
443 | ||
8e5ac2d1 | 444 | Double_t Et = p1.Et(); |
7bb82cc2 | 445 | Double_t Phi = p1.Phi(); |
9ff4e38b | 446 | Double_t M02 = c->GetM02(); |
447 | Double_t DxClus = c->GetTrackDx(); | |
448 | Double_t DzClus = c->GetTrackDz(); | |
449 | Double_t dr = TMath::Sqrt(DxClus*DxClus + DzClus*DzClus); | |
7bb82cc2 | 450 | |
7bb82cc2 | 451 | Double_t difClusV0A = TVector2::Phi_0_2pi(Phi-EPV0A); if(difClusV0A >TMath::Pi()) difClusV0A -= TMath::Pi(); |
452 | Double_t difClusV0C = TVector2::Phi_0_2pi(Phi-EPV0C); if(difClusV0C >TMath::Pi()) difClusV0C -= TMath::Pi(); | |
453 | Double_t difClusTPC = TVector2::Phi_0_2pi(Phi-EPTPC); if(difClusTPC >TMath::Pi()) difClusTPC -= TMath::Pi(); | |
454 | ||
79ad78fd | 455 | Double_t DataV0A[5]; |
8e5ac2d1 | 456 | DataV0A[0] = Et; |
457 | DataV0A[1] = M02; | |
458 | DataV0A[2] = fCentrality; | |
79ad78fd | 459 | DataV0A[3] = difClusV0A; |
460 | DataV0A[4] = dr; | |
8e5ac2d1 | 461 | fClusterPbV0A->Fill(DataV0A); |
462 | ||
79ad78fd | 463 | Double_t DataV0C[5]; |
8e5ac2d1 | 464 | DataV0C[0] = Et; |
465 | DataV0C[1] = M02; | |
466 | DataV0C[2] = fCentrality; | |
79ad78fd | 467 | DataV0C[3] = difClusV0C; |
468 | DataV0C[4] = dr; | |
8e5ac2d1 | 469 | fClusterPbV0C->Fill(DataV0C); |
470 | ||
79ad78fd | 471 | Double_t DataTPC[5]; |
8e5ac2d1 | 472 | DataTPC[0] = Et; |
473 | DataTPC[1] = M02; | |
474 | DataTPC[2] = fCentrality; | |
79ad78fd | 475 | DataTPC[3] = difClusTPC; |
476 | DataTPC[4] = dr; | |
8e5ac2d1 | 477 | fClusterPbTPC->Fill(DataTPC); |
04b116e8 | 478 | } |
cd0e5e33 | 479 | |
3c40321c | 480 | //_________________________________________________________________________________________________ |
ceba2d0c | 481 | void AliAnalysisTaskPi0V2::GetMom(TLorentzVector& p, const AliVCluster *c, Double_t *vertex) |
3c40321c | 482 | { |
483 | // Calculate momentum. | |
484 | Float_t posMom[3]; | |
485 | c->GetPosition(posMom); | |
486 | TVector3 clsPos2(posMom); | |
487 | ||
488 | Double_t e = c->E(); | |
489 | Double_t r = clsPos2.Perp(); | |
490 | Double_t eta = clsPos2.Eta(); | |
491 | Double_t phi = clsPos2.Phi(); | |
492 | ||
493 | TVector3 pos; | |
494 | pos.SetPtEtaPhi(r,eta,phi); | |
495 | ||
496 | if (vertex) { //calculate direction relative to vertex | |
497 | pos -= vertex; | |
498 | } | |
499 | ||
500 | Double_t rad = pos.Mag(); | |
501 | p.SetPxPyPzE(e*pos.x()/rad, e*pos.y()/rad, e*pos.z()/rad, e); | |
70d53162 | 502 | |
04b116e8 | 503 | } |
cd0e5e33 | 504 | |
3c40321c | 505 | //________________________________________________________________________ |
506 | void AliAnalysisTaskPi0V2::UserCreateOutputObjects() | |
507 | { | |
cd0e5e33 | 508 | // Create histograms |
509 | // Called once (on the worker node) | |
3c40321c | 510 | |
cd0e5e33 | 511 | fOutput = new TList(); |
512 | fOutput->SetOwner(); // IMPORTANT! | |
513 | ||
514 | hEvtCount = new TH1F("hEvtCount", " Event Plane", 9, 0.5, 9.5); | |
515 | hEvtCount->GetXaxis()->SetBinLabel(1,"All"); | |
516 | hEvtCount->GetXaxis()->SetBinLabel(2,"Evt"); | |
517 | hEvtCount->GetXaxis()->SetBinLabel(3,"Trg Class"); | |
518 | hEvtCount->GetXaxis()->SetBinLabel(4,"Vtx"); | |
519 | hEvtCount->GetXaxis()->SetBinLabel(5,"Cent"); | |
520 | hEvtCount->GetXaxis()->SetBinLabel(6,"EPtask"); | |
521 | hEvtCount->GetXaxis()->SetBinLabel(7,"ClusterTask"); | |
522 | hEvtCount->GetXaxis()->SetBinLabel(8,"Pass"); | |
523 | fOutput->Add(hEvtCount); | |
04b116e8 | 524 | |
cd0e5e33 | 525 | hEPTPC = new TH2F("hEPTPC", "EPTPC vs cent", 100, 0., 100., 100, 0., TMath::Pi()); |
526 | hresoTPC = new TH2F("hresoTPC", "TPc reso vs cent", 100, 0., 100., 100, 0., 1.); | |
527 | hEPV0 = new TH2F("hEPV0", "EPV0 vs cent", 100, 0., 100., 100, 0., TMath::Pi()); | |
528 | hEPV0A = new TH2F("hEPV0A", "EPV0A vs cent", 100, 0., 100., 100, 0., TMath::Pi()); | |
529 | hEPV0C = new TH2F("hEPV0C", "EPV0C vs cent", 100, 0., 100., 100, 0., TMath::Pi()); | |
530 | hEPV0Ar = new TH2F("hEPV0Ar", "EPV0Ar vs cent", 100, 0., 100., 100, 0., TMath::Pi()); | |
531 | hEPV0Cr = new TH2F("hEPV0Cr", "EPV0Cr vs cent", 100, 0., 100., 100, 0., TMath::Pi()); | |
532 | hEPV0r = new TH2F("hEPV0r", "EPV0r vs cent", 100, 0., 100., 100, 0., TMath::Pi()); | |
533 | hEPV0AR4 = new TH2F("hEPV0AR4", "EPV0AR4 vs cent", 100, 0., 100., 100, 0., TMath::Pi()); | |
534 | hEPV0AR7 = new TH2F("hEPV0AR7", "EPV0AR7 vs cent", 100, 0., 100., 100, 0., TMath::Pi()); | |
535 | hEPV0CR0 = new TH2F("hEPV0CR0", "EPV0CR0 vs cent", 100, 0., 100., 100, 0., TMath::Pi()); | |
536 | hEPV0CR3 = new TH2F("hEPV0CR3", "EPV0CR3 vs cent", 100, 0., 100., 100, 0., TMath::Pi()); | |
537 | fOutput->Add(hEPTPC); | |
538 | fOutput->Add(hresoTPC); | |
539 | fOutput->Add(hEPV0); | |
540 | fOutput->Add(hEPV0A); | |
541 | fOutput->Add(hEPV0C); | |
542 | fOutput->Add(hEPV0Ar); | |
543 | fOutput->Add(hEPV0Cr); | |
544 | fOutput->Add(hEPV0r); | |
545 | fOutput->Add(hEPV0AR4); | |
546 | fOutput->Add(hEPV0AR7); | |
547 | fOutput->Add(hEPV0CR0); | |
548 | fOutput->Add(hEPV0CR3); | |
549 | ||
550 | hEPTPCCor = new TH2F("hEPTPCCor", "EPTPC vs cent after PHOS Correct", 100, 0., 100., 100, 0., TMath::Pi()); | |
551 | hEPV0ACor = new TH2F("hEPV0ACor", "EPV0A vs cent after PHOS Correct", 100, 0., 100., 100, 0., TMath::Pi()); | |
552 | hEPV0CCor = new TH2F("hEPV0CCor", "EPV0C vs cent after PHOS Correct", 100, 0., 100., 100, 0., TMath::Pi()); | |
553 | fOutput->Add(hEPTPCCor); | |
554 | fOutput->Add(hEPV0ACor); | |
555 | fOutput->Add(hEPV0CCor); | |
556 | ||
557 | hdifV0Ar_V0Cr = new TH2F("hdifV0Ar_V0Cr", "EP Ar-Cr ", 100, 0., 100., 100, -1., 1.); | |
558 | hdifV0A_V0CR0 = new TH2F("hdifV0A_V0CR0", "EP A-R0 ", 100, 0., 100., 100, -1., 1.); | |
559 | hdifV0A_V0CR3 = new TH2F("hdifV0A_V0CR3", "EP A-R3 ", 100, 0., 100., 100, -1., 1.); | |
560 | hdifV0ACR0_V0CR3 = new TH2F("hdifV0ACR0_V0CR3", "EP R0-R3 ", 100, 0., 100., 100, -1., 1.); | |
561 | hdifV0C_V0AR4 = new TH2F("hdifV0C_V0AR4", "EP C-R4 ", 100, 0., 100., 100, -1., 1.); | |
562 | hdifV0C_V0AR7 = new TH2F("hdifV0C_V0AR7", "EP C-R7 ", 100, 0., 100., 100, -1., 1.); | |
563 | hdifV0AR4_V0AR7 = new TH2F("hdifV0AR4_V0AR7", "EP R4-R7 ", 100, 0., 100., 100, -1., 1.); | |
564 | fOutput->Add(hdifV0Ar_V0Cr); | |
565 | fOutput->Add(hdifV0A_V0CR0); | |
566 | fOutput->Add(hdifV0A_V0CR3); | |
567 | fOutput->Add(hdifV0ACR0_V0CR3); | |
568 | fOutput->Add(hdifV0C_V0AR4); | |
569 | fOutput->Add(hdifV0C_V0AR7); | |
570 | fOutput->Add(hdifV0AR4_V0AR7); | |
571 | ||
572 | hdifV0A_V0C = new TH2F("hdifV0A_V0C", "EP A-C ", 100, 0., 100., 100, -1., 1.); | |
573 | hdifV0A_TPC = new TH2F("hdifV0A_TPC", "EP A-TPC", 100, 0., 100., 100, -1., 1.); | |
574 | hdifV0C_TPC = new TH2F("hdifV0C_TPC", "EP C-TPC", 100, 0., 100., 100, -1., 1.); | |
575 | hdifV0C_V0A = new TH2F("hdifV0C_V0A", "EP C-A ", 100, 0., 100., 100, -1., 1.); | |
576 | fOutput->Add(hdifV0A_V0C); | |
577 | fOutput->Add(hdifV0A_TPC); | |
578 | fOutput->Add(hdifV0C_TPC); | |
579 | fOutput->Add(hdifV0C_V0A); | |
580 | ||
91d49d74 | 581 | hdifEMC_EPV0A = new TH3F("hdifEMC_EPV0A", "dif phi in EMC with EPV0A", 100, 0., 100., 100, 0., TMath::Pi(), 15, 0., 15.); |
582 | hdifEMC_EPV0C = new TH3F("hdifEMC_EPV0C", "dif phi in EMC with EPV0C", 100, 0., 100., 100, 0., TMath::Pi(), 15, 0., 15.); | |
cd0e5e33 | 583 | fOutput->Add(hdifEMC_EPV0A); |
584 | fOutput->Add(hdifEMC_EPV0C); | |
585 | ||
91d49d74 | 586 | hdifful_EPV0A = new TH3F("hdifful_EPV0A", "dif phi in full with EPV0A", 100, 0., 100., 100, 0., TMath::Pi(), 15, 0., 15.); |
587 | hdifful_EPV0C = new TH3F("hdifful_EPV0C", "dif phi in full with EPV0C", 100, 0., 100., 100, 0., TMath::Pi(), 15, 0., 15.); | |
cd0e5e33 | 588 | fOutput->Add(hdifful_EPV0A); |
589 | fOutput->Add(hdifful_EPV0C); | |
590 | ||
91d49d74 | 591 | hdifout_EPV0A = new TH3F("hdifout_EPV0A", "dif phi NOT in EMC with EPV0A", 100, 0., 100., 100, 0., TMath::Pi(), 15, 0., 15.); |
592 | hdifout_EPV0C = new TH3F("hdifout_EPV0C", "dif phi NOT in EMC with EPV0C", 100, 0., 100., 100, 0., TMath::Pi(), 15, 0., 15.); | |
cd0e5e33 | 593 | fOutput->Add(hdifout_EPV0A); |
594 | fOutput->Add(hdifout_EPV0C); | |
595 | ||
91d49d74 | 596 | hCv2EMC_EPV0A = new TH3F("hCv2EMC_EPV0A", " raw v2 of charged trc in EMC with V0A", 100, 0, 100, 50, -1., 1., 15, 0., 15.); |
597 | hCv2EMC_EPV0C = new TH3F("hCv2EMC_EPV0C", " raw v2 of charged trc in EMC with V0C", 100, 0, 100, 50, -1., 1., 15, 0., 15.); | |
598 | fOutput->Add(hCv2EMC_EPV0A); | |
599 | fOutput->Add(hCv2EMC_EPV0C); | |
600 | ||
601 | hCv2ful_EPV0A = new TH3F("hCv2ful_EPV0A", " raw v2 of charged trc in ful with V0A", 100, 0, 100, 50, -1., 1., 15, 0., 15.); | |
602 | hCv2ful_EPV0C = new TH3F("hCv2ful_EPV0C", " raw v2 of charged trc in ful with V0C", 100, 0, 100, 50, -1., 1., 15, 0., 15.); | |
603 | fOutput->Add(hCv2ful_EPV0A); | |
604 | fOutput->Add(hCv2ful_EPV0C); | |
605 | ||
606 | hCv2out_EPV0A = new TH3F("hCv2out_EPV0A", " raw v2 of charged trc out with V0A", 100, 0, 100, 50, -1., 1., 15, 0., 15.); | |
607 | hCv2out_EPV0C = new TH3F("hCv2out_EPV0C", " raw v2 of charged trc out with V0A", 100, 0, 100, 50, -1., 1., 15, 0., 15.); | |
608 | fOutput->Add(hCv2out_EPV0A); | |
609 | fOutput->Add(hCv2out_EPV0C); | |
610 | ||
611 | hclusDif_EPV0A = new TH3F("hclusDif_EPV0A", "dif phi of clus with EP V0A", 100, 0., 100., 100, 0., TMath::Pi(), 15, 0., 15.); | |
612 | hclusDif_EPV0C = new TH3F("hclusDif_EPV0C", "dif phi of clus with EP V0C", 100, 0., 100., 100, 0., TMath::Pi(), 15, 0., 15.); | |
613 | fOutput->Add(hclusDif_EPV0A); | |
614 | fOutput->Add(hclusDif_EPV0C); | |
615 | ||
616 | hclusv2_EPV0A = new TH3F("hclusv2_EPV0A", " raw v2 of clus in ful with V0A", 100, 0, 100, 50, -1., 1., 15, 0., 15.); | |
617 | hclusv2_EPV0C = new TH3F("hclusv2_EPV0C", " raw v2 of clus in ful with V0C", 100, 0, 100, 50, -1., 1., 15, 0., 15.); | |
618 | fOutput->Add(hclusv2_EPV0A); | |
619 | fOutput->Add(hclusv2_EPV0C); | |
620 | ||
cd0e5e33 | 621 | if (isV1Clus) { |
91d49d74 | 622 | // Et M02 spdcent DeltaPhi Dr |
79ad78fd | 623 | Int_t bins[5] = { 500, 350, 100, 100, 100}; // binning |
624 | Double_t min[5] = { 0.0, 0.0, 0, 0.0, 0 }; // min x | |
625 | Double_t max[5] = { 50.0, 3.5, 100, TMath::Pi(), 0.1}; // max x | |
8e5ac2d1 | 626 | |
79ad78fd | 627 | fClusterPbV0A = new THnSparseF("fClusterPbV0A","",5,bins,min,max); |
cd0e5e33 | 628 | fClusterPbV0A->GetAxis(0)->SetTitle("Transverse Energy [GeV]"); |
629 | fClusterPbV0A->GetAxis(1)->SetTitle("M02"); | |
630 | fClusterPbV0A->GetAxis(2)->SetTitle("V0M Centrality"); | |
631 | fClusterPbV0A->GetAxis(3)->SetTitle("Delta(#phi) [rad]"); | |
632 | fClusterPbV0A->GetAxis(4)->SetTitle("Dr"); | |
8e5ac2d1 | 633 | fOutput->Add(fClusterPbV0A); |
634 | ||
79ad78fd | 635 | fClusterPbV0C = new THnSparseF("fClusterPbV0C","",5,bins,min,max); |
cd0e5e33 | 636 | fClusterPbV0C->GetAxis(0)->SetTitle("Transverse Energy [GeV]"); |
637 | fClusterPbV0C->GetAxis(1)->SetTitle("M02"); | |
638 | fClusterPbV0C->GetAxis(2)->SetTitle("V0M Centrality"); | |
639 | fClusterPbV0C->GetAxis(3)->SetTitle("Delta(#phi) [rad]"); | |
640 | fClusterPbV0C->GetAxis(4)->SetTitle("Dr"); | |
8e5ac2d1 | 641 | fOutput->Add(fClusterPbV0C); |
642 | ||
79ad78fd | 643 | fClusterPbTPC = new THnSparseF("fClusterPbTPC","",5,bins,min,max); |
cd0e5e33 | 644 | fClusterPbTPC->GetAxis(0)->SetTitle("Transverse Energy [GeV]"); |
645 | fClusterPbTPC->GetAxis(1)->SetTitle("M02"); | |
646 | fClusterPbTPC->GetAxis(2)->SetTitle("V0M Centrality"); | |
647 | fClusterPbTPC->GetAxis(3)->SetTitle("Delta(#phi) [rad]"); | |
648 | fClusterPbTPC->GetAxis(4)->SetTitle("Dr"); | |
8e5ac2d1 | 649 | fOutput->Add(fClusterPbTPC); |
cd0e5e33 | 650 | } |
79ad78fd | 651 | |
cd0e5e33 | 652 | h2DcosV0A = new TProfile("h2DcosV0A", "cos(Phi) V0r vs Run NUmber", 200, 0., 200.); |
653 | h2DsinV0A = new TProfile("h2DsinV0A", "sin(Phi) V0r vs Run NUmber", 200, 0., 200.); | |
654 | h2DcosV0C = new TProfile("h2DcosV0C", "cos(Phi) V0r vs Run NUmber", 200, 0., 200.); | |
655 | h2DsinV0C = new TProfile("h2DsinV0C", "sin(Phi) V0r vs Run NUmber", 200, 0., 200.); | |
656 | h2DcosTPC = new TProfile("h2DcosTPC", "cos(Phi) V0r vs Run NUmber", 200, 0., 200.); | |
657 | h2DsinTPC = new TProfile("h2DsinTPC", "sin(Phi) V0r vs Run NUmber", 200, 0., 200.); | |
658 | fOutput->Add(h2DcosV0A); | |
659 | fOutput->Add(h2DsinV0A); | |
660 | fOutput->Add(h2DcosV0C); | |
661 | fOutput->Add(h2DsinV0C); | |
662 | fOutput->Add(h2DcosTPC); | |
663 | fOutput->Add(h2DsinTPC); | |
664 | ||
665 | if (isV1Clus) { | |
666 | hM02vsPtA = new TH2F("hM02vsPtA", "M02 vs Et before cut", 5000, 0, 50, 400, 0, 4.); | |
667 | hM02vsPtB = new TH2F("hM02vsPtB", "M02 vs Et before cut", 5000, 0, 50, 400, 0, 4.); | |
668 | fOutput->Add(hM02vsPtA); | |
669 | fOutput->Add(hM02vsPtB); | |
670 | } | |
671 | hClusDxDZA = new TH2F("hClusDxDZA", "clus Dx vs Dz", 1000, -1., 1., 1000, -1., 1); | |
672 | hClusDxDZB = new TH2F("hClusDxDZB", "clus Dx vs Dz", 1000, -1., 1., 1000, -1., 1); | |
673 | fOutput->Add(hClusDxDZA); | |
674 | fOutput->Add(hClusDxDZB); | |
79ad78fd | 675 | |
cd0e5e33 | 676 | if (!isV1Clus) { |
d118f9e0 | 677 | const Int_t ndims = 4; |
1accedbd | 678 | Int_t nMgg=500, nPt=40, nCent=20, nDeltaPhi=315, ncos2phi=500; |
d118f9e0 | 679 | Int_t binsv1[ndims] = {nMgg, nPt, nCent, nDeltaPhi}; |
91d49d74 | 680 | Double_t xmin[ndims] = { 0, 0., 0, 0. }; |
681 | Double_t xmax[ndims] = { 0.5, 20., 100, 3.15 }; | |
8e5ac2d1 | 682 | fHEPV0A = new THnSparseF("fHEPV0A", "Flow histogram EPV0A", ndims, binsv1, xmin, xmax); |
683 | fHEPV0C = new THnSparseF("fHEPV0C", "Flow histogram EPV0C", ndims, binsv1, xmin, xmax); | |
684 | fHEPTPC = new THnSparseF("fHEPTPC", "Flow histogram EPTPC", ndims, binsv1, xmin, xmax); | |
cd0e5e33 | 685 | fHEPV0A->GetAxis(0)->SetTitle("m_{#gamma#gamma} "); |
686 | fHEPV0A->GetAxis(1)->SetTitle("p_{T}[GeV]"); | |
687 | fHEPV0A->GetAxis(2)->SetTitle("centrality"); | |
688 | fHEPV0A->GetAxis(3)->SetTitle("#delta #phi"); | |
689 | fHEPV0C->GetAxis(0)->SetTitle("m_{#gamma#gamma} "); | |
690 | fHEPV0C->GetAxis(1)->SetTitle("p_{T}[GeV]"); | |
691 | fHEPV0C->GetAxis(2)->SetTitle("centrality"); | |
692 | fHEPV0C->GetAxis(3)->SetTitle("#delta #phi"); | |
693 | fHEPTPC->GetAxis(0)->SetTitle("m_{#gamma#gamma} "); | |
694 | fHEPTPC->GetAxis(1)->SetTitle("p_{T}[GeV]"); | |
695 | fHEPTPC->GetAxis(2)->SetTitle("centrality"); | |
696 | fHEPTPC->GetAxis(3)->SetTitle("#delta #phi"); | |
04b116e8 | 697 | fOutput->Add(fHEPV0A); |
698 | fOutput->Add(fHEPV0C); | |
699 | fOutput->Add(fHEPTPC); | |
d118f9e0 | 700 | |
701 | Int_t binsv2[ndims] = {nMgg, nPt, nCent, ncos2phi}; | |
702 | Double_t xmin2[ndims] = { 0, 0., 0, -1.}; | |
703 | Double_t xmax2[ndims] = { 0.5, 20., 100, 1.}; | |
704 | fHEPV0AM2 = new THnSparseF("fHEPV0AM2", "Flow histogram EPV0A M2", ndims, binsv2, xmin2, xmax2); | |
705 | fHEPV0CM2 = new THnSparseF("fHEPV0CM2", "Flow histogram EPV0C M2", ndims, binsv2, xmin2, xmax2); | |
706 | fHEPTPCM2 = new THnSparseF("fHEPTPCM2", "Flow histogram EPTPC M2", ndims, binsv2, xmin2, xmax2); | |
707 | fHEPV0AM2->GetAxis(0)->SetTitle("m_{#gamma#gamma} "); | |
708 | fHEPV0AM2->GetAxis(1)->SetTitle("p_{T}[GeV]"); | |
709 | fHEPV0AM2->GetAxis(2)->SetTitle("centrality"); | |
710 | fHEPV0AM2->GetAxis(3)->SetTitle("cos(2*#delta #phi)"); | |
711 | fHEPV0CM2->GetAxis(0)->SetTitle("m_{#gamma#gamma} "); | |
712 | fHEPV0CM2->GetAxis(1)->SetTitle("p_{T}[GeV]"); | |
713 | fHEPV0CM2->GetAxis(2)->SetTitle("centrality"); | |
714 | fHEPV0CM2->GetAxis(3)->SetTitle("cos(2*#delta #phi)"); | |
715 | fHEPTPCM2->GetAxis(0)->SetTitle("m_{#gamma#gamma} "); | |
716 | fHEPTPCM2->GetAxis(1)->SetTitle("p_{T}[GeV]"); | |
717 | fHEPTPCM2->GetAxis(2)->SetTitle("centrality"); | |
718 | fHEPTPCM2->GetAxis(3)->SetTitle("cos(2*#delta #phi)"); | |
719 | fOutput->Add(fHEPV0AM2); | |
720 | fOutput->Add(fHEPV0CM2); | |
721 | fOutput->Add(fHEPTPCM2); | |
722 | ||
79ad78fd | 723 | } |
cd0e5e33 | 724 | PostData(1, fOutput); // Post data for ALL output slots >0 here, to get at least an empty histogram |
3c40321c | 725 | } |
726 | ||
727 | //________________________________________________________________________ | |
728 | void AliAnalysisTaskPi0V2::UserExec(Option_t *) | |
729 | { | |
79ad78fd | 730 | // Main loop |
731 | // Called for each event | |
732 | ||
733 | hEvtCount->Fill(1); | |
734 | // Create pointer to reconstructed event | |
cd0e5e33 | 735 | |
79ad78fd | 736 | AliVEvent *event = InputEvent(); |
cd0e5e33 | 737 | if (!event) { |
738 | AliError("Could not retrieve event"); | |
739 | return; | |
740 | } | |
741 | ||
742 | // create pointer to event | |
743 | TString type = AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()->GetDataType(); | |
af1defae | 744 | if (type=="ESD") { |
79ad78fd | 745 | fESD = dynamic_cast<AliESDEvent*>(event); |
746 | if (!fESD) { | |
cd0e5e33 | 747 | AliError("Cannot get the ESD event"); |
748 | return; | |
79ad78fd | 749 | } |
af1defae | 750 | } else if (type=="AOD") { |
79ad78fd | 751 | fAOD = dynamic_cast<AliAODEvent*>(event); |
752 | if (!fAOD) { | |
cd0e5e33 | 753 | AliError("Cannot get the AOD event"); |
754 | return; | |
79ad78fd | 755 | } |
cd0e5e33 | 756 | } else { |
757 | AliError("Cannot happen"); | |
758 | return; | |
8071d5b2 | 759 | } |
ea7921ea | 760 | |
4fbbf89d | 761 | hEvtCount->Fill(2); |
cd0e5e33 | 762 | if (!fTrigClass.IsNull()) { |
7bb82cc2 | 763 | TString fired; |
cd0e5e33 | 764 | if (fESD) { |
765 | fired = fESD->GetFiredTriggerClasses(); | |
766 | } else { | |
767 | fired = fAOD->GetFiredTriggerClasses(); | |
79ad78fd | 768 | } |
7bb82cc2 | 769 | if (!fired.Contains("-B-")) |
770 | return; | |
771 | TObjArray *arr = fTrigClass.Tokenize("|"); | |
772 | if (!arr) | |
773 | return; | |
774 | Bool_t match = 0; | |
775 | for (Int_t i=0;i<arr->GetEntriesFast();++i) { | |
776 | TObject *obj = arr->At(i); | |
777 | if (!obj) | |
778 | continue; | |
779 | if (fired.Contains(obj->GetName())) { | |
780 | match = 1; | |
781 | break; | |
782 | } | |
783 | } | |
784 | delete arr; | |
cd0e5e33 | 785 | if (!match) |
786 | return; | |
7bb82cc2 | 787 | } |
cd0e5e33 | 788 | hEvtCount->Fill(3); |
79ad78fd | 789 | |
a20c44e6 | 790 | if (fRunNumber != event->GetRunNumber()) { |
791 | fRunNumber = event->GetRunNumber(); | |
792 | SetFlatteningData(); | |
79ad78fd | 793 | } |
cd0e5e33 | 794 | |
af1defae | 795 | fInterRunNumber = ConvertToInternalRunNumber(fRunNumber); |
796 | ||
cd0e5e33 | 797 | const AliVVertex* fvertex; |
af1defae | 798 | fvertex = event->GetPrimaryVertex(); |
965c985f | 799 | |
cd0e5e33 | 800 | if (TMath::Abs(fvertex->GetZ())>fVtxCut) |
801 | return; | |
802 | Double_t vertex[3] = {fvertex->GetX(), fvertex->GetY(), fvertex->GetZ()}; | |
803 | ||
804 | hEvtCount->Fill(4); | |
ef7e23cf | 805 | |
cd0e5e33 | 806 | fCentrality = event->GetCentrality()->GetCentralityPercentile("CL1"); //spd vertex |
807 | ||
808 | hEvtCount->Fill(5); | |
809 | ||
810 | AliEventplane *ep = event->GetEventplane(); | |
811 | if (ep) { | |
af1defae | 812 | if (ep->GetEventplane("Q") != -1) |
813 | fEPTPC = ep->GetEventplane("Q"); | |
cd0e5e33 | 814 | else |
815 | fEPTPC = -999.; | |
af1defae | 816 | if (ep->GetEventplane("Q") != -1) |
817 | fEPTPCreso = TMath::Cos(2.*(ep->GetQsubRes())); | |
cd0e5e33 | 818 | else |
819 | fEPTPCreso = -1; | |
af1defae | 820 | |
821 | fEPV0 = ep->GetEventplane("V0", event); | |
822 | fEPV0A = ep->GetEventplane("V0A", event); | |
823 | fEPV0C = ep->GetEventplane("V0C", event); | |
cd0e5e33 | 824 | Double_t qx=0, qy=0; |
825 | Double_t qxr=0, qyr=0; | |
af1defae | 826 | fEPV0Ar = ep->CalculateVZEROEventPlane(event, 4, 5, 2, qxr, qyr); |
827 | fEPV0Cr = ep->CalculateVZEROEventPlane(event, 2, 3, 2, qx, qy); | |
cd0e5e33 | 828 | qxr += qx; |
829 | qyr += qy; | |
830 | fEPV0r = TMath::ATan2(qyr,qxr)/2.; | |
af1defae | 831 | fEPV0AR4 = ep->CalculateVZEROEventPlane(event, 4, 2, qx, qy); |
832 | fEPV0AR5 = ep->CalculateVZEROEventPlane(event, 5, 2, qx, qy); | |
833 | fEPV0AR6 = ep->CalculateVZEROEventPlane(event, 6, 2, qx, qy); | |
834 | fEPV0AR7 = ep->CalculateVZEROEventPlane(event, 7, 2, qx, qy); | |
835 | fEPV0CR0 = ep->CalculateVZEROEventPlane(event, 0, 2, qx, qy); | |
836 | fEPV0CR1 = ep->CalculateVZEROEventPlane(event, 1, 2, qx, qy); | |
837 | fEPV0CR2 = ep->CalculateVZEROEventPlane(event, 2, 2, qx, qy); | |
838 | fEPV0CR3 = ep->CalculateVZEROEventPlane(event, 3, 2, qx, qy); | |
839 | } | |
ef7e23cf | 840 | |
cd0e5e33 | 841 | FillEPQA(); //Fill the EP QA |
842 | ||
843 | hEvtCount->Fill(6); | |
844 | ||
845 | fEPV0 = TVector2::Phi_0_2pi(fEPV0); | |
846 | if (fEPV0>TMath::Pi()) | |
847 | fEPV0 = fEPV0 - TMath::Pi(); | |
848 | fEPV0r = TVector2::Phi_0_2pi(fEPV0r); | |
849 | if (fEPV0r>TMath::Pi()) | |
850 | fEPV0r = fEPV0r - TMath::Pi(); | |
851 | fEPV0A = TVector2::Phi_0_2pi(fEPV0A); | |
852 | if (fEPV0A>TMath::Pi()) | |
853 | fEPV0A = fEPV0A - TMath::Pi(); | |
854 | fEPV0C = TVector2::Phi_0_2pi(fEPV0C); | |
855 | if (fEPV0C>TMath::Pi()) | |
856 | fEPV0C = fEPV0C - TMath::Pi(); | |
857 | fEPV0Ar = TVector2::Phi_0_2pi(fEPV0Ar); | |
858 | if (fEPV0Ar>TMath::Pi()) | |
859 | fEPV0Ar = fEPV0Ar - TMath::Pi(); | |
860 | fEPV0Cr = TVector2::Phi_0_2pi(fEPV0Cr); | |
861 | if (fEPV0Cr>TMath::Pi()) | |
862 | fEPV0Cr = fEPV0Cr - TMath::Pi(); | |
863 | fEPV0AR4 = TVector2::Phi_0_2pi(fEPV0AR4); | |
864 | if (fEPV0AR4>TMath::Pi()) | |
865 | fEPV0AR4 = fEPV0AR4 - TMath::Pi(); | |
866 | fEPV0AR7 = TVector2::Phi_0_2pi(fEPV0AR7); | |
867 | if (fEPV0AR7>TMath::Pi()) | |
868 | fEPV0AR7 = fEPV0AR7 - TMath::Pi(); | |
869 | fEPV0CR0 = TVector2::Phi_0_2pi(fEPV0CR0); | |
870 | if (fEPV0CR0>TMath::Pi()) | |
871 | fEPV0CR0 = fEPV0CR0 - TMath::Pi(); | |
872 | fEPV0CR3 = TVector2::Phi_0_2pi(fEPV0CR3); | |
873 | if (fEPV0CR3>TMath::Pi()) | |
874 | fEPV0CR3 = fEPV0CR3 - TMath::Pi(); | |
af1defae | 875 | if (fEPTPC != -999. ) |
cd0e5e33 | 876 | hEPTPC->Fill(fCentrality, fEPTPC); |
877 | if (fEPTPCreso!=-1) | |
878 | hresoTPC->Fill(fCentrality, fEPTPCreso); | |
879 | hEPV0->Fill(fCentrality, fEPV0); | |
880 | hEPV0A->Fill(fCentrality, fEPV0A); | |
881 | hEPV0C->Fill(fCentrality, fEPV0C); | |
882 | hEPV0Ar->Fill(fCentrality, fEPV0Ar); | |
883 | hEPV0Cr->Fill(fCentrality, fEPV0Cr); | |
884 | hEPV0r->Fill(fCentrality, fEPV0r); | |
885 | hEPV0AR4->Fill(fCentrality, fEPV0AR4); | |
886 | hEPV0AR7->Fill(fCentrality, fEPV0AR7); | |
887 | hEPV0CR0->Fill(fCentrality, fEPV0CR0); | |
888 | hEPV0CR3->Fill(fCentrality, fEPV0CR3); | |
889 | ||
890 | if (isPhosCali) { | |
891 | // PHOS Flattening | |
892 | fEPV0A = ApplyFlatteningV0A(fEPV0A, fCentrality); //V0A after Phos flatten | |
893 | fEPV0C = ApplyFlatteningV0C(fEPV0C, fCentrality); //V0C after Phos flatten | |
af1defae | 894 | if(fEPTPC != -999.) |
895 | fEPTPC = ApplyFlattening(fEPTPC, fCentrality); //TPC after Phos flatten | |
cd0e5e33 | 896 | } |
897 | ||
898 | if (!isPhosCali) { | |
af1defae | 899 | if(fEPTPC != -999.) |
900 | hEPTPCCor->Fill(fCentrality, ApplyFlattening(fEPTPC, fCentrality)); | |
cd0e5e33 | 901 | hEPV0ACor->Fill(fCentrality, ApplyFlatteningV0A(fEPV0A, fCentrality)); |
902 | hEPV0CCor->Fill(fCentrality, ApplyFlatteningV0C(fEPV0C, fCentrality)); | |
903 | } else { | |
af1defae | 904 | if(fEPTPC != -999.) |
905 | hEPTPCCor->Fill(fCentrality, fEPTPC); | |
cd0e5e33 | 906 | hEPV0ACor->Fill(fCentrality, fEPV0A); |
907 | hEPV0CCor->Fill(fCentrality, fEPV0C); | |
79ad78fd | 908 | } |
04b116e8 | 909 | |
cd0e5e33 | 910 | hdifV0Ar_V0Cr->Fill(fCentrality, TMath::Cos(2.*(fEPV0Ar - fEPV0Cr))); |
911 | hdifV0A_V0CR0->Fill(fCentrality, TMath::Cos(2.*(fEPV0A - fEPV0CR0))); | |
912 | hdifV0A_V0CR3->Fill(fCentrality, TMath::Cos(2.*(fEPV0A - fEPV0CR3))); | |
913 | hdifV0ACR0_V0CR3->Fill(fCentrality, TMath::Cos(2*(fEPV0CR0 - fEPV0CR3))); | |
914 | hdifV0C_V0AR4->Fill(fCentrality, TMath::Cos(2*(fEPV0C - fEPV0AR4))); | |
915 | hdifV0C_V0AR7->Fill(fCentrality, TMath::Cos(2*(fEPV0C - fEPV0AR7))); | |
916 | hdifV0AR4_V0AR7->Fill(fCentrality, TMath::Cos(2*(fEPV0AR4 - fEPV0AR7))); | |
3c40321c | 917 | |
cd0e5e33 | 918 | hdifV0A_V0C->Fill(fCentrality, TMath::Cos(2*(fEPV0A - fEPV0C))); |
af1defae | 919 | if (fEPTPC!=-999.){ |
cd0e5e33 | 920 | hdifV0A_TPC->Fill(fCentrality, TMath::Cos(2*(fEPV0A - fEPTPC))); |
921 | hdifV0C_TPC->Fill(fCentrality, TMath::Cos(2*(fEPV0C - fEPTPC))); | |
922 | } | |
923 | hdifV0C_V0A->Fill(fCentrality, TMath::Cos(2*(fEPV0C - fEPV0A))); | |
924 | ||
925 | // Cluster loop for reconstructed event | |
926 | ||
927 | //================ for v2 clusterize analysis============================================== | |
928 | if (!isV1Clus) { | |
13e6ff28 | 929 | if (!fV2ClusName.IsNull() && !fV2Clus) { |
930 | fV2Clus = dynamic_cast<TClonesArray*>(InputEvent()->FindListObject(fV2ClusName)); | |
931 | if (!fV2Clus) { | |
c0ca428c | 932 | AliError(Form("%s: Could not retrieve v2 cluster name %s!", GetName(), fV2ClusName.Data())); |
13e6ff28 | 933 | return; |
934 | } | |
935 | } | |
936 | Int_t nCluster = fV2Clus->GetEntries(); | |
cd0e5e33 | 937 | for (Int_t i=0; i<nCluster; ++i) { |
13e6ff28 | 938 | AliVCluster *c1 = static_cast<AliVCluster*>(fV2Clus->At(i)); |
cd0e5e33 | 939 | if (!c1) |
940 | continue; | |
13e6ff28 | 941 | hClusDxDZA->Fill(c1->GetTrackDz(), c1->GetTrackDx()); |
cd0e5e33 | 942 | if (!c1->IsEMCAL()) |
943 | continue; | |
944 | if (!IsGoodCluster(c1)) | |
945 | continue; | |
13e6ff28 | 946 | hClusDxDZB->Fill(c1->GetTrackDz(), c1->GetTrackDx()); |
947 | TLorentzVector p1; | |
948 | GetMom(p1, c1, vertex); | |
91d49d74 | 949 | Double_t cluPhi = p1.Phi(); |
950 | Double_t cluPt = p1.Pt(); | |
951 | Double_t difclusV0A = TVector2::Phi_0_2pi(cluPhi-fEPV0A); | |
952 | if (difclusV0A >TMath::Pi()) | |
953 | difclusV0A -= TMath::Pi(); | |
954 | Double_t difclusV0C = TVector2::Phi_0_2pi(cluPhi-fEPV0C); | |
955 | if (difclusV0C >TMath::Pi()) | |
956 | difclusV0C -= TMath::Pi(); | |
957 | hclusDif_EPV0A->Fill(fCentrality, difclusV0A, cluPt); | |
958 | hclusDif_EPV0C->Fill(fCentrality, difclusV0C, cluPt); | |
959 | hclusv2_EPV0A->Fill(fCentrality, TMath::Cos(2.*difclusV0A), cluPt); | |
960 | hclusv2_EPV0C->Fill(fCentrality, TMath::Cos(2.*difclusV0C), cluPt); | |
cd0e5e33 | 961 | for (Int_t j=i+1; j<nCluster; ++j) { |
962 | AliVCluster *c2 = static_cast<AliVCluster*>(fV2Clus->At(j)); | |
963 | if (!c2) | |
964 | continue; | |
965 | if (!c2->IsEMCAL()) | |
966 | continue; | |
967 | if (!IsGoodCluster(c2)) | |
968 | continue; | |
13e6ff28 | 969 | TLorentzVector p2; |
970 | GetMom(p2, c2, vertex); | |
79ad78fd | 971 | FillPion(p1, p2, fEPV0A, fEPV0C, fEPTPC); |
13e6ff28 | 972 | } |
973 | } | |
ceba2d0c | 974 | } |
cd0e5e33 | 975 | |
13e6ff28 | 976 | //================ for v1 clusterize analysis============================================== |
cd0e5e33 | 977 | if (isV1Clus) { |
ceba2d0c | 978 | if (!fV2ClusName.IsNull() && !fV1Clus) { |
979 | fV1Clus = dynamic_cast<TClonesArray*>(InputEvent()->FindListObject(fV1ClusName)); | |
980 | if (!fV1Clus) { | |
c0ca428c | 981 | AliError(Form("%s: Could not retrieve v1 cluster name %s!", GetName(), fV1ClusName.Data())); |
ceba2d0c | 982 | return; |
983 | } | |
984 | } | |
985 | Int_t nClusterV1 = fV1Clus->GetEntries(); | |
cd0e5e33 | 986 | for (Int_t i=0; i<nClusterV1; ++i) { |
79ad78fd | 987 | AliVCluster *c3 = dynamic_cast<AliVCluster*>(fV1Clus->At(i)); |
cd0e5e33 | 988 | if (!c3) |
989 | continue; | |
990 | if (!c3->IsEMCAL()) | |
991 | continue; | |
9ff4e38b | 992 | Double_t M02c3 = c3->GetM02(); |
993 | Double_t Dxc3 = c3->GetTrackDx(); | |
994 | Double_t Dzc3 = c3->GetTrackDz(); | |
995 | ||
996 | hClusDxDZA->Fill(Dzc3, Dxc3); | |
13e6ff28 | 997 | Float_t clsPosEt[3] = {0,0,0}; |
998 | c3->GetPosition(clsPosEt); | |
999 | TVector3 clsVec(clsPosEt); | |
1000 | Double_t Et = c3->E()*TMath::Sin(clsVec.Theta()); | |
9ff4e38b | 1001 | hM02vsPtA->Fill(Et, M02c3); |
cd0e5e33 | 1002 | if (!IsGoodClusterV1(c3)) |
1003 | continue; | |
9ff4e38b | 1004 | hM02vsPtB->Fill(Et, M02c3); |
1005 | hClusDxDZB->Fill(Dzc3, Dxc3); | |
8f4922cb | 1006 | TLorentzVector p3; |
1007 | GetMom(p3, c3, vertex); | |
79ad78fd | 1008 | FillCluster(p3, fEPV0A, fEPV0C, fEPTPC, c3); |
8f4922cb | 1009 | } |
1010 | } | |
1011 | ||
cd0e5e33 | 1012 | hEvtCount->Fill(7); |
8f4922cb | 1013 | |
cd0e5e33 | 1014 | if (!fTracksName.IsNull() && !fTracks) { |
1015 | fTracks = dynamic_cast<TClonesArray*>(InputEvent()->FindListObject(fTracksName)); | |
1016 | if (!fTracks) { | |
1017 | AliError(Form("%s: Could not retrieve tracks %s!", GetName(), fTracksName.Data())); | |
1018 | return; | |
1019 | } | |
50ebbe79 | 1020 | } |
e5ba16b4 | 1021 | |
cd0e5e33 | 1022 | Int_t ntracks = fTracks->GetEntries(); |
1023 | for (Int_t i=0; i<ntracks; ++i){ | |
1024 | AliVTrack *track = static_cast<AliVTrack*>(fTracks->At(i)); | |
1025 | if (!track) | |
1026 | continue; | |
1027 | Double_t tPhi = track->Phi(); | |
1028 | Double_t tPt = track->Pt(); | |
1029 | Double_t Eta = track->Eta(); | |
1030 | ||
1031 | Double_t difTrackV0 = TVector2::Phi_0_2pi(tPhi-fEPV0); | |
1032 | if (difTrackV0 >TMath::Pi()) | |
1033 | difTrackV0 -= TMath::Pi(); | |
1034 | Double_t difTrackV0A = TVector2::Phi_0_2pi(tPhi-fEPV0A); | |
1035 | if (difTrackV0A >TMath::Pi()) | |
1036 | difTrackV0A -= TMath::Pi(); | |
1037 | Double_t difTrackV0C = TVector2::Phi_0_2pi(tPhi-fEPV0C); | |
1038 | if (difTrackV0C >TMath::Pi()) | |
1039 | difTrackV0C -= TMath::Pi(); | |
1040 | Double_t difTrackTPC = TVector2::Phi_0_2pi(tPhi-fEPTPC); | |
1041 | if (difTrackTPC >TMath::Pi()) | |
1042 | difTrackTPC -= TMath::Pi(); | |
1043 | if (tPhi*TMath::RadToDeg()>80. && tPhi*TMath::RadToDeg()<180. && Eta <0.7 && Eta >(-0.7)){ | |
cd0e5e33 | 1044 | hdifEMC_EPV0A->Fill(fCentrality, difTrackV0A, tPt); |
1045 | hdifEMC_EPV0C->Fill(fCentrality, difTrackV0C, tPt); | |
91d49d74 | 1046 | hCv2EMC_EPV0A->Fill(fCentrality, TMath::Cos(2.*difTrackV0A), tPt); |
1047 | hCv2EMC_EPV0C->Fill(fCentrality, TMath::Cos(2.*difTrackV0C), tPt); | |
cd0e5e33 | 1048 | } else { |
cd0e5e33 | 1049 | hdifout_EPV0A->Fill(fCentrality, difTrackV0A, tPt); |
1050 | hdifout_EPV0C->Fill(fCentrality, difTrackV0C, tPt); | |
91d49d74 | 1051 | hCv2out_EPV0A->Fill(fCentrality, TMath::Cos(2.*difTrackV0A), tPt); |
1052 | hCv2out_EPV0C->Fill(fCentrality, TMath::Cos(2.*difTrackV0C), tPt); | |
cd0e5e33 | 1053 | } |
cd0e5e33 | 1054 | hdifful_EPV0A->Fill(fCentrality, difTrackV0A, tPt); |
1055 | hdifful_EPV0C->Fill(fCentrality, difTrackV0C, tPt); | |
91d49d74 | 1056 | hCv2ful_EPV0A->Fill(fCentrality, TMath::Cos(2.*difTrackV0A), tPt); |
1057 | hCv2ful_EPV0C->Fill(fCentrality, TMath::Cos(2.*difTrackV0C), tPt); | |
cd0e5e33 | 1058 | } |
1059 | hEvtCount->Fill(8); | |
1060 | ||
1061 | // NEW HISTO should be filled before this point, as PostData puts the | |
1062 | // information for this iteration of the UserExec in the container | |
1063 | PostData(1, fOutput); | |
3c40321c | 1064 | } |
cd0e5e33 | 1065 | |
7bb82cc2 | 1066 | //____________________________________________________________________ |
1067 | Int_t AliAnalysisTaskPi0V2::ConvertToInternalRunNumber(Int_t n) | |
1068 | { | |
cd0e5e33 | 1069 | switch(n) { |
1070 | case 170593 : return 179; | |
1071 | case 170572 : return 178; | |
1072 | case 170556 : return 177; | |
1073 | case 170552 : return 176; | |
1074 | case 170546 : return 175; | |
1075 | case 170390 : return 174; | |
1076 | case 170389 : return 173; | |
1077 | case 170388 : return 172; | |
1078 | case 170387 : return 171; | |
1079 | case 170315 : return 170; | |
1080 | case 170313 : return 169; | |
1081 | case 170312 : return 168; | |
1082 | case 170311 : return 167; | |
1083 | case 170309 : return 166; | |
1084 | case 170308 : return 165; | |
1085 | case 170306 : return 164; | |
1086 | case 170270 : return 163; | |
1087 | case 170269 : return 162; | |
1088 | case 170268 : return 161; | |
1089 | case 170267 : return 160; | |
1090 | case 170264 : return 159; | |
1091 | case 170230 : return 158; | |
1092 | case 170228 : return 157; | |
1093 | case 170208 : return 156; | |
1094 | case 170207 : return 155; | |
1095 | case 170205 : return 154; | |
1096 | case 170204 : return 153; | |
1097 | case 170203 : return 152; | |
1098 | case 170195 : return 151; | |
1099 | case 170193 : return 150; | |
1100 | case 170163 : return 149; | |
1101 | case 170162 : return 148; | |
1102 | case 170159 : return 147; | |
1103 | case 170155 : return 146; | |
1104 | case 170152 : return 145; | |
1105 | case 170091 : return 144; | |
1106 | case 170089 : return 143; | |
1107 | case 170088 : return 142; | |
1108 | case 170085 : return 141; | |
1109 | case 170084 : return 140; | |
1110 | case 170083 : return 139; | |
1111 | case 170081 : return 138; | |
1112 | case 170040 : return 137; | |
1113 | case 170038 : return 136; | |
1114 | case 170036 : return 135; | |
1115 | case 170027 : return 134; | |
1116 | case 169981 : return 133; | |
1117 | case 169975 : return 132; | |
1118 | case 169969 : return 131; | |
1119 | case 169965 : return 130; | |
1120 | case 169961 : return 129; | |
1121 | case 169956 : return 128; | |
1122 | case 169926 : return 127; | |
1123 | case 169924 : return 126; | |
1124 | case 169923 : return 125; | |
1125 | case 169922 : return 124; | |
1126 | case 169919 : return 123; | |
1127 | case 169918 : return 122; | |
1128 | case 169914 : return 121; | |
1129 | case 169859 : return 120; | |
1130 | case 169858 : return 119; | |
1131 | case 169855 : return 118; | |
1132 | case 169846 : return 117; | |
1133 | case 169838 : return 116; | |
1134 | case 169837 : return 115; | |
1135 | case 169835 : return 114; | |
1136 | case 169683 : return 113; | |
1137 | case 169628 : return 112; | |
1138 | case 169591 : return 111; | |
1139 | case 169590 : return 110; | |
1140 | case 169588 : return 109; | |
1141 | case 169587 : return 108; | |
1142 | case 169586 : return 107; | |
1143 | case 169584 : return 106; | |
1144 | case 169557 : return 105; | |
1145 | case 169555 : return 104; | |
1146 | case 169554 : return 103; | |
1147 | case 169553 : return 102; | |
1148 | case 169550 : return 101; | |
1149 | case 169515 : return 100; | |
1150 | case 169512 : return 99; | |
1151 | case 169506 : return 98; | |
1152 | case 169504 : return 97; | |
1153 | case 169498 : return 96; | |
1154 | case 169475 : return 95; | |
1155 | case 169420 : return 94; | |
1156 | case 169419 : return 93; | |
1157 | case 169418 : return 92; | |
1158 | case 169417 : return 91; | |
1159 | case 169415 : return 90; | |
1160 | case 169411 : return 89; | |
1161 | case 169238 : return 88; | |
1162 | case 169236 : return 87; | |
1163 | case 169167 : return 86; | |
1164 | case 169160 : return 85; | |
1165 | case 169156 : return 84; | |
1166 | case 169148 : return 83; | |
1167 | case 169145 : return 82; | |
1168 | case 169144 : return 81; | |
1169 | case 169143 : return 80; | |
1170 | case 169138 : return 79; | |
1171 | case 169099 : return 78; | |
1172 | case 169094 : return 77; | |
1173 | case 169091 : return 76; | |
1174 | case 169045 : return 75; | |
1175 | case 169044 : return 74; | |
1176 | case 169040 : return 73; | |
1177 | case 169035 : return 72; | |
1178 | case 168992 : return 71; | |
1179 | case 168988 : return 70; | |
1180 | case 168984 : return 69; | |
1181 | case 168826 : return 68; | |
1182 | case 168777 : return 67; | |
1183 | case 168514 : return 66; | |
1184 | case 168512 : return 65; | |
1185 | case 168511 : return 64; | |
1186 | case 168467 : return 63; | |
1187 | case 168464 : return 62; | |
1188 | case 168461 : return 61; | |
1189 | case 168460 : return 60; | |
1190 | case 168458 : return 59; | |
1191 | case 168362 : return 58; | |
1192 | case 168361 : return 57; | |
1193 | case 168356 : return 56; | |
1194 | case 168342 : return 55; | |
1195 | case 168341 : return 54; | |
1196 | case 168325 : return 53; | |
1197 | case 168322 : return 52; | |
1198 | case 168318 : return 51; | |
1199 | case 168311 : return 50; | |
1200 | case 168310 : return 49; | |
1201 | case 168213 : return 48; | |
1202 | case 168212 : return 47; | |
1203 | case 168208 : return 46; | |
1204 | case 168207 : return 45; | |
1205 | case 168206 : return 44; | |
1206 | case 168205 : return 43; | |
1207 | case 168204 : return 42; | |
1208 | case 168203 : return 41; | |
1209 | case 168181 : return 40; | |
1210 | case 168177 : return 39; | |
1211 | case 168175 : return 38; | |
1212 | case 168173 : return 37; | |
1213 | case 168172 : return 36; | |
1214 | case 168171 : return 35; | |
1215 | case 168115 : return 34; | |
1216 | case 168108 : return 33; | |
1217 | case 168107 : return 32; | |
1218 | case 168105 : return 31; | |
1219 | case 168104 : return 30; | |
1220 | case 168103 : return 29; | |
1221 | case 168076 : return 28; | |
1222 | case 168069 : return 27; | |
1223 | case 168068 : return 26; | |
1224 | case 168066 : return 25; | |
1225 | case 167988 : return 24; | |
1226 | case 167987 : return 23; | |
1227 | case 167986 : return 22; | |
1228 | case 167985 : return 21; | |
1229 | case 167921 : return 20; | |
1230 | case 167920 : return 19; | |
1231 | case 167915 : return 18; | |
1232 | case 167909 : return 17; | |
1233 | case 167903 : return 16; | |
1234 | case 167902 : return 15; | |
1235 | case 167818 : return 14; | |
1236 | case 167814 : return 13; | |
1237 | case 167813 : return 12; | |
1238 | case 167808 : return 11; | |
1239 | case 167807 : return 10; | |
1240 | case 167806 : return 9; | |
1241 | case 167713 : return 8; | |
1242 | case 167712 : return 7; | |
1243 | case 167711 : return 6; | |
1244 | case 167706 : return 5; | |
1245 | case 167693 : return 4; | |
1246 | case 166532 : return 3; | |
1247 | case 166530 : return 2; | |
1248 | case 166529 : return 1; | |
7bb82cc2 | 1249 | |
1250 | default : return 199; | |
cd0e5e33 | 1251 | } |
7bb82cc2 | 1252 | } |
cd0e5e33 | 1253 | |
7bb82cc2 | 1254 | //_______________________________________________________________________ |
1255 | void AliAnalysisTaskPi0V2::FillEPQA() | |
1256 | { | |
79ad78fd | 1257 | h2DcosV0A->Fill(fInterRunNumber, TMath::Cos(fEPV0A)); |
1258 | h2DsinV0A->Fill(fInterRunNumber, TMath::Sin(fEPV0A)); | |
1259 | h2DcosV0C->Fill(fInterRunNumber, TMath::Cos(fEPV0C)); | |
1260 | h2DsinV0C->Fill(fInterRunNumber, TMath::Sin(fEPV0C)); | |
af1defae | 1261 | if (fEPTPC!=-999.){ |
1262 | h2DcosTPC->Fill(fInterRunNumber, TMath::Cos(fEPTPC)); | |
1263 | h2DsinTPC->Fill(fInterRunNumber, TMath::Sin(fEPTPC)); | |
1264 | } | |
79ad78fd | 1265 | } |
cd0e5e33 | 1266 | |
79ad78fd | 1267 | //_________________________________________________________________________________ |
cd0e5e33 | 1268 | void AliAnalysisTaskPi0V2::SetFlatteningData() |
1269 | { | |
79ad78fd | 1270 | //Read objects with flattening parameters |
1271 | AliOADBContainer flatContainer("phosFlat"); | |
1272 | flatContainer.InitFromFile(fEPcalibFileName.Data(),"phosFlat"); | |
1273 | TObjArray *maps = (TObjArray*)flatContainer.GetObject(fRunNumber,"phosFlat"); | |
cd0e5e33 | 1274 | if (!maps) { |
1275 | AliError(Form("Can not read Flattening for run %d. \n From file >%s<\n",fRunNumber,fEPcalibFileName.Data())) ; | |
1276 | } else { | |
79ad78fd | 1277 | AliInfo(Form("Setting PHOS flattening with name %s \n",maps->GetName())) ; |
2fbb6418 | 1278 | AliEPFlattener * h = (AliEPFlattener*)maps->At(0) ; |
79ad78fd | 1279 | if(fTPCFlat) delete fTPCFlat ; |
2fbb6418 | 1280 | fTPCFlat = new AliEPFlattener(); |
79ad78fd | 1281 | fTPCFlat = h ; |
2fbb6418 | 1282 | h = (AliEPFlattener*)maps->At(1); |
79ad78fd | 1283 | if(fV0AFlat) delete fV0AFlat ; |
2fbb6418 | 1284 | fV0AFlat = new AliEPFlattener(); |
79ad78fd | 1285 | fV0AFlat = h ; |
2fbb6418 | 1286 | h = (AliEPFlattener*)maps->At(2); |
79ad78fd | 1287 | if(fV0CFlat) delete fV0CFlat ; |
2fbb6418 | 1288 | fV0CFlat = new AliEPFlattener(); |
cd0e5e33 | 1289 | fV0CFlat = h; |
79ad78fd | 1290 | } |
79ad78fd | 1291 | } |
79ad78fd | 1292 | |
cd0e5e33 | 1293 | //____________________________________________________________________________ |
1294 | Double_t AliAnalysisTaskPi0V2::ApplyFlattening(Double_t phi, Double_t c) | |
1295 | { | |
79ad78fd | 1296 | if(fTPCFlat) |
1297 | return fTPCFlat->MakeFlat(phi,c); | |
cd0e5e33 | 1298 | return phi; |
79ad78fd | 1299 | } |
cd0e5e33 | 1300 | |
79ad78fd | 1301 | //____________________________________________________________________________ |
cd0e5e33 | 1302 | Double_t AliAnalysisTaskPi0V2::ApplyFlatteningV0A(Double_t phi, Double_t c) |
1303 | { | |
79ad78fd | 1304 | if(fV0AFlat) |
1305 | return fV0AFlat->MakeFlat(phi,c); | |
cd0e5e33 | 1306 | return phi; |
79ad78fd | 1307 | } |
cd0e5e33 | 1308 | |
79ad78fd | 1309 | //____________________________________________________________________________ |
1310 | Double_t AliAnalysisTaskPi0V2::ApplyFlatteningV0C(Double_t phi, Double_t c){ | |
1311 | ||
1312 | if(fV0CFlat) | |
1313 | return fV0CFlat->MakeFlat(phi,c); | |
cd0e5e33 | 1314 | return phi; |
7bb82cc2 | 1315 | } |
cd0e5e33 | 1316 | |
3c40321c | 1317 | //________________________________________________________________________ |
1318 | void AliAnalysisTaskPi0V2::Terminate(Option_t *) | |
1319 | { | |
3c40321c | 1320 | } |