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(const TParticle* p);
22 AliFlowTrackSimple(const AliFlowTrackSimple& aTrack);
23 AliFlowTrackSimple(Double_t phi, Double_t eta, Double_t pt, Double_t weight);
24 virtual AliFlowTrackSimple& operator=(const AliFlowTrackSimple& aTrack);
25 virtual ~AliFlowTrackSimple();
26 virtual AliFlowTrackSimple* Clone(const char* option="") const;
28 Bool_t IsFolder() const {return kTRUE;};
29 // void Browse(TBrowser *b);
30 virtual void Print(Option_t* option = "") const;
35 Double_t Weight() const;
37 Bool_t InRPSelection() const;
38 Bool_t InPOISelection() const;
39 Bool_t InSubevent(Int_t i) const;
40 Bool_t IsDead() const {return (fFlowBits.CountBits()==0);}
42 void SetEta(Double_t eta);
43 void SetPt(Double_t pt);
44 void SetPhi(Double_t phi);
45 void SetWeight(Double_t weight);
46 void SetForRPSelection(Bool_t b=kTRUE);
47 void SetForPOISelection(Bool_t b=kTRUE);
48 void SetForSubevent(Int_t i);
49 void ResetFlowTags() {fFlowBits.ResetAllBits();}
50 void ResetSubEventTags() {fSubEventBits.ResetAllBits();}
52 void ResolutionPt(Double_t resolution);
54 void AddV1( Double_t v1,
55 Double_t reactionPlaneAngle,
57 Int_t maxNumberOfIterations=100 );
58 void AddV2( Double_t v2,
59 Double_t reactionPlaneAngle,
61 Int_t maxNumberOfIterations=100 );
62 void AddV4( Double_t v4,
63 Double_t reactionPlaneAngle,
65 Int_t maxNumberOfIterations=100 );
66 void AddFlow( Double_t v1,
69 Double_t reactionPlaneAngle,
71 Int_t maxNumberOfIterations=100 );
73 const TBits* GetFlowBits() const {return &fFlowBits;}
79 Double_t fTrackWeight; // weight
80 TBits fFlowBits; // bits to set if track is selected
81 TBits fSubEventBits;// bits to set if track is selected for a subevent
83 ClassDef(AliFlowTrackSimple,1) // macro for rootcint
88 inline Double_t AliFlowTrackSimple::Eta() const {
90 inline Double_t AliFlowTrackSimple::Pt() const {
92 inline Double_t AliFlowTrackSimple::Phi() const {
94 inline Double_t AliFlowTrackSimple::Weight() const {
95 return this->fTrackWeight; }
97 inline Bool_t AliFlowTrackSimple::InRPSelection() const {
98 return this->fFlowBits.TestBitNumber(0); }
99 inline Bool_t AliFlowTrackSimple::InPOISelection() const {
100 return this->fFlowBits.TestBitNumber(1); }
101 inline Bool_t AliFlowTrackSimple::InSubevent(Int_t i) const {
102 return this->fSubEventBits.TestBitNumber(i); }
105 inline void AliFlowTrackSimple::SetEta(Double_t val) {
107 inline void AliFlowTrackSimple::SetPt(Double_t val) {
109 inline void AliFlowTrackSimple::SetPhi(Double_t val) {
111 inline void AliFlowTrackSimple::SetWeight(Double_t val) {
112 fTrackWeight = val; }
114 inline void AliFlowTrackSimple::SetForRPSelection(Bool_t val) {
115 fFlowBits.SetBitNumber(0,val); }
116 inline void AliFlowTrackSimple::SetForPOISelection(Bool_t val) {
117 fFlowBits.SetBitNumber(1,val); }
118 inline void AliFlowTrackSimple::SetForSubevent(Int_t i) {
119 fSubEventBits.SetBitNumber(i,kTRUE); }