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 */
6 //-------------------------------------------------------------------------
7 // Class AliAnalysisVertexingHF
8 // Reconstruction of heavy-flavour decay candidates
10 // Origin: E.Bruna, G.E.Bruno, A.Dainese, F.Prino, R.Romita
11 // Contact: andrea.dainese@lnl.infn.it
12 //-------------------------------------------------------------------------
16 #include "AliESDEvent.h"
17 #include "AliESDVertex.h"
18 #include "AliAODVertex.h"
19 #include "AliAODRecoDecayHF.h"
20 #include "AliAODRecoDecayHF2Prong.h"
21 #include "AliAODRecoDecayHF3Prong.h"
22 #include "AliAODRecoDecayHF4Prong.h"
24 //-----------------------------------------------------------------------------
25 class AliAnalysisVertexingHF : public TNamed {
28 AliAnalysisVertexingHF();
29 AliAnalysisVertexingHF(const AliAnalysisVertexingHF& source);
30 AliAnalysisVertexingHF& operator=(const AliAnalysisVertexingHF& source);
31 virtual ~AliAnalysisVertexingHF();
33 void FindCandidatesESDtoAOD(AliESDEvent *esd,
34 TClonesArray *aodVerticesHFTClArr,
35 TClonesArray *aodD0toKpiTClArr,
36 TClonesArray *aodJPSItoEleTClArr,
37 TClonesArray *aodCharm3ProngTClArr,
38 TClonesArray *aodCharm4ProngTClArr);
39 void FindCandidates(AliESDEvent *esd,TTree *treeout[]);
40 AliAODRecoDecayHF2Prong* Make2Prong(TObjArray *twoTrackArray1,AliESDEvent *esd,
41 AliESDVertex *vertexp1n1,Double_t dcap1n1,
42 Bool_t &okD0,Bool_t &okJPSI) const;
43 AliAODRecoDecayHF3Prong* Make3Prong(TObjArray *threeTrackArray,AliESDEvent *esd,
44 AliESDVertex *vertexp1n1,
45 AliESDVertex *vertexp2n1,
46 Double_t dcap1n1,Double_t dcap2n1,Double_t dcap1p2,
47 Bool_t &ok3Prong) const;
48 AliAODRecoDecayHF4Prong* Make4Prong(TObjArray *fourTrackArray,AliESDEvent *esd,
49 AliESDVertex *vertexp1n1,
50 AliESDVertex *vertexp2n1,
51 Double_t dcap1n1,Double_t dcap1n2,
53 Bool_t &ok4Prong) const;
56 void SetDebug(Int_t debug=0) {fDebug=debug;}
57 void PrintStatus() const;
58 void SetUseTRef() { fUseTRef=kTRUE; }
59 void SetSecVtxWithKF() { fSecVtxWithKF=kTRUE; }
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; }
68 Bool_t GetD0toKpi() { return fD0toKpi; }
69 Bool_t GetJPSItoEle() { return fJPSItoEle; }
70 Bool_t Get3Prong() { return f3Prong; }
71 Bool_t Get4Prong() { return f4Prong; }
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.,
99 void SetDplusCuts(const Double_t cuts[12]);
100 void SetDsCuts(Double_t cut0=0.);
101 void SetDsCuts(const Double_t cuts[1]);
102 void SetLcCuts(Double_t cut0=0.);
103 void SetLcCuts(const Double_t cuts[1]);
107 Double_t fBzkG; // z componenent of field in kG
109 Bool_t fSecVtxWithKF; // if kTRUE use KF vertexer, else AliVertexerTracks
111 Bool_t fUseTRef; // use TRef to store in the AOD
113 Bool_t fRecoPrimVtxSkippingTrks; // flag for primary vertex reco on the fly
114 // for each candidate, w/o its daughters
115 Bool_t fRmTrksFromPrimVtx; // flag for fast removal of daughters from
116 // the primary vertex
118 AliESDVertex *fV1; // primary vertex
120 Int_t fDebug; // enable verbose mode
122 // flag to enable candidates production
129 Bool_t fITSrefit; // require kITSrefit
130 Bool_t fBothSPD; // require both SPD layers
131 Int_t fMinITSCls; // minimum number of ITS clusters
132 Double_t fMinPtCut; // minimum track pt [GeV/c]
133 Double_t fMind0rphiCut; // minimum track |rphi impact parameter| [cm]
135 Double_t fD0toKpiCuts[9]; // cuts on D0->Kpi candidates
136 // (to be passed to AliAODRecoDecayHF2Prong::SelectD0())
137 // 0 = inv. mass half width [GeV]
142 // 5 = d0K [cm] upper limit!
143 // 6 = d0Pi [cm] upper limit!
146 Double_t fBtoJPSICuts[9]; // cuts on JPSI candidates
147 // (to be passed to AliAODRecoDecayHF2Prong::SelectBtoJPSI())
148 // 0 = inv. mass half width [GeV]
150 // 2 = cosThetaStar (negative electron)
153 // 5 = d0O [cm] upper limit!
154 // 6 = d0N [cm] upper limit!
157 Double_t fDplusCuts[12]; // cuts on Dplus candidates
158 // (to be passed to AliAODRecoDecayHF2Prong::SelectDplus())
159 // 0 = inv. mass half width [GeV]
162 // 3 = d0K [cm] lower limit!
163 // 4 = d0Pi [cm] lower limit!
165 // 6 = sigmavert (cm)
166 // 7 = dist prim-sec (cm)
167 // 8 = pM=Max{pT1,pT2,pT3} (GeV/c)
169 // 10 = Sum d0^2 (cm^2)
171 Double_t fDsCuts[1]; // cuts on Ds candidates
172 // (to be passed to AliAODRecoDecayHF2Prong::SelectDs())
173 // 0 = inv. mass half width [GeV]
174 Double_t fLcCuts[1]; // cuts on Lambdac candidates
175 // (to be passed to AliAODRecoDecayHF2Prong::SelectLc())
176 // 0 = inv. mass half width [GeV]
179 AliESDVertex* OwnPrimaryVertex(Int_t ntrks,TObjArray *trkArray,AliESDEvent *esd) const;
180 Bool_t SelectInvMass(Int_t decay,Int_t nprongs,
181 Double_t *px,Double_t *py,Double_t *pz) const;
182 void SelectTracks(AliESDEvent *esd,
183 TObjArray &trksP,Int_t &nTrksP,
184 TObjArray &trksN,Int_t &nTrksN) const;
185 void SetPrimaryVertex(AliESDVertex* v1) { fV1 = v1; }
186 Bool_t SingleTrkCuts(AliESDtrack& trk) const;
187 AliESDVertex* ReconstructSecondaryVertex(TObjArray *trkArray) const;
189 ClassDef(AliAnalysisVertexingHF,2) // Reconstruction of HF decay candidates