AliPhysics  1c9c77b (1c9c77b)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliFlowTrackSimple.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 #ifndef ALIFLOWTRACKSIMPLE_H
6 #define ALIFLOWTRACKSIMPLE_H
7 
8 #include "TObject.h"
9 #include "TBits.h"
10 class TParticle;
11 
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)
16 
17 class AliFlowTrackSimple: public TObject {
18 
19 public:
20  enum poiTypes { kInvalid=-1,
21  kRP=0,
22  kPOI=1,
23  kPOI1=2,
24  kPOI2=3,
25  };
26 
28  AliFlowTrackSimple(TParticle* p);
31  virtual ~AliFlowTrackSimple();
32  virtual AliFlowTrackSimple* Clone(const char* option="") const;
33 
34  Bool_t IsFolder() const {return kTRUE;};
35  // void Browse(TBrowser *b);
36  virtual void Print(Option_t* option = "") const;
37 
38  void Set(TParticle* p);
39 
40  Double_t Eta() const;
41  Double_t Pt() const;
42  Double_t Phi() const;
43  Double_t Weight() const;
44  Int_t Charge() const;
45  Double_t Mass() const;
46  Int_t PID() const {return 0;}
47 
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) {fPOItype.SetBitNumber(n,b);}
56  Bool_t CheckTag(Int_t n) {return fPOItype.TestBitNumber(n);}
57  void SetForSubevent(Int_t i);
58  void ResetPOItype() {fPOItype.ResetAllBits();}
59  void ResetSubEventTags() {fSubEventBits.ResetAllBits();}
60  Bool_t IsDead() const {return (fPOItype.CountBits()==0);}
61 
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="");
71 
72  void ResolutionPt(Double_t resolution);
73 
74  void AddV1( Double_t v1,
75  Double_t reactionPlaneAngle,
76  Double_t precision,
77  Int_t maxNumberOfIterations=100 );
78  void AddV2( Double_t v2,
79  Double_t reactionPlaneAngle,
80  Double_t precision,
81  Int_t maxNumberOfIterations=100 );
82  void AddV3( Double_t v3,
83  Double_t reactionPlaneAngle,
84  Double_t precision,
85  Int_t maxNumberOfIterations=100 );
86  void AddV4( Double_t v4,
87  Double_t reactionPlaneAngle,
88  Double_t precision,
89  Int_t maxNumberOfIterations=100 );
90  void AddV5( Double_t v5,
91  Double_t reactionPlaneAngle,
92  Double_t precision,
93  Int_t maxNumberOfIterations=100 );
94  void AddFlow( Double_t v1,
95  Double_t v2,
96  Double_t v3,
97  Double_t v4,
98  Double_t reactionPlaneAngle,
99  Double_t precision,
100  Int_t maxNumberOfIterations=100 );
101  void AddFlow( Double_t v1,
102  Double_t v2,
103  Double_t v3,
104  Double_t v4,
105  Double_t v5,
106  Double_t reactionPlaneAngle,
107  Double_t precision,
108  Int_t maxNumberOfIterations=100 );
109  void AddFlow( Double_t v1,
110  Double_t v2,
111  Double_t v3,
112  Double_t v4,
113  Double_t v5,
114  Double_t rp1,
115  Double_t rp2,
116  Double_t rp3,
117  Double_t rp4,
118  Double_t rp5,
119  Double_t precision,
120  Int_t maxNumberOfIterations=100 );
121 
122  const TBits* GetPOItype() const {return &fPOItype;}
123  const TBits* GetFlowBits() const {return GetPOItype();}
124 
125  void SetID(Int_t i) {fID=i;}
126  Int_t GetID() const {return fID;}
127 
128  virtual Int_t GetNDaughters() const {return 0;}
129  virtual void AddDaughter(Int_t /*value*/) {}
130  virtual Int_t GetIDDaughter(Int_t /*value*/) const {return 0;}
131  virtual void SetDaughter(Int_t /*value*/, AliFlowTrackSimple* /*track*/) {}
132  virtual AliFlowTrackSimple *GetDaughter(Int_t /*value*/) const {return NULL;}
133 
134  private:
136  Double_t fEta; // eta
137  Double_t fPt; // pt
138  Double_t fPhi; // phi
140  Int_t fCharge; //charge
141  Double_t fMass; // mass
142  TBits fPOItype; // bits to set if track is selected
143  TBits fSubEventBits;// bits to set if track is selected for a subevent
144  Int_t fID; // Unique track ID, point back to the ESD track
145 
146  ClassDef(AliFlowTrackSimple,2) // macro for rootcint
147 
148 };
149 
150 //Getters
152  return this->fEta; }
154  return this->fPt;}
156  return this->fPhi; }
158  return this->fTrackWeight; }
160  return this->fCharge; }
162  return this->fMass; }
163 //TBits
165  return fPOItype.TestBitNumber(kRP); }
167  return fPOItype.TestBitNumber(poiType); }
169  return fPOItype.TestBitNumber(poiType); }
171  return this->fSubEventBits.TestBitNumber(i); }
172 
173 //Setters
175  fEta = val; }
177  fPt = val; }
179  fPhi = val; }
181  fTrackWeight = val; }
183  fCharge = val; }
185  fMass = val; }
186 
187  //TBits
189  fPOItype.SetBitNumber(kRP,val); }
191  fPOItype.SetBitNumber(kPOI,val); }
193  fSubEventBits.SetBitNumber(i,kTRUE); }
194 
195 inline void AliFlowTrackSimple::SetPOItype(Int_t poiType, Bool_t b) {
196  fPOItype.SetBitNumber(poiType,b); }
197 
198 #endif
199 
void SetCharge(Int_t charge)
Int_t charge
void SetForSubevent(Int_t i)
void SetPOItype(Int_t poiType, Bool_t b=kTRUE)
virtual void SetDaughter(Int_t, AliFlowTrackSimple *)
const TBits * GetFlowBits() const
double Double_t
Definition: External.C:58
void SetEta(Double_t eta)
virtual void Print(Option_t *option="") const
virtual void AddDaughter(Int_t)
virtual Int_t GetNDaughters() const
void AddV1(Double_t v1, Double_t reactionPlaneAngle, Double_t precision, Int_t maxNumberOfIterations=100)
Bool_t InSubevent(Int_t i) const
void AddV5(Double_t v5, Double_t reactionPlaneAngle, Double_t precision, Int_t maxNumberOfIterations=100)
Double_t mass
virtual AliFlowTrackSimple * Clone(const char *option="") const
void SetMass(Double_t mass)
virtual Int_t GetIDDaughter(Int_t) const
void Set(TParticle *p)
Double_t Mass() const
void TagRP(Bool_t b=kTRUE)
Bool_t InRPSelection() const
const TBits * GetPOItype() const
void SetForRPSelection(Bool_t b=kTRUE)
Double_t Phi() const
int Int_t
Definition: External.C:63
void TagPOI(Bool_t b=kTRUE)
void AddV4(Double_t v4, Double_t reactionPlaneAngle, Double_t precision, Int_t maxNumberOfIterations=100)
Bool_t CheckTag(Int_t n)
AliFlowTrackSimple & operator=(const AliFlowTrackSimple &aTrack)
void Tag(Int_t n, Bool_t b=kTRUE)
Bool_t IsDead() const
void ResolutionPt(Double_t resolution)
void SetPhi(Double_t phi)
void SetPt(Double_t pt)
void AddV2(Double_t v2, 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 reactionPlaneAngle, Double_t precision, Int_t maxNumberOfIterations=100)
void SetWeight(Double_t weight)
void AddV3(Double_t v3, Double_t reactionPlaneAngle, Double_t precision, Int_t maxNumberOfIterations=100)
Double_t Pt() const
void SetForPOISelection(Bool_t b=kTRUE)
Double_t Weight() const
virtual AliFlowTrackSimple * GetDaughter(Int_t) const
Bool_t IsFolder() const
Bool_t IsPOItype(Int_t poiType) const
const char Option_t
Definition: External.C:48
Bool_t InPOISelection(Int_t poiType=1) const
Double_t Eta() const
bool Bool_t
Definition: External.C:53
virtual void Clear(Option_t *o="")