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