AliPhysics  b095172 (b095172)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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; }
55  Int_t GetEventNSelTracksRP() const { return GetNumberOfPOIs(0); }
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  virtual void SetVertexPosition(Double_t* pos);
125  virtual void GetVertexPosition(Double_t* pos);
126 
128  Double_t GetCentrality() const {return fCentrality;};
132  Double_t GetNITSCL1() const {return fNITSCL1;};
135  void SetRun(Int_t const run) {fRun = run;};
136  Int_t GetRun() const {return fRun;};
137  void SetZNCEnergy(Double_t const en) {fZNCM = en;};
138  Double_t GetZNCEnergy() const {return fZNCM;};
139  void SetZNAEnergy(Double_t const en) {fZNAM = en;};
140  Double_t GetZNAEnergy() const {return fZNAM;};
141 
142  protected:
143  virtual void Generate( Int_t nParticles,
144  TF1* ptDist=NULL,
145  Double_t phiMin=0.0,
146  Double_t phiMax=TMath::TwoPi(),
147  Double_t etaMin=-1.0,
148  Double_t etaMax= 1.0 );
149 
150  //data members
151  TObjArray* fTrackCollection; //-> collection of tracks
152  Int_t fReferenceMultiplicity; // reference multiplicity
153  Int_t fNumberOfTracks; // number of tracks
154  Bool_t fUseGlauberMCSymmetryPlanes;// Use symmetry planes (Glauber MC)
155  Bool_t fUseExternalSymmetryPlanes; // Use symmetry planes (external)
156  Double_t fPsi1; // Psi_1
157  Double_t fPsi2; // Psi_2
158  Double_t fPsi3; // Psi_3
159  Double_t fPsi4; // Psi_4
160  Double_t fPsi5; // Psi_5
161  TF1* fPsi1Psi3; // Correlation between Psi_1 and Psi_3
162  TF1* fPsi2Psi4; // Correlation between Psi_2 and Psi_4
163  TF1* fPsi3Psi5; // Correlation between Psi_3 and Psi_5
164  Double_t fMCReactionPlaneAngle; // the angle of the reaction plane from the MC truth
165  Bool_t fMCReactionPlaneAngleIsSet; // did we set it from MC?
166  Double_t fAfterBurnerPrecision; // iteration precision in afterburner
167  Bool_t fUserModified; // did we modify the event in any way (afterburner etc) ?
173  Bool_t fShuffleTracks; // do we shuffle tracks on get?
175  Double_t fCentrality; // centrality
176  Double_t fCentralityCL1; // centrality (CL1)
177  Double_t fNITSCL1; // number of clusters in ITS layer 1
178  Double_t fCentralityTRK; // centrality (TRK)
179  Int_t fRun; // run number
180  AliFlowVector fZNCQ; // Q_1 vector from ZNC-C
181  AliFlowVector fZNAQ; // Q_1 vector from ZNC-A
182  Double_t fZNCM; // total energy from ZNC-C
183  Double_t fZNAM; // total energy from ZNC-A
184  Double_t fVtxPos[3]; // Primary vertex position (x,y,z)
185 
186  private:
187  Int_t fNumberOfPOItypes; // how many different flow particle types do we have? (RP,POI,POI_2,...)
188  Int_t* fNumberOfPOIs; //[fNumberOfPOItypes] number of tracks that have passed the POI selection
189 
190  ClassDef(AliFlowEventSimple,6)
191 };
192 
193 #endif
194 
195 
void Print(Option_t *option="") const
void Browse(TBrowser *b)
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 AddV3(Double_t v3)
virtual void GetVertexPosition(Double_t *pos)
AliFlowTrackSimple * GetTrack(Int_t i)
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)
static TF2 * SimplePtEtaDepV2()
void TagTracks(const AliFlowTrackSimpleCuts *cutsRP, const AliFlowTrackSimpleCuts *cutsPOI)
void AddV4(Double_t v4)
AliFlowEventSimple & operator=(const AliFlowEventSimple &anEvent)
static TF1 * SimplePtSpectrum()
Double_t GetZNCEnergy() const
Int_t GetEventNSelTracksRP() const
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
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)
Int_t GetNumberOfPOIs(Int_t i=1) const
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
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
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 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
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
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)
void SetAfterBurnerPrecision(Double_t p)
Double_t GetCentralityCL1() const
Int_t NumberOfTracks() const