]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FLOW/AliFlowCommon/AliFlowTrackSimple.h
e2ff59345763641a6bb77697eead1753091ecc0c
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowCommon / AliFlowTrackSimple.h
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 "TNamed.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 TNamed {
18
19 public:
20   AliFlowTrackSimple();
21   AliFlowTrackSimple(const TParticle* p);
22   AliFlowTrackSimple(const AliFlowTrackSimple& aTrack);
23   AliFlowTrackSimple(Double_t phi, Double_t eta, Double_t pt);
24   AliFlowTrackSimple& operator=(const AliFlowTrackSimple& aTrack);
25   virtual  ~AliFlowTrackSimple();
26   
27   Bool_t  IsFolder() const {return kTRUE;};
28   //  void Browse(TBrowser *b); 
29   //  void Print(Option_t* option = "") const;      //method to print stats
30  
31
32   Double_t Eta() const; 
33   Double_t Pt()  const; 
34   Double_t Phi() const; 
35   TBits    GetFlowBits() const;
36   Bool_t   InRPSelection() const; 
37   Bool_t   InPOISelection() const; 
38   Bool_t   InSubevent(Int_t i) const;
39       
40   void SetEta(Double_t eta);
41   void SetPt(Double_t pt); 
42   void SetPhi(Double_t phi);
43   void SetForRPSelection(Bool_t b=kTRUE); 
44   void SetForPOISelection(Bool_t b=kTRUE); 
45   void SetForSubevent(Int_t i); 
46   
47   void ResolutionPt(Double_t resolution);
48
49   void AddV2( Double_t v2, Double_t reactionPlaneAngle,
50                 Double_t precision, Int_t maxNumberOfIterations=100 );
51     
52  private:
53   Double_t fEta;    // eta
54   Double_t fPt;     // pt
55   Double_t fPhi;    // phi
56   TBits fFlowBits;  // bits to set if track is selected
57   TBits fSubEventBits;  // bits to set if track is selected for a subevent
58
59   ClassDef(AliFlowTrackSimple,1)                 // macro for rootcint
60
61 };
62
63 inline Double_t AliFlowTrackSimple::Eta() const { 
64   return this->fEta; }
65 inline Double_t AliFlowTrackSimple::Pt() const {  
66   //  cout << "Returned pt:" << fPt << endl; 
67   return this->fPt;}
68 inline Double_t AliFlowTrackSimple::Phi() const { 
69   return this->fPhi; }
70 //TBits
71 inline TBits AliFlowTrackSimple::GetFlowBits() const { 
72   return this->fFlowBits; }
73 inline Bool_t AliFlowTrackSimple::InRPSelection() const { 
74   return this->fFlowBits.TestBitNumber(0); }
75 inline Bool_t AliFlowTrackSimple::InPOISelection() const { 
76   return this->fFlowBits.TestBitNumber(1); }
77 inline Bool_t AliFlowTrackSimple::InSubevent(Int_t i) const { 
78   return this->fSubEventBits.TestBitNumber(i); }
79
80 inline void AliFlowTrackSimple::SetEta(Double_t val) {
81   fEta = val; }
82 inline void AliFlowTrackSimple::SetPt(Double_t val) {
83   fPt = val; }
84   //  cout << "pt set to:" << fPt << endl;}
85 inline void AliFlowTrackSimple::SetPhi(Double_t val) {
86   fPhi = val; }
87 //TBits
88 inline void AliFlowTrackSimple::SetForRPSelection(Bool_t val) {
89   fFlowBits.SetBitNumber(0,val); }
90 inline void AliFlowTrackSimple::SetForPOISelection(Bool_t val) {
91   fFlowBits.SetBitNumber(1,val); }
92 inline void AliFlowTrackSimple::SetForSubevent(Int_t i) {
93   fSubEventBits.SetBitNumber(i,kTRUE); }
94
95 #endif
96