Added cuts for Ds and Lc
[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//
10// Origin: E.Bruna, G.E.Bruno, A.Dainese, F.Prino, R.Romita
b056c5e3 11// Contact: andrea.dainese@lnl.infn.it
6a213b59 12//-------------------------------------------------------------------------
13
14#include <TNamed.h>
15#include <TTree.h>
5e6f195c 16#include "AliESDEvent.h"
6a213b59 17#include "AliESDVertex.h"
b82f6d67 18#include "AliAODVertex.h"
6a213b59 19#include "AliAODRecoDecayHF.h"
20#include "AliAODRecoDecayHF2Prong.h"
21#include "AliAODRecoDecayHF3Prong.h"
22#include "AliAODRecoDecayHF4Prong.h"
23
24//-----------------------------------------------------------------------------
25class AliAnalysisVertexingHF : public TNamed {
26 public:
27 //
28 AliAnalysisVertexingHF();
13977a79 29 AliAnalysisVertexingHF(const AliAnalysisVertexingHF& source);
30 AliAnalysisVertexingHF& operator=(const AliAnalysisVertexingHF& source);
6a213b59 31 virtual ~AliAnalysisVertexingHF();
32
b056c5e3 33 void FindCandidatesESDtoAOD(AliESDEvent *esd,
34 TClonesArray *aodVerticesHFTClArr,
35 TClonesArray *aodD0toKpiTClArr,
36 TClonesArray *aodJPSItoEleTClArr,
37 TClonesArray *aodCharm3ProngTClArr,
38 TClonesArray *aodCharm4ProngTClArr);
260836a9 39 void FindCandidates(AliESDEvent *esd,TTree *treeout[]);
5e6f195c 40 AliAODRecoDecayHF2Prong* Make2Prong(TObjArray *twoTrackArray1,AliESDEvent *esd,
6a213b59 41 AliESDVertex *vertexp1n1,Double_t dcap1n1,
42 Bool_t &okD0,Bool_t &okJPSI) const;
5e6f195c 43 AliAODRecoDecayHF3Prong* Make3Prong(TObjArray *threeTrackArray,AliESDEvent *esd,
6a213b59 44 AliESDVertex *vertexp1n1,
45 AliESDVertex *vertexp2n1,
46 Double_t dcap1n1,Double_t dcap2n1,Double_t dcap1p2,
47 Bool_t &ok3Prong) const;
5e6f195c 48 AliAODRecoDecayHF4Prong* Make4Prong(TObjArray *fourTrackArray,AliESDEvent *esd,
6a213b59 49 AliESDVertex *vertexp1n1,
50 AliESDVertex *vertexp2n1,
51 Double_t dcap1n1,Double_t dcap1n2,
52 Double_t dcap2n1,
53 Bool_t &ok4Prong) const;
54
55
56 void SetDebug(Int_t debug=0) {fDebug=debug;}
57 void PrintStatus() const;
b056c5e3 58 void SetUseTRef() { fUseTRef=kTRUE; }
b82f6d67 59 void SetSecVtxWithKF() { fSecVtxWithKF=kTRUE; }
6a213b59 60 void SetD0toKpiOn() { fD0toKpi=kTRUE; }
61 void SetD0toKpiOff() { fD0toKpi=kFALSE; }
62 void SetJPSItoEleOn() { fJPSItoEle=kTRUE; }
63 void SetJPSItoEleOff() { fJPSItoEle=kFALSE; }
64 void Set3ProngOn() { f3Prong=kTRUE; }
65 void Set3ProngOff() { f3Prong=kFALSE; }
66 void Set4ProngOn() { f4Prong=kTRUE; }
67 void Set4ProngOff() { f4Prong=kFALSE; }
b056c5e3 68 Bool_t GetD0toKpi() { return fD0toKpi; }
69 Bool_t GetJPSItoEle() { return fJPSItoEle; }
70 Bool_t Get3Prong() { return f3Prong; }
71 Bool_t Get4Prong() { return f4Prong; }
6a213b59 72 void SetRecoPrimVtxSkippingTrks()
73 { fRecoPrimVtxSkippingTrks=kTRUE; fRmTrksFromPrimVtx=kFALSE;}
74 void SetRmTrksFromPrimVtx()
75 {fRmTrksFromPrimVtx=kTRUE; fRecoPrimVtxSkippingTrks=kFALSE; }
76 void SetITSrefitRequired() { fITSrefit=kTRUE; }
77 void SetITSrefitNotRequired() { fITSrefit=kFALSE; }
78 void SetBothSPDRequired() { fBothSPD=kTRUE; }
79 void SetBothSPDNotRequired() {fBothSPD=kFALSE;}
80 void SetMinITSCls(Int_t n=6) { fMinITSCls=n; }
81 void SetMinPtCut(Double_t pt=0.) { fMinPtCut=pt; }
82 void SetMind0Cut(Double_t d0=0.) { fMind0rphiCut=d0; }
83 void SetD0toKpiCuts(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 SetD0toKpiCuts(const Double_t cuts[9]);
88 void SetBtoJPSICuts(Double_t cut0=1000.,Double_t cut1=100000.,
89 Double_t cut2=1.1,Double_t cut3=0.,Double_t cut4=0.,
90 Double_t cut5=100000.,Double_t cut6=100000.,
91 Double_t cut7=100000000.,Double_t cut8=-1.1);
92 void SetBtoJPSICuts(const Double_t cuts[9]);
93 void SetDplusCuts(Double_t cut0=1000.,Double_t cut1=0.,
94 Double_t cut2=0.,Double_t cut3=0.,Double_t cut4=0.,
95 Double_t cut5=0.,Double_t cut6=10000000000.,
96 Double_t cut7=0.,Double_t cut8=0.,
97 Double_t cut9=-1.1,Double_t cut10=0.,
98 Double_t cut11=0.);
99 void SetDplusCuts(const Double_t cuts[12]);
6ea608bf 100 void SetDsCuts(Double_t cut0=1000.,Double_t cut1=0.,
101 Double_t cut2=0.,Double_t cut3=0.,Double_t cut4=0.,
102 Double_t cut5=0.,Double_t cut6=10000000000.,
103 Double_t cut7=0.,Double_t cut8=0.,
104 Double_t cut9=-1.1,Double_t cut10=0.,
105 Double_t cut11=0.);
106 void SetDsCuts(const Double_t cuts[12]);
107 void SetLcCuts(Double_t cut0=1000.,Double_t cut1=0.,
108 Double_t cut2=0.,Double_t cut3=0.,Double_t cut4=0.,
109 Double_t cut5=0.,Double_t cut6=10000000000.,
110 Double_t cut7=0.,Double_t cut8=0.,
111 Double_t cut9=-1.1,Double_t cut10=0.,
112 Double_t cut11=0.);
113 void SetLcCuts(const Double_t cuts[12]);
114
6a213b59 115 //
116 private:
117 //
b82f6d67 118 Double_t fBzkG; // z componenent of field in kG
119
120 Bool_t fSecVtxWithKF; // if kTRUE use KF vertexer, else AliVertexerTracks
121
b056c5e3 122 Bool_t fUseTRef; // use TRef to store in the AOD
123
6a213b59 124 Bool_t fRecoPrimVtxSkippingTrks; // flag for primary vertex reco on the fly
125 // for each candidate, w/o its daughters
126 Bool_t fRmTrksFromPrimVtx; // flag for fast removal of daughters from
127 // the primary vertex
128
129 AliESDVertex *fV1; // primary vertex
130
131 Int_t fDebug; // enable verbose mode
132
133 // flag to enable candidates production
134 Bool_t fD0toKpi;
135 Bool_t fJPSItoEle;
136 Bool_t f3Prong;
137 Bool_t f4Prong;
138
139 // single-track cuts
140 Bool_t fITSrefit; // require kITSrefit
141 Bool_t fBothSPD; // require both SPD layers
142 Int_t fMinITSCls; // minimum number of ITS clusters
143 Double_t fMinPtCut; // minimum track pt [GeV/c]
144 Double_t fMind0rphiCut; // minimum track |rphi impact parameter| [cm]
145 // candidates cuts
146 Double_t fD0toKpiCuts[9]; // cuts on D0->Kpi candidates
147 // (to be passed to AliAODRecoDecayHF2Prong::SelectD0())
148 // 0 = inv. mass half width [GeV]
149 // 1 = dca [cm]
150 // 2 = cosThetaStar
151 // 3 = pTK [GeV/c]
152 // 4 = pTPi [GeV/c]
153 // 5 = d0K [cm] upper limit!
154 // 6 = d0Pi [cm] upper limit!
155 // 7 = d0d0 [cm^2]
156 // 8 = cosThetaPoint
157 Double_t fBtoJPSICuts[9]; // cuts on JPSI candidates
158 // (to be passed to AliAODRecoDecayHF2Prong::SelectBtoJPSI())
159 // 0 = inv. mass half width [GeV]
160 // 1 = dca [cm]
161 // 2 = cosThetaStar (negative electron)
162 // 3 = pTP [GeV/c]
163 // 4 = pTN [GeV/c]
164 // 5 = d0O [cm] upper limit!
165 // 6 = d0N [cm] upper limit!
166 // 7 = d0d0 [cm^2]
167 // 8 = cosThetaPoint
168 Double_t fDplusCuts[12]; // cuts on Dplus candidates
6ea608bf 169 // (to be passed to AliAODRecoDecayHF3Prong::SelectDplus())
6a213b59 170 // 0 = inv. mass half width [GeV]
171 // 1 = pTK [GeV/c]
172 // 2 = pTPi [GeV/c]
173 // 3 = d0K [cm] lower limit!
174 // 4 = d0Pi [cm] lower limit!
175 // 5 = dist12 (cm)
176 // 6 = sigmavert (cm)
177 // 7 = dist prim-sec (cm)
178 // 8 = pM=Max{pT1,pT2,pT3} (GeV/c)
179 // 9 = cosThetaPoint
180 // 10 = Sum d0^2 (cm^2)
181 // 11 = dca cut (cm)
6ea608bf 182 Double_t fDsCuts[12]; // cuts on Ds candidates
183 // (to be passed to AliAODRecoDecayHF3Prong::SelectDs())
184 // 0 = inv. mass half width [GeV]
185 // 1 = pTK [GeV/c]
186 // 2 = pTPi [GeV/c]
187 // 3 = d0K [cm] lower limit!
188 // 4 = d0Pi [cm] lower limit!
189 // 5 = dist12 (cm)
190 // 6 = sigmavert (cm)
191 // 7 = dist prim-sec (cm)
192 // 8 = pM=Max{pT1,pT2,pT3} (GeV/c)
193 // 9 = cosThetaPoint
194 // 10 = Sum d0^2 (cm^2)
195 // 11 = dca cut (cm)
196 Double_t fLcCuts[12]; // cuts on Lambdac candidates
197 // (to be passed to AliAODRecoDecayHF3Prong::SelectLc())
198 // 0 = inv. mass half width [GeV]
199 // 1 = pTP [GeV/c]
200 // 2 = pTPi abd pTK [GeV/c]
201 // 3 = d0P [cm] lower limit!
202 // 4 = d0Pi and d0K [cm] lower limit!
203 // 5 = dist12 (cm)
204 // 6 = sigmavert (cm)
205 // 7 = dist prim-sec (cm)
206 // 8 = pM=Max{pT1,pT2,pT3} (GeV/c)
207 // 9 = cosThetaPoint
208 // 10 = Sum d0^2 (cm^2)
209 // 11 = dca cut (cm)
6a213b59 210 //
5e6f195c 211 AliESDVertex* OwnPrimaryVertex(Int_t ntrks,TObjArray *trkArray,AliESDEvent *esd) const;
6a213b59 212 Bool_t SelectInvMass(Int_t decay,Int_t nprongs,
213 Double_t *px,Double_t *py,Double_t *pz) const;
5e6f195c 214 void SelectTracks(AliESDEvent *esd,
6a213b59 215 TObjArray &trksP,Int_t &nTrksP,
216 TObjArray &trksN,Int_t &nTrksN) const;
217 void SetPrimaryVertex(AliESDVertex* v1) { fV1 = v1; }
b82f6d67 218 Bool_t SingleTrkCuts(AliESDtrack& trk) const;
219 AliESDVertex* ReconstructSecondaryVertex(TObjArray *trkArray) const;
6a213b59 220 //
b82f6d67 221 ClassDef(AliAnalysisVertexingHF,2) // Reconstruction of HF decay candidates
6a213b59 222};
223
224
225#endif
226
227
228
229
230
231
232
233