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