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