1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
5 #ifndef ALIFLOWTRACKSIMPLE_H
6 #define ALIFLOWTRACKSIMPLE_H
12 // AliFlowTrackSimple:
13 // A simple track class to the the AliFlowEventSimple for flow analysis
14 // author: N. van der Kolk (kolk@nikhef.nl)
15 // mods: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch)
17 class AliFlowTrackSimple: public TObject {
20 enum tagType { kInvalid=-1,
28 AliFlowTrackSimple(TParticle* p);
29 AliFlowTrackSimple(const AliFlowTrackSimple& aTrack);
30 AliFlowTrackSimple& operator=(const AliFlowTrackSimple& aTrack);
31 virtual ~AliFlowTrackSimple();
32 virtual AliFlowTrackSimple* Clone(const char* option="") const;
34 Bool_t IsFolder() const {return kTRUE;};
35 // void Browse(TBrowser *b);
36 virtual void Print(Option_t* option = "") const;
38 void Set(TParticle* p);
43 Double_t Weight() const;
45 Double_t Mass() const;
46 Int_t PID() const {return 0;}
48 Bool_t InRPSelection() const;
49 Bool_t InPOISelection(Int_t poiType=1) const;
50 Bool_t IsPOItype(Int_t poiType) const;
51 void SetPOItype(Int_t poiType, Bool_t b=kTRUE);
52 Bool_t InSubevent(Int_t i) const;
53 void TagRP(Bool_t b=kTRUE) {SetForRPSelection(b);}
54 void TagPOI(Bool_t b=kTRUE) {SetForPOISelection(b);}
55 void Tag(Int_t n, Bool_t b=kTRUE) {fFlowBits.SetBitNumber(n,b);}
56 Bool_t CheckTag(Int_t n) {return fFlowBits.TestBitNumber(n);}
57 void SetForSubevent(Int_t i);
58 void ResetFlowTags() {fFlowBits.ResetAllBits();}
59 void ResetSubEventTags() {fSubEventBits.ResetAllBits();}
60 Bool_t IsDead() const {return (fFlowBits.CountBits()==0);}
62 void SetEta(Double_t eta);
63 void SetPt(Double_t pt);
64 void SetPhi(Double_t phi);
65 void SetWeight(Double_t weight);
66 void SetCharge(Int_t charge);
67 void SetMass(Double_t mass);
68 void SetForRPSelection(Bool_t b=kTRUE);
69 void SetForPOISelection(Bool_t b=kTRUE);
70 virtual void Clear(Option_t* o="");
72 void ResolutionPt(Double_t resolution);
74 void AddV1( Double_t v1,
75 Double_t reactionPlaneAngle,
77 Int_t maxNumberOfIterations=100 );
78 void AddV2( Double_t v2,
79 Double_t reactionPlaneAngle,
81 Int_t maxNumberOfIterations=100 );
82 void AddV3( Double_t v3,
83 Double_t reactionPlaneAngle,
85 Int_t maxNumberOfIterations=100 );
86 void AddV4( Double_t v4,
87 Double_t reactionPlaneAngle,
89 Int_t maxNumberOfIterations=100 );
90 void AddV5( Double_t v5,
91 Double_t reactionPlaneAngle,
93 Int_t maxNumberOfIterations=100 );
94 void AddFlow( Double_t v1,
98 Double_t reactionPlaneAngle,
100 Int_t maxNumberOfIterations=100 );
101 void AddFlow( Double_t v1,
106 Double_t reactionPlaneAngle,
108 Int_t maxNumberOfIterations=100 );
109 void AddFlow( Double_t v1,
120 Int_t maxNumberOfIterations=100 );
122 const TBits* GetFlowBits() const {return &fFlowBits;}
124 void SetID(Int_t i) {fID=i;}
125 Int_t GetID() const {return fID;}
127 virtual Int_t GetNDaughters() const {return 0;}
128 virtual void AddDaughter(Int_t /*value*/) {}
129 virtual Int_t GetIDDaughter(Int_t /*value*/) const {return 0;}
130 virtual void SetDaughter(Int_t /*value*/, AliFlowTrackSimple* /*track*/) {}
131 virtual AliFlowTrackSimple *GetDaughter(Int_t /*value*/) const {return NULL;}
134 AliFlowTrackSimple(Double_t phi, Double_t eta, Double_t pt, Double_t weight, Int_t charge, Double_t mass=-1);
135 Double_t fEta; // eta
137 Double_t fPhi; // phi
138 Double_t fTrackWeight; // weight
139 Int_t fCharge; //charge
140 Double_t fMass; // mass
141 TBits fFlowBits; // bits to set if track is selected
142 TBits fSubEventBits;// bits to set if track is selected for a subevent
143 Int_t fID; // Unique track ID, point back to the ESD track
145 ClassDef(AliFlowTrackSimple,2) // macro for rootcint
150 inline Double_t AliFlowTrackSimple::Eta() const {
152 inline Double_t AliFlowTrackSimple::Pt() const {
154 inline Double_t AliFlowTrackSimple::Phi() const {
156 inline Double_t AliFlowTrackSimple::Weight() const {
157 return this->fTrackWeight; }
158 inline Int_t AliFlowTrackSimple::Charge() const {
159 return this->fCharge; }
160 inline Double_t AliFlowTrackSimple::Mass() const {
161 return this->fMass; }
163 inline Bool_t AliFlowTrackSimple::InRPSelection() const {
164 return fFlowBits.TestBitNumber(kRP); }
165 inline Bool_t AliFlowTrackSimple::InPOISelection(Int_t poiType) const {
166 return fFlowBits.TestBitNumber(poiType); }
167 inline Bool_t AliFlowTrackSimple::IsPOItype(Int_t poiType) const {
168 return fFlowBits.TestBitNumber(poiType); }
169 inline Bool_t AliFlowTrackSimple::InSubevent(Int_t i) const {
170 return this->fSubEventBits.TestBitNumber(i); }
173 inline void AliFlowTrackSimple::SetEta(Double_t val) {
175 inline void AliFlowTrackSimple::SetPt(Double_t val) {
177 inline void AliFlowTrackSimple::SetPhi(Double_t val) {
179 inline void AliFlowTrackSimple::SetWeight(Double_t val) {
180 fTrackWeight = val; }
181 inline void AliFlowTrackSimple::SetCharge(Int_t val) {
183 inline void AliFlowTrackSimple::SetMass(Double_t val) {
187 inline void AliFlowTrackSimple::SetForRPSelection(Bool_t val) {
188 fFlowBits.SetBitNumber(kRP,val); }
189 inline void AliFlowTrackSimple::SetForPOISelection(Bool_t val) {
190 fFlowBits.SetBitNumber(kPOI,val); }
191 inline void AliFlowTrackSimple::SetForSubevent(Int_t i) {
192 fSubEventBits.SetBitNumber(i,kTRUE); }
194 inline void AliFlowTrackSimple::SetPOItype(Int_t poiType, Bool_t b) {
195 fFlowBits.SetBitNumber(poiType,b); }