]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FLOW/AliFlowCommon/AliFlowTrackSimple.h
Bug fix (Chiara, Sergey)
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowCommon / 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:
f1d945a1 20 AliFlowTrackSimple();
701f71c1 21 AliFlowTrackSimple(TParticle* p);
bc6b015e 22 AliFlowTrackSimple(const AliFlowTrackSimple& aTrack);
bc231a12 23 virtual AliFlowTrackSimple& operator=(const AliFlowTrackSimple& aTrack);
f1d945a1 24 virtual ~AliFlowTrackSimple();
bc231a12 25 virtual AliFlowTrackSimple* Clone(const char* option="") const;
f1d945a1 26
c076fda8 27 Bool_t IsFolder() const {return kTRUE;};
28 // void Browse(TBrowser *b);
bc231a12 29 virtual void Print(Option_t* option = "") const;
c076fda8 30
f1d945a1 31 Double_t Eta() const;
32 Double_t Pt() const;
44e060e0 33 Double_t Phi() const;
34 Double_t Weight() const;
701f71c1 35 Int_t Charge() const;
b4dba88d 36 Int_t PID() const {return 0;}
701f71c1 37
34b15925 38
39 Bool_t InRPSelection() const;
40 Bool_t InPOISelection() const;
41 Bool_t InSubevent(Int_t i) const;
42 Bool_t IsDead() const {return (fFlowBits.CountBits()==0);}
b125a454 43
f1d945a1 44 void SetEta(Double_t eta);
45 void SetPt(Double_t pt);
46 void SetPhi(Double_t phi);
44e060e0 47 void SetWeight(Double_t weight);
701f71c1 48 void SetCharge(Int_t charge);
7382279b 49 void SetForRPSelection(Bool_t b=kTRUE);
50 void SetForPOISelection(Bool_t b=kTRUE);
b4dba88d 51 void TagRP(Bool_t b=kTRUE) {SetForRPSelection(b);}
52 void TagPOI(Bool_t b=kTRUE) {SetForPOISelection(b);}
b125a454 53 void SetForSubevent(Int_t i);
34b15925 54 void ResetFlowTags() {fFlowBits.ResetAllBits();}
55 void ResetSubEventTags() {fSubEventBits.ResetAllBits();}
7382279b 56
57 void ResolutionPt(Double_t resolution);
58
bc231a12 59 void AddV1( Double_t v1,
60 Double_t reactionPlaneAngle,
61 Double_t precision,
62 Int_t maxNumberOfIterations=100 );
63 void AddV2( Double_t v2,
64 Double_t reactionPlaneAngle,
65 Double_t precision,
66 Int_t maxNumberOfIterations=100 );
67 void AddV4( Double_t v4,
68 Double_t reactionPlaneAngle,
69 Double_t precision,
70 Int_t maxNumberOfIterations=100 );
71 void AddFlow( Double_t v1,
72 Double_t v2,
73 Double_t v4,
74 Double_t reactionPlaneAngle,
75 Double_t precision,
76 Int_t maxNumberOfIterations=100 );
b125a454 77
34b15925 78 const TBits* GetFlowBits() const {return &fFlowBits;}
44e060e0 79
f1d945a1 80 private:
701f71c1 81 AliFlowTrackSimple(Double_t phi, Double_t eta, Double_t pt, Double_t weight, Int_t charge);
44e060e0 82 Double_t fEta; // eta
83 Double_t fPt; // pt
84 Double_t fPhi; // phi
85 Double_t fTrackWeight; // weight
701f71c1 86 Int_t fCharge; //charge
44e060e0 87 TBits fFlowBits; // bits to set if track is selected
88 TBits fSubEventBits;// bits to set if track is selected for a subevent
f1d945a1 89
1c1d4332 90 ClassDef(AliFlowTrackSimple,1) // macro for rootcint
f1d945a1 91
92};
93
701f71c1 94//Getters
f1d945a1 95inline Double_t AliFlowTrackSimple::Eta() const {
88e00a8a 96 return this->fEta; }
f1d945a1 97inline Double_t AliFlowTrackSimple::Pt() const {
88e00a8a 98 return this->fPt;}
f1d945a1 99inline Double_t AliFlowTrackSimple::Phi() const {
88e00a8a 100 return this->fPhi; }
44e060e0 101inline Double_t AliFlowTrackSimple::Weight() const {
102 return this->fTrackWeight; }
701f71c1 103inline Int_t AliFlowTrackSimple::Charge() const {
104 return this->fCharge; }
b125a454 105//TBits
1918addd 106inline Bool_t AliFlowTrackSimple::InRPSelection() const {
107 return this->fFlowBits.TestBitNumber(0); }
108inline Bool_t AliFlowTrackSimple::InPOISelection() const {
109 return this->fFlowBits.TestBitNumber(1); }
b125a454 110inline Bool_t AliFlowTrackSimple::InSubevent(Int_t i) const {
111 return this->fSubEventBits.TestBitNumber(i); }
f1d945a1 112
701f71c1 113//Setters
f1d945a1 114inline void AliFlowTrackSimple::SetEta(Double_t val) {
115 fEta = val; }
116inline void AliFlowTrackSimple::SetPt(Double_t val) {
117 fPt = val; }
f1d945a1 118inline void AliFlowTrackSimple::SetPhi(Double_t val) {
119 fPhi = val; }
44e060e0 120inline void AliFlowTrackSimple::SetWeight(Double_t val) {
121 fTrackWeight = val; }
701f71c1 122inline void AliFlowTrackSimple::SetCharge(Int_t val) {
123 fCharge = val; }
b125a454 124//TBits
1918addd 125inline void AliFlowTrackSimple::SetForRPSelection(Bool_t val) {
f1d945a1 126 fFlowBits.SetBitNumber(0,val); }
1918addd 127inline void AliFlowTrackSimple::SetForPOISelection(Bool_t val) {
f1d945a1 128 fFlowBits.SetBitNumber(1,val); }
b125a454 129inline void AliFlowTrackSimple::SetForSubevent(Int_t i) {
130 fSubEventBits.SetBitNumber(i,kTRUE); }
131
f1d945a1 132#endif
133