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