AliPhysics  ec7afe5 (ec7afe5)
 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 
92 
93 //
94 // Constructor
95 //
97 
98 isPhosCali(0), isCentFlat(0),
99 fInputEvent(0x0), fEventPlane(0x0), fCentrality(-999.), fRunNumber(0), fInternalRunNum(0), fFlatContainer(0x0),
100 
101 fTPCFlat(0x0), fV0AFlat(0x0), fV0CFlat(0x0),
102 fEPTPC(-999.), fEPTPCResolution(0.),
103 fEPV0(-999.), fEPV0A(-999.), fEPV0C(-999.),
104 fEPV0AR(-999.), fEPV0CR(-999.), fEPV0R(-999.),
105 fEPV0AR4(-999.), fEPV0AR5(-999.), fEPV0AR6(-999.), fEPV0AR7(-999.),
106 fEPV0CR0(-999.), fEPV0CR1(-999.), fEPV0CR2(-999.), fEPV0CR3(-999.),
107 
108 fHistStatCentrality(0), fHistStatCentralityCorrected(0), fHistStatRunNum(0),
109 
110 fHistEPTPC(0), fHistEPTPCResolution(0),
111 fHistEPV0(0), fHistEPV0A(0), fHistEPV0C(0),
112 fHistEPV0AR(0), fHistEPV0CR(0), fHistEPV0R(0),
113 fHistEPV0AR4(0), fHistEPV0AR7(0), fHistEPV0CR0(0), fHistEPV0CR3(0),
114 fHistEPTPCFlatten(0), fHistEPV0AFlatten(0), fHistEPV0CFlatten(0),
115 fHistEPDiffV0A_V0CR0(0), fHistEPDiffV0A_V0CR3(0), fHistEPDiffV0CR0_V0CR3(0),
116 fHistEPDiffV0C_V0AR4(0), fHistEPDiffV0C_V0AR7(0), fHistEPDiffV0AR4_V0AR7(0), fHistEPDiffV0AR_V0CR(0),
117 fHistClusterEtaPhi(0), fHistClusterEN(0), fHistClusterEtN(0), fHistClusterEM02(0), fHistClusterEtM02(0),
118 
119 fDataV0(0), fDataV0A(0), fDataV0C(0), fDataTPC(0)
120 {
121  InitParameters();
122 }
123 
124 
126 {}
127 
128 //
129 // Initialize parameters
130 //
132 {
133  SetInputAODName("AliAODPWG4Particle");
134  AddToHistogramsName("AnaPi0Flow_");
135 
136  fFlatContainer = new AliOADBContainer("phosFlat");
137  fFlatContainer->InitFromFile("$ALICE_PHYSICS/OADB/PHOS/PHOSflat.root", "phosFlat");
138 }
139 
140 //
141 // Add cuts (needed by AliAnaCaloTrackCorrMaker)
142 //
144 {
145  TString parList ; //this will be list of parameters used for this analysis.
146 
147  //Get parameters set in base class.
148  parList += GetBaseParametersList() ;
149 
150  return new TObjString(parList) ;
151 }
152 
153 //
154 // Create output (needed by AliAnaCaloTrackCorrMaker)
155 //
157 {
158  TList * outputList = new TList() ;
159  outputList->SetName(GetName());
160 
161  //
162  // statistics
163  //
164  fHistStatRunNum = new TH1I("fHistStatRunNum", "", 45, 0, 45);
165  outputList->Add(fHistStatRunNum);
166 
167  fHistStatCentrality = new TH1D("fHistStatCentrality", "", 200, 0, 100);
168  outputList->Add(fHistStatCentrality);
169 
170  fHistStatCentralityCorrected = new TH1D("fHistStatCentralityCorrected", "", 200, 0, 100);
171  outputList->Add(fHistStatCentralityCorrected);
172 
173  //
174  // event plane
175  //
176  fHistEPTPC = new TH2F("fHistEPTPC","",100,0,100,100,0.0,TMath::Pi());
177  outputList->Add(fHistEPTPC);
178 
179  fHistEPTPCResolution = new TH2F("fHistEPTPCResolution","",100,0,100,100,0.0,1.0);
180  outputList->Add(fHistEPTPCResolution);
181 
182  fHistEPV0 = new TH2F("fHistEPV0","",100,0,100,100,0.0,TMath::Pi());
183  outputList->Add(fHistEPV0);
184 
185  fHistEPV0A = new TH2F("fHistEPV0A","",100,0,100,100,0.0,TMath::Pi());
186  outputList->Add(fHistEPV0A);
187 
188  fHistEPV0C = new TH2F("fHistEPV0C","",100,0,100,100,0.0,TMath::Pi());
189  outputList->Add(fHistEPV0C);
190 
191  fHistEPV0AR = new TH2F("fHistEPV0AR","",100,0,100,100,0.0,TMath::Pi());
192  outputList->Add(fHistEPV0AR);
193 
194  fHistEPV0CR = new TH2F("fHistEPV0CR","",100,0,100,100,0.0,TMath::Pi());
195  outputList->Add(fHistEPV0CR);
196 
197  fHistEPV0R = new TH2F("fHistEPV0R","",100,0,100,100,0.0,TMath::Pi());
198  outputList->Add(fHistEPV0R);
199 
200  fHistEPV0AR4 = new TH2F("fHistEPV0AR4","",100,0,100,100,0.0,TMath::Pi());
201  outputList->Add(fHistEPV0AR4);
202 
203  fHistEPV0AR7 = new TH2F("fHistEPV0AR7","",100,0,100,100,0.0,TMath::Pi());
204  outputList->Add(fHistEPV0AR7);
205 
206  fHistEPV0CR0 = new TH2F("fHistEPV0CR0","",100,0,100,100,0.0,TMath::Pi());
207  outputList->Add(fHistEPV0CR0);
208 
209  fHistEPV0CR3 = new TH2F("fHistEPV0CR3","",100,0,100,100,0.0,TMath::Pi());
210  outputList->Add(fHistEPV0CR3);
211 
212  fHistEPV0AFlatten = new TH2F("fHistEPV0AFlatten","",100,0,100,100,0.0,TMath::Pi());
213  outputList->Add(fHistEPV0AFlatten);
214 
215  fHistEPV0CFlatten = new TH2F("fHistEPV0CFlatten","",100,0,100,100,0.0,TMath::Pi());
216  outputList->Add(fHistEPV0CFlatten);
217 
218  fHistEPTPCFlatten = new TH2F("fHistEPTPFlatten","",100,0,100,100,0.0,TMath::Pi());
219  outputList->Add(fHistEPTPCFlatten);
220 
221  fHistEPDiffV0A_V0CR0 = new TH2F("fHistEPDiffV0A_V0CR0","",100,0,100,100,-1.0,1.0);
222  outputList->Add(fHistEPDiffV0A_V0CR0);
223 
224  fHistEPDiffV0A_V0CR3 = new TH2F("fHistEPDiffV0A_V0CR3","",100,0,100,100,-1.0,1.0);
225  outputList->Add(fHistEPDiffV0A_V0CR3);
226 
227  fHistEPDiffV0CR0_V0CR3 = new TH2F("fHistEPDiffV0CR0_V0CR3","",100,0,100,100,-1.0,1.0);
228  outputList->Add(fHistEPDiffV0CR0_V0CR3);
229 
230  fHistEPDiffV0C_V0AR4 = new TH2F("fHistEPDiffV0C_V0AR4","",100,0,100,100,-1.0,1.0);
231  outputList->Add(fHistEPDiffV0C_V0AR4);
232 
233  fHistEPDiffV0C_V0AR7 = new TH2F("fHistEPDiffV0C_V0AR7","",100,0,100,100,-1.0,1.0);
234  outputList->Add(fHistEPDiffV0C_V0AR7);
235 
236  fHistEPDiffV0AR4_V0AR7 = new TH2F("fHistEPDiffV0AR4_V0AR7","",100,0,100,100,-1.0,1.0);
237  outputList->Add(fHistEPDiffV0AR4_V0AR7);
238 
239  fHistEPDiffV0AR_V0CR = new TH2F("fHistEPDiffV0AR_V0CR","",100,0,100,100,-1.0,1.0);
240  outputList->Add(fHistEPDiffV0AR_V0CR);
241 
242  fHistClusterEtaPhi = new TH2F("fHistClusterEtaPhi","Cluster #eta vs #phi",100,-1.0,1.0,100,0.0,6.29);
243  fHistClusterEtaPhi->GetXaxis()->SetTitle("#eta"); fHistClusterEtaPhi->GetYaxis()->SetTitle("#phi [rad]");
244  outputList->Add(fHistClusterEtaPhi);
245 
246  fHistClusterEN = new TH2F("fHistClusterEN","N vs E",100,0.0,50.0,30,0.0,30.0);
247  fHistClusterEN->GetYaxis()->SetTitle("N"); fHistClusterEN->GetXaxis()->SetTitle("E [GeV]");
248  outputList->Add(fHistClusterEN);
249 
250  fHistClusterEtN = new TH2F("fHistClusterEtN","N vs Cluster E_{T}",100,0.0,50.0,30,0.0,30.0);
251  fHistClusterEtN->GetYaxis()->SetTitle("N"); fHistClusterEtN->GetXaxis()->SetTitle("E_{T} [GeV]");
252  outputList->Add(fHistClusterEtN);
253 
254  fHistClusterEM02 = new TH2F("fHistClusterEM02","Cluster E vs M02",500,0.0,50.0,100,0.0,10.0);
255  fHistClusterEM02->GetYaxis()->SetTitle("M02"); fHistClusterEM02->GetXaxis()->SetTitle("E [GeV]");
256  outputList->Add(fHistClusterEM02);
257 
258  fHistClusterEtM02 = new TH2F("fHistClusterEtM02","Cluster E_{T} vs M02",100,0.0,50.0,100,0.0,10.0);
259  fHistClusterEtM02->GetYaxis()->SetTitle("M02"); fHistClusterEtM02->GetXaxis()->SetTitle("E_{T} [GeV]");
260  outputList->Add(fHistClusterEtM02);
261 
262  // E Et M02 Cent DeltaPhi Cos[2*DeltaPhi]
263  Int_t bins[6] = {500, 500, 500, 100, 100, 100};
264  Double_t min[6] = {0, 0.0, 0.0, 0, 0.0, -1.0};
265  Double_t max[6] = {50.0, 50.0, 10.0, 100, TMath::Pi(), 1.0};
266 
267  fDataV0 = new THnSparseF("fDataV0","",6,bins,min,max);
268  fDataV0->GetAxis(0)->SetTitle("E"); fDataV0->GetAxis(1)->SetTitle("E_{T} [GeV]"); fDataV0->GetAxis(2)->SetTitle("M02");
269  fDataV0->GetAxis(3)->SetTitle("Centrality"); fDataV0->GetAxis(4)->SetTitle("#Delta(#phi) [rad]"); fDataV0->GetAxis(5)->SetTitle("Cos[2*#Delta(#phi)]");
270  outputList->Add(fDataV0);
271 
272  fDataV0A = new THnSparseF("fDataV0A","",6,bins,min,max);
273  fDataV0A->GetAxis(0)->SetTitle("E"); fDataV0A->GetAxis(1)->SetTitle("E_{T} [GeV]"); fDataV0A->GetAxis(2)->SetTitle("M02");
274  fDataV0A->GetAxis(3)->SetTitle("Centrality"); fDataV0A->GetAxis(4)->SetTitle("#Delta(#phi) [rad]"); fDataV0A->GetAxis(5)->SetTitle("Cos[2*#Delta(#phi)]");
275  outputList->Add(fDataV0A);
276 
277  fDataV0C = new THnSparseF("fDataV0C","",6,bins,min,max);
278  fDataV0C->GetAxis(0)->SetTitle("E"); fDataV0C->GetAxis(1)->SetTitle("E_{T} [GeV]"); fDataV0C->GetAxis(2)->SetTitle("M02");
279  fDataV0C->GetAxis(3)->SetTitle("Centrality"); fDataV0C->GetAxis(4)->SetTitle("#Delta(#phi) [rad]"); fDataV0C->GetAxis(5)->SetTitle("Cos[2*#Delta(#phi)]");
280  outputList->Add(fDataV0C);
281 
282  fDataTPC = new THnSparseF("fDataTPC","",6,bins,min,max);
283  fDataTPC->GetAxis(0)->SetTitle("E"); fDataTPC->GetAxis(1)->SetTitle("E_{T} [GeV]"); fDataTPC->GetAxis(2)->SetTitle("M02");
284  fDataTPC->GetAxis(3)->SetTitle("Centrality"); fDataTPC->GetAxis(4)->SetTitle("#Delta(#phi) [rad]"); fDataTPC->GetAxis(5)->SetTitle("Cos[2*#Delta(#phi)]");
285  outputList->Add(fDataTPC);
286 
287  return outputList;
288 }
289 
290 //
291 // Print (needed by AliAnaCaloTrackCorrMaker)
292 //
293 void AliAnaPi0Flow::Print(const Option_t * /*opt*/) const
294 {
295  printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
297  printf("------------------------------------------------------\n") ;
298 }
299 
300 //
301 // Main method (needed by AliAnaCaloTrackCorrMaker)
302 //
304 {
305  if (!GetInputAODBranch()) {
306  AliFatal(Form("ERROR: No input in AOD with name branch < %s >", GetInputAODName().Data()));
307  return;
308  }
309 
311  fEventPlane = fInputEvent->GetEventplane();
314  if (isCentFlat && !IsCentAccepted()) return;
316 
317  Int_t fRunNumber = fInputEvent->GetRunNumber();
318  fInternalRunNum = GetInternalRunNum(fRunNumber);
320 
321  TObjArray *maps = (TObjArray*)fFlatContainer->GetObject(fRunNumber,"phosFlat");
322  fTPCFlat = (AliEPFlattener*)maps->At(0);
323  fV0AFlat = (AliEPFlattener*)maps->At(1);
324  fV0CFlat = (AliEPFlattener*)maps->At(2);
325  if (fEventPlane) {
327  } else {
328  AliFatal("ERROR: Could not retrieve the Event Plane!");
329  return;
330  }
331 
332  //
333  // Get me some pions
334  //
335  Int_t naod = GetInputAODBranch()->GetEntriesFast();
336  if (naod == 0) {
337  AliDebug(1, "No cluster found in this event!");
338  return;
339  }
340 
341  for (Int_t i = 0; i < naod; ++i) {
342  AliAODPWG4Particle* c = (AliAODPWG4Particle*) (GetInputAODBranch()->At(i));
343 
344  Double_t E = c->E();
345  Double_t eta = c->Eta();
346  Double_t Et = c->Pt();
347  Double_t phi = c->Phi();
348  Double_t M02 = c->GetM02();
349  Double_t N = c->GetNCells();
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: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