]>
Commit | Line | Data |
---|---|---|
6a213b59 | 1 | #ifndef AliAnalysisVertexingHF_H |
2 | #define AliAnalysisVertexingHF_H | |
3 | /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | //------------------------------------------------------------------------- | |
7 | // Class AliAnalysisVertexingHF | |
8 | // Reconstruction of heavy-flavour decay candidates | |
9 | // | |
2ff20727 | 10 | // Origin: E.Bruna, G.E.Bruno, A.Dainese, F.Prino, R.Romita, X.M.Zhang |
b056c5e3 | 11 | // Contact: andrea.dainese@lnl.infn.it |
6a213b59 | 12 | //------------------------------------------------------------------------- |
13 | ||
14 | #include <TNamed.h> | |
6a213b59 | 15 | #include "AliESDVertex.h" |
16 | #include "AliAODRecoDecayHF.h" | |
17 | #include "AliAODRecoDecayHF2Prong.h" | |
18 | #include "AliAODRecoDecayHF3Prong.h" | |
19 | #include "AliAODRecoDecayHF4Prong.h" | |
2ff20727 | 20 | #include "AliAODRecoCascadeHF.h" |
f8fa4595 | 21 | #include "AliAnalysisFilter.h" |
6a213b59 | 22 | |
dcb444c9 | 23 | class AliESDtrack; |
24 | class AliVEvent; | |
25 | class AliAODVertex; | |
26 | ||
6a213b59 | 27 | //----------------------------------------------------------------------------- |
28 | class AliAnalysisVertexingHF : public TNamed { | |
29 | public: | |
30 | // | |
31 | AliAnalysisVertexingHF(); | |
13977a79 | 32 | AliAnalysisVertexingHF(const AliAnalysisVertexingHF& source); |
33 | AliAnalysisVertexingHF& operator=(const AliAnalysisVertexingHF& source); | |
6a213b59 | 34 | virtual ~AliAnalysisVertexingHF(); |
35 | ||
dcb444c9 | 36 | void FindCandidates(AliVEvent *event, |
37 | TClonesArray *aodVerticesHFTClArr, | |
38 | TClonesArray *aodD0toKpiTClArr, | |
39 | TClonesArray *aodJPSItoEleTClArr, | |
40 | TClonesArray *aodCharm3ProngTClArr, | |
2ff20727 | 41 | TClonesArray *aodCharm4ProngTClArr, |
dc963de9 | 42 | TClonesArray *aodDstarTClArr, |
43 | TClonesArray *aodLikeSignTClArr); | |
dcb444c9 | 44 | |
6a213b59 | 45 | void PrintStatus() const; |
b82f6d67 | 46 | void SetSecVtxWithKF() { fSecVtxWithKF=kTRUE; } |
6a213b59 | 47 | void SetD0toKpiOn() { fD0toKpi=kTRUE; } |
48 | void SetD0toKpiOff() { fD0toKpi=kFALSE; } | |
49 | void SetJPSItoEleOn() { fJPSItoEle=kTRUE; } | |
50 | void SetJPSItoEleOff() { fJPSItoEle=kFALSE; } | |
51 | void Set3ProngOn() { f3Prong=kTRUE; } | |
52 | void Set3ProngOff() { f3Prong=kFALSE; } | |
53 | void Set4ProngOn() { f4Prong=kTRUE; } | |
54 | void Set4ProngOff() { f4Prong=kFALSE; } | |
2ff20727 | 55 | void SetDstarOn() { fDstar=kTRUE; } |
56 | void SetDstarOff() { fDstar=kFALSE; } | |
dc963de9 | 57 | void SetLikeSignOn() { fLikeSign=kTRUE; } |
58 | void SetLikeSignOff() { fLikeSign=kFALSE; } | |
b056c5e3 | 59 | Bool_t GetD0toKpi() { return fD0toKpi; } |
60 | Bool_t GetJPSItoEle() { return fJPSItoEle; } | |
61 | Bool_t Get3Prong() { return f3Prong; } | |
62 | Bool_t Get4Prong() { return f4Prong; } | |
2ff20727 | 63 | Bool_t GetDstar() { return fDstar; } |
dc963de9 | 64 | Bool_t GetLikeSign() { return fLikeSign; } |
eee95e18 | 65 | void SetFindVertexForDstar(Bool_t vtx=kTRUE) { fFindVertexForDstar=vtx; } |
6a213b59 | 66 | void SetRecoPrimVtxSkippingTrks() |
67 | { fRecoPrimVtxSkippingTrks=kTRUE; fRmTrksFromPrimVtx=kFALSE;} | |
68 | void SetRmTrksFromPrimVtx() | |
69 | {fRmTrksFromPrimVtx=kTRUE; fRecoPrimVtxSkippingTrks=kFALSE; } | |
f8fa4595 | 70 | void SetTrackFilter(AliAnalysisFilter* trackF) { fTrackFilter = trackF; } |
2ff20727 | 71 | void SetTrackFilterSoftPi(AliAnalysisFilter* trackF) { fTrackFilterSoftPi = trackF; } |
dc963de9 | 72 | AliAnalysisFilter* GetTrackFilter() const { return fTrackFilter; } |
73 | AliAnalysisFilter* GetTrackFilterSoftPi() const { return fTrackFilterSoftPi; } | |
6a213b59 | 74 | void SetD0toKpiCuts(Double_t cut0=1000.,Double_t cut1=100000., |
75 | Double_t cut2=1.1,Double_t cut3=0.,Double_t cut4=0., | |
76 | Double_t cut5=100000.,Double_t cut6=100000., | |
77 | Double_t cut7=100000000.,Double_t cut8=-1.1); | |
78 | void SetD0toKpiCuts(const Double_t cuts[9]); | |
2ff20727 | 79 | void SetD0fromDstarCuts(Double_t cut0=1000.,Double_t cut1=100000., |
80 | Double_t cut2=1.1,Double_t cut3=0.,Double_t cut4=0., | |
81 | Double_t cut5=100000.,Double_t cut6=100000., | |
82 | Double_t cut7=100000000.,Double_t cut8=-1.1); | |
83 | void SetD0fromDstarCuts(const Double_t cuts[9]); | |
6a213b59 | 84 | void SetBtoJPSICuts(Double_t cut0=1000.,Double_t cut1=100000., |
85 | Double_t cut2=1.1,Double_t cut3=0.,Double_t cut4=0., | |
86 | Double_t cut5=100000.,Double_t cut6=100000., | |
87 | Double_t cut7=100000000.,Double_t cut8=-1.1); | |
88 | void SetBtoJPSICuts(const Double_t cuts[9]); | |
89 | void SetDplusCuts(Double_t cut0=1000.,Double_t cut1=0., | |
90 | Double_t cut2=0.,Double_t cut3=0.,Double_t cut4=0., | |
91 | Double_t cut5=0.,Double_t cut6=10000000000., | |
92 | Double_t cut7=0.,Double_t cut8=0., | |
93 | Double_t cut9=-1.1,Double_t cut10=0., | |
81679460 | 94 | Double_t cut11=10000000000.); |
6a213b59 | 95 | void SetDplusCuts(const Double_t cuts[12]); |
6ea608bf | 96 | void SetDsCuts(Double_t cut0=1000.,Double_t cut1=0., |
97 | Double_t cut2=0.,Double_t cut3=0.,Double_t cut4=0., | |
98 | Double_t cut5=0.,Double_t cut6=10000000000., | |
99 | Double_t cut7=0.,Double_t cut8=0., | |
100 | Double_t cut9=-1.1,Double_t cut10=0., | |
81679460 | 101 | Double_t cut11=10000000000., Double_t cut12=1000.); |
102 | void SetDsCuts(const Double_t cuts[13]); | |
6ea608bf | 103 | void SetLcCuts(Double_t cut0=1000.,Double_t cut1=0., |
104 | Double_t cut2=0.,Double_t cut3=0.,Double_t cut4=0., | |
105 | Double_t cut5=0.,Double_t cut6=10000000000., | |
106 | Double_t cut7=0.,Double_t cut8=0., | |
107 | Double_t cut9=-1.1,Double_t cut10=0., | |
81679460 | 108 | Double_t cut11=10000000000.); |
6ea608bf | 109 | void SetLcCuts(const Double_t cuts[12]); |
2ff20727 | 110 | void SetDstarCuts(Double_t cut0=1000., Double_t cut1=1000., |
111 | Double_t cut2=-1., Double_t cut3=1000., | |
112 | Double_t cut4=1.6); | |
113 | void SetDstarCuts(const Double_t cuts[5]); | |
721c0b8f | 114 | void SetD0to4ProngsCuts(Double_t cut0=1000.,Double_t cut1=100000., |
115 | Double_t cut2=0.,Double_t cut3=0.,Double_t cut4=0., | |
116 | Double_t cut5=-1.1,Double_t cut6=0., | |
117 | Double_t cut7=0.,Double_t cut8=0.); | |
118 | void SetD0to4ProngsCuts(const Double_t cuts[9]); | |
dc963de9 | 119 | const Double_t *GetD0toKpiCuts() const {return fD0toKpiCuts;} |
120 | const Double_t *GetD0fromDstarCuts() const {return fD0fromDstarCuts;} | |
121 | const Double_t *GetBtoJPSICuts() const {return fBtoJPSICuts;} | |
122 | const Double_t *GetDplusCuts() const {return fDplusCuts;} | |
123 | const Double_t *GetDsCuts() const {return fDsCuts;} | |
124 | const Double_t *GetLcCuts() const {return fLcCuts;} | |
125 | const Double_t *GetDstarCuts() const {return fDstarCuts;} | |
721c0b8f | 126 | const Double_t *GetD0to4ProngsCuts() const {return fD0to4ProngsCuts;} |
6ea608bf | 127 | |
6a213b59 | 128 | // |
129 | private: | |
130 | // | |
2ff20727 | 131 | enum { kBitDispl = 0, kBitSoftPi = 1 }; |
132 | ||
dcb444c9 | 133 | Bool_t fInputAOD; // input from AOD (kTRUE) or ESD (kFALSE) |
134 | ||
135 | Int_t *fAODMap; // map between index and ID for AOD tracks | |
136 | ||
b82f6d67 | 137 | Double_t fBzkG; // z componenent of field in kG |
138 | ||
139 | Bool_t fSecVtxWithKF; // if kTRUE use KF vertexer, else AliVertexerTracks | |
140 | ||
6a213b59 | 141 | Bool_t fRecoPrimVtxSkippingTrks; // flag for primary vertex reco on the fly |
142 | // for each candidate, w/o its daughters | |
143 | Bool_t fRmTrksFromPrimVtx; // flag for fast removal of daughters from | |
144 | // the primary vertex | |
145 | ||
146 | AliESDVertex *fV1; // primary vertex | |
147 | ||
6a213b59 | 148 | // flag to enable candidates production |
2ff20727 | 149 | Bool_t fD0toKpi; // D0->Kpi |
150 | Bool_t fJPSItoEle; // Jpsi->ee | |
151 | Bool_t f3Prong; // D+,Ds,Lc | |
152 | Bool_t f4Prong; // D0->Kpipipi | |
153 | Bool_t fDstar; // D*->D0pi | |
dc963de9 | 154 | Bool_t fLikeSign; // Like-sign pairs |
6a213b59 | 155 | |
156 | // single-track cuts | |
2ff20727 | 157 | AliAnalysisFilter *fTrackFilter; // Track Filter for displaced vertices |
158 | AliAnalysisFilter *fTrackFilterSoftPi; // Track Filter for D* soft pion | |
6a213b59 | 159 | // candidates cuts |
160 | Double_t fD0toKpiCuts[9]; // cuts on D0->Kpi candidates | |
161 | // (to be passed to AliAODRecoDecayHF2Prong::SelectD0()) | |
162 | // 0 = inv. mass half width [GeV] | |
163 | // 1 = dca [cm] | |
164 | // 2 = cosThetaStar | |
165 | // 3 = pTK [GeV/c] | |
166 | // 4 = pTPi [GeV/c] | |
167 | // 5 = d0K [cm] upper limit! | |
168 | // 6 = d0Pi [cm] upper limit! | |
169 | // 7 = d0d0 [cm^2] | |
170 | // 8 = cosThetaPoint | |
2ff20727 | 171 | Double_t fD0fromDstarCuts[9]; // cuts on D0->Kpi candidates from D* |
172 | // (to be passed to AliAODRecoCascadeHF::SelectDstar()) | |
173 | // 0 = inv. mass half width [GeV] | |
174 | // 1 = dca [cm] | |
175 | // 2 = cosThetaStar | |
176 | // 3 = pTK [GeV/c] | |
177 | // 4 = pTPi [GeV/c] | |
178 | // 5 = d0K [cm] upper limit! | |
179 | // 6 = d0Pi [cm] upper limit! | |
180 | // 7 = d0d0 [cm^2] | |
181 | // 8 = cosThetaPoint | |
6a213b59 | 182 | Double_t fBtoJPSICuts[9]; // cuts on JPSI candidates |
183 | // (to be passed to AliAODRecoDecayHF2Prong::SelectBtoJPSI()) | |
184 | // 0 = inv. mass half width [GeV] | |
185 | // 1 = dca [cm] | |
186 | // 2 = cosThetaStar (negative electron) | |
187 | // 3 = pTP [GeV/c] | |
188 | // 4 = pTN [GeV/c] | |
189 | // 5 = d0O [cm] upper limit! | |
190 | // 6 = d0N [cm] upper limit! | |
191 | // 7 = d0d0 [cm^2] | |
192 | // 8 = cosThetaPoint | |
193 | Double_t fDplusCuts[12]; // cuts on Dplus candidates | |
6ea608bf | 194 | // (to be passed to AliAODRecoDecayHF3Prong::SelectDplus()) |
6a213b59 | 195 | // 0 = inv. mass half width [GeV] |
196 | // 1 = pTK [GeV/c] | |
197 | // 2 = pTPi [GeV/c] | |
198 | // 3 = d0K [cm] lower limit! | |
199 | // 4 = d0Pi [cm] lower limit! | |
200 | // 5 = dist12 (cm) | |
201 | // 6 = sigmavert (cm) | |
202 | // 7 = dist prim-sec (cm) | |
203 | // 8 = pM=Max{pT1,pT2,pT3} (GeV/c) | |
204 | // 9 = cosThetaPoint | |
205 | // 10 = Sum d0^2 (cm^2) | |
206 | // 11 = dca cut (cm) | |
81679460 | 207 | Double_t fDsCuts[13]; // cuts on Ds candidates |
6ea608bf | 208 | // (to be passed to AliAODRecoDecayHF3Prong::SelectDs()) |
209 | // 0 = inv. mass half width [GeV] | |
210 | // 1 = pTK [GeV/c] | |
211 | // 2 = pTPi [GeV/c] | |
212 | // 3 = d0K [cm] lower limit! | |
213 | // 4 = d0Pi [cm] lower limit! | |
214 | // 5 = dist12 (cm) | |
215 | // 6 = sigmavert (cm) | |
216 | // 7 = dist prim-sec (cm) | |
217 | // 8 = pM=Max{pT1,pT2,pT3} (GeV/c) | |
218 | // 9 = cosThetaPoint | |
219 | // 10 = Sum d0^2 (cm^2) | |
220 | // 11 = dca cut (cm) | |
81679460 | 221 | // 12 = inv. mass cut arounf phi and K0* [GeV] |
222 | Double_t fLcCuts[12]; // cuts on Lambdac candidates | |
6ea608bf | 223 | // (to be passed to AliAODRecoDecayHF3Prong::SelectLc()) |
224 | // 0 = inv. mass half width [GeV] | |
225 | // 1 = pTP [GeV/c] | |
226 | // 2 = pTPi abd pTK [GeV/c] | |
227 | // 3 = d0P [cm] lower limit! | |
228 | // 4 = d0Pi and d0K [cm] lower limit! | |
229 | // 5 = dist12 (cm) | |
230 | // 6 = sigmavert (cm) | |
231 | // 7 = dist prim-sec (cm) | |
232 | // 8 = pM=Max{pT1,pT2,pT3} (GeV/c) | |
233 | // 9 = cosThetaPoint | |
234 | // 10 = Sum d0^2 (cm^2) | |
235 | // 11 = dca cut (cm) | |
2ff20727 | 236 | Double_t fDstarCuts[5]; // cuts on D* candidates |
237 | // (to be passed to AliAODRecoCascadeHF::SelectDstar()) | |
238 | // 0 = inv. mass half width of D* [GeV] | |
239 | // 1 = half width of (M_Kpipi-M_Kpi) [GeV] | |
240 | // 2 = PtMin of pi_s [GeV/c] | |
241 | // 3 = PtMax of pi_s [GeV/c] | |
242 | // 4 = theta, angle between the track of pi_s and D0 decay plane [rad] | |
243 | ||
721c0b8f | 244 | Double_t fD0to4ProngsCuts[9]; // cuts on D0->K3pi candidates |
245 | // (to be passed to AliAODRecoDecayHF4Prong::SelectD0()) | |
246 | // 0 = inv. mass half width of D0 [GeV] | |
247 | // 1 = DCA between opposite sign tracks | |
248 | // 2 = Distance between primary and two tracks vertex fDist12toPrim | |
249 | // 3 = Distance between primary and three tracks vertex fDist3toPrim | |
250 | // 4 = Distance between primary and two tracks vertex fDist4toPrim | |
251 | // 5 = Cosinus of the pointing angle | |
252 | // 6 = Transverse momentum of the D0 candidate | |
253 | // 7 = Mass Pi+Pi- = mass of the rho0 | |
254 | // 8 = PID cut (one K in the quadruplet) | |
255 | ||
eee95e18 | 256 | Bool_t fFindVertexForDstar; // reconstruct a secondary vertex or assume it's from the primary vertex |
6a213b59 | 257 | // |
dcb444c9 | 258 | void AddDaughterRefs(AliAODVertex *v,AliVEvent *event, |
259 | TObjArray *trkArray) const; | |
260 | AliAODRecoDecayHF2Prong* Make2Prong(TObjArray *twoTrackArray1,AliVEvent *event, | |
261 | AliAODVertex *secVert,Double_t dcap1n1, | |
2ff20727 | 262 | Bool_t &okD0,Bool_t &okJPSI,Bool_t &okD0fromDstar) const; |
dcb444c9 | 263 | AliAODRecoDecayHF3Prong* Make3Prong(TObjArray *threeTrackArray,AliVEvent *event, |
264 | AliAODVertex *secVert, | |
265 | Double_t dispersion, | |
266 | AliAODVertex *vertexp1n1, | |
267 | AliAODVertex *vertexp2n1, | |
268 | Double_t dcap1n1,Double_t dcap2n1,Double_t dcap1p2, | |
269 | Bool_t &ok3Prong) const; | |
270 | AliAODRecoDecayHF4Prong* Make4Prong(TObjArray *fourTrackArray,AliVEvent *event, | |
721c0b8f | 271 | AliAODVertex *secVert, |
272 | AliAODVertex *vertexp1n1, | |
273 | AliAODVertex *vertexp1n1p2, | |
274 | Double_t dcap1n1,Double_t dcap1n2, | |
275 | Double_t dcap2n1,Double_t dcap2n2, | |
276 | Bool_t &ok4Prong) const; | |
2ff20727 | 277 | AliAODRecoCascadeHF* MakeCascade(TObjArray *twoTrackArray,AliVEvent *event, |
278 | AliAODVertex *secVert, | |
279 | AliAODRecoDecayHF2Prong *rd2Prong, | |
280 | Double_t dca, | |
281 | Bool_t &okDstar) const; | |
dcb444c9 | 282 | |
2ff20727 | 283 | AliAODVertex* PrimaryVertex(TObjArray *trkArray=0x0,AliVEvent *event=0x0) const; |
dcfa35b3 | 284 | AliAODVertex* ReconstructSecondaryVertex(TObjArray *trkArray,Double_t &dispersion,Bool_t useTRefArray=kTRUE) const; |
6a213b59 | 285 | Bool_t SelectInvMass(Int_t decay,Int_t nprongs, |
286 | Double_t *px,Double_t *py,Double_t *pz) const; | |
dcb444c9 | 287 | void SelectTracksAndCopyVertex(AliVEvent *event, |
2ff20727 | 288 | TObjArray &seleTrksArray,Int_t &nSeleTrks, |
289 | UChar_t *seleFlags); | |
dcb444c9 | 290 | void SetPrimaryVertex(AliESDVertex *v1) { fV1 = v1; } |
2ff20727 | 291 | Bool_t SingleTrkCuts(AliESDtrack *trk,Bool_t &okDisplaced,Bool_t &okSoftPi) const; |
6a213b59 | 292 | // |
eee95e18 | 293 | ClassDef(AliAnalysisVertexingHF,9); // Reconstruction of HF decay candidates |
6a213b59 | 294 | }; |
295 | ||
296 | ||
297 | #endif | |
298 | ||
299 | ||
300 | ||
301 | ||
302 | ||
303 | ||
304 | ||
305 |