]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG/FLOW/Base/AliFlowEventSimple.h
initial checkin of the new flow development - from an OLD diff!
[u/mrichter/AliRoot.git] / PWG / FLOW / Base / AliFlowEventSimple.h
CommitLineData
f1d945a1 1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2* See cxx source for full Copyright notice */
3/* $Id$ */
4
929098e4 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*****************************************************************/
f1d945a1 14
929098e4 15#ifndef ALIFLOWEVENTSIMPLE_H
16#define ALIFLOWEVENTSIMPLE_H
17
18#include "TObject.h"
c076fda8 19#include "TParameter.h"
bc231a12 20#include "TMath.h"
929098e4 21class TTree;
bc231a12 22class TF1;
929098e4 23class AliFlowVector;
f1d945a1 24class AliFlowTrackSimple;
929098e4 25class AliFlowTrackSimpleCuts;
f1d945a1 26
27class AliFlowEventSimple: public TObject {
28
29 public:
9fa64edc 30
31 enum ConstructionMethod {kEmpty,kGenerate};
32
46bec39c 33 AliFlowEventSimple();
bc231a12 34 AliFlowEventSimple( Int_t nParticles,
9fa64edc 35 ConstructionMethod m=kEmpty,
36 TF1* ptDist=NULL,
37 Double_t phiMin=0.0,
bc231a12 38 Double_t phiMax=TMath::TwoPi(),
39 Double_t etaMin=-1.0,
40 Double_t etaMax= 1.0 );
929098e4 41 AliFlowEventSimple(TTree* anInput, const AliFlowTrackSimpleCuts* rpCuts, const AliFlowTrackSimpleCuts* poiCuts);
e35ddff0 42 AliFlowEventSimple(const AliFlowEventSimple& anEvent);
43 AliFlowEventSimple& operator=(const AliFlowEventSimple& anEvent);
f1d945a1 44 virtual ~AliFlowEventSimple();
c076fda8 45
46 Bool_t IsFolder() const {return kTRUE;};
29195b69 47 void Browse(TBrowser *b);
48 void Print(Option_t* option = "") const; //method to print stats
f1d945a1 49
929098e4 50 Int_t NumberOfTracks() const { return fNumberOfTracks; }
df23c5ae 51 Int_t GetReferenceMultiplicity() const { return fReferenceMultiplicity; }
52 void SetReferenceMultiplicity( Int_t m ) { fReferenceMultiplicity = m; }
8fa6a5fa
MK
53 Int_t GetEventNSelTracksRP() const { return fNumberOfFlowTags[0]; }
54 void SetEventNSelTracksRP(Int_t nr) { fNumberOfFlowTags[0] = nr; }
55 Int_t GetEventNSelTracksPOI() const { return fNumberOfFlowTags[0]; }
56 void SetEventNSelTracksPOI(Int_t np) { fNumberOfFlowTags[0] = np; }
57 Int_t GetNumberOfRPs() const { return fNumberOfFlowTags[0]; }
58 void SetNumberOfRPs( Int_t nr ) { fNumberOfFlowTags[0]=nr; }
59 Int_t GetNumberOfPOIs(Int_t i=1) const { return (i<fNumberOfFlowTagClasses)?fNumberOfFlowTags[i]:0; }
60 void SetNumberOfPOIs( Int_t np, Int_t tagClass=1 );
61 void IncrementNumberOfPOIs(Int_t poiType);
62 void SetNumberOfFlowTagClasses(Int_t n);
8d1c89ad 63
64 void SetUseGlauberMCSymmetryPlanes() { fUseGlauberMCSymmetryPlanes = kTRUE; }
65 void SetUseExternalSymmetryPlanes(TF1 *gPsi1Psi3 = 0x0,
66 TF1 *gPsi2Psi4 = 0x0,
67 TF1 *gPsi3Psi5 = 0x0);
68 void SetPsi1(Double_t gPsi1) { fPsi1 = gPsi1; }
69 void SetPsi2(Double_t gPsi2) { fPsi2 = gPsi2; }
70 void SetPsi3(Double_t gPsi3) { fPsi3 = gPsi3; }
71 void SetPsi4(Double_t gPsi4) { fPsi4 = gPsi4; }
72 void SetPsi5(Double_t gPsi5) { fPsi5 = gPsi5; }
73 Double_t GetPsi1() const { return fPsi1; }
74 Double_t GetPsi2() const { return fPsi2; }
75 Double_t GetPsi3() const { return fPsi3; }
76 Double_t GetPsi4() const { return fPsi4; }
77 Double_t GetPsi5() const { return fPsi5; }
78
929098e4 79 Double_t GetMCReactionPlaneAngle() const { return fMCReactionPlaneAngle; }
80 void SetMCReactionPlaneAngle(Double_t fPhiRP) { fMCReactionPlaneAngle=fPhiRP; fMCReactionPlaneAngleIsSet=kTRUE; }
124fb262 81 Bool_t IsSetMCReactionPlaneAngle() const { return fMCReactionPlaneAngleIsSet; }
bc231a12 82 void SetAfterBurnerPrecision(Double_t p) { fAfterBurnerPrecision=p; }
83 Double_t GetAfterBurnerPrecision() const { return fAfterBurnerPrecision; }
9fa64edc 84 void SetUserModified(Bool_t s=kTRUE) { fUserModified=s; }
85 Bool_t IsUserModified() const { return fUserModified; }
ad4d7e4e 86 void SetShuffleTracks(Bool_t b) {fShuffleTracks=b;}
ba4dd29f 87 void ShuffleTracks();
929098e4 88
7382279b 89 void ResolutionPt(Double_t res);
940a5ed1 90 void TagSubeventsInEta(Double_t etaMinA, Double_t etaMaxA, Double_t etaMinB, Double_t etaMaxB );
076df7bf 91 void TagSubeventsByCharge();
cc0afcfc 92 void TagRP(const AliFlowTrackSimpleCuts* cuts );
8fa6a5fa 93 void TagPOI(const AliFlowTrackSimpleCuts* cuts, Int_t poiType=0);
929098e4 94 void CloneTracks(Int_t n);
bc231a12 95 void AddV1( Double_t v1 );
244c607a 96 void AddV2( Double_t v2 );
54089829 97 void AddV3( Double_t v3 );
bc231a12 98 void AddV4( Double_t v4 );
1a80f9f6 99 void AddV5( Double_t v5 );
100 void AddFlow( Double_t v1, Double_t v2, Double_t v3, Double_t v4, Double_t v5 );
101 void AddFlow(Double_t v1, Double_t v2, Double_t v3, Double_t v4, Double_t v5,
102 Double_t rp1, Double_t rp2, Double_t rp3, Double_t rp4, Double_t rp5 );
99ff691b 103 void AddV2( TF1* ptDepV2 );
34b15925 104 void DefineDeadZone( Double_t etaMin, Double_t etaMax, Double_t phiMin, Double_t phiMax );
105 Int_t CleanUpDeadTracks();
7d27a354 106 void ClearFast();
26c4cbb9 107
99ff691b 108 static TF1* SimplePtSpectrum();
109 static TF1* SimplePtDepV2();
110
f1d945a1 111 AliFlowTrackSimple* GetTrack(Int_t i);
7382279b 112 void AddTrack( AliFlowTrackSimple* track );
8fa6a5fa 113 void TrackAdded();
7b5556ef 114 AliFlowTrackSimple* MakeNewTrack();
03a02aca 115
86a97121 116 virtual AliFlowVector GetQ(Int_t n=2, TList *weightsList=NULL, Bool_t usePhiWeights=kFALSE, Bool_t usePtWeights=kFALSE, Bool_t useEtaWeights=kFALSE);
117 virtual void Get2Qsub(AliFlowVector* Qarray, Int_t n=2, TList *weightsList=NULL, Bool_t usePhiWeights=kFALSE, Bool_t usePtWeights=kFALSE, Bool_t useEtaWeights=kFALSE);
395fadba 118
8fa6a5fa
MK
119 void SetCentrality(Double_t c) {fCentrality=c;}
120 Double_t GetCentrality() const {return fCentrality;}
121
7382279b 122 protected:
9fa64edc 123 virtual void Generate( Int_t nParticles,
124 TF1* ptDist=NULL,
125 Double_t phiMin=0.0,
126 Double_t phiMax=TMath::TwoPi(),
127 Double_t etaMin=-1.0,
128 Double_t etaMax= 1.0 );
129
7d27a354 130 //data members
bc231a12 131 TObjArray* fTrackCollection; //-> collection of tracks
7d27a354 132 Int_t fReferenceMultiplicity; // reference multiplicity
929098e4 133 Int_t fNumberOfTracks; // number of tracks
8d1c89ad 134 Bool_t fUseGlauberMCSymmetryPlanes;// Use symmetry planes (Glauber MC)
135 Bool_t fUseExternalSymmetryPlanes; // Use symmetry planes (external)
136 Double_t fPsi1; // Psi_1
137 Double_t fPsi2; // Psi_2
138 Double_t fPsi3; // Psi_3
139 Double_t fPsi4; // Psi_4
140 Double_t fPsi5; // Psi_5
141 TF1* fPsi1Psi3; // Correlation between Psi_1 and Psi_3
142 TF1* fPsi2Psi4; // Correlation between Psi_2 and Psi_4
143 TF1* fPsi3Psi5; // Correlation between Psi_3 and Psi_5
929098e4 144 Double_t fMCReactionPlaneAngle; // the angle of the reaction plane from the MC truth
145 Bool_t fMCReactionPlaneAngleIsSet; // did we set it from MC?
bc231a12 146 Double_t fAfterBurnerPrecision; // iteration precision in afterburner
9fa64edc 147 Bool_t fUserModified; // did we modify the event in any way (afterburner etc) ?
929098e4 148 TParameter<Int_t>* fNumberOfTracksWrap; //! number of tracks in TBrowser
bc231a12 149 TParameter<Int_t>* fNumberOfRPsWrap; //! number of tracks that have passed the RP selection in TBrowser
8fa6a5fa 150 TParameter<Int_t>* fNumberOfFlowTagsWrap; //! number of tracks that have passed the POI selection in TBrowser
bc231a12 151 TParameter<Double_t>* fMCReactionPlaneAngleWrap; //! the angle of the reaction plane from the MC truth in TBrowser
ad4d7e4e 152 Int_t* fShuffledIndexes; //! placeholder for randomized indexes
153 Bool_t fShuffleTracks; // do we shuffle tracks on get?
8fa6a5fa
MK
154 TObjArray* fMothersCollection; //!cache the particles with daughters
155 Double_t fCentrality; //centrality
156
157 private:
158 Int_t fNumberOfFlowTagClasses; // how many different flow particle types do we have? (RP,POI,POI_2,...)
159 Int_t* fNumberOfFlowTags; //[fNumberOfFlowTagClasses] number of tracks that have passed the POI selection
29195b69 160
bc231a12 161 ClassDef(AliFlowEventSimple,1)
f1d945a1 162};
163
164#endif
5fef318d 165
166