AliPhysics  6f1d526 (6f1d526)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnaPi0Flow.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 
16 // --- ROOT system ---
17 #include "TH3.h"
18 #include "TH2F.h"
19 //#include "Riostream.h"
20 #include "TCanvas.h"
21 #include "TPad.h"
22 #include "TROOT.h"
23 #include "TClonesArray.h"
24 #include "TObjString.h"
25 #include "TDatabasePDG.h"
26 #include <TParticle.h>
27 #include <TRefArray.h>
28 #include <TCanvas.h>
29 #include <TChain.h>
30 #include <TFile.h>
31 #include <TH1I.h>
32 #include <TH1F.h>
33 #include <TH1D.h>
34 #include <TH2F.h>
35 #include <THnSparse.h>
36 #include <TList.h>
37 #include <TMath.h>
38 #include <TProfile.h>
39 #include <TRandom3.h>
40 #include <TVirtualFFT.h>
41 
42 
43 //---- AliRoot system ----
44 #include "AliAnaPi0Flow.h"
45 #include "AliCaloTrackReader.h"
46 #include "AliCaloPID.h"
47 #include "AliFiducialCut.h"
48 #include "TParticle.h"
49 #include "AliVEvent.h"
50 #include "AliESDCaloCluster.h"
51 #include "AliESDEvent.h"
52 #include "AliAODEvent.h"
54 #include "AliMixedEvent.h"
55 #include "AliAODMCParticle.h"
56 
57 #include "AliAnalysisTaskSE.h"
58 #include "AliRunLoader.h"
59 #include "AliAnalysisManager.h"
60 #include "AliAnalysisTask.h"
61 #include "AliEMCALGeometry.h"
62 #include "AliEPFlattener.h"
63 #include "AliESDEvent.h"
64 #include "AliESDVertex.h"
65 #include "AliESDCaloCells.h"
66 #include "AliESDCaloCluster.h"
67 #include "AliESDEvent.h"
68 #include "AliESDHeader.h"
69 #include "AliESDInputHandler.h"
70 #include "AliESDtrack.h"
71 #include "AliKFParticle.h"
72 #include "AliAODEvent.h"
73 #include "AliVCluster.h"
74 #include "AliCentrality.h"
75 #include "AliEventplane.h"
76 #include "AliOADBContainer.h"
77 
78 // --- Detectors ---
79 #include "AliPHOSGeoUtils.h"
80 #include "AliEMCALGeometry.h"
81 
82 #include <iostream>
83 
84 using std::cout;
85 using std::endl;
86 
90 
91 //
92 // Constructor
93 //
95 
96 isPhosCali(0), isCentFlat(0),
97 fInputEvent(0x0), fEventPlane(0x0), fCentrality(-999.), fRunNumber(0), fInternalRunNum(0), fFlatContainer(0x0),
98 
99 fTPCFlat(0x0), fV0AFlat(0x0), fV0CFlat(0x0),
100 fEPTPC(-999.), fEPTPCResolution(0.),
101 fEPV0(-999.), fEPV0A(-999.), fEPV0C(-999.),
102 fEPV0AR(-999.), fEPV0CR(-999.), fEPV0R(-999.),
103 fEPV0AR4(-999.), fEPV0AR5(-999.), fEPV0AR6(-999.), fEPV0AR7(-999.),
104 fEPV0CR0(-999.), fEPV0CR1(-999.), fEPV0CR2(-999.), fEPV0CR3(-999.),
105 
106 fHistStatCentrality(0), fHistStatCentralityCorrected(0), fHistStatRunNum(0),
107 
108 fHistEPTPC(0), fHistEPTPCResolution(0),
109 fHistEPV0(0), fHistEPV0A(0), fHistEPV0C(0),
110 fHistEPV0AR(0), fHistEPV0CR(0), fHistEPV0R(0),
111 fHistEPV0AR4(0), fHistEPV0AR7(0), fHistEPV0CR0(0), fHistEPV0CR3(0),
112 fHistEPTPCFlatten(0), fHistEPV0AFlatten(0), fHistEPV0CFlatten(0),
113 fHistEPDiffV0A_V0CR0(0), fHistEPDiffV0A_V0CR3(0), fHistEPDiffV0CR0_V0CR3(0),
114 fHistEPDiffV0C_V0AR4(0), fHistEPDiffV0C_V0AR7(0), fHistEPDiffV0AR4_V0AR7(0), fHistEPDiffV0AR_V0CR(0),
115 fHistClusterEtaPhi(0), fHistClusterEN(0), fHistClusterEtN(0), fHistClusterEM02(0), fHistClusterEtM02(0),
116 
117 fDataV0(0), fDataV0A(0), fDataV0C(0), fDataTPC(0)
118 {
119  InitParameters();
120 }
121 
122 
124 {}
125 
126 //
127 // Initialize parameters
128 //
130 {
131  SetInputAODName("AliAODPWG4Particle");
132  AddToHistogramsName("AnaPi0Flow_");
133 
134  fFlatContainer = new AliOADBContainer("phosFlat");
135  fFlatContainer->InitFromFile("$ALICE_PHYSICS/OADB/PHOS/PHOSflat.root", "phosFlat");
136 }
137 
138 //
139 // Add cuts (needed by AliAnaCaloTrackCorrMaker)
140 //
142 {
143  TString parList ; //this will be list of parameters used for this analysis.
144 
145  //Get parameters set in base class.
146  parList += GetBaseParametersList() ;
147 
148  return new TObjString(parList) ;
149 }
150 
151 //
152 // Create output (needed by AliAnaCaloTrackCorrMaker)
153 //
155 {
156  TList * outputList = new TList() ;
157  outputList->SetName(GetName());
158 
159  //
160  // statistics
161  //
162  fHistStatRunNum = new TH1I("fHistStatRunNum", "", 45, 0, 45);
163  outputList->Add(fHistStatRunNum);
164 
165  fHistStatCentrality = new TH1D("fHistStatCentrality", "", 200, 0, 100);
166  outputList->Add(fHistStatCentrality);
167 
168  fHistStatCentralityCorrected = new TH1D("fHistStatCentralityCorrected", "", 200, 0, 100);
169  outputList->Add(fHistStatCentralityCorrected);
170 
171  //
172  // event plane
173  //
174  fHistEPTPC = new TH2F("fHistEPTPC","",100,0,100,100,0.0,TMath::Pi());
175  outputList->Add(fHistEPTPC);
176 
177  fHistEPTPCResolution = new TH2F("fHistEPTPCResolution","",100,0,100,100,0.0,1.0);
178  outputList->Add(fHistEPTPCResolution);
179 
180  fHistEPV0 = new TH2F("fHistEPV0","",100,0,100,100,0.0,TMath::Pi());
181  outputList->Add(fHistEPV0);
182 
183  fHistEPV0A = new TH2F("fHistEPV0A","",100,0,100,100,0.0,TMath::Pi());
184  outputList->Add(fHistEPV0A);
185 
186  fHistEPV0C = new TH2F("fHistEPV0C","",100,0,100,100,0.0,TMath::Pi());
187  outputList->Add(fHistEPV0C);
188 
189  fHistEPV0AR = new TH2F("fHistEPV0AR","",100,0,100,100,0.0,TMath::Pi());
190  outputList->Add(fHistEPV0AR);
191 
192  fHistEPV0CR = new TH2F("fHistEPV0CR","",100,0,100,100,0.0,TMath::Pi());
193  outputList->Add(fHistEPV0CR);
194 
195  fHistEPV0R = new TH2F("fHistEPV0R","",100,0,100,100,0.0,TMath::Pi());
196  outputList->Add(fHistEPV0R);
197 
198  fHistEPV0AR4 = new TH2F("fHistEPV0AR4","",100,0,100,100,0.0,TMath::Pi());
199  outputList->Add(fHistEPV0AR4);
200 
201  fHistEPV0AR7 = new TH2F("fHistEPV0AR7","",100,0,100,100,0.0,TMath::Pi());
202  outputList->Add(fHistEPV0AR7);
203 
204  fHistEPV0CR0 = new TH2F("fHistEPV0CR0","",100,0,100,100,0.0,TMath::Pi());
205  outputList->Add(fHistEPV0CR0);
206 
207  fHistEPV0CR3 = new TH2F("fHistEPV0CR3","",100,0,100,100,0.0,TMath::Pi());
208  outputList->Add(fHistEPV0CR3);
209 
210  fHistEPV0AFlatten = new TH2F("fHistEPV0AFlatten","",100,0,100,100,0.0,TMath::Pi());
211  outputList->Add(fHistEPV0AFlatten);
212 
213  fHistEPV0CFlatten = new TH2F("fHistEPV0CFlatten","",100,0,100,100,0.0,TMath::Pi());
214  outputList->Add(fHistEPV0CFlatten);
215 
216  fHistEPTPCFlatten = new TH2F("fHistEPTPFlatten","",100,0,100,100,0.0,TMath::Pi());
217  outputList->Add(fHistEPTPCFlatten);
218 
219  fHistEPDiffV0A_V0CR0 = new TH2F("fHistEPDiffV0A_V0CR0","",100,0,100,100,-1.0,1.0);
220  outputList->Add(fHistEPDiffV0A_V0CR0);
221 
222  fHistEPDiffV0A_V0CR3 = new TH2F("fHistEPDiffV0A_V0CR3","",100,0,100,100,-1.0,1.0);
223  outputList->Add(fHistEPDiffV0A_V0CR3);
224 
225  fHistEPDiffV0CR0_V0CR3 = new TH2F("fHistEPDiffV0CR0_V0CR3","",100,0,100,100,-1.0,1.0);
226  outputList->Add(fHistEPDiffV0CR0_V0CR3);
227 
228  fHistEPDiffV0C_V0AR4 = new TH2F("fHistEPDiffV0C_V0AR4","",100,0,100,100,-1.0,1.0);
229  outputList->Add(fHistEPDiffV0C_V0AR4);
230 
231  fHistEPDiffV0C_V0AR7 = new TH2F("fHistEPDiffV0C_V0AR7","",100,0,100,100,-1.0,1.0);
232  outputList->Add(fHistEPDiffV0C_V0AR7);
233 
234  fHistEPDiffV0AR4_V0AR7 = new TH2F("fHistEPDiffV0AR4_V0AR7","",100,0,100,100,-1.0,1.0);
235  outputList->Add(fHistEPDiffV0AR4_V0AR7);
236 
237  fHistEPDiffV0AR_V0CR = new TH2F("fHistEPDiffV0AR_V0CR","",100,0,100,100,-1.0,1.0);
238  outputList->Add(fHistEPDiffV0AR_V0CR);
239 
240  fHistClusterEtaPhi = new TH2F("fHistClusterEtaPhi","Cluster #eta vs #phi",100,-1.0,1.0,100,0.0,6.29);
241  fHistClusterEtaPhi->GetXaxis()->SetTitle("#eta"); fHistClusterEtaPhi->GetYaxis()->SetTitle("#phi [rad]");
242  outputList->Add(fHistClusterEtaPhi);
243 
244  fHistClusterEN = new TH2F("fHistClusterEN","N vs E",100,0.0,50.0,30,0.0,30.0);
245  fHistClusterEN->GetYaxis()->SetTitle("N"); fHistClusterEN->GetXaxis()->SetTitle("E [GeV]");
246  outputList->Add(fHistClusterEN);
247 
248  fHistClusterEtN = new TH2F("fHistClusterEtN","N vs Cluster E_{T}",100,0.0,50.0,30,0.0,30.0);
249  fHistClusterEtN->GetYaxis()->SetTitle("N"); fHistClusterEtN->GetXaxis()->SetTitle("E_{T} [GeV]");
250  outputList->Add(fHistClusterEtN);
251 
252  fHistClusterEM02 = new TH2F("fHistClusterEM02","Cluster E vs M02",500,0.0,50.0,100,0.0,10.0);
253  fHistClusterEM02->GetYaxis()->SetTitle("M02"); fHistClusterEM02->GetXaxis()->SetTitle("E [GeV]");
254  outputList->Add(fHistClusterEM02);
255 
256  fHistClusterEtM02 = new TH2F("fHistClusterEtM02","Cluster E_{T} vs M02",100,0.0,50.0,100,0.0,10.0);
257  fHistClusterEtM02->GetYaxis()->SetTitle("M02"); fHistClusterEtM02->GetXaxis()->SetTitle("E_{T} [GeV]");
258  outputList->Add(fHistClusterEtM02);
259 
260  // E Et M02 Cent DeltaPhi Cos[2*DeltaPhi]
261  Int_t bins[6] = {500, 500, 500, 100, 100, 100};
262  Double_t min[6] = {0, 0.0, 0.0, 0, 0.0, -1.0};
263  Double_t max[6] = {50.0, 50.0, 10.0, 100, TMath::Pi(), 1.0};
264 
265  fDataV0 = new THnSparseF("fDataV0","",6,bins,min,max);
266  fDataV0->GetAxis(0)->SetTitle("E"); fDataV0->GetAxis(1)->SetTitle("E_{T} [GeV]"); fDataV0->GetAxis(2)->SetTitle("M02");
267  fDataV0->GetAxis(3)->SetTitle("Centrality"); fDataV0->GetAxis(4)->SetTitle("#Delta(#phi) [rad]"); fDataV0->GetAxis(5)->SetTitle("Cos[2*#Delta(#phi)]");
268  outputList->Add(fDataV0);
269 
270  fDataV0A = new THnSparseF("fDataV0A","",6,bins,min,max);
271  fDataV0A->GetAxis(0)->SetTitle("E"); fDataV0A->GetAxis(1)->SetTitle("E_{T} [GeV]"); fDataV0A->GetAxis(2)->SetTitle("M02");
272  fDataV0A->GetAxis(3)->SetTitle("Centrality"); fDataV0A->GetAxis(4)->SetTitle("#Delta(#phi) [rad]"); fDataV0A->GetAxis(5)->SetTitle("Cos[2*#Delta(#phi)]");
273  outputList->Add(fDataV0A);
274 
275  fDataV0C = new THnSparseF("fDataV0C","",6,bins,min,max);
276  fDataV0C->GetAxis(0)->SetTitle("E"); fDataV0C->GetAxis(1)->SetTitle("E_{T} [GeV]"); fDataV0C->GetAxis(2)->SetTitle("M02");
277  fDataV0C->GetAxis(3)->SetTitle("Centrality"); fDataV0C->GetAxis(4)->SetTitle("#Delta(#phi) [rad]"); fDataV0C->GetAxis(5)->SetTitle("Cos[2*#Delta(#phi)]");
278  outputList->Add(fDataV0C);
279 
280  fDataTPC = new THnSparseF("fDataTPC","",6,bins,min,max);
281  fDataTPC->GetAxis(0)->SetTitle("E"); fDataTPC->GetAxis(1)->SetTitle("E_{T} [GeV]"); fDataTPC->GetAxis(2)->SetTitle("M02");
282  fDataTPC->GetAxis(3)->SetTitle("Centrality"); fDataTPC->GetAxis(4)->SetTitle("#Delta(#phi) [rad]"); fDataTPC->GetAxis(5)->SetTitle("Cos[2*#Delta(#phi)]");
283  outputList->Add(fDataTPC);
284 
285  return outputList;
286 }
287 
288 //
289 // Print (needed by AliAnaCaloTrackCorrMaker)
290 //
291 void AliAnaPi0Flow::Print(const Option_t * /*opt*/) const
292 {
293  printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
295  printf("------------------------------------------------------\n") ;
296 }
297 
298 //
299 // Main method (needed by AliAnaCaloTrackCorrMaker)
300 //
302 {
303  if (!GetInputAODBranch()) {
304  AliFatal(Form("ERROR: No input in AOD with name branch < %s >", GetInputAODName().Data()));
305  return;
306  }
307 
309  fEventPlane = fInputEvent->GetEventplane();
312  if (isCentFlat && !IsCentAccepted()) return;
314 
315  Int_t fRunNumber = fInputEvent->GetRunNumber();
316  fInternalRunNum = GetInternalRunNum(fRunNumber);
318 
319  TObjArray *maps = (TObjArray*)fFlatContainer->GetObject(fRunNumber,"phosFlat");
320  fTPCFlat = (AliEPFlattener*)maps->At(0);
321  fV0AFlat = (AliEPFlattener*)maps->At(1);
322  fV0CFlat = (AliEPFlattener*)maps->At(2);
323  if (fEventPlane) {
325  } else {
326  AliFatal("ERROR: Could not retrieve the Event Plane!");
327  return;
328  }
329 
330  //
331  // Get me some pions
332  //
333  Int_t naod = GetInputAODBranch()->GetEntriesFast();
334  if (naod == 0) {
335  AliDebug(1, "No cluster found in this event!");
336  return;
337  }
338 
339  for (Int_t i = 0; i < naod; ++i) {
340  AliAODPWG4Particle* c = (AliAODPWG4Particle*) (GetInputAODBranch()->At(i));
341 
342  Double_t E = c->E();
343  Double_t eta = c->Eta();
344  Double_t Et = c->Pt();
345  Double_t phi = c->Phi();
346  Double_t M02 = c->GetM02();
347  Double_t N = c->GetNCells();
348 
349  Double_t dphiV0 = TVector2::Phi_0_2pi(phi-fEPV0R); if(dphiV0 >TMath::Pi()) {dphiV0 -=TMath::Pi();}
350  Double_t dphiV0A = TVector2::Phi_0_2pi(phi-fEPV0A); if(dphiV0A>TMath::Pi()) {dphiV0A-=TMath::Pi();}
351  Double_t dphiV0C = TVector2::Phi_0_2pi(phi-fEPV0C); if(dphiV0C>TMath::Pi()) {dphiV0C-=TMath::Pi();}
352  Double_t dphiTPC = TVector2::Phi_0_2pi(phi-fEPTPC); if(dphiTPC>TMath::Pi()) {dphiTPC-=TMath::Pi();}
353 
354  //
355  // Fill flow data
356  //
357  Double_t dataV0[6];
358  dataV0[0] = E;
359  dataV0[1] = Et;
360  dataV0[2] = M02;
361  dataV0[3] = fCentrality;
362  dataV0[4] = dphiV0;
363  dataV0[5] = TMath::Cos(2.0*(dphiV0));
364  fDataV0->Fill(dataV0);
365 
366  Double_t dataV0A[6];
367  dataV0A[0] = E;
368  dataV0A[1] = Et;
369  dataV0A[2] = M02;
370  dataV0A[3] = fCentrality;
371  dataV0A[4] = dphiV0A;
372  dataV0A[5] = TMath::Cos(2.0*(dphiV0A));
373  fDataV0A->Fill(dataV0A);
374 
375  Double_t dataV0C[6];
376  dataV0C[0] = E;
377  dataV0C[1] = Et;
378  dataV0C[2] = M02;
379  dataV0C[3] = fCentrality;
380  dataV0C[4] = dphiV0C;
381  dataV0C[5] = TMath::Cos(2.0*(dphiV0C));
382  fDataV0C->Fill(dataV0C);
383 
384  Double_t dataTPC[6];
385  dataTPC[0] = E;
386  dataTPC[1] = Et;
387  dataTPC[2] = M02;
388  dataTPC[3] = fCentrality;
389  dataTPC[4] = dphiTPC;
390  dataTPC[5] = TMath::Cos(2.0*(dphiTPC));
391  fDataTPC->Fill(dataTPC);
392 
393  //
394  // Fill some QA hists
395  //
396  fHistClusterEtaPhi->Fill(eta,phi);
397  fHistClusterEN->Fill(E,N);
398  fHistClusterEtN->Fill(Et,N);
399  fHistClusterEM02->Fill(E,M02);
400  fHistClusterEtM02->Fill(Et,M02);
401  }
402 
403  AliDebug(1, "End fill histograms");
404 }
405 
406 //
407 // Flatten centrality
408 //
410 {
411  if (fCentrality<=10) { // 0-10%
412  Bool_t isGoodCent = kFALSE;
413  TRandom3 *rndm = new TRandom3(0);
414  Double_t Nrndm = rndm->Uniform(0.,1.);
415  Double_t rejectR[10] = {0.864235, 0.855794, 0.838345, 0.837401, 0.838991,
416  0.859132, 0.852702, 0.859955, 0.880277, 1};
417 
418  if (fCentrality<=1) {
419  if (Nrndm < rejectR[0]) isGoodCent = kTRUE;
420  } else if (1<fCentrality && fCentrality<=2) {
421  if (Nrndm < rejectR[1]) isGoodCent = kTRUE;
422  } else if (2<fCentrality && fCentrality<=3) {
423  if (Nrndm < rejectR[2]) isGoodCent = kTRUE;
424  } else if (3<fCentrality && fCentrality<=4) {
425  if (Nrndm < rejectR[3]) isGoodCent = kTRUE;
426  } else if (4<fCentrality && fCentrality<=5) {
427  if (Nrndm < rejectR[4]) isGoodCent = kTRUE;
428  } else if (5<fCentrality && fCentrality<=6) {
429  if (Nrndm < rejectR[5]) isGoodCent = kTRUE;
430  } else if (6<fCentrality && fCentrality<=7) {
431  if (Nrndm < rejectR[6]) isGoodCent = kTRUE;
432  } else if (7<fCentrality && fCentrality<=8) {
433  if (Nrndm < rejectR[7]) isGoodCent = kTRUE;
434  } else if (8<fCentrality && fCentrality<=9) {
435  if (Nrndm < rejectR[8]) isGoodCent = kTRUE;
436  } else if (9<fCentrality && fCentrality<=10) {
437  if (Nrndm < rejectR[9]) isGoodCent = kTRUE;
438  }
439 
440  delete rndm; rndm = NULL;
441  return isGoodCent;
442  } else if (10<fCentrality && fCentrality<=50) { // 10-50%
443  TString centfired;
444  centfired = fInputEvent->GetFiredTriggerClasses();
445  if (!centfired.Contains("CVLN_B2-B-NOPF-ALLNOTRD") &&
446  !centfired.Contains("CVLN_R1-B-NOPF-ALLNOTRD") &&
447  !centfired.Contains("CSEMI_R1-B-NOPF-ALLNOTRD")) return kFALSE;
448  else return kTRUE;
449  } else return kTRUE; // other%
450 
451  return kFALSE;
452 }
453 
454 //
455 // Internal run number
456 //
458 { // LHC11h_AOD_145, train runlist listPCMgood+VaryingVoltages (no phi cut)
459  Int_t stdRunNum[45] = {167987, 167988, 168310, 168311, 168322, 168325, 168341, 168342, 168361, 168362,
460  168458, 168460, 168464, 168467, 168511, 168512, 168514, 168777, 168826, 168984,
461  168988, 168992, 169035, 169091, 169094, 169138, 169143, 169144, 169145, 169148,
462  169156, 169160, 169167, 169238, 169411, 169415, 169417, 169835, 169837, 169846,
463  169855, 169858, 169859, 169923, 169965};
464 
465  for (int i = 0; i < 45; ++i) {
466  if (i%10==0) fHistStatRunNum->GetXaxis()->SetBinLabel(i+1, Form("%i",stdRunNum[i]));
467  if (runnumber==stdRunNum[i]) return i;
468  }
469 
470  return -1;
471 }
472 
473 
474 //
475 // Get different event planes, flatten them, and fill some QA plots
476 //
478 { // Calculate the V0 Event Plane
479  if (fEventPlane->GetQVector()) {
480  // fEPTPC = TVector2::Phi_0_2pi(fEventPlane->GetQVector()->Phi())/2.0; //if(fEPTPC>TMath::Pi()) {fEPTPC-=TMath::Pi();}
481  fEPTPC = fEventPlane->GetEventplane("Q");
482  } else fEPTPC = -999;
483 
484  if (fEventPlane->GetQsub1() && fEventPlane->GetQsub2()) {
485  // fEPTPCResolution = TMath::Cos(2.0*(fEventPlane->GetQsub1()->Phi()/2.0-fEventPlane->GetQsub2()->Phi()/2.0));
486  fEPTPCResolution = TMath::Cos(2.*(fEventPlane->GetQsubRes()));
487  } else fEPTPCResolution = -1;
488 
489  fEPV0 = TVector2::Phi_0_2pi(fEventPlane->GetEventplane("V0", fInputEvent)); if (fEPV0>TMath::Pi()) fEPV0-=TMath::Pi();
490  fEPV0A = TVector2::Phi_0_2pi(fEventPlane->GetEventplane("V0A", fInputEvent)); if (fEPV0A>TMath::Pi()) fEPV0A-=TMath::Pi();
491  fEPV0C = TVector2::Phi_0_2pi(fEventPlane->GetEventplane("V0C", fInputEvent)); if (fEPV0C>TMath::Pi()) fEPV0C-=TMath::Pi();
492 
493  Double_t qx=0, qy=0, qxr=0, qyr=0;
494  fEPV0AR = TVector2::Phi_0_2pi(fEventPlane->CalculateVZEROEventPlane(fInputEvent, 4, 5, 2, qxr, qyr)); if (fEPV0AR>TMath::Pi()) fEPV0AR-=TMath::Pi();
495  fEPV0CR = TVector2::Phi_0_2pi(fEventPlane->CalculateVZEROEventPlane(fInputEvent, 2, 3, 2, qx, qy)); if (fEPV0CR>TMath::Pi()) fEPV0CR-=TMath::Pi();
496  qxr += qx; qyr += qy;
497  fEPV0R = TVector2::Phi_0_2pi(TMath::ATan2(qyr,qxr))/2.0; // equals to ring 2-5
498  fEPV0AR4 = TVector2::Phi_0_2pi(fEventPlane->CalculateVZEROEventPlane(fInputEvent, 4, 2, qx, qy)); if (fEPV0AR4>TMath::Pi()) fEPV0AR4-=TMath::Pi();
499  fEPV0AR5 = TVector2::Phi_0_2pi(fEventPlane->CalculateVZEROEventPlane(fInputEvent, 5, 2, qx, qy)); if (fEPV0AR5>TMath::Pi()) fEPV0AR5-=TMath::Pi();
500  fEPV0AR6 = TVector2::Phi_0_2pi(fEventPlane->CalculateVZEROEventPlane(fInputEvent, 6, 2, qx, qy)); if (fEPV0AR6>TMath::Pi()) fEPV0AR6-=TMath::Pi();
501  fEPV0AR7 = TVector2::Phi_0_2pi(fEventPlane->CalculateVZEROEventPlane(fInputEvent, 7, 2, qx, qy)); if (fEPV0AR7>TMath::Pi()) fEPV0AR7-=TMath::Pi();
502  fEPV0CR0 = TVector2::Phi_0_2pi(fEventPlane->CalculateVZEROEventPlane(fInputEvent, 0, 2, qx, qy)); if (fEPV0CR0>TMath::Pi()) fEPV0CR0-=TMath::Pi();
503  fEPV0CR1 = TVector2::Phi_0_2pi(fEventPlane->CalculateVZEROEventPlane(fInputEvent, 1, 2, qx, qy)); if (fEPV0CR1>TMath::Pi()) fEPV0CR1-=TMath::Pi();
504  fEPV0CR2 = TVector2::Phi_0_2pi(fEventPlane->CalculateVZEROEventPlane(fInputEvent, 2, 2, qx, qy)); if (fEPV0CR2>TMath::Pi()) fEPV0CR2-=TMath::Pi();
505  fEPV0CR3 = TVector2::Phi_0_2pi(fEventPlane->CalculateVZEROEventPlane(fInputEvent, 3, 2, qx, qy)); if (fEPV0CR3>TMath::Pi()) fEPV0CR3-=TMath::Pi();
506 
507  fHistEPTPC->Fill(fCentrality, fEPTPC);
509  fHistEPV0->Fill(fCentrality, fEPV0);
510  fHistEPV0A->Fill(fCentrality, fEPV0A);
511  fHistEPV0C->Fill(fCentrality, fEPV0C);
514  fHistEPV0R->Fill(fCentrality, fEPV0R);
519 
520  if (flattenEP) {
524  while (fEPV0A<0.) fEPV0A+=TMath::Pi(); while (fEPV0A>TMath::Pi()) fEPV0A-=TMath::Pi();
525  while (fEPV0C<0.) fEPV0C+=TMath::Pi(); while (fEPV0C>TMath::Pi()) fEPV0C-=TMath::Pi();
526  while (fEPTPC<0.) fEPTPC+=TMath::Pi(); while (fEPTPC>TMath::Pi()) fEPTPC-=TMath::Pi();
527 
531  }
532 
533  fHistEPDiffV0A_V0CR0->Fill(fCentrality, TMath::Cos(2.0*(fEPV0A - fEPV0CR0)));
534  fHistEPDiffV0A_V0CR3->Fill(fCentrality, TMath::Cos(2.0*(fEPV0A - fEPV0CR3)));
535  fHistEPDiffV0CR0_V0CR3->Fill(fCentrality, TMath::Cos(2.0*(fEPV0CR0 - fEPV0CR3)));
536  fHistEPDiffV0C_V0AR4->Fill(fCentrality, TMath::Cos(2.0*(fEPV0C - fEPV0AR4)));
537  fHistEPDiffV0C_V0AR7->Fill(fCentrality, TMath::Cos(2.0*(fEPV0C - fEPV0AR7)));
538  fHistEPDiffV0AR4_V0AR7->Fill(fCentrality, TMath::Cos(2.0*(fEPV0AR4 - fEPV0AR7)));
539  fHistEPDiffV0AR_V0CR->Fill(fCentrality, TMath::Cos(2.0*(fEPV0AR - fEPV0CR)));
540 }
541 
543 {
544  if (fV0AFlat) return fV0AFlat->MakeFlat(phi,c);
545  return phi;
546 }
547 
549 {
550  if (fV0CFlat) return fV0CFlat->MakeFlat(phi,c);
551  return phi;
552 }
553 
555 {
556  if (fTPCFlat) return fTPCFlat->MakeFlat(phi,c);
557  return phi;
558 }
559 
TH2F * fHistClusterEM02
Double_t fEPTPC
Definition: AliAnaPi0Flow.h:78
double Double_t
Definition: External.C:58
virtual void AddToHistogramsName(TString add)
Double_t fEPV0AR
Definition: AliAnaPi0Flow.h:83
Definition: External.C:236
void MakeAnalysisFillHistograms()
AliEPFlattener * fV0CFlat
Definition: AliAnaPi0Flow.h:77
Double_t fEPTPCResolution
Definition: AliAnaPi0Flow.h:79
TH2F * fHistEPDiffV0C_V0AR4
TH2F * fHistEPDiffV0C_V0AR7
TH2F * fHistEPDiffV0AR4_V0AR7
Double_t fEPV0AR6
Definition: AliAnaPi0Flow.h:88
TH2F * fHistEPV0CR
TH1D * fHistStatCentrality
Definition: AliAnaPi0Flow.h:98
virtual AliVEvent * GetInputEvent() const
virtual void SetInputAODName(TString name)
Bool_t isCentFlat
Definition: AliAnaPi0Flow.h:66
TList * GetCreateOutputObjects()
TCanvas * c
Definition: TestFitELoss.C:172
TH2F * fHistEPV0CR0
Double_t fEPV0AR5
Definition: AliAnaPi0Flow.h:87
THnSparse * fDataV0C
TH1I * fHistStatRunNum
THnSparse * fDataV0
AliOADBContainer * fFlatContainer
Definition: AliAnaPi0Flow.h:73
Double_t fEPV0CR0
Definition: AliAnaPi0Flow.h:90
TH1D * fHistStatCentralityCorrected
Definition: AliAnaPi0Flow.h:99
TObjString * GetAnalysisCuts()
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
Base class for CaloTrackCorr analysis algorithms.
TH2F * fHistClusterEN
AliEPFlattener * fV0AFlat
Definition: AliAnaPi0Flow.h:76
void GetVZEROEventPlane(Bool_t isFlatten)
int Int_t
Definition: External.C:63
virtual TClonesArray * GetInputAODBranch() const
Definition: External.C:204
Int_t GetInternalRunNum(Int_t runnumber)
Double_t fEPV0A
Definition: AliAnaPi0Flow.h:81
Double_t fCentrality
Definition: AliAnaPi0Flow.h:70
Double_t fEPV0R
Definition: AliAnaPi0Flow.h:85
Double_t fEPV0AR4
Definition: AliAnaPi0Flow.h:86
Double_t fEPV0
Definition: AliAnaPi0Flow.h:80
AliEPFlattener * fTPCFlat
Definition: AliAnaPi0Flow.h:75
THnSparse * fDataV0A
Definition: External.C:212
Bool_t isPhosCali
Definition: AliAnaPi0Flow.h:65
AliEventplane * fEventPlane
Definition: AliAnaPi0Flow.h:69
Double_t ApplyFlatteningV0A(Double_t phi, Double_t c)
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
Int_t fInternalRunNum
Definition: AliAnaPi0Flow.h:72
THnSparse * fDataTPC
Double_t fEPV0C
Definition: AliAnaPi0Flow.h:82
TH2F * fHistClusterEtN
void InitParameters()
Initialize the parameters of the analysis.
TH2F * fHistEPDiffV0A_V0CR0
Double_t fEPV0CR
Definition: AliAnaPi0Flow.h:84
Flow analysis.
Definition: AliAnaPi0Flow.h:39
Double_t fEPV0AR7
Definition: AliAnaPi0Flow.h:89
Double_t ApplyFlatteningTPC(Double_t phi, Double_t c)
Double_t ApplyFlatteningV0C(Double_t phi, Double_t c)
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
AliVEvent * fInputEvent
Definition: AliAnaPi0Flow.h:68
Double_t fEPV0CR1
Definition: AliAnaPi0Flow.h:91
TH2F * fHistClusterEtaPhi
virtual void Print(const Option_t *) const
Print some relevant parameters set for the analysis.
TH2F * fHistEPV0CR3
TH2F * fHistEPDiffV0AR_V0CR
Double_t fEPV0CR3
Definition: AliAnaPi0Flow.h:93
const char Option_t
Definition: External.C:48
TH2F * fHistEPDiffV0A_V0CR3
TH2F * fHistEPV0AR
Bool_t IsCentAccepted()
virtual ~AliAnaPi0Flow()
bool Bool_t
Definition: External.C:53
virtual AliCaloTrackReader * GetReader() const
TH2F * fHistEPTPCFlatten
TH2F * fHistClusterEtM02
Double_t fEPV0CR2
Definition: AliAnaPi0Flow.h:92
TH2F * fHistEPV0AR7
TH2F * fHistEPV0AR4
TH2F * fHistEPV0CFlatten
TH2F * fHistEPV0AFlatten
TH2F * fHistEPTPCResolution
TH2F * fHistEPDiffV0CR0_V0CR3