]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG/FLOW/Base/AliFlowTrackSimple.h
Merge remote-tracking branch 'origin/master' into TPCdev
[u/mrichter/AliRoot.git] / PWG / FLOW / Base / AliFlowTrackSimple.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
e1911c19 5#ifndef ALIFLOWTRACKSIMPLE_H
6#define ALIFLOWTRACKSIMPLE_H
f1d945a1 7
bc231a12 8#include "TObject.h"
f1d945a1 9#include "TBits.h"
929098e4 10class TParticle;
f1d945a1 11
12// AliFlowTrackSimple:
13// A simple track class to the the AliFlowEventSimple for flow analysis
14// author: N. van der Kolk (kolk@nikhef.nl)
929098e4 15// mods: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch)
f1d945a1 16
bc231a12 17class AliFlowTrackSimple: public TObject {
f1d945a1 18
244c607a 19public:
5c8e53c4 20 enum poiTypes { kInvalid=-1,
8eca5d19 21 kRP=0,
22 kPOI=1,
23 kPOI1=2,
24 kPOI2=3,
25 };
26
f1d945a1 27 AliFlowTrackSimple();
701f71c1 28 AliFlowTrackSimple(TParticle* p);
bc6b015e 29 AliFlowTrackSimple(const AliFlowTrackSimple& aTrack);
59327657 30 AliFlowTrackSimple& operator=(const AliFlowTrackSimple& aTrack);
f1d945a1 31 virtual ~AliFlowTrackSimple();
bc231a12 32 virtual AliFlowTrackSimple* Clone(const char* option="") const;
f1d945a1 33
c076fda8 34 Bool_t IsFolder() const {return kTRUE;};
35 // void Browse(TBrowser *b);
bc231a12 36 virtual void Print(Option_t* option = "") const;
c076fda8 37
7d27a354 38 void Set(TParticle* p);
39
f1d945a1 40 Double_t Eta() const;
41 Double_t Pt() const;
44e060e0 42 Double_t Phi() const;
43 Double_t Weight() const;
701f71c1 44 Int_t Charge() const;
60875c3c 45 Double_t Mass() const;
b4dba88d 46 Int_t PID() const {return 0;}
701f71c1 47
34b15925 48 Bool_t InRPSelection() const;
8fa6a5fa
MK
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);
34b15925 52 Bool_t InSubevent(Int_t i) const;
8fa6a5fa
MK
53 void TagRP(Bool_t b=kTRUE) {SetForRPSelection(b);}
54 void TagPOI(Bool_t b=kTRUE) {SetForPOISelection(b);}
5c8e53c4
MK
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);}
8fa6a5fa 57 void SetForSubevent(Int_t i);
5c8e53c4 58 void ResetPOItype() {fPOItype.ResetAllBits();}
8fa6a5fa 59 void ResetSubEventTags() {fSubEventBits.ResetAllBits();}
5c8e53c4 60 Bool_t IsDead() const {return (fPOItype.CountBits()==0);}
b125a454 61
f1d945a1 62 void SetEta(Double_t eta);
63 void SetPt(Double_t pt);
64 void SetPhi(Double_t phi);
44e060e0 65 void SetWeight(Double_t weight);
701f71c1 66 void SetCharge(Int_t charge);
60875c3c 67 void SetMass(Double_t mass);
7382279b 68 void SetForRPSelection(Bool_t b=kTRUE);
69 void SetForPOISelection(Bool_t b=kTRUE);
8fa6a5fa 70 virtual void Clear(Option_t* o="");
7382279b 71
72 void ResolutionPt(Double_t resolution);
73
bc231a12 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 );
bff213ad 82 void AddV3( Double_t v3,
83 Double_t reactionPlaneAngle,
84 Double_t precision,
85 Int_t maxNumberOfIterations=100 );
bc231a12 86 void AddV4( Double_t v4,
87 Double_t reactionPlaneAngle,
88 Double_t precision,
89 Int_t maxNumberOfIterations=100 );
1a80f9f6 90 void AddV5( Double_t v5,
91 Double_t reactionPlaneAngle,
92 Double_t precision,
93 Int_t maxNumberOfIterations=100 );
bc231a12 94 void AddFlow( Double_t v1,
95 Double_t v2,
bff213ad 96 Double_t v3,
bc231a12 97 Double_t v4,
98 Double_t reactionPlaneAngle,
99 Double_t precision,
100 Int_t maxNumberOfIterations=100 );
1a80f9f6 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
5c8e53c4
MK
122 const TBits* GetPOItype() const {return &fPOItype;}
123 const TBits* GetFlowBits() const {return GetPOItype();}
44e060e0 124
41dc4195 125 void SetID(Int_t i) {fID=i;}
cc0afcfc 126 Int_t GetID() const {return fID;}
6e214c87 127
8fa6a5fa
MK
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
f1d945a1 134 private:
60875c3c 135 AliFlowTrackSimple(Double_t phi, Double_t eta, Double_t pt, Double_t weight, Int_t charge, Double_t mass=-1);
44e060e0 136 Double_t fEta; // eta
137 Double_t fPt; // pt
138 Double_t fPhi; // phi
139 Double_t fTrackWeight; // weight
5c8e53c4 140 Int_t fCharge; //charge
60875c3c 141 Double_t fMass; // mass
5c8e53c4 142 TBits fPOItype; // bits to set if track is selected
44e060e0 143 TBits fSubEventBits;// bits to set if track is selected for a subevent
41dc4195 144 Int_t fID; // Unique track ID, point back to the ESD track
f1d945a1 145
60875c3c 146 ClassDef(AliFlowTrackSimple,2) // macro for rootcint
f1d945a1 147
148};
149
701f71c1 150//Getters
f1d945a1 151inline Double_t AliFlowTrackSimple::Eta() const {
88e00a8a 152 return this->fEta; }
f1d945a1 153inline Double_t AliFlowTrackSimple::Pt() const {
88e00a8a 154 return this->fPt;}
f1d945a1 155inline Double_t AliFlowTrackSimple::Phi() const {
88e00a8a 156 return this->fPhi; }
44e060e0 157inline Double_t AliFlowTrackSimple::Weight() const {
158 return this->fTrackWeight; }
701f71c1 159inline Int_t AliFlowTrackSimple::Charge() const {
160 return this->fCharge; }
60875c3c 161inline Double_t AliFlowTrackSimple::Mass() const {
162 return this->fMass; }
b125a454 163//TBits
1918addd 164inline Bool_t AliFlowTrackSimple::InRPSelection() const {
5c8e53c4 165 return fPOItype.TestBitNumber(kRP); }
8fa6a5fa 166inline Bool_t AliFlowTrackSimple::InPOISelection(Int_t poiType) const {
5c8e53c4 167 return fPOItype.TestBitNumber(poiType); }
8fa6a5fa 168inline Bool_t AliFlowTrackSimple::IsPOItype(Int_t poiType) const {
5c8e53c4 169 return fPOItype.TestBitNumber(poiType); }
b125a454 170inline Bool_t AliFlowTrackSimple::InSubevent(Int_t i) const {
171 return this->fSubEventBits.TestBitNumber(i); }
f1d945a1 172
701f71c1 173//Setters
f1d945a1 174inline void AliFlowTrackSimple::SetEta(Double_t val) {
175 fEta = val; }
176inline void AliFlowTrackSimple::SetPt(Double_t val) {
177 fPt = val; }
f1d945a1 178inline void AliFlowTrackSimple::SetPhi(Double_t val) {
179 fPhi = val; }
44e060e0 180inline void AliFlowTrackSimple::SetWeight(Double_t val) {
181 fTrackWeight = val; }
701f71c1 182inline void AliFlowTrackSimple::SetCharge(Int_t val) {
183 fCharge = val; }
60875c3c 184inline void AliFlowTrackSimple::SetMass(Double_t val) {
185 fMass = val; }
8fa6a5fa
MK
186
187 //TBits
1918addd 188inline void AliFlowTrackSimple::SetForRPSelection(Bool_t val) {
5c8e53c4 189 fPOItype.SetBitNumber(kRP,val); }
1918addd 190inline void AliFlowTrackSimple::SetForPOISelection(Bool_t val) {
5c8e53c4 191 fPOItype.SetBitNumber(kPOI,val); }
b125a454 192inline void AliFlowTrackSimple::SetForSubevent(Int_t i) {
193 fSubEventBits.SetBitNumber(i,kTRUE); }
194
8fa6a5fa 195inline void AliFlowTrackSimple::SetPOItype(Int_t poiType, Bool_t b) {
5c8e53c4 196 fPOItype.SetBitNumber(poiType,b); }
8fa6a5fa 197
f1d945a1 198#endif
199