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