Mods for K0 and D0 flow
[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);
59327657 23 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 );
bff213ad 67 void AddV3( Double_t v3,
68 Double_t reactionPlaneAngle,
69 Double_t precision,
70 Int_t maxNumberOfIterations=100 );
bc231a12 71 void AddV4( Double_t v4,
72 Double_t reactionPlaneAngle,
73 Double_t precision,
74 Int_t maxNumberOfIterations=100 );
75 void AddFlow( Double_t v1,
76 Double_t v2,
bff213ad 77 Double_t v3,
bc231a12 78 Double_t v4,
79 Double_t reactionPlaneAngle,
80 Double_t precision,
81 Int_t maxNumberOfIterations=100 );
b125a454 82
34b15925 83 const TBits* GetFlowBits() const {return &fFlowBits;}
44e060e0 84
41dc4195 85 void SetID(Int_t i) {fID=i;}
86 Int_t GetID() {return fID;}
6e214c87 87
f1d945a1 88 private:
701f71c1 89 AliFlowTrackSimple(Double_t phi, Double_t eta, Double_t pt, Double_t weight, Int_t charge);
44e060e0 90 Double_t fEta; // eta
91 Double_t fPt; // pt
92 Double_t fPhi; // phi
93 Double_t fTrackWeight; // weight
701f71c1 94 Int_t fCharge; //charge
44e060e0 95 TBits fFlowBits; // bits to set if track is selected
96 TBits fSubEventBits;// bits to set if track is selected for a subevent
41dc4195 97 Int_t fID; // Unique track ID, point back to the ESD track
f1d945a1 98
1c1d4332 99 ClassDef(AliFlowTrackSimple,1) // macro for rootcint
f1d945a1 100
101};
102
701f71c1 103//Getters
f1d945a1 104inline Double_t AliFlowTrackSimple::Eta() const {
88e00a8a 105 return this->fEta; }
f1d945a1 106inline Double_t AliFlowTrackSimple::Pt() const {
88e00a8a 107 return this->fPt;}
f1d945a1 108inline Double_t AliFlowTrackSimple::Phi() const {
88e00a8a 109 return this->fPhi; }
44e060e0 110inline Double_t AliFlowTrackSimple::Weight() const {
111 return this->fTrackWeight; }
701f71c1 112inline Int_t AliFlowTrackSimple::Charge() const {
113 return this->fCharge; }
b125a454 114//TBits
1918addd 115inline Bool_t AliFlowTrackSimple::InRPSelection() const {
116 return this->fFlowBits.TestBitNumber(0); }
117inline Bool_t AliFlowTrackSimple::InPOISelection() const {
118 return this->fFlowBits.TestBitNumber(1); }
b125a454 119inline Bool_t AliFlowTrackSimple::InSubevent(Int_t i) const {
120 return this->fSubEventBits.TestBitNumber(i); }
f1d945a1 121
701f71c1 122//Setters
f1d945a1 123inline void AliFlowTrackSimple::SetEta(Double_t val) {
124 fEta = val; }
125inline void AliFlowTrackSimple::SetPt(Double_t val) {
126 fPt = val; }
f1d945a1 127inline void AliFlowTrackSimple::SetPhi(Double_t val) {
128 fPhi = val; }
44e060e0 129inline void AliFlowTrackSimple::SetWeight(Double_t val) {
130 fTrackWeight = val; }
701f71c1 131inline void AliFlowTrackSimple::SetCharge(Int_t val) {
132 fCharge = val; }
b125a454 133//TBits
1918addd 134inline void AliFlowTrackSimple::SetForRPSelection(Bool_t val) {
f1d945a1 135 fFlowBits.SetBitNumber(0,val); }
1918addd 136inline void AliFlowTrackSimple::SetForPOISelection(Bool_t val) {
f1d945a1 137 fFlowBits.SetBitNumber(1,val); }
b125a454 138inline void AliFlowTrackSimple::SetForSubevent(Int_t i) {
139 fSubEventBits.SetBitNumber(i,kTRUE); }
140
f1d945a1 141#endif
142