AliPhysics  defa9f6 (defa9f6)
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 ITStype() const;
47  Int_t PID() const {return 0;}
48 
49  Bool_t InRPSelection() const;
50  Bool_t InPOISelection(Int_t poiType=1) const;
51  Bool_t IsPOItype(Int_t poiType) const;
52  void SetPOItype(Int_t poiType, Bool_t b=kTRUE);
53  Bool_t InSubevent(Int_t i) const;
54  void TagRP(Bool_t b=kTRUE) {SetForRPSelection(b);}
55  void TagPOI(Bool_t b=kTRUE) {SetForPOISelection(b);}
56  void Tag(Int_t n, Bool_t b=kTRUE) {fPOItype.SetBitNumber(n,b);}
57  Bool_t CheckTag(Int_t n) {return fPOItype.TestBitNumber(n);}
58  void SetForSubevent(Int_t i);
59  void ResetPOItype() {fPOItype.ResetAllBits();}
60  void ResetSubEventTags() {fSubEventBits.ResetAllBits();}
61  Bool_t IsDead() const {return (fPOItype.CountBits()==0);}
62 
63  void SetEta(Double_t eta);
64  void SetPt(Double_t pt);
65  void SetPhi(Double_t phi);
66  void SetWeight(Double_t weight);
67  void SetCharge(Int_t charge);
68  void SetMass(Double_t mass);
69  void SetITStype(Int_t val);
70  void SetForRPSelection(Bool_t b=kTRUE);
71  void SetForPOISelection(Bool_t b=kTRUE);
72  virtual void Clear(Option_t* o="");
73 
74  void ResolutionPt(Double_t resolution);
75 
76  void AddV1( Double_t v1,
77  Double_t reactionPlaneAngle,
78  Double_t precision,
79  Int_t maxNumberOfIterations=100 );
80  void AddV2( Double_t v2,
81  Double_t reactionPlaneAngle,
82  Double_t precision,
83  Int_t maxNumberOfIterations=100 );
84  void AddV3( Double_t v3,
85  Double_t reactionPlaneAngle,
86  Double_t precision,
87  Int_t maxNumberOfIterations=100 );
88  void AddV4( Double_t v4,
89  Double_t reactionPlaneAngle,
90  Double_t precision,
91  Int_t maxNumberOfIterations=100 );
92  void AddV5( Double_t v5,
93  Double_t reactionPlaneAngle,
94  Double_t precision,
95  Int_t maxNumberOfIterations=100 );
96  void AddFlow( Double_t v1,
97  Double_t v2,
98  Double_t v3,
99  Double_t v4,
100  Double_t reactionPlaneAngle,
101  Double_t precision,
102  Int_t maxNumberOfIterations=100 );
103  void AddFlow( Double_t v1,
104  Double_t v2,
105  Double_t v3,
106  Double_t v4,
107  Double_t v5,
108  Double_t reactionPlaneAngle,
109  Double_t precision,
110  Int_t maxNumberOfIterations=100 );
111  void AddFlow( Double_t v1,
112  Double_t v2,
113  Double_t v3,
114  Double_t v4,
115  Double_t v5,
116  Double_t rp1,
117  Double_t rp2,
118  Double_t rp3,
119  Double_t rp4,
120  Double_t rp5,
121  Double_t precision,
122  Int_t maxNumberOfIterations=100 );
123 
124  const TBits* GetPOItype() const {return &fPOItype;}
125  const TBits* GetFlowBits() const {return GetPOItype();}
126 
127  void SetID(Int_t i) {fID=i;}
128  Int_t GetID() const {return fID;}
129 
130  virtual Int_t GetNDaughters() const {return 0;}
131  virtual void AddDaughter(Int_t /*value*/) {}
132  virtual Int_t GetIDDaughter(Int_t /*value*/) const {return 0;}
133  virtual void SetDaughter(Int_t /*value*/, AliFlowTrackSimple* /*track*/) {}
134  virtual AliFlowTrackSimple *GetDaughter(Int_t /*value*/) const {return NULL;}
135 
136  private:
137  AliFlowTrackSimple(Double_t phi, Double_t eta, Double_t pt, Double_t weight, Int_t charge, Double_t mass=-1);
138  Double_t fEta; // eta
139  Double_t fPt; // pt
140  Double_t fPhi; // phi
142  Int_t fCharge; //charge
143  Double_t fMass; // mass
144  TBits fPOItype; // bits to set if track is selected
145  TBits fSubEventBits;// bits to set if track is selected for a subevent
146  Int_t fID; // Unique track ID, point back to the ESD track
147  Int_t fITStype; // ITS hits identifier (test purpose only)
148 
149  ClassDef(AliFlowTrackSimple,2) // macro for rootcint
150 
151 };
152 
153 //Getters
155  return this->fEta; }
157  return this->fPt;}
159  return this->fPhi; }
161  return this->fTrackWeight; }
163  return this->fCharge; }
165  return this->fMass; }
167  return this->fITStype; }
168 //TBits
170  return fPOItype.TestBitNumber(kRP); }
172  return fPOItype.TestBitNumber(poiType); }
174  return fPOItype.TestBitNumber(poiType); }
176  return this->fSubEventBits.TestBitNumber(i); }
177 
178 //Setters
180  fEta = val; }
182  fPt = val; }
184  fPhi = val; }
186  fTrackWeight = val; }
188  fCharge = val; }
190  fMass = val; }
192  fITStype = val; }
193 
194  //TBits
196  fPOItype.SetBitNumber(kRP,val); }
198  fPOItype.SetBitNumber(kPOI,val); }
200  fSubEventBits.SetBitNumber(i,kTRUE); }
201 
202 inline void AliFlowTrackSimple::SetPOItype(Int_t poiType, Bool_t b) {
203  fPOItype.SetBitNumber(poiType,b); }
204 
205 #endif
206 
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)
Int_t ITStype() const
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 SetITStype(Int_t val)
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="")