AliPhysics  8b695ca (8b695ca)
AliFlowEventSimple.h
Go to the documentation of this file.
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3 /* $Id$ */
4 
5 /*****************************************************************
6  AliFlowEventSimple: A simple event
7  for flow analysis
8 
9  origin: Naomi van der Kolk (kolk@nikhef.nl)
10  Ante Bilandzic (anteb@nikhef.nl)
11  Raimond Snellings (Raimond.Snellings@nikhef.nl)
12  mods: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch)
13  Redmer A. Bertens (rbertens@cern.ch)
14 *****************************************************************/
15 
16 #ifndef ALIFLOWEVENTSIMPLE_H
17 #define ALIFLOWEVENTSIMPLE_H
18 
19 #include "TObject.h"
20 #include "TParameter.h"
21 #include "TMath.h"
22 #include "AliFlowVector.h"
23 class TTree;
24 class TF1;
25 class TF2;
26 class AliFlowTrackSimple;
28 
29 class AliFlowEventSimple: public TObject {
30 
31  public:
32 
34 
36  AliFlowEventSimple( Int_t nParticles,
38  TF1* ptDist=NULL,
39  Double_t phiMin=0.0,
40  Double_t phiMax=TMath::TwoPi(),
41  Double_t etaMin=-1.0,
42  Double_t etaMax= 1.0 );
43  AliFlowEventSimple(TTree* anInput, const AliFlowTrackSimpleCuts* rpCuts, const AliFlowTrackSimpleCuts* poiCuts);
44  AliFlowEventSimple(const AliFlowEventSimple& anEvent);
46  virtual ~AliFlowEventSimple();
47 
48  Bool_t IsFolder() const {return kTRUE;};
49  void Browse(TBrowser *b);
50  void Print(Option_t* option = "") const; //method to print stats
51 
52  Int_t NumberOfTracks() const { return fNumberOfTracks; }
59  Int_t GetNumberOfRPs() const { return GetNumberOfPOIs(0); }
60  void SetNumberOfRPs( Int_t nr ) { SetNumberOfPOIs(nr,0); }
61  Int_t GetNumberOfPOIs(Int_t i=1) const { return (i<fNumberOfPOItypes)?fNumberOfPOIs[i]:0; }
62  void SetNumberOfPOIs( Int_t nubmerOfPOIs, Int_t poiType=1 );
63  void IncrementNumberOfPOIs(Int_t poiType=1);
64 
66  void SetUseExternalSymmetryPlanes(TF1 *gPsi1Psi3 = 0x0,
67  TF1 *gPsi2Psi4 = 0x0,
68  TF1 *gPsi3Psi5 = 0x0);
69  void SetPsi1(Double_t gPsi1) { fPsi1 = gPsi1; }
70  void SetPsi2(Double_t gPsi2) { fPsi2 = gPsi2; }
71  void SetPsi3(Double_t gPsi3) { fPsi3 = gPsi3; }
72  void SetPsi4(Double_t gPsi4) { fPsi4 = gPsi4; }
73  void SetPsi5(Double_t gPsi5) { fPsi5 = gPsi5; }
74  Double_t GetPsi1() const { return fPsi1; }
75  Double_t GetPsi2() const { return fPsi2; }
76  Double_t GetPsi3() const { return fPsi3; }
77  Double_t GetPsi4() const { return fPsi4; }
78  Double_t GetPsi5() const { return fPsi5; }
79 
85  void SetUserModified(Bool_t s=kTRUE) { fUserModified=s; }
86  Bool_t IsUserModified() const { return fUserModified; }
88  void ShuffleTracks();
89 
90  void ResolutionPt(Double_t res);
91  void TagSubeventsInEta(Double_t etaMinA, Double_t etaMaxA, Double_t etaMinB, Double_t etaMaxB );
92  void TagSubeventsByCharge();
93  void TagRP(const AliFlowTrackSimpleCuts* cuts );
94  void TagPOI(const AliFlowTrackSimpleCuts* cuts, Int_t poiType=1);
95  void TagTracks(const AliFlowTrackSimpleCuts* cutsRP, const AliFlowTrackSimpleCuts* cutsPOI);
96  void CloneTracks(Int_t n);
97  void AddV1( Double_t v1 );
98  void AddV2( Double_t v2 );
99  void AddV3( Double_t v3 );
100  void AddV4( Double_t v4 );
101  void AddV5( Double_t v5 );
102  void AddFlow( Double_t v1, Double_t v2, Double_t v3, Double_t v4, Double_t v5 );
103  void AddFlow(Double_t v1, Double_t v2, Double_t v3, Double_t v4, Double_t v5,
104  Double_t rp1, Double_t rp2, Double_t rp3, Double_t rp4, Double_t rp5 );
105  void AddV2( TF1* ptDepV2 );
106  void AddV2( TF2* ptEtaDepV2 );
107  void DefineDeadZone( Double_t etaMin, Double_t etaMax, Double_t phiMin, Double_t phiMax );
109  virtual void ClearFast();
110 
111  static TF1* SimplePtSpectrum();
112  static TF1* SimplePtDepV2();
113  static TF2* SimplePtEtaDepV2();
114 
116  void AddTrack( AliFlowTrackSimple* track );
117  void TrackAdded();
119 
120  virtual AliFlowVector GetQ(Int_t n=2, TList *weightsList=NULL, Bool_t usePhiWeights=kFALSE, Bool_t usePtWeights=kFALSE, Bool_t useEtaWeights=kFALSE);
121  virtual void Get2Qsub(AliFlowVector* Qarray, Int_t n=2, TList *weightsList=NULL, Bool_t usePhiWeights=kFALSE, Bool_t usePtWeights=kFALSE, Bool_t useEtaWeights=kFALSE);
122  virtual void GetZDC2Qsub(AliFlowVector* Qarray);
123  virtual void SetZDC2Qsub(Double_t* QVC, Double_t MC, Double_t* QVA, Double_t MA);
124  // begin test methods for LHC15o VZERO calibration, do not use
125  virtual void GetV02Qsub(AliFlowVector* Qarray, Int_t har);
126  virtual void SetV02Qsub(Double_t QVCx, Double_t QVCy, Double_t MC, Double_t QVAx, Double_t QVAy, Double_t MA, Int_t har);
127  // end test methods for LHC15o calibration
128  virtual void SetVertexPosition(Double_t* pos);
129  virtual void GetVertexPosition(Double_t* pos);
130 
132  Double_t GetCentrality() const {return fCentrality;};
136  Double_t GetNITSCL1() const {return fNITSCL1;};
139  void SetRun(Int_t const run) {fRun = run;};
140  Int_t GetRun() const {return fRun;};
141  void SetZNCQ0(Double_t const en) {fZNCQ0 = en;};
142  Double_t GetZNCQ0() const {return fZNCQ0;};
143  void SetZNAQ0(Double_t const en) {fZNAQ0 = en;};
144  Double_t GetZNAQ0() const {return fZNAQ0;};
145  void SetZNCEnergy(Double_t const en) {fZNCM = en;};
146  Double_t GetZNCEnergy() const {return fZNCM;};
147  void SetZNAEnergy(Double_t const en) {fZNAM = en;};
148  Double_t GetZNAEnergy() const {return fZNAM;};
149  void SetZPCEnergy(Double_t const en) {fZPCM = en;};
150  Double_t GetZPCEnergy() const {return fZPCM;};
151  void SetZPAEnergy(Double_t const en) {fZPAM = en;};
152  Double_t GetZPAEnergy() const {return fZPAM;};
153  void SetAbsOrbit(UInt_t const en) {fAbsOrbit = en;};
154  UInt_t GetAbsOrbit() const {return fAbsOrbit;};
155 
156  protected:
157  virtual void Generate( Int_t nParticles,
158  TF1* ptDist=NULL,
159  Double_t phiMin=0.0,
160  Double_t phiMax=TMath::TwoPi(),
161  Double_t etaMin=-1.0,
162  Double_t etaMax= 1.0 );
163 
164  //data members
165  TObjArray* fTrackCollection; //-> collection of tracks
166  Int_t fReferenceMultiplicity; // reference multiplicity
167  Int_t fNumberOfTracks; // number of tracks
168  Bool_t fUseGlauberMCSymmetryPlanes;// Use symmetry planes (Glauber MC)
169  Bool_t fUseExternalSymmetryPlanes; // Use symmetry planes (external)
170  Double_t fPsi1; // Psi_1
171  Double_t fPsi2; // Psi_2
172  Double_t fPsi3; // Psi_3
173  Double_t fPsi4; // Psi_4
174  Double_t fPsi5; // Psi_5
175  TF1* fPsi1Psi3; // Correlation between Psi_1 and Psi_3
176  TF1* fPsi2Psi4; // Correlation between Psi_2 and Psi_4
177  TF1* fPsi3Psi5; // Correlation between Psi_3 and Psi_5
178  Double_t fMCReactionPlaneAngle; // the angle of the reaction plane from the MC truth
179  Bool_t fMCReactionPlaneAngleIsSet; // did we set it from MC?
180  Double_t fAfterBurnerPrecision; // iteration precision in afterburner
181  Bool_t fUserModified; // did we modify the event in any way (afterburner etc) ?
187  Bool_t fShuffleTracks; // do we shuffle tracks on get?
189  Double_t fCentrality; // centrality
190  Double_t fCentralityCL1; // centrality (CL1)
191  Double_t fNITSCL1; // number of clusters in ITS layer 1
192  Double_t fCentralityTRK; // centrality (TRK)
193  Int_t fRun; // run number
194  AliFlowVector fZNCQ; // Q_1 vector from ZNC-C
195  AliFlowVector fZNAQ; // Q_1 vector from ZNC-A
196  // test members for LHC15o VZERO calibration, do not use
197  AliFlowVector fV0C[4]; // Q_n vector from V0-C
198  AliFlowVector fV0A[4]; // Q_n vector from V0-C
199  Double_t fZNCQ0; // common channel ZNC-C
200  Double_t fZNAQ0; // common channel ZNC-A
201  Double_t fZNCM; // total energy from ZNC-C
202  Double_t fZNAM; // total energy from ZNC-A
203  Double_t fZPCM; // total energy from ZPC-C
204  Double_t fZPAM; // total energy from ZPC-A
205  Double_t fVtxPos[3]; // Primary vertex position (x,y,z)
206  UInt_t fAbsOrbit; // Absolute orbit number
207 
208  private:
209  Int_t fNumberOfPOItypes; // how many different flow particle types do we have? (RP,POI,POI_2,...)
210  Int_t* fNumberOfPOIs; //[fNumberOfPOItypes] number of tracks that have passed the POI selection
211 
212  ClassDef(AliFlowEventSimple,7)
213 };
214 
215 #endif
void Print(Option_t *option="") const
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)
Bool_t IsUserModified() const
void SetEventNSelTracksPOI(Int_t np)
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 SetZNCQ0(Double_t const en)
void AddV3(Double_t v3)
virtual void GetVertexPosition(Double_t *pos)
AliFlowTrackSimple * GetTrack(Int_t i)
Double_t GetZPCEnergy() const
Int_t GetNumberOfRPs() const
virtual void SetZDC2Qsub(Double_t *QVC, Double_t MC, Double_t *QVA, Double_t MA)
void AddFlow(Double_t v1, Double_t v2, Double_t v3, Double_t v4, Double_t v5)
TParameter< Int_t > * fNumberOfRPsWrap
number of tracks in TBrowser
void TagRP(const AliFlowTrackSimpleCuts *cuts)
void SetZPAEnergy(Double_t const en)
static TF2 * SimplePtEtaDepV2()
void TagTracks(const AliFlowTrackSimpleCuts *cutsRP, const AliFlowTrackSimpleCuts *cutsPOI)
void AddV4(Double_t v4)
Double_t phiMin
AliFlowEventSimple & operator=(const AliFlowEventSimple &anEvent)
void SetZNAQ0(Double_t const en)
static TF1 * SimplePtSpectrum()
Double_t GetZNCEnergy() const
Int_t GetEventNSelTracksRP() const
AliFlowVector fV0A[4]
TCanvas * c
Definition: TestFitELoss.C:172
void SetZNAEnergy(Double_t const en)
void SetPsi1(Double_t gPsi1)
void AddTrack(AliFlowTrackSimple *track)
void TagPOI(const AliFlowTrackSimpleCuts *cuts, Int_t poiType=1)
void SetUserModified(Bool_t s=kTRUE)
void SetReferenceMultiplicity(Int_t m)
Double_t GetPsi3() const
Double_t GetPsi1() const
void SetCentralityCL1(Double_t c)
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 SetPsi5(Double_t gPsi5)
void SetNumberOfRPs(Int_t nr)
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
void SetShuffleTracks(Bool_t b)
Int_t GetEventNSelTracksPOI() const
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 SetNITSCL1(Double_t c)
void ResolutionPt(Double_t res)
Double_t phiMax
Int_t GetNumberOfPOIs(Int_t i=1) const
void SetAbsOrbit(UInt_t const en)
Double_t GetCentrality() const
void AddV1(Double_t v1)
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)
void SetCentrality(Double_t c)
Bool_t fShuffleTracks
placeholder for randomized indexes
void SetRun(Int_t const run)
void SetPsi2(Double_t gPsi2)
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 SetUseGlauberMCSymmetryPlanes()
Double_t GetPsi2() const
Double_t GetZNCQ0() const
void DefineDeadZone(Double_t etaMin, Double_t etaMax, Double_t phiMin, Double_t phiMax)
AliFlowTrackSimple * MakeNewTrack()
void SetPsi4(Double_t gPsi4)
void AddV5(Double_t v5)
void SetZNCEnergy(Double_t const en)
Int_t GetReferenceMultiplicity() const
virtual void GetZDC2Qsub(AliFlowVector *Qarray)
Double_t GetCentralityTRK() const
Bool_t IsSetMCReactionPlaneAngle() const
void SetPsi3(Double_t gPsi3)
Double_t GetAfterBurnerPrecision() const
void SetEventNSelTracksRP(Int_t nr)
TParameter< Int_t > * fNumberOfTracksWrap
virtual void GetV02Qsub(AliFlowVector *Qarray, Int_t har)
void AddV2(Double_t v2)
TObjArray * fMothersCollection
void SetMCReactionPlaneAngle(Double_t fPhiRP)
Double_t GetPsi4() const
void TagSubeventsInEta(Double_t etaMinA, Double_t etaMaxA, Double_t etaMinB, Double_t etaMaxB)
void SetZPCEnergy(Double_t const en)
void SetUseExternalSymmetryPlanes(TF1 *gPsi1Psi3=0x0, TF1 *gPsi2Psi4=0x0, TF1 *gPsi3Psi5=0x0)
Double_t GetMCReactionPlaneAngle() const
static TF1 * SimplePtDepV2()
Double_t GetNITSCL1() const
const char Option_t
Definition: External.C:48
AliFlowVector fV0C[4]
bool Bool_t
Definition: External.C:53
Double_t fCentrality
cache the particles with daughters
Bool_t IsFolder() const
void SetCentralityTRK(Double_t c)
Double_t GetPsi5() const
Double_t GetZNAEnergy() const
Double_t GetZNAQ0() const
UInt_t GetAbsOrbit() const
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)
Double_t GetZPAEnergy() const
void SetAfterBurnerPrecision(Double_t p)
Double_t GetCentralityCL1() const
Int_t NumberOfTracks() const