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