]>
Commit | Line | Data |
---|---|---|
6b91e8c0 | 1 | #ifndef ALIANALYSISTASKB2_H |
2 | #define ALIANALYSISTASKB2_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | // Analysis task for B2 | |
8 | // author: Eulogio Serradilla <eulogio.serradilla@cern.ch> | |
9 | ||
10 | #include <AliAnalysisTask.h> | |
6b91e8c0 | 11 | |
12 | class AliESDtrack; | |
13 | class AliMCEvent; | |
14 | class AliESDEvent; | |
15 | class TString; | |
16 | class AliESDtrackCuts; | |
17 | class AliLnHistoMap; | |
18 | class AliLnID; | |
19 | class TParticle; | |
68a84436 | 20 | class TList; |
2b4e5f2c | 21 | class TProfile; |
6b91e8c0 | 22 | |
23 | class AliAnalysisTaskB2: public AliAnalysisTask | |
24 | { | |
25 | public: | |
26 | AliAnalysisTaskB2(); | |
27 | AliAnalysisTaskB2(const char* name); | |
28 | ||
29 | virtual ~AliAnalysisTaskB2(); | |
30 | ||
31 | virtual void ConnectInputData(Option_t *); | |
32 | virtual void CreateOutputObjects(); | |
33 | virtual void Exec(Option_t* option); | |
34 | virtual void Terminate(Option_t *); | |
35 | ||
36 | void SetV0ANDtrigger(Bool_t flag=1) { fV0AND = flag; } | |
37 | void SetNoFastOnlyTrigger(Bool_t flag=1) { fNoFastOnly = flag; } | |
dc8b5f72 | 38 | void SetNtrkMultTrigger(Bool_t flag=1) { fNtrkMultTrigger = flag; } |
6b91e8c0 | 39 | void SetKNOmultInterval(Double_t min, Double_t max) { fMinKNOmult = min; fMaxKNOmult = max; } |
40 | void SetCentralityInterval(Double_t min, Double_t max) { fMinCentrality = min; fMaxCentrality = max; } | |
41 | ||
42 | void SetMeanNtrk(Double_t mean) { fMeanNtrk = mean; } | |
43 | ||
44 | void SetVertexXInterval(Double_t min, Double_t max) { fMinVx = min; fMaxVx = max; } | |
45 | void SetVertexYInterval(Double_t min, Double_t max) { fMinVy = min; fMaxVy = max; } | |
46 | void SetVertexZInterval(Double_t min, Double_t max) { fMinVz = min; fMaxVz = max; } | |
47 | ||
48 | void SetDCAxyInterval(Double_t min, Double_t max) { fMinDCAxy = min; fMaxDCAxy = max; } | |
49 | void SetDCAzInterval(Double_t min, Double_t max) { fMinDCAz = min; fMaxDCAz = max; } | |
50 | void SetMaxNSigmaToVertex(Double_t max ) { fMaxNSigma = max; } | |
51 | ||
52 | void SetEtaInterval(Double_t min, Double_t max) { fMinEta = min; fMaxEta = max; } | |
53 | void SetRapidityInterval(Double_t min, Double_t max) { fMinY = min; fMaxY = max; } | |
54 | ||
55 | void SetSimulation(Bool_t flag = kTRUE) { fSimulation = flag; } | |
56 | void SetHeavyIons(Bool_t flag = kTRUE) { fHeavyIons = flag; } | |
57 | ||
2b4e5f2c | 58 | void SetMomentumCorrection(Bool_t flag = kTRUE) { fMomentumCorrection = flag; } |
59 | void SetMomentumCorrectionProfile(TProfile* pfx) { fMoCpfx = pfx; } | |
60 | ||
6b91e8c0 | 61 | void SetHistogramMap(AliLnHistoMap* map) { fHistoMap = map; } |
62 | ||
5ad23888 | 63 | void SetESDtrackCuts(AliESDtrackCuts* esdTrackCuts) {fTrackCuts = esdTrackCuts; } |
6b91e8c0 | 64 | |
65 | void SetPID(AliLnID* lnID) { fLnID = lnID; } | |
66 | void SetMaxNSigmaITS(Double_t max) { fMaxNSigmaITS = max; } | |
67 | void SetMaxNSigmaTPC(Double_t max) { fMaxNSigmaTPC = max; } | |
68 | void SetMaxNSigmaTOF(Double_t max) { fMaxNSigmaTOF = max; } | |
69 | ||
70 | void SetTOFmatch(Bool_t flag = kTRUE) { fTOFmatch = flag; } | |
71 | Bool_t AcceptTOFtrack(const AliESDtrack* trk) const; | |
72 | ||
1cb68411 | 73 | void SetM2Interval(Double_t min, Double_t max) { fMinM2 = min; fMaxM2 = max; }; |
74 | ||
6b91e8c0 | 75 | void SetParticleSpecies(const TString& species); |
76 | ||
77 | private: | |
78 | ||
79 | AliAnalysisTaskB2(const AliAnalysisTaskB2& other); | |
80 | AliAnalysisTaskB2& operator=(const AliAnalysisTaskB2& other); | |
81 | ||
82 | AliLnHistoMap* CreateHistograms(); | |
83 | ||
84 | Int_t GetParticles(); | |
85 | Int_t GetTracks(); | |
86 | ||
87 | Bool_t IsV0AND() const; | |
88 | Bool_t IsFastOnly(UInt_t triggerBits) const; | |
89 | Bool_t IsMB(UInt_t triggerBits) const; | |
90 | ||
6b91e8c0 | 91 | TParticle* GetParticle(const AliESDtrack* trk) const; |
92 | ||
77dac0a6 | 93 | Int_t GetChargedMultiplicity(Double_t maxEta) const; |
6b91e8c0 | 94 | |
95 | Bool_t IsFakeTrack(const AliESDtrack* trk) const; | |
96 | Bool_t IsPhysicalPrimary(const TParticle* prt) const; | |
97 | Bool_t IsFromMaterial(const TParticle* prt) const; | |
98 | Bool_t IsFromWeakDecay(const TParticle* prt) const; | |
99 | ||
100 | Double_t GetSign(TParticle* prt) const; | |
101 | ||
102 | Double_t GetPhi(const AliESDtrack* trk) const; | |
103 | Double_t GetTheta(const AliESDtrack* trk) const; | |
d4ddb53b | 104 | Double_t GetRapidity(Double_t p, Double_t pz, Double_t m) const; |
6b91e8c0 | 105 | Double_t GetITSmomentum(const AliESDtrack* trk) const; |
106 | Double_t GetTOFmomentum(const AliESDtrack* trk) const; | |
107 | Double_t GetBeta(const AliESDtrack* trk) const; | |
5ad23888 | 108 | Double_t GetMassSquared(Double_t p, Double_t beta) const; |
6b91e8c0 | 109 | Double_t GetTimeOfFlight(const AliESDtrack* trk) const; |
110 | Double_t GetITSchi2PerCluster(const AliESDtrack* trk) const; | |
111 | Int_t GetITSnClusters(const AliESDtrack* trk) const; | |
112 | Int_t GetITSnPointsPID(const AliESDtrack* trk) const; | |
113 | ||
114 | Int_t GetPidCode(const TString& species) const; | |
115 | ||
2b4e5f2c | 116 | Double_t GetMomentumCorrection(Double_t ptrec) const; |
117 | ||
067aa49d | 118 | Double_t GetM2Difference(Double_t beta, Double_t p, Double_t m) const; |
119 | Double_t GetExpectedTime(const AliESDtrack* trk, Double_t m) const; | |
5b88d60e | 120 | |
6b91e8c0 | 121 | private: |
122 | ||
123 | TString fSpecies; // particle species for the analysis | |
124 | Int_t fPartCode; // particle species code | |
125 | ||
126 | Bool_t fHeavyIons; // analysis of heavy ions data | |
127 | Bool_t fSimulation; // analysis of MC simulation | |
128 | ||
dc8b5f72 | 129 | Bool_t fMultTriggerFired; //! track multiplicity trigger flag |
130 | Bool_t fCentTriggerFired; //! centrality trigger flag | |
6b91e8c0 | 131 | Bool_t fTriggerFired; //! trigger flag |
132 | Bool_t fGoodVertex; //! good vertex flag | |
133 | Bool_t fPileUpEvent; //! pile-up flag | |
134 | ||
135 | Bool_t fV0AND; // V0AND trigger flag | |
136 | Bool_t fNoFastOnly; // No kFastOnly trigger flag | |
dc8b5f72 | 137 | Bool_t fNtrkMultTrigger; // enable combined multiplicity trigger |
6b91e8c0 | 138 | Double_t fMinKNOmult; // minimum KNO track multiplicity scaling |
139 | Double_t fMaxKNOmult; // maximum KNO track multiplicity scaling | |
140 | Double_t fMinCentrality; // minimum centrality for HI | |
141 | Double_t fMaxCentrality; // maximum centrality for HI | |
142 | ||
ec499c6d | 143 | Double_t fNch; //! current charged multipicity |
6b91e8c0 | 144 | Double_t fNtrk; //! current track multipicity |
145 | Double_t fMeanNtrk; // average track multiplicity | |
146 | Double_t fKNOmult; //! KNO track multiplicity scaling | |
147 | ||
148 | Double_t fMinVx; // vertex low X value | |
149 | Double_t fMaxVx; // vertex high X value | |
150 | Double_t fMinVy; // vertex low Y value | |
151 | Double_t fMaxVy; // vertex high Y value | |
152 | Double_t fMinVz; // vertex low Z value | |
153 | Double_t fMaxVz; // vertex high Z value | |
154 | ||
155 | Double_t fMinDCAxy; // minimum DCAxy | |
156 | Double_t fMaxDCAxy; // maximum DCAxy | |
157 | Double_t fMinDCAz; // minimum DCAz | |
158 | Double_t fMaxDCAz; // maximum DCAz | |
159 | Double_t fMaxNSigma; // maximum number of sigmas to primary vertex | |
160 | ||
161 | Double_t fMinEta; // minimum pseudorapidity | |
162 | Double_t fMaxEta; // maximum pseudorapidity | |
163 | Double_t fMinY; // minimum rapidity | |
164 | Double_t fMaxY; // maximum rapidity | |
165 | ||
166 | AliMCEvent* fMCevent; //! monte carlo event | |
167 | AliESDEvent* fESDevent; //! ESD event | |
168 | ||
68a84436 | 169 | TList* fOutputContainer; // output container |
6b91e8c0 | 170 | AliLnHistoMap* fHistoMap; // histogram map (defined somewhere else) |
5ad23888 | 171 | AliESDtrackCuts* fTrackCuts; // track cuts (defined somewhere else) |
6b91e8c0 | 172 | AliLnID* fLnID; // PID for light nuclei (defined somewhere else) |
173 | ||
174 | Double_t fMaxNSigmaITS; // maximum number of sigmas to dEdx in the ITS | |
175 | Double_t fMaxNSigmaTPC; // maximum number of sigmas to dEdx in the TPC | |
176 | Double_t fMaxNSigmaTOF; // maximum number of sigmas to dEdx in the TOF | |
177 | ||
178 | class AliTriggerAnalysis* fTrigAna; //! to access trigger information | |
179 | class AliESDpid* fESDpid; //! ESD pid | |
180 | Bool_t fIsPidOwner; // whether we own fESDpid | |
181 | Int_t fTimeZeroType; // time zero type | |
182 | ||
183 | Bool_t fTOFmatch; // TOF match flag | |
184 | ||
1cb68411 | 185 | Double_t fMinM2; // minimum m2 for TPC+TOF pid |
186 | Double_t fMaxM2; // maximum m2 for TPC+TOF pid | |
187 | ||
2b4e5f2c | 188 | Bool_t fMomentumCorrection; // enable momentum correction |
189 | TProfile* fMoCpfx; // momentum correction from simulation | |
190 | ||
6b91e8c0 | 191 | ClassDef(AliAnalysisTaskB2, 1) |
192 | }; | |
193 | ||
194 | #endif // ALIANALYSISTASKB2_H |