]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/vertexingHF/AliAnalysisVertexingHF.h
New EMC ideal calibration with all gains=0.005
[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]);
dc963de9 113 const Double_t *GetD0toKpiCuts() const {return fD0toKpiCuts;}
114 const Double_t *GetD0fromDstarCuts() const {return fD0fromDstarCuts;}
115 const Double_t *GetBtoJPSICuts() const {return fBtoJPSICuts;}
116 const Double_t *GetDplusCuts() const {return fDplusCuts;}
117 const Double_t *GetDsCuts() const {return fDsCuts;}
118 const Double_t *GetLcCuts() const {return fLcCuts;}
119 const Double_t *GetDstarCuts() const {return fDstarCuts;}
6ea608bf 120
6a213b59 121 //
122 private:
123 //
2ff20727 124 enum { kBitDispl = 0, kBitSoftPi = 1 };
125
dcb444c9 126 Bool_t fInputAOD; // input from AOD (kTRUE) or ESD (kFALSE)
127
128 Int_t *fAODMap; // map between index and ID for AOD tracks
129
b82f6d67 130 Double_t fBzkG; // z componenent of field in kG
131
132 Bool_t fSecVtxWithKF; // if kTRUE use KF vertexer, else AliVertexerTracks
133
6a213b59 134 Bool_t fRecoPrimVtxSkippingTrks; // flag for primary vertex reco on the fly
135 // for each candidate, w/o its daughters
136 Bool_t fRmTrksFromPrimVtx; // flag for fast removal of daughters from
137 // the primary vertex
138
139 AliESDVertex *fV1; // primary vertex
140
6a213b59 141 // flag to enable candidates production
2ff20727 142 Bool_t fD0toKpi; // D0->Kpi
143 Bool_t fJPSItoEle; // Jpsi->ee
144 Bool_t f3Prong; // D+,Ds,Lc
145 Bool_t f4Prong; // D0->Kpipipi
146 Bool_t fDstar; // D*->D0pi
dc963de9 147 Bool_t fLikeSign; // Like-sign pairs
6a213b59 148
149 // single-track cuts
2ff20727 150 AliAnalysisFilter *fTrackFilter; // Track Filter for displaced vertices
151 AliAnalysisFilter *fTrackFilterSoftPi; // Track Filter for D* soft pion
6a213b59 152 // candidates cuts
153 Double_t fD0toKpiCuts[9]; // cuts on D0->Kpi candidates
154 // (to be passed to AliAODRecoDecayHF2Prong::SelectD0())
155 // 0 = inv. mass half width [GeV]
156 // 1 = dca [cm]
157 // 2 = cosThetaStar
158 // 3 = pTK [GeV/c]
159 // 4 = pTPi [GeV/c]
160 // 5 = d0K [cm] upper limit!
161 // 6 = d0Pi [cm] upper limit!
162 // 7 = d0d0 [cm^2]
163 // 8 = cosThetaPoint
2ff20727 164 Double_t fD0fromDstarCuts[9]; // cuts on D0->Kpi candidates from D*
165 // (to be passed to AliAODRecoCascadeHF::SelectDstar())
166 // 0 = inv. mass half width [GeV]
167 // 1 = dca [cm]
168 // 2 = cosThetaStar
169 // 3 = pTK [GeV/c]
170 // 4 = pTPi [GeV/c]
171 // 5 = d0K [cm] upper limit!
172 // 6 = d0Pi [cm] upper limit!
173 // 7 = d0d0 [cm^2]
174 // 8 = cosThetaPoint
6a213b59 175 Double_t fBtoJPSICuts[9]; // cuts on JPSI candidates
176 // (to be passed to AliAODRecoDecayHF2Prong::SelectBtoJPSI())
177 // 0 = inv. mass half width [GeV]
178 // 1 = dca [cm]
179 // 2 = cosThetaStar (negative electron)
180 // 3 = pTP [GeV/c]
181 // 4 = pTN [GeV/c]
182 // 5 = d0O [cm] upper limit!
183 // 6 = d0N [cm] upper limit!
184 // 7 = d0d0 [cm^2]
185 // 8 = cosThetaPoint
186 Double_t fDplusCuts[12]; // cuts on Dplus candidates
6ea608bf 187 // (to be passed to AliAODRecoDecayHF3Prong::SelectDplus())
6a213b59 188 // 0 = inv. mass half width [GeV]
189 // 1 = pTK [GeV/c]
190 // 2 = pTPi [GeV/c]
191 // 3 = d0K [cm] lower limit!
192 // 4 = d0Pi [cm] lower limit!
193 // 5 = dist12 (cm)
194 // 6 = sigmavert (cm)
195 // 7 = dist prim-sec (cm)
196 // 8 = pM=Max{pT1,pT2,pT3} (GeV/c)
197 // 9 = cosThetaPoint
198 // 10 = Sum d0^2 (cm^2)
199 // 11 = dca cut (cm)
81679460 200 Double_t fDsCuts[13]; // cuts on Ds candidates
6ea608bf 201 // (to be passed to AliAODRecoDecayHF3Prong::SelectDs())
202 // 0 = inv. mass half width [GeV]
203 // 1 = pTK [GeV/c]
204 // 2 = pTPi [GeV/c]
205 // 3 = d0K [cm] lower limit!
206 // 4 = d0Pi [cm] lower limit!
207 // 5 = dist12 (cm)
208 // 6 = sigmavert (cm)
209 // 7 = dist prim-sec (cm)
210 // 8 = pM=Max{pT1,pT2,pT3} (GeV/c)
211 // 9 = cosThetaPoint
212 // 10 = Sum d0^2 (cm^2)
213 // 11 = dca cut (cm)
81679460 214 // 12 = inv. mass cut arounf phi and K0* [GeV]
215 Double_t fLcCuts[12]; // cuts on Lambdac candidates
6ea608bf 216 // (to be passed to AliAODRecoDecayHF3Prong::SelectLc())
217 // 0 = inv. mass half width [GeV]
218 // 1 = pTP [GeV/c]
219 // 2 = pTPi abd pTK [GeV/c]
220 // 3 = d0P [cm] lower limit!
221 // 4 = d0Pi and d0K [cm] lower limit!
222 // 5 = dist12 (cm)
223 // 6 = sigmavert (cm)
224 // 7 = dist prim-sec (cm)
225 // 8 = pM=Max{pT1,pT2,pT3} (GeV/c)
226 // 9 = cosThetaPoint
227 // 10 = Sum d0^2 (cm^2)
228 // 11 = dca cut (cm)
2ff20727 229 Double_t fDstarCuts[5]; // cuts on D* candidates
230 // (to be passed to AliAODRecoCascadeHF::SelectDstar())
231 // 0 = inv. mass half width of D* [GeV]
232 // 1 = half width of (M_Kpipi-M_Kpi) [GeV]
233 // 2 = PtMin of pi_s [GeV/c]
234 // 3 = PtMax of pi_s [GeV/c]
235 // 4 = theta, angle between the track of pi_s and D0 decay plane [rad]
236
6a213b59 237 //
dcb444c9 238 void AddDaughterRefs(AliAODVertex *v,AliVEvent *event,
239 TObjArray *trkArray) const;
240 AliAODRecoDecayHF2Prong* Make2Prong(TObjArray *twoTrackArray1,AliVEvent *event,
241 AliAODVertex *secVert,Double_t dcap1n1,
2ff20727 242 Bool_t &okD0,Bool_t &okJPSI,Bool_t &okD0fromDstar) const;
dcb444c9 243 AliAODRecoDecayHF3Prong* Make3Prong(TObjArray *threeTrackArray,AliVEvent *event,
244 AliAODVertex *secVert,
245 Double_t dispersion,
246 AliAODVertex *vertexp1n1,
247 AliAODVertex *vertexp2n1,
248 Double_t dcap1n1,Double_t dcap2n1,Double_t dcap1p2,
249 Bool_t &ok3Prong) const;
250 AliAODRecoDecayHF4Prong* Make4Prong(TObjArray *fourTrackArray,AliVEvent *event,
251 AliAODVertex *secVert,
252 AliAODVertex *vertexp1n1,
253 AliAODVertex *vertexp2n1,
254 Double_t dcap1n1,Double_t dcap1n2,
255 Double_t dcap2n1,
256 Bool_t &ok4Prong) const;
2ff20727 257 AliAODRecoCascadeHF* MakeCascade(TObjArray *twoTrackArray,AliVEvent *event,
258 AliAODVertex *secVert,
259 AliAODRecoDecayHF2Prong *rd2Prong,
260 Double_t dca,
261 Bool_t &okDstar) const;
dcb444c9 262
2ff20727 263 AliAODVertex* PrimaryVertex(TObjArray *trkArray=0x0,AliVEvent *event=0x0) const;
dcfa35b3 264 AliAODVertex* ReconstructSecondaryVertex(TObjArray *trkArray,Double_t &dispersion,Bool_t useTRefArray=kTRUE) const;
6a213b59 265 Bool_t SelectInvMass(Int_t decay,Int_t nprongs,
266 Double_t *px,Double_t *py,Double_t *pz) const;
dcb444c9 267 void SelectTracksAndCopyVertex(AliVEvent *event,
2ff20727 268 TObjArray &seleTrksArray,Int_t &nSeleTrks,
269 UChar_t *seleFlags);
dcb444c9 270 void SetPrimaryVertex(AliESDVertex *v1) { fV1 = v1; }
2ff20727 271 Bool_t SingleTrkCuts(AliESDtrack *trk,Bool_t &okDisplaced,Bool_t &okSoftPi) const;
6a213b59 272 //
dc963de9 273 ClassDef(AliAnalysisVertexingHF,7) // Reconstruction of HF decay candidates
6a213b59 274};
275
276
277#endif
278
279
280
281
282
283
284
285