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 {
21 AliFlowTrackSimple(TParticle* p);
22 AliFlowTrackSimple(const AliFlowTrackSimple& aTrack);
23 virtual AliFlowTrackSimple& operator=(const AliFlowTrackSimple& aTrack);
24 virtual ~AliFlowTrackSimple();
25 virtual AliFlowTrackSimple* Clone(const char* option="") const;
27 Bool_t IsFolder() const {return kTRUE;};
28 // void Browse(TBrowser *b);
29 virtual void Print(Option_t* option = "") const;
34 Double_t Weight() const;
38 Bool_t InRPSelection() const;
39 Bool_t InPOISelection() const;
40 Bool_t InSubevent(Int_t i) const;
41 Bool_t IsDead() const {return (fFlowBits.CountBits()==0);}
43 void SetEta(Double_t eta);
44 void SetPt(Double_t pt);
45 void SetPhi(Double_t phi);
46 void SetWeight(Double_t weight);
47 void SetCharge(Int_t charge);
48 void SetForRPSelection(Bool_t b=kTRUE);
49 void SetForPOISelection(Bool_t b=kTRUE);
50 void SetForSubevent(Int_t i);
51 void ResetFlowTags() {fFlowBits.ResetAllBits();}
52 void ResetSubEventTags() {fSubEventBits.ResetAllBits();}
54 void ResolutionPt(Double_t resolution);
56 void AddV1( Double_t v1,
57 Double_t reactionPlaneAngle,
59 Int_t maxNumberOfIterations=100 );
60 void AddV2( Double_t v2,
61 Double_t reactionPlaneAngle,
63 Int_t maxNumberOfIterations=100 );
64 void AddV4( Double_t v4,
65 Double_t reactionPlaneAngle,
67 Int_t maxNumberOfIterations=100 );
68 void AddFlow( Double_t v1,
71 Double_t reactionPlaneAngle,
73 Int_t maxNumberOfIterations=100 );
75 const TBits* GetFlowBits() const {return &fFlowBits;}
78 AliFlowTrackSimple(Double_t phi, Double_t eta, Double_t pt, Double_t weight, Int_t charge);
82 Double_t fTrackWeight; // weight
83 Int_t fCharge; //charge
84 TBits fFlowBits; // bits to set if track is selected
85 TBits fSubEventBits;// bits to set if track is selected for a subevent
87 ClassDef(AliFlowTrackSimple,1) // macro for rootcint
92 inline Double_t AliFlowTrackSimple::Eta() const {
94 inline Double_t AliFlowTrackSimple::Pt() const {
96 inline Double_t AliFlowTrackSimple::Phi() const {
98 inline Double_t AliFlowTrackSimple::Weight() const {
99 return this->fTrackWeight; }
100 inline Int_t AliFlowTrackSimple::Charge() const {
101 return this->fCharge; }
103 inline Bool_t AliFlowTrackSimple::InRPSelection() const {
104 return this->fFlowBits.TestBitNumber(0); }
105 inline Bool_t AliFlowTrackSimple::InPOISelection() const {
106 return this->fFlowBits.TestBitNumber(1); }
107 inline Bool_t AliFlowTrackSimple::InSubevent(Int_t i) const {
108 return this->fSubEventBits.TestBitNumber(i); }
111 inline void AliFlowTrackSimple::SetEta(Double_t val) {
113 inline void AliFlowTrackSimple::SetPt(Double_t val) {
115 inline void AliFlowTrackSimple::SetPhi(Double_t val) {
117 inline void AliFlowTrackSimple::SetWeight(Double_t val) {
118 fTrackWeight = val; }
119 inline void AliFlowTrackSimple::SetCharge(Int_t val) {
122 inline void AliFlowTrackSimple::SetForRPSelection(Bool_t val) {
123 fFlowBits.SetBitNumber(0,val); }
124 inline void AliFlowTrackSimple::SetForPOISelection(Bool_t val) {
125 fFlowBits.SetBitNumber(1,val); }
126 inline void AliFlowTrackSimple::SetForSubevent(Int_t i) {
127 fSubEventBits.SetBitNumber(i,kTRUE); }