AliPhysics  c69cd47 (c69cd47)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliFlowEventSimple.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 /*****************************************************************
17  AliFlowEventSimple: A simple event
18  for flow analysis
19 
20  origin: Naomi van der Kolk (kolk@nikhef.nl)
21  Ante Bilandzic (anteb@nikhef.nl)
22  Raimond Snellings (Raimond.Snellings@nikhef.nl)
23  mods: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch)
24  Redmer A. Bertens (rbertens@cern.ch)
25 *****************************************************************/
26 
27 #include "Riostream.h"
28 #include "TObjArray.h"
29 #include "TFile.h"
30 #include "TList.h"
31 #include "TTree.h"
32 #include "TParticle.h"
33 #include "TMath.h"
34 #include "TH1F.h"
35 #include "TH1D.h"
36 #include "TF1.h"
37 #include "TF2.h"
38 #include "TProfile.h"
39 #include "TParameter.h"
40 #include "TBrowser.h"
41 #include "AliFlowVector.h"
42 #include "AliFlowTrackSimple.h"
43 #include "AliFlowTrackSimpleCuts.h"
44 #include "AliFlowEventSimple.h"
45 #include "TRandom.h"
46 
47 using std::cout;
48 using std::endl;
49 using std::cerr;
51 
52 //-----------------------------------------------------------------------
54  fTrackCollection(NULL),
55  fReferenceMultiplicity(0),
56  fNumberOfTracks(0),
57  fUseGlauberMCSymmetryPlanes(kFALSE),
58  fUseExternalSymmetryPlanes(kFALSE),
59  fPsi1(0.),
60  fPsi2(0.),
61  fPsi3(0.),
62  fPsi4(0.),
63  fPsi5(0.),
64  fPsi1Psi3(0x0),
65  fPsi2Psi4(0x0),
66  fPsi3Psi5(0x0),
67  fMCReactionPlaneAngle(0.),
68  fMCReactionPlaneAngleIsSet(kFALSE),
69  fAfterBurnerPrecision(0.001),
70  fUserModified(kFALSE),
71  fNumberOfTracksWrap(NULL),
72  fNumberOfRPsWrap(NULL),
73  fNumberOfPOIsWrap(NULL),
74  fMCReactionPlaneAngleWrap(NULL),
75  fShuffledIndexes(NULL),
76  fShuffleTracks(kFALSE),
77  fMothersCollection(NULL),
78  fCentrality(-1.),
79  fCentralityCL1(-1.),
80  fNITSCL1(-1.),
81  fCentralityTRK(-1.),
82  fRun(-1),
83  fZNCM(0.),
84  fZNAM(0.),
85  fNumberOfPOItypes(2),
86  fNumberOfPOIs(NULL)
87 {
88  for(Int_t i(0); i < 2; i++) {
89  fZNCQ[i] = 0.;
90  fZNAQ[i] = 0.;
91  }
92  for(Int_t i(0); i < 3; i++) {
93  fVtxPos[i] = 0.;
94  }
95  cout << "AliFlowEventSimple: Default constructor to be used only by root for io" << endl;
96 }
97 
98 //-----------------------------------------------------------------------
100  ConstructionMethod method,
101  TF1* ptDist,
102  Double_t phiMin,
103  Double_t phiMax,
104  Double_t etaMin,
105  Double_t etaMax):
106  fTrackCollection(new TObjArray(n)),
107  fReferenceMultiplicity(0),
108  fNumberOfTracks(0),
109  fUseGlauberMCSymmetryPlanes(kFALSE),
110  fUseExternalSymmetryPlanes(kFALSE),
111  fPsi1(0.),
112  fPsi2(0.),
113  fPsi3(0.),
114  fPsi4(0.),
115  fPsi5(0.),
116  fPsi1Psi3(0x0),
117  fPsi2Psi4(0x0),
118  fPsi3Psi5(0x0),
119  fMCReactionPlaneAngle(0.),
120  fMCReactionPlaneAngleIsSet(kFALSE),
121  fAfterBurnerPrecision(0.001),
122  fUserModified(kFALSE),
123  fNumberOfTracksWrap(NULL),
124  fNumberOfRPsWrap(NULL),
125  fNumberOfPOIsWrap(NULL),
126  fMCReactionPlaneAngleWrap(NULL),
127  fShuffledIndexes(NULL),
128  fShuffleTracks(kFALSE),
129  fMothersCollection(new TObjArray()),
130  fCentrality(-1.),
131  fCentralityCL1(-1.),
132  fNITSCL1(-1.),
133  fCentralityTRK(-1.),
134  fRun(-1),
135  fZNCM(0.),
136  fZNAM(0.),
137  fNumberOfPOItypes(2),
138  fNumberOfPOIs(new Int_t[fNumberOfPOItypes])
139 {
140  //ctor
141  // if second argument is set to AliFlowEventSimple::kGenerate
142  // it generates n random tracks with given Pt distribution
143  // (a sane default is provided), phi and eta are uniform
144 
145  if (method==kGenerate)
146  Generate(n,ptDist,phiMin,phiMax,etaMin,etaMax);
147 
148  for(Int_t i(0); i < 2; i++) {
149  fZNCQ[i] = 0.;
150  fZNAQ[i] = 0.;
151  }
152  for(Int_t i(0); i < 3; i++) {
153  fVtxPos[i] = 0.;
154  }
155 }
156 
157 //-----------------------------------------------------------------------
159  TObject(anEvent),
160  fTrackCollection((TObjArray*)(anEvent.fTrackCollection)->Clone()),
161  fReferenceMultiplicity(anEvent.fReferenceMultiplicity),
162  fNumberOfTracks(anEvent.fNumberOfTracks),
163  fUseGlauberMCSymmetryPlanes(anEvent.fUseGlauberMCSymmetryPlanes),
164  fUseExternalSymmetryPlanes(anEvent.fUseExternalSymmetryPlanes),
165  fPsi1(anEvent.fPsi1),
166  fPsi2(anEvent.fPsi2),
167  fPsi3(anEvent.fPsi3),
168  fPsi4(anEvent.fPsi4),
169  fPsi5(anEvent.fPsi5),
170  fPsi1Psi3(anEvent.fPsi1Psi3),
171  fPsi2Psi4(anEvent.fPsi2Psi4),
172  fPsi3Psi5(anEvent.fPsi3Psi5),
173  fMCReactionPlaneAngle(anEvent.fMCReactionPlaneAngle),
174  fMCReactionPlaneAngleIsSet(anEvent.fMCReactionPlaneAngleIsSet),
175  fAfterBurnerPrecision(anEvent.fAfterBurnerPrecision),
176  fUserModified(anEvent.fUserModified),
177  fNumberOfTracksWrap(anEvent.fNumberOfTracksWrap),
178  fNumberOfRPsWrap(anEvent.fNumberOfRPsWrap),
179  fNumberOfPOIsWrap(anEvent.fNumberOfPOIsWrap),
180  fMCReactionPlaneAngleWrap(anEvent.fMCReactionPlaneAngleWrap),
181  fShuffledIndexes(NULL),
182  fShuffleTracks(anEvent.fShuffleTracks),
183  fMothersCollection(new TObjArray()),
184  fCentrality(anEvent.fCentrality),
185  fCentralityCL1(anEvent.fCentralityCL1),
186  fNITSCL1(anEvent.fNITSCL1),
187  fCentralityTRK(anEvent.fCentralityTRK),
188  fRun(anEvent.fRun),
189  fZNCM(anEvent.fZNCM),
190  fZNAM(anEvent.fZNAM),
191  fNumberOfPOItypes(anEvent.fNumberOfPOItypes),
192  fNumberOfPOIs(new Int_t[fNumberOfPOItypes])
193 {
194  //copy constructor
195  memcpy(fNumberOfPOIs,anEvent.fNumberOfPOIs,fNumberOfPOItypes*sizeof(Int_t));
196  for(Int_t i(0); i < 2; i++) {
197  fZNCQ[i] = anEvent.fZNCQ[i];
198  fZNAQ[i] = anEvent.fZNAQ[i];
199  }
200  for(Int_t i(0); i < 3; i++) {
201  fVtxPos[i] = anEvent.fVtxPos[i];
202  }
203 }
204 
205 //-----------------------------------------------------------------------
206 void AliFlowEventSimple::SetNumberOfPOIs( Int_t numberOfPOIs, Int_t poiType)
207 {
208  //set the number of poi classes, resize the array if larger is needed
209  //never shrink the array
210  //never decrease the stored number
211  if (poiType>=fNumberOfPOItypes)
212  {
213  Int_t n = poiType+1;
214  Int_t* tmp = new Int_t[n];
215  for (Int_t j=0; j<n; j++) { tmp[j]=0; }
216  memcpy(tmp,fNumberOfPOIs,fNumberOfPOItypes*sizeof(Int_t));
217  delete [] fNumberOfPOIs;
218  fNumberOfPOIs = tmp;
219  fNumberOfPOItypes = n;
220  }
221 
222  fNumberOfPOIs[poiType] = numberOfPOIs;
223 }
224 
225 //-----------------------------------------------------------------------
227 {
228 
229  if (poiType>=fNumberOfPOItypes) SetNumberOfPOIs(0,poiType);
230  fNumberOfPOIs[poiType]++;
231 }
232 
233 //-----------------------------------------------------------------------
235 {
236  //assignment operator
237  if (&anEvent==this) return *this; //check self-assignment
238  if (fTrackCollection) fTrackCollection->Delete();
239  delete fTrackCollection;
240  fTrackCollection = (TObjArray*)(anEvent.fTrackCollection)->Clone(); //deep copy
244  delete [] fNumberOfPOIs;
245  fNumberOfPOIs=new Int_t[fNumberOfPOItypes];
246  memcpy(fNumberOfPOIs,anEvent.fNumberOfPOIs,fNumberOfPOItypes*sizeof(Int_t));
249  fPsi1 = anEvent.fPsi1;
250  fPsi2 = anEvent.fPsi2;
251  fPsi3 = anEvent.fPsi3;
252  fPsi4 = anEvent.fPsi4;
253  fPsi5 = anEvent.fPsi5;
254  fPsi1Psi3 = anEvent.fPsi1Psi3;
255  fPsi2Psi4 = anEvent.fPsi2Psi4;
256  fPsi3Psi5 = anEvent.fPsi3Psi5;
265  fShuffleTracks = anEvent.fShuffleTracks;
266  fCentrality = anEvent.fCentrality;
267  fCentralityCL1 = anEvent.fCentralityCL1,
268  fNITSCL1 = anEvent.fNITSCL1,
269  fCentralityTRK = anEvent.fCentralityTRK,
270  fRun = anEvent.fRun;
271  fZNCM = anEvent.fZNCM;
272  fZNAM = anEvent.fZNAM;
273  for(Int_t i(0); i < 2; i++) {
274  fZNCQ[i] = anEvent.fZNCQ[i];
275  fZNAQ[i] = anEvent.fZNAQ[i];
276  }
277  for(Int_t i(0); i < 3; i++) {
278  fVtxPos[i] = anEvent.fVtxPos[i];
279  }
280  delete [] fShuffledIndexes;
281  return *this;
282 }
283 
284 //-----------------------------------------------------------------------
286 {
287  //destructor
288  if (fTrackCollection) fTrackCollection->Delete();
289  delete fTrackCollection;
290  delete fNumberOfTracksWrap;
291  delete fNumberOfRPsWrap;
292  delete fNumberOfPOIsWrap;
294  delete fShuffledIndexes;
295  delete fMothersCollection;
296  delete [] fNumberOfPOIs;
297 }
298 
299 //-----------------------------------------------------------------------
301  TF1 *gPsi2Psi4,
302  TF1 *gPsi3Psi5) {
303  //Use symmetry planes, setup correlations between different Psi_n
305 
306  //Correlations between Psi_1 and Psi_3
307  if(gPsi1Psi3) fPsi1Psi3 = gPsi1Psi3;
308  else {
309  fPsi1Psi3 = new TF1("fPsi1Psi3","[0]*x+[1]",0.,2.*TMath::Pi());
310  fPsi1Psi3->SetParameter(0,1.);
311  fPsi1Psi3->SetParameter(1,0.);
312  }
313 
314  //Correlations between Psi_2 and Psi_4
315  if(gPsi2Psi4) fPsi2Psi4 = gPsi2Psi4;
316  else {
317  fPsi2Psi4 = new TF1("fPsi2Psi4","[0]*x+[1]",0.,2.*TMath::Pi());
318  fPsi2Psi4->SetParameter(0,1.);
319  fPsi2Psi4->SetParameter(1,0.);
320  }
321 
322  //Correlations between Psi_3 and Psi_5
323  if(gPsi3Psi5) fPsi3Psi5 = gPsi3Psi5;
324  else {
325  fPsi3Psi5 = new TF1("fPsi3Psi5","[0]*x+[1]",0.,2.*TMath::Pi());
326  fPsi3Psi5->SetParameter(0,1.);
327  fPsi3Psi5->SetParameter(1,0.);
328  }
329 }
330 
331 //-----------------------------------------------------------------------
332 void AliFlowEventSimple::Generate(Int_t nParticles,
333  TF1* ptDist,
334  Double_t phiMin,
335  Double_t phiMax,
336  Double_t etaMin,
337  Double_t etaMax)
338 {
339  //generate nParticles random tracks uniform in phi and eta
340  //according to the specified pt distribution
341  if (!ptDist)
342  {
343  static TF1 ptdistribution("ptSpectra","x*TMath::Exp(-pow(0.13957*0.13957+x*x,0.5)/0.4)",0.1,10.);
344  ptDist=&ptdistribution;
345  }
346 
347  for (Int_t i=0; i<nParticles; i++)
348  {
349  AliFlowTrackSimple* track = new AliFlowTrackSimple();
350  track->SetPhi( gRandom->Uniform(phiMin,phiMax) );
351  track->SetEta( gRandom->Uniform(etaMin,etaMax) );
352  track->SetPt( ptDist->GetRandom() );
353  track->SetCharge( (gRandom->Uniform()-0.5<0)?-1:1 );
354  AddTrack(track);
355  }
357  Double_t betaParameter = gRandom->Gaus(0.,1.3);
358  fPsi1Psi3->SetParameter(1,betaParameter);
359 
360  betaParameter = gRandom->Gaus(0.,0.9);
361  fPsi2Psi4->SetParameter(1,betaParameter);
362 
363  betaParameter = gRandom->Gaus(0.,1.5);
364  fPsi3Psi5->SetParameter(1,betaParameter);
365 
366  fPsi1 = gRandom->Uniform(2.*TMath::Pi());
367  fPsi2 = gRandom->Uniform(2.*TMath::Pi());
368  fPsi3 = fPsi1Psi3->Eval(fPsi1);
369  if(fPsi3 < 0) fPsi3 += 2.*TMath::Pi();
370  else if(fPsi3 > 2.*TMath::Pi()) fPsi3 -= 2.*TMath::Pi();
371  fPsi4 = fPsi2Psi4->Eval(fPsi2);
372  if(fPsi4 < 0) fPsi4 += 2.*TMath::Pi();
373  else if(fPsi4 > 2.*TMath::Pi()) fPsi4 -= 2.*TMath::Pi();
374  fPsi5 = fPsi3Psi5->Eval(fPsi3);
375  if(fPsi5 < 0) fPsi5 += 2.*TMath::Pi();
376  else if(fPsi5 > 2.*TMath::Pi()) fPsi5 -= 2.*TMath::Pi();
377 
380  }
381  else {
382  fMCReactionPlaneAngle=gRandom->Uniform(0.0,TMath::TwoPi());
384  }
385  SetUserModified();
386 }
387 
388 //-----------------------------------------------------------------------
390 {
391  //get track i from collection
392  if (i>=fNumberOfTracks) return NULL;
393  Int_t trackIndex=i;
394  //if asked use the shuffled index
395  if (fShuffleTracks)
396  {
398  trackIndex=fShuffledIndexes[i];
399  }
400  AliFlowTrackSimple* pTrack = static_cast<AliFlowTrackSimple*>(fTrackCollection->At(trackIndex)) ;
401  return pTrack;
402 }
403 
404 //-----------------------------------------------------------------------
406 {
407  //shuffle track indexes
408  if (!fShuffledIndexes)
409  {
410  //initialize the table with shuffled indexes
411  fShuffledIndexes = new Int_t[fNumberOfTracks];
412  for (Int_t j=0; j<fNumberOfTracks; j++) { fShuffledIndexes[j]=j; }
413  }
414  //shuffle
415  std::random_shuffle(&fShuffledIndexes[0], &fShuffledIndexes[fNumberOfTracks]);
416  Printf("Tracks shuffled! tracks: %i",fNumberOfTracks);
417 }
418 
419 //-----------------------------------------------------------------------
421 {
422  //add a track, delete the old one if necessary
423  if (fNumberOfTracks < fTrackCollection->GetEntriesFast())
424  {
425  TObject* o = fTrackCollection->At(fNumberOfTracks);
426  delete o;
427  }
428  fTrackCollection->AddAtAndExpand(track,fNumberOfTracks);
429  if (track->GetNDaughters()>0)
430  {
431  //if there track has daughters cache in the collection of mothers
432  fMothersCollection->Add(track);
433  }
434  TrackAdded();
435 }
436 
437 //-----------------------------------------------------------------------
439 {
440  //book keeping after a new track has been added
441  fNumberOfTracks++;
442  if (fShuffledIndexes)
443  {
444  delete [] fShuffledIndexes;
445  fShuffledIndexes=NULL;
446  }
447 }
448 
449 //-----------------------------------------------------------------------
451 {
453  if( !t ) { // If there was no track at the end of the list then create a new track
454  t=new AliFlowTrackSimple();
455  }
456 
457  return t;
458 }
459 
460 //-----------------------------------------------------------------------
462  TList *weightsList,
463  Bool_t usePhiWeights,
464  Bool_t usePtWeights,
465  Bool_t useEtaWeights )
466 {
467  // calculate Q-vector in harmonic n without weights (default harmonic n=2)
468  Double_t dQX = 0.;
469  Double_t dQY = 0.;
470  AliFlowVector vQ;
471  vQ.Set(0.,0.);
472 
473  Int_t iOrder = n;
474  Double_t sumOfWeights = 0.;
475  Double_t dPhi = 0.;
476  Double_t dPt = 0.;
477  Double_t dEta = 0.;
478  Double_t dWeight = 1.;
479 
480  AliFlowTrackSimple* pTrack = NULL;
481 
482  Int_t nBinsPhi = 0;
483  Double_t dBinWidthPt = 0.;
484  Double_t dPtMin = 0.;
485  Double_t dBinWidthEta = 0.;
486  Double_t dEtaMin = 0.;
487 
488  Double_t wPhi = 1.; // weight Phi
489  Double_t wPt = 1.; // weight Pt
490  Double_t wEta = 1.; // weight Eta
491 
492  TH1F *phiWeights = NULL;
493  TH1D *ptWeights = NULL;
494  TH1D *etaWeights = NULL;
495 
496  if(weightsList)
497  {
498  if(usePhiWeights)
499  {
500  phiWeights = dynamic_cast<TH1F *>(weightsList->FindObject("phi_weights"));
501  if(phiWeights) nBinsPhi = phiWeights->GetNbinsX();
502  }
503  if(usePtWeights)
504  {
505  ptWeights = dynamic_cast<TH1D *>(weightsList->FindObject("pt_weights"));
506  if(ptWeights)
507  {
508  dBinWidthPt = ptWeights->GetBinWidth(1); // assuming that all bins have the same width
509  dPtMin = (ptWeights->GetXaxis())->GetXmin();
510  }
511  }
512  if(useEtaWeights)
513  {
514  etaWeights = dynamic_cast<TH1D *>(weightsList->FindObject("eta_weights"));
515  if(etaWeights)
516  {
517  dBinWidthEta = etaWeights->GetBinWidth(1); // assuming that all bins have the same width
518  dEtaMin = (etaWeights->GetXaxis())->GetXmin();
519  }
520  }
521  } // end of if(weightsList)
522 
523  // loop over tracks
524  for(Int_t i=0; i<fNumberOfTracks; i++)
525  {
526  pTrack = (AliFlowTrackSimple*)fTrackCollection->At(i);
527  if(pTrack)
528  {
529  if(pTrack->InRPSelection())
530  {
531  dPhi = pTrack->Phi();
532  dPt = pTrack->Pt();
533  dEta = pTrack->Eta();
534  dWeight = pTrack->Weight();
535 
536  // determine Phi weight: (to be improved, I should here only access it + the treatment of gaps in the if statement)
537  if(phiWeights && nBinsPhi)
538  {
539  wPhi = phiWeights->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*nBinsPhi/TMath::TwoPi())));
540  }
541  // determine v'(pt) weight:
542  if(ptWeights && dBinWidthPt)
543  {
544  wPt=ptWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-dPtMin)/dBinWidthPt)));
545  }
546  // determine v'(eta) weight:
547  if(etaWeights && dBinWidthEta)
548  {
549  wEta=etaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-dEtaMin)/dBinWidthEta)));
550  }
551 
552  // building up the weighted Q-vector:
553  dQX += dWeight*wPhi*wPt*wEta*TMath::Cos(iOrder*dPhi);
554  dQY += dWeight*wPhi*wPt*wEta*TMath::Sin(iOrder*dPhi);
555 
556  // weighted multiplicity:
557  sumOfWeights += dWeight*wPhi*wPt*wEta;
558 
559  } // end of if (pTrack->InRPSelection())
560  } // end of if (pTrack)
561  else
562  {
563  cerr << "no particle!!!"<<endl;
564  }
565  } // loop over particles
566 
567  vQ.Set(dQX,dQY);
568  vQ.SetMult(sumOfWeights);
569  vQ.SetHarmonic(iOrder);
571  vQ.SetSubeventNumber(-1);
572 
573  return vQ;
574 
575 }
576 
577 //-----------------------------------------------------------------------
579  Int_t n,
580  TList *weightsList,
581  Bool_t usePhiWeights,
582  Bool_t usePtWeights,
583  Bool_t useEtaWeights )
584 {
585 
586  // calculate Q-vector in harmonic n without weights (default harmonic n=2)
587  Double_t dQX = 0.;
588  Double_t dQY = 0.;
589 
590  Int_t iOrder = n;
591  Double_t sumOfWeights = 0.;
592  Double_t dPhi = 0.;
593  Double_t dPt = 0.;
594  Double_t dEta = 0.;
595  Double_t dWeight = 1.;
596 
597  AliFlowTrackSimple* pTrack = NULL;
598 
599  Int_t iNbinsPhiSub0 = 0;
600  Int_t iNbinsPhiSub1 = 0;
601  Double_t dBinWidthPt = 0.;
602  Double_t dPtMin = 0.;
603  Double_t dBinWidthEta= 0.;
604  Double_t dEtaMin = 0.;
605 
606  Double_t dWphi = 1.; // weight Phi
607  Double_t dWpt = 1.; // weight Pt
608  Double_t dWeta = 1.; // weight Eta
609 
610  TH1F* phiWeightsSub0 = NULL;
611  TH1F* phiWeightsSub1 = NULL;
612  TH1D* ptWeights = NULL;
613  TH1D* etaWeights = NULL;
614 
615  if(weightsList)
616  {
617  if(usePhiWeights)
618  {
619  phiWeightsSub0 = dynamic_cast<TH1F *>(weightsList->FindObject("phi_weights_sub0"));
620  if(phiWeightsSub0) {
621  iNbinsPhiSub0 = phiWeightsSub0->GetNbinsX();
622  }
623  phiWeightsSub1 = dynamic_cast<TH1F *>(weightsList->FindObject("phi_weights_sub1"));
624  if(phiWeightsSub1) {
625  iNbinsPhiSub1 = phiWeightsSub1->GetNbinsX();
626  }
627  }
628  if(usePtWeights)
629  {
630  ptWeights = dynamic_cast<TH1D *>(weightsList->FindObject("pt_weights"));
631  if(ptWeights)
632  {
633  dBinWidthPt = ptWeights->GetBinWidth(1); // assuming that all bins have the same width
634  dPtMin = (ptWeights->GetXaxis())->GetXmin();
635  }
636  }
637  if(useEtaWeights)
638  {
639  etaWeights = dynamic_cast<TH1D *>(weightsList->FindObject("eta_weights"));
640  if(etaWeights)
641  {
642  dBinWidthEta = etaWeights->GetBinWidth(1); // assuming that all bins have the same width
643  dEtaMin = (etaWeights->GetXaxis())->GetXmin();
644  }
645  }
646  } // end of if(weightsList)
647 
648  //loop over the two subevents
649  for (Int_t s=0; s<2; s++)
650  {
651  // loop over tracks
652  for(Int_t i=0; i<fNumberOfTracks; i++)
653  {
654  pTrack = (AliFlowTrackSimple*)fTrackCollection->At(i);
655  if(!pTrack)
656  {
657  cerr << "no particle!!!"<<endl;
658  continue;
659  }
660  if(pTrack->InRPSelection() && (pTrack->InSubevent(s)))
661  {
662  dPhi = pTrack->Phi();
663  dPt = pTrack->Pt();
664  dEta = pTrack->Eta();
665  dWeight = pTrack->Weight();
666 
667  // determine Phi weight: (to be improved, I should here only access it + the treatment of gaps in the if statement)
668  //subevent 0
669  if(s == 0) {
670  if(phiWeightsSub0 && iNbinsPhiSub0) {
671  Int_t phiBin = 1+(Int_t)(TMath::Floor(dPhi*iNbinsPhiSub0/TMath::TwoPi()));
672  //use the phi value at the center of the bin
673  dPhi = phiWeightsSub0->GetBinCenter(phiBin);
674  dWphi = phiWeightsSub0->GetBinContent(phiBin);
675  }
676  }
677  //subevent 1
678  else if (s == 1) {
679  if(phiWeightsSub1 && iNbinsPhiSub1) {
680  Int_t phiBin = 1+(Int_t)(TMath::Floor(dPhi*iNbinsPhiSub1/TMath::TwoPi()));
681  //use the phi value at the center of the bin
682  dPhi = phiWeightsSub1->GetBinCenter(phiBin);
683  dWphi = phiWeightsSub1->GetBinContent(phiBin);
684  }
685  }
686 
687  // determine v'(pt) weight:
688  if(ptWeights && dBinWidthPt)
689  {
690  dWpt=ptWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-dPtMin)/dBinWidthPt)));
691  }
692 
693  // determine v'(eta) weight:
694  if(etaWeights && dBinWidthEta)
695  {
696  dWeta=etaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-dEtaMin)/dBinWidthEta)));
697  }
698 
699  // building up the weighted Q-vector:
700  dQX += dWeight*dWphi*dWpt*dWeta*TMath::Cos(iOrder*dPhi);
701  dQY += dWeight*dWphi*dWpt*dWeta*TMath::Sin(iOrder*dPhi);
702 
703  // weighted multiplicity:
704  sumOfWeights+=dWeight*dWphi*dWpt*dWeta;
705 
706  } // end of if (pTrack->InRPSelection())
707  } // loop over particles
708 
709  Qarray[s].Set(dQX,dQY);
710  Qarray[s].SetMult(sumOfWeights);
711  Qarray[s].SetHarmonic(iOrder);
713  Qarray[s].SetSubeventNumber(s);
714 
715  //reset
716  sumOfWeights = 0.;
717  dQX = 0.;
718  dQY = 0.;
719  }
720 
721 }
722 
723 
724 //-----------------------------------------------------------------------
726 {
727  Qarray[0].Set(fZNCQ[0],fZNCQ[1]);
728  Qarray[0].SetMult(fZNCM);
729  Qarray[1].Set(fZNAQ[0],fZNAQ[1]);
730  Qarray[1].SetMult(fZNAM);
731 }
732 
733 //-----------------------------------------------------------------------------
734 
735 void AliFlowEventSimple::SetZDC2Qsub(Double_t* QVC, Double_t MC, Double_t* QVA, Double_t MA)
736 {
737  fZNCQ[0] = QVC[0];
738  fZNCQ[1] = QVC[1];
739  fZNCM = MC;
740  fZNAQ[0] = QVA[0];
741  fZNAQ[1] = QVA[1];
742  fZNAM = MA;
743 }
744 //-----------------------------------------------------------------------
746 {
747  pos[0] = fVtxPos[0];
748  pos[1] = fVtxPos[1];
749  pos[2] = fVtxPos[2];
750 }
751 
752 //-----------------------------------------------------------------------------
753 
755 {
756  fVtxPos[0] = pos[0];
757  fVtxPos[1] = pos[1];
758  fVtxPos[2] = pos[2];
759 }
760 //-----------------------------------------------------------------------
761 
762 void AliFlowEventSimple::Print(Option_t *option) const
763 {
764  // -*-*-*-*-*Print some global quantities for this histogram collection class *-*-*-*-*-*-*-*
765  // ===============================================
766  // printf( "TH1.Print Name = %s, Entries= %d, Total sum= %g\n",GetName(),Int_t(fEntries),GetSumOfWeights());
767  printf( "Class.Print Name = %s, #tracks= %d, Number of RPs= %d, Number of POIs = %d, MC EventPlaneAngle= %f\n",
769 
770  TString optionstr(option);
771  if (!optionstr.Contains("all")) return;
772  if (fTrackCollection)
773  {
774  fTrackCollection->Print(option);
775  }
776  else
777  {
778  printf( "Empty track collection \n");
779  }
780 }
781 
782 //-----------------------------------------------------------------------
783 void AliFlowEventSimple::Browse(TBrowser *b)
784 {
785  //browse in TBrowser
786  if (!b) return;
787  if (!fNumberOfTracksWrap)
788  {
789  fNumberOfTracksWrap = new TParameter<int>("fNumberOfTracks", fNumberOfTracks);
790  b->Add(fNumberOfTracksWrap);
791  }
792  if (!fNumberOfRPsWrap)
793  {
794  fNumberOfRPsWrap = new TParameter<int>("fNumberOfRPs", GetNumberOfRPs());
795  b->Add(fNumberOfRPsWrap);
796  }
797  if (!fNumberOfPOIsWrap)
798  {
799  fNumberOfPOIsWrap = new TParameter<int>("fNumberOfPOIs", GetNumberOfPOIs());
800  b->Add(fNumberOfPOIsWrap);
801  }
803  {
804  fMCReactionPlaneAngleWrap = new TParameter<double>(" fMCReactionPlaneAngle", fMCReactionPlaneAngle);
805  b->Add( fMCReactionPlaneAngleWrap);
806  }
807  if (fTrackCollection) b->Add(fTrackCollection,"AliFlowTracksSimple");
808 }
809 
810 //-----------------------------------------------------------------------
812  const AliFlowTrackSimpleCuts* rpCuts,
813  const AliFlowTrackSimpleCuts* poiCuts):
814  fTrackCollection(NULL),
815  fReferenceMultiplicity(0),
816  fNumberOfTracks(0),
817  fUseGlauberMCSymmetryPlanes(kFALSE),
818  fUseExternalSymmetryPlanes(kFALSE),
819  fPsi1(0.),
820  fPsi2(0.),
821  fPsi3(0.),
822  fPsi4(0.),
823  fPsi5(0.),
824  fPsi1Psi3(0x0),
825  fPsi2Psi4(0x0),
826  fPsi3Psi5(0x0),
827  fMCReactionPlaneAngle(0.),
828  fMCReactionPlaneAngleIsSet(kFALSE),
829  fAfterBurnerPrecision(0.001),
830  fUserModified(kFALSE),
831  fNumberOfTracksWrap(NULL),
832  fNumberOfRPsWrap(NULL),
833  fNumberOfPOIsWrap(NULL),
834  fMCReactionPlaneAngleWrap(NULL),
835  fShuffledIndexes(NULL),
836  fShuffleTracks(kFALSE),
837  fMothersCollection(new TObjArray()),
838  fCentrality(-1.),
839  fCentralityCL1(-1.),
840  fNITSCL1(-1.),
841  fCentralityTRK(-1.),
842  fRun(-1),
843  fNumberOfPOItypes(2),
844  fNumberOfPOIs(new Int_t[fNumberOfPOItypes])
845 {
846  //constructor, fills the event from a TTree of kinematic.root files
847  //applies RP and POI cuts, tags the tracks
848 
849  Int_t numberOfInputTracks = inputTree->GetEntries() ;
850  fTrackCollection = new TObjArray(numberOfInputTracks/2);
851 
852  TParticle* pParticle = new TParticle();
853  inputTree->SetBranchAddress("Particles",&pParticle);
854 
855  for (Int_t i=0; i<numberOfInputTracks; i++)
856  {
857  inputTree->GetEntry(i); //get input particle
858 
859  if (!pParticle) continue; //no particle
860  if (!pParticle->IsPrimary()) continue;
861 
862  Bool_t rpOK = (rpCuts->PassesCuts(pParticle)>0);
863  Bool_t poiOK = poiCuts->PassesCuts(pParticle);
864  Int_t poiType = poiCuts->GetPOItype();
865 
866  if (rpOK || poiOK)
867  {
868  AliFlowTrackSimple* pTrack = new AliFlowTrackSimple(pParticle);
869 
870  //marking the particles used for int. flow:
871  if(rpOK)
872  {
873  pTrack->TagRP(kTRUE);
875  cout<<"numberOfRPs = "<<fNumberOfPOIs[0]<<endl;
876  }
877  //marking the particles used for diff. flow:
878  if(poiOK)
879  {
880  pTrack->Tag(poiType);
881  IncrementNumberOfPOIs(poiType);
882  printf("fNumberOfPOIs[%i] = %i",poiType,fNumberOfPOIs[poiType]);
883  }
884  //adding a particles which were used either for int. or diff. flow to the list
885  AddTrack(pTrack);
886  }
887  }//for i
888  delete pParticle;
889 
890  for(Int_t i(0); i < 2; i++) {
891  fZNCQ[i] = 0.;
892  fZNAQ[i] = 0.;
893  }
894  for(Int_t i(0); i < 3; i++) {
895  fVtxPos[i] = 0.;
896  }
897 }
898 
899 //_____________________________________________________________________________
901 {
902  //clone every track n times to add non-flow
903  if (n<=0) return; //no use to clone stuff zero or less times
904  Int_t ntracks = fNumberOfTracks;
905  fTrackCollection->Expand((n+1)*fNumberOfTracks);
906  for (Int_t i=0; i<n; i++)
907  {
908  for (Int_t itrack=0; itrack<ntracks; itrack++)
909  {
910  AliFlowTrackSimple* track = dynamic_cast<AliFlowTrackSimple*>(fTrackCollection->At(itrack));
911  if (!track) continue;
912  AddTrack(static_cast<AliFlowTrackSimple*>(track->Clone()));
913  }
914  }
915  SetUserModified();
916 }
917 
918 //_____________________________________________________________________________
920 {
921  //smear pt of all tracks by gaussian with sigma=res
922  for (Int_t i=0; i<fNumberOfTracks; i++)
923  {
924  AliFlowTrackSimple* track = static_cast<AliFlowTrackSimple*>(fTrackCollection->At(i));
925  if (track) track->ResolutionPt(res);
926  }
927  SetUserModified();
928 }
929 
930 //_____________________________________________________________________________
932  Double_t etaMaxA,
933  Double_t etaMinB,
934  Double_t etaMaxB )
935 {
936  //Flag two subevents in given eta ranges
937  for (Int_t i=0; i<fNumberOfTracks; i++)
938  {
939  AliFlowTrackSimple* track = static_cast<AliFlowTrackSimple*>(fTrackCollection->At(i));
940  if (!track) continue;
941  track->ResetSubEventTags();
942  Double_t eta=track->Eta();
943  if (eta >= etaMinA && eta <= etaMaxA) track->SetForSubevent(0);
944  if (eta >= etaMinB && eta <= etaMaxB) track->SetForSubevent(1);
945  }
946 }
947 
948 //_____________________________________________________________________________
950 {
951  //Flag two subevents in given eta ranges
952  for (Int_t i=0; i<fNumberOfTracks; i++)
953  {
954  AliFlowTrackSimple* track = static_cast<AliFlowTrackSimple*>(fTrackCollection->At(i));
955  if (!track) continue;
956  track->ResetSubEventTags();
957  Int_t charge=track->Charge();
958  if (charge<0) track->SetForSubevent(0);
959  if (charge>0) track->SetForSubevent(1);
960  }
961 }
962 
963 //_____________________________________________________________________________
964 void AliFlowEventSimple::AddV1( Double_t v1 )
965 {
966  //add v2 to all tracks wrt the reaction plane angle
967  for (Int_t i=0; i<fNumberOfTracks; i++)
968  {
969  AliFlowTrackSimple* track = static_cast<AliFlowTrackSimple*>(fTrackCollection->At(i));
970  if (track) {
972  track->AddV1(v1, fPsi1, fAfterBurnerPrecision);
973  else
975  }
976  }
977  SetUserModified();
978 }
979 
980 //_____________________________________________________________________________
981 void AliFlowEventSimple::AddV2( Double_t v2 )
982 {
983  //add v2 to all tracks wrt the reaction plane angle
984  for (Int_t i=0; i<fNumberOfTracks; i++)
985  {
986  AliFlowTrackSimple* track = static_cast<AliFlowTrackSimple*>(fTrackCollection->At(i));
987  if (track) {
989  track->AddV2(v2, fPsi2, fAfterBurnerPrecision);
990  else
992  }
993  }
994  SetUserModified();
995 }
996 
997 //_____________________________________________________________________________
998 void AliFlowEventSimple::AddV3( Double_t v3 )
999 {
1000  //add v3 to all tracks wrt the reaction plane angle
1001  for (Int_t i=0; i<fNumberOfTracks; i++)
1002  {
1003  AliFlowTrackSimple* track = static_cast<AliFlowTrackSimple*>(fTrackCollection->At(i));
1004  if(track) {
1006  track->AddV3(v3, fPsi3, fAfterBurnerPrecision);
1007  else
1009  }
1010  }
1011  SetUserModified();
1012 }
1013 
1014 //_____________________________________________________________________________
1015 void AliFlowEventSimple::AddV4( Double_t v4 )
1016 {
1017  //add v4 to all tracks wrt the reaction plane angle
1018  for (Int_t i=0; i<fNumberOfTracks; i++)
1019  {
1020  AliFlowTrackSimple* track = static_cast<AliFlowTrackSimple*>(fTrackCollection->At(i));
1021  if(track) {
1023  track->AddV4(v4, fPsi4, fAfterBurnerPrecision);
1024  else
1026  }
1027  }
1028  SetUserModified();
1029 }
1030 
1031 //_____________________________________________________________________________
1032 void AliFlowEventSimple::AddV5( Double_t v5 )
1033 {
1034  //add v4 to all tracks wrt the reaction plane angle
1035  for (Int_t i=0; i<fNumberOfTracks; i++)
1036  {
1037  AliFlowTrackSimple* track = static_cast<AliFlowTrackSimple*>(fTrackCollection->At(i));
1038  if(track) {
1040  track->AddV5(v5, fPsi5, fAfterBurnerPrecision);
1041  else
1043  }
1044  }
1045  SetUserModified();
1046 }
1047 
1048 //_____________________________________________________________________________
1049 void AliFlowEventSimple::AddFlow( Double_t v1, Double_t v2, Double_t v3, Double_t v4, Double_t v5,
1050  Double_t rp1, Double_t rp2, Double_t rp3, Double_t rp4, Double_t rp5 )
1051 {
1052  //add flow to all tracks wrt the reaction plane angle, for all harmonic separate angle
1053  for (Int_t i=0; i<fNumberOfTracks; i++)
1054  {
1055  AliFlowTrackSimple* track = static_cast<AliFlowTrackSimple*>(fTrackCollection->At(i));
1056  if (track) track->AddFlow(v1,v2,v3,v4,v5,rp1,rp2,rp3,rp4,rp5,fAfterBurnerPrecision);
1057  }
1058  SetUserModified();
1059 }
1060 
1061 //_____________________________________________________________________________
1062 void AliFlowEventSimple::AddFlow( Double_t v1, Double_t v2, Double_t v3, Double_t v4, Double_t v5 )
1063 {
1064  //add flow to all tracks wrt the reaction plane angle
1065  for (Int_t i=0; i<fNumberOfTracks; i++)
1066  {
1067  AliFlowTrackSimple* track = static_cast<AliFlowTrackSimple*>(fTrackCollection->At(i));
1068  if (track) track->AddFlow(v1,v2,v3,v4,v5,fMCReactionPlaneAngle, fAfterBurnerPrecision);
1069  }
1070  SetUserModified();
1071 }
1072 
1073 //_____________________________________________________________________________
1074 void AliFlowEventSimple::AddV2( TF1* ptDepV2 )
1075 {
1076  //add v2 to all tracks wrt the reaction plane angle
1077  for (Int_t i=0; i<fNumberOfTracks; i++)
1078  {
1079  AliFlowTrackSimple* track = static_cast<AliFlowTrackSimple*>(fTrackCollection->At(i));
1080  if (!track) continue;
1081  Double_t v2 = ptDepV2->Eval(track->Pt());
1083  }
1084  SetUserModified();
1085 }
1086 
1087 //_____________________________________________________________________________
1088 void AliFlowEventSimple::AddV2( TF2* ptEtaDepV2 )
1089 {
1090  //add v2 to all tracks wrt the reaction plane angle
1091  for (Int_t i=0; i<fNumberOfTracks; i++)
1092  {
1093  AliFlowTrackSimple* track = static_cast<AliFlowTrackSimple*>(fTrackCollection->At(i));
1094  if (!track) continue;
1095  Double_t v2 = ptEtaDepV2->Eval(track->Pt(), track->Eta());
1097  }
1098  SetUserModified();
1099 }
1100 
1101 //_____________________________________________________________________________
1103 {
1104  //tag tracks as reference particles (RPs)
1105  for (Int_t i=0; i<fNumberOfTracks; i++)
1106  {
1107  AliFlowTrackSimple* track = static_cast<AliFlowTrackSimple*>(fTrackCollection->At(i));
1108  if (!track) continue;
1109  Bool_t pass=cuts->PassesCuts(track);
1110  Bool_t rpTrack=track->InRPSelection();
1111  if (pass)
1112  {
1113  if (!rpTrack) fNumberOfPOIs[0]++; //only increase if not already tagged
1114  }
1115  else
1116  {
1117  if (rpTrack) fNumberOfPOIs[0]--; //only decrease if detagging
1118  }
1119  track->SetForRPSelection(pass);
1120  }
1121 }
1122 
1123 //_____________________________________________________________________________
1124 void AliFlowEventSimple::TagPOI( const AliFlowTrackSimpleCuts* cuts, Int_t poiType )
1125 {
1126  //tag tracks as particles of interest (POIs)
1127  for (Int_t i=0; i<fNumberOfTracks; i++)
1128  {
1129  AliFlowTrackSimple* track = static_cast<AliFlowTrackSimple*>(fTrackCollection->At(i));
1130  if (!track) continue;
1131  Bool_t pass=cuts->PassesCuts(track);
1132  Bool_t poiTrack=track->InPOISelection();
1133  if (pass)
1134  {
1135  if (!poiTrack) fNumberOfPOIs[poiType]++; //only increase if not already tagged
1136  }
1137  else
1138  {
1139  if (poiTrack) fNumberOfPOIs[poiType]--; //only decrease if detagging
1140  }
1141  track->Tag(poiType,pass);
1142  }
1143 }
1144 
1145 //_____________________________________________________________________________
1147 {
1148  // simple interface to tagging poi's and rp's
1149  TagPOI(cutsRP, 0);
1150  TagPOI(cutsPOI, 1);
1151 }
1152 //_____________________________________________________________________________
1154  Double_t etaMax,
1155  Double_t phiMin,
1156  Double_t phiMax )
1157 {
1158  //mark tracks in given eta-phi region as dead
1159  //by resetting the flow bits
1160  for (Int_t i=0; i<fNumberOfTracks; i++)
1161  {
1162  AliFlowTrackSimple* track = static_cast<AliFlowTrackSimple*>(fTrackCollection->At(i));
1163  Double_t eta = track->Eta();
1164  Double_t phi = track->Phi();
1165  if (eta>etaMin && eta<etaMax && phi>phiMin && phi<phiMax)
1166  {
1167  if (track->InRPSelection()) {fNumberOfPOIs[0]--;}
1168  for (Int_t j=1; j<fNumberOfPOItypes; j++)
1169  {
1170  if (track->CheckTag(j)) {fNumberOfPOIs[j]--;}
1171  }
1172  track->ResetPOItype();
1173  }
1174  }
1175 }
1176 
1177 //_____________________________________________________________________________
1179 {
1180  //remove tracks that have no flow tags set and cleanup the container
1181  //returns number of cleaned tracks
1182  Int_t ncleaned=0;
1183  for (Int_t i=0; i<fNumberOfTracks; i++)
1184  {
1185  AliFlowTrackSimple* track = static_cast<AliFlowTrackSimple*>(fTrackCollection->At(i));
1186  if (!track) continue;
1187  if (track->IsDead()) {delete track;track=NULL;ncleaned++;}
1188  }
1189  fTrackCollection->Compress(); //clean up empty slots
1190  fNumberOfTracks-=ncleaned; //update number of tracks
1191  delete [] fShuffledIndexes; fShuffledIndexes=NULL;
1192  return ncleaned;
1193 }
1194 
1195 //_____________________________________________________________________________
1197 {
1198  //return a standard pt dependent v2 formula, user has to clean up!
1199  return new TF1("StandardPtDepV2","((x<1.0)*(0.05/1.0)*x+(x>=1.0)*0.05)");
1200 }
1201 
1202 //_____________________________________________________________________________
1204 {
1205  //returna standard pt and eta dependent v2 formula, user has to clean up!
1206  return new TF2 ("f","((x<1)*.1*x+(x>=1)*.1)*(1-0.2*TMath::Abs(y))");
1207 }
1208 
1209 //_____________________________________________________________________________
1211 {
1212  //return a standard pt spectrum, user has to clean up!
1213  return new TF1("StandardPtSpectrum","x*TMath::Exp(-pow(0.13957*0.13957+x*x,0.5)/0.4)",0.1,10.);
1214 }
1215 
1216 //_____________________________________________________________________________
1218 {
1219  //clear the counters without deleting allocated objects so they can be reused
1221  fNumberOfTracks = 0;
1222  for (Int_t i=0; i<fNumberOfPOItypes; i++)
1223  {
1224  fNumberOfPOIs[i] = 0;
1225  }
1226  fMCReactionPlaneAngle = 0.0;
1227  fMCReactionPlaneAngleIsSet = kFALSE;
1228  fAfterBurnerPrecision = 0.001;
1229  fUserModified = kFALSE;
1230  delete [] fShuffledIndexes; fShuffledIndexes=NULL;
1231 }
void SetCharge(Int_t charge)
Int_t charge
void Print(Option_t *option="") const
void SetForSubevent(Int_t i)
void Browse(TBrowser *b)
virtual AliFlowVector GetQ(Int_t n=2, TList *weightsList=NULL, Bool_t usePhiWeights=kFALSE, Bool_t usePtWeights=kFALSE, Bool_t useEtaWeights=kFALSE)
void SetEta(Double_t eta)
virtual Int_t GetNDaughters() const
void AddV3(Double_t v3)
virtual void GetVertexPosition(Double_t *pos)
AliFlowTrackSimple * GetTrack(Int_t i)
void AddV1(Double_t v1, Double_t reactionPlaneAngle, Double_t precision, Int_t maxNumberOfIterations=100)
ClassImp(AliFlowEventSimple) AliFlowEventSimple
Bool_t InSubevent(Int_t i) const
Int_t GetNumberOfRPs() const
virtual void SetZDC2Qsub(Double_t *QVC, Double_t MC, Double_t *QVA, Double_t MA)
void AddV5(Double_t v5, Double_t reactionPlaneAngle, Double_t precision, Int_t maxNumberOfIterations=100)
void AddFlow(Double_t v1, Double_t v2, Double_t v3, Double_t v4, Double_t v5)
virtual AliFlowTrackSimple * Clone(const char *option="") const
TParameter< Int_t > * fNumberOfRPsWrap
number of tracks in TBrowser
void TagRP(const AliFlowTrackSimpleCuts *cuts)
static TF2 * SimplePtEtaDepV2()
void TagTracks(const AliFlowTrackSimpleCuts *cutsRP, const AliFlowTrackSimpleCuts *cutsPOI)
void AddV4(Double_t v4)
AliFlowEventSimple & operator=(const AliFlowEventSimple &anEvent)
static TF1 * SimplePtSpectrum()
void SetSubeventNumber(Int_t n)
Definition: AliFlowVector.h:51
void AddTrack(AliFlowTrackSimple *track)
void TagPOI(const AliFlowTrackSimpleCuts *cuts, Int_t poiType=1)
Bool_t PassesCuts(const AliFlowTrackSimple *track) const
void SetUserModified(Bool_t s=kTRUE)
TRandom * gRandom
void TagRP(Bool_t b=kTRUE)
Bool_t InRPSelection() const
virtual void SetVertexPosition(Double_t *pos)
void IncrementNumberOfPOIs(Int_t poiType=1)
Int_t * fShuffledIndexes
the angle of the reaction plane from the MC truth in TBrowser
TParameter< Double_t > * fMCReactionPlaneAngleWrap
number of tracks that have passed the POI selection in TBrowser
void SetForRPSelection(Bool_t b=kTRUE)
Double_t Phi() const
void SetHarmonic(Int_t h)
Definition: AliFlowVector.h:47
TParameter< Int_t > * fNumberOfPOIsWrap
number of tracks that have passed the RP selection in TBrowser
void SetNumberOfPOIs(Int_t nubmerOfPOIs, Int_t poiType=1)
void AddV4(Double_t v4, Double_t reactionPlaneAngle, Double_t precision, Int_t maxNumberOfIterations=100)
void ResolutionPt(Double_t res)
void SetMult(Double_t mult)
Definition: AliFlowVector.h:45
Bool_t CheckTag(Int_t n)
Int_t GetNumberOfPOIs(Int_t i=1) const
void Tag(Int_t n, Bool_t b=kTRUE)
void AddV1(Double_t v1)
Bool_t IsDead() const
void ResolutionPt(Double_t resolution)
virtual void Generate(Int_t nParticles, TF1 *ptDist=NULL, Double_t phiMin=0.0, Double_t phiMax=TMath::TwoPi(), Double_t etaMin=-1.0, Double_t etaMax=1.0)
Bool_t fShuffleTracks
placeholder for randomized indexes
TObjArray * fTrackCollection
virtual void Get2Qsub(AliFlowVector *Qarray, Int_t n=2, TList *weightsList=NULL, Bool_t usePhiWeights=kFALSE, Bool_t usePtWeights=kFALSE, Bool_t useEtaWeights=kFALSE)
void SetPhi(Double_t phi)
void DefineDeadZone(Double_t etaMin, Double_t etaMax, Double_t phiMin, Double_t phiMax)
AliFlowTrackSimple * MakeNewTrack()
void SetPt(Double_t pt)
void AddV2(Double_t v2, Double_t reactionPlaneAngle, Double_t precision, Int_t maxNumberOfIterations=100)
void AddV5(Double_t v5)
void SetPOItype(Int_t t)
Definition: AliFlowVector.h:49
virtual void GetZDC2Qsub(AliFlowVector *Qarray)
void AddFlow(Double_t v1, Double_t v2, Double_t v3, Double_t v4, Double_t reactionPlaneAngle, Double_t precision, Int_t maxNumberOfIterations=100)
void AddV3(Double_t v3, Double_t reactionPlaneAngle, Double_t precision, Int_t maxNumberOfIterations=100)
Double_t Pt() const
TParameter< Int_t > * fNumberOfTracksWrap
Double_t Weight() const
void AddV2(Double_t v2)
TObjArray * fMothersCollection
void TagSubeventsInEta(Double_t etaMinA, Double_t etaMaxA, Double_t etaMinB, Double_t etaMaxB)
void SetUseExternalSymmetryPlanes(TF1 *gPsi1Psi3=0x0, TF1 *gPsi2Psi4=0x0, TF1 *gPsi3Psi5=0x0)
static TF1 * SimplePtDepV2()
Bool_t InPOISelection(Int_t poiType=1) const
Double_t Eta() const
Double_t fCentrality
cache the particles with daughters
Bool_t MC(TH1F *hs, TH1F *hb, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmaused, Int_t &status)