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