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