]>
Commit | Line | Data |
---|---|---|
9777bfcb | 1 | ////////////////////////////////////////////////////////////////////// |
2 | // | |
448e8856 | 3 | // $Id: AliFlowMaker.h 18618 2007-05-16 15:38:22Z snelling $ |
9777bfcb | 4 | // |
5 | // Author: Emanuele Simili | |
6 | // | |
7 | ////////////////////////////////////////////////////////////////////// | |
8 | // | |
9 | // Description: parser class from AliESD to AliFlowEvent . | |
4e566f2f | 10 | // Nothing else to say at this point, but 3 lines of comments must be |
11 | // there (at least) to make the code checker happy. I hope now is ok! | |
9777bfcb | 12 | // |
13 | ////////////////////////////////////////////////////////////////////// | |
14 | ||
15 | #ifndef ALIFLOWMAKER_H | |
16 | #define ALIFLOWMAKER_H | |
17 | ||
da5aa0a0 | 18 | #include <vector> |
19 | using namespace std; //required for resolving the 'cout' symbol | |
20 | ||
9777bfcb | 21 | class AliFlowEvent ; |
22 | class AliFlowTrack ; | |
23 | class AliFlowV0 ; | |
92016a03 | 24 | class TClonesArray ; |
9777bfcb | 25 | |
26 | class AliESD ; | |
27 | class AliESDVertex ; | |
28 | class AliESDtrack ; | |
29 | class AliESDv0 ; | |
30 | ||
31 | class AliFlowMaker { | |
32 | ||
33 | public: | |
4e566f2f | 34 | |
9777bfcb | 35 | AliFlowMaker(); |
36 | virtual ~AliFlowMaker(); | |
37 | ||
38 | // FLOW SPECIFIC METHODS (to fill the flowEvents) | |
39 | AliFlowEvent* FillFlowEvent(AliESD* fESD) ; // fills up evt quantities | |
40 | AliFlowTrack* FillFlowTrack(AliESDtrack* fTrack) ; // fills up track quantities (global & constrained) ; p.id. & bayesian calculation ; | |
41 | AliFlowV0* FillFlowV0(AliESDv0* fV0) ; // fills up v0 quantities ; links v0 to tracks and back ; | |
42 | ||
43 | // USEFULL METHODS | |
44 | Double_t Norm(Double_t nu[3]) ; // norm of a non-vector 3 array | |
45 | Double_t Phi(Double_t nu[3]) ; // phi of a non-vector 3 array | |
46 | Double_t Pt(Double_t nu[3]) ; // pt of a non-vector 3 array | |
47 | Double_t Eta(Double_t nu[3]) ; // eta of a non-vector 3 array | |
48 | ||
49 | // Cut METHODS | |
327288af | 50 | Bool_t CheckTrack(AliESDtrack* fTrack) const ; // checks track (applies track cuts) |
51 | Bool_t CheckV0(AliESDv0* fV0) const ; // checks v0 (dummy) | |
52 | Bool_t CheckEvent(AliESD* fESD) const ; // checks event (dummy) | |
9777bfcb | 53 | void PrintCutList() ; // prints the list of cuts |
54 | void SetNHitsCut(Int_t nHits) { fNHits = nHits ; } // exclude tracks with less than .. TPC hits | |
55 | void SetECut(Float_t eLow, Float_t eUp) { fElow = eLow ; fEup = eUp ; } // exclude tracks below and above .. GeV | |
56 | void SetLabelCut(Int_t labLo, Int_t labHi) { fLabel[0] = labLo ; fLabel[1] = labHi ; } // exclude tracks outside label interval | |
57 | ||
58 | // Get METHODS | |
327288af | 59 | Int_t GetNgoodTracks() const { return fGoodTracks ; } |
60 | Int_t GetNgoodV0s() const { return fGoodV0s ; } | |
61 | Int_t GetNgoodTracksEta() const { return fGoodTracksEta ; } | |
62 | Int_t GetNposiTracks() const { return fPosiTracks ; } | |
63 | Int_t GetNnegaTracks() const { return fNegaTracks ; } | |
64 | Int_t GetNunconstrained() const { return fUnconstrained ; } | |
65 | Int_t GetBayesian(Int_t i = 2) const { return fBayesianAll[i] ; } | |
66 | Float_t GetBayesianNorm(Int_t i = 2) const { return (Float_t)fBayesianAll[i] / (Float_t)fSumAll ; } | |
9777bfcb | 67 | |
da5aa0a0 | 68 | // Flags |
69 | void DoTracks(Bool_t dt = kTRUE) { fLoopTrks = dt ; } // loop over tracks | |
70 | void DoV0s(Bool_t dv = kTRUE) { fLoopV0s = dv ; } // loop over v0s | |
71 | ||
9777bfcb | 72 | protected: |
73 | ||
74 | // enumerators | |
75 | Int_t fEventNumber ; //! progressive enumeration of ESD events | |
76 | Int_t fTrackNumber ; //! progressive enumeration of ESD tracks | |
77 | Int_t fV0Number ; //! progressive enumeration of ESD V0 | |
78 | ||
79 | Int_t fGoodTracks ; //! enumerator for good tracks | |
80 | Int_t fGoodV0s ; //! enumerator for good v0s | |
81 | Int_t fGoodTracksEta ; //! enumerator for good tracks in the good eta range (-0.9..0.9) | |
82 | Int_t fPosiTracks ; //! enumerator for positive tracks | |
83 | Int_t fNegaTracks ; //! enumerator for negative tracks | |
84 | Int_t fUnconstrained ; //! enumerator for tracks not constrainable | |
85 | Int_t fBayesianAll[5] ; //! final particles abundance -> AliFlowEvent (see Bayesian P.Id.) | |
86 | Int_t fSumAll ; //! total particles abundance (all kind) | |
87 | ||
88 | Int_t fCutEvts ; //! total enumerator for discarded events | |
89 | Int_t fCutTrks ; //! total enumerator for discarded tracks | |
90 | Int_t fCutV0s ; //! total enumerator for discarded V0s | |
da5aa0a0 | 91 | |
92 | Int_t fCounter ; //! number of processed events | |
93 | vector<int> fMovedTr ; //! tracks wich number has been changed (for cutting away something) | |
9777bfcb | 94 | |
95 | // Flags | |
96 | Bool_t fNewAli ; //! enables the new ESD features (since AliRoot 12/2006) | |
97 | Bool_t fLoopTrks ; //! flag to loop over tracks | |
98 | Bool_t fLoopV0s ; //! flag to loop over v0s | |
99 | ||
9777bfcb | 100 | private: |
101 | ||
92016a03 | 102 | // to make the code checker happy |
103 | AliFlowMaker(const AliFlowMaker &flowMak) ; // Copy Constructor (dummy) | |
104 | AliFlowMaker &operator=(const AliFlowMaker &flowMak) ; // Assignment Operator (dummy) | |
327288af | 105 | |
9777bfcb | 106 | // ESDs |
4e566f2f | 107 | AliESD* fESD; //! "ESD event" |
9777bfcb | 108 | AliESDtrack* fTrack; //! "ESD track" |
109 | AliESDv0* fV0; //! "ESD v0" | |
110 | AliESDVertex* fVertex; //! "ESD primary vertex" | |
111 | ||
112 | Int_t fRunID; //! last run ID | |
113 | Int_t fNumberOfEvents ; //! total number of ESD events in file | |
114 | Int_t fNumberOfTracks ; //! total number of tracks in the current event | |
115 | Int_t fNumberOfV0s ; //! total number of v0s in the current event | |
116 | Float_t fMagField ; //! magnetic field from the ESD | |
117 | ||
118 | // Flow | |
119 | AliFlowEvent* fFlowEvent ; //! pointer to flow event | |
120 | AliFlowTrack* fFlowTrack; //! pointer to flow track | |
121 | AliFlowV0* fFlowV0; //! pointer to flow V0 | |
122 | ||
123 | // Tracks cuts | |
124 | Int_t fNHits; // exclude tracks with less than .. TPC hits | |
da5aa0a0 | 125 | Float_t fElow ; // exclude tracks with total Momentum < .. GeV & v0 with mass < .. GeV |
126 | Float_t fEup ; // exclude tracks with total Momentum > .. GeV | |
9777bfcb | 127 | Int_t fLabel[2] ; // exclude tracks outside label interval |
128 | ||
129 | ClassDef(AliFlowMaker,0); | |
130 | }; | |
131 | ||
132 | #endif |