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