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