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 //-------------------------------------------------------------------------
15 #include "AliESDEvent.h"
16 #include "AliESDVertex.h"
17 #include "AliAODVertex.h"
18 #include "AliAODRecoDecayHF.h"
19 #include "AliAODRecoDecayHF2Prong.h"
20 #include "AliAODRecoDecayHF3Prong.h"
21 #include "AliAODRecoDecayHF4Prong.h"
23 //-----------------------------------------------------------------------------
24 class AliAnalysisVertexingHF : public TNamed {
27 AliAnalysisVertexingHF();
28 AliAnalysisVertexingHF(const AliAnalysisVertexingHF& source);
29 AliAnalysisVertexingHF& operator=(const AliAnalysisVertexingHF& source);
30 virtual ~AliAnalysisVertexingHF();
32 void FindCandidates(AliESDEvent *esd,TTree treeout[]);
33 AliAODRecoDecayHF2Prong* Make2Prong(TObjArray *twoTrackArray1,AliESDEvent *esd,
34 AliESDVertex *vertexp1n1,Double_t dcap1n1,
35 Bool_t &okD0,Bool_t &okJPSI) const;
36 AliAODRecoDecayHF3Prong* Make3Prong(TObjArray *threeTrackArray,AliESDEvent *esd,
37 AliESDVertex *vertexp1n1,
38 AliESDVertex *vertexp2n1,
39 Double_t dcap1n1,Double_t dcap2n1,Double_t dcap1p2,
40 Bool_t &ok3Prong) const;
41 AliAODRecoDecayHF4Prong* Make4Prong(TObjArray *fourTrackArray,AliESDEvent *esd,
42 AliESDVertex *vertexp1n1,
43 AliESDVertex *vertexp2n1,
44 Double_t dcap1n1,Double_t dcap1n2,
46 Bool_t &ok4Prong) const;
49 void SetDebug(Int_t debug=0) {fDebug=debug;}
50 void PrintStatus() const;
51 void SetSecVtxWithKF() { fSecVtxWithKF=kTRUE; }
52 void SetD0toKpiOn() { fD0toKpi=kTRUE; }
53 void SetD0toKpiOff() { fD0toKpi=kFALSE; }
54 void SetJPSItoEleOn() { fJPSItoEle=kTRUE; }
55 void SetJPSItoEleOff() { fJPSItoEle=kFALSE; }
56 void Set3ProngOn() { f3Prong=kTRUE; }
57 void Set3ProngOff() { f3Prong=kFALSE; }
58 void Set4ProngOn() { f4Prong=kTRUE; }
59 void Set4ProngOff() { f4Prong=kFALSE; }
60 void SetRecoPrimVtxSkippingTrks()
61 { fRecoPrimVtxSkippingTrks=kTRUE; fRmTrksFromPrimVtx=kFALSE;}
62 void SetRmTrksFromPrimVtx()
63 {fRmTrksFromPrimVtx=kTRUE; fRecoPrimVtxSkippingTrks=kFALSE; }
64 void SetITSrefitRequired() { fITSrefit=kTRUE; }
65 void SetITSrefitNotRequired() { fITSrefit=kFALSE; }
66 void SetBothSPDRequired() { fBothSPD=kTRUE; }
67 void SetBothSPDNotRequired() {fBothSPD=kFALSE;}
68 void SetMinITSCls(Int_t n=6) { fMinITSCls=n; }
69 void SetMinPtCut(Double_t pt=0.) { fMinPtCut=pt; }
70 void SetMind0Cut(Double_t d0=0.) { fMind0rphiCut=d0; }
71 void SetD0toKpiCuts(Double_t cut0=1000.,Double_t cut1=100000.,
72 Double_t cut2=1.1,Double_t cut3=0.,Double_t cut4=0.,
73 Double_t cut5=100000.,Double_t cut6=100000.,
74 Double_t cut7=100000000.,Double_t cut8=-1.1);
75 void SetD0toKpiCuts(const Double_t cuts[9]);
76 void SetBtoJPSICuts(Double_t cut0=1000.,Double_t cut1=100000.,
77 Double_t cut2=1.1,Double_t cut3=0.,Double_t cut4=0.,
78 Double_t cut5=100000.,Double_t cut6=100000.,
79 Double_t cut7=100000000.,Double_t cut8=-1.1);
80 void SetBtoJPSICuts(const Double_t cuts[9]);
81 void SetDplusCuts(Double_t cut0=1000.,Double_t cut1=0.,
82 Double_t cut2=0.,Double_t cut3=0.,Double_t cut4=0.,
83 Double_t cut5=0.,Double_t cut6=10000000000.,
84 Double_t cut7=0.,Double_t cut8=0.,
85 Double_t cut9=-1.1,Double_t cut10=0.,
87 void SetDplusCuts(const Double_t cuts[12]);
88 void SetDsCuts(Double_t cut0=0.);
89 void SetDsCuts(const Double_t cuts[1]);
90 void SetLcCuts(Double_t cut0=0.);
91 void SetLcCuts(const Double_t cuts[1]);
95 Double_t fBzkG; // z componenent of field in kG
97 Bool_t fSecVtxWithKF; // if kTRUE use KF vertexer, else AliVertexerTracks
99 Bool_t fRecoPrimVtxSkippingTrks; // flag for primary vertex reco on the fly
100 // for each candidate, w/o its daughters
101 Bool_t fRmTrksFromPrimVtx; // flag for fast removal of daughters from
102 // the primary vertex
104 AliESDVertex *fV1; // primary vertex
106 Int_t fDebug; // enable verbose mode
108 // flag to enable candidates production
115 Bool_t fITSrefit; // require kITSrefit
116 Bool_t fBothSPD; // require both SPD layers
117 Int_t fMinITSCls; // minimum number of ITS clusters
118 Double_t fMinPtCut; // minimum track pt [GeV/c]
119 Double_t fMind0rphiCut; // minimum track |rphi impact parameter| [cm]
121 Double_t fD0toKpiCuts[9]; // cuts on D0->Kpi candidates
122 // (to be passed to AliAODRecoDecayHF2Prong::SelectD0())
123 // 0 = inv. mass half width [GeV]
128 // 5 = d0K [cm] upper limit!
129 // 6 = d0Pi [cm] upper limit!
132 Double_t fBtoJPSICuts[9]; // cuts on JPSI candidates
133 // (to be passed to AliAODRecoDecayHF2Prong::SelectBtoJPSI())
134 // 0 = inv. mass half width [GeV]
136 // 2 = cosThetaStar (negative electron)
139 // 5 = d0O [cm] upper limit!
140 // 6 = d0N [cm] upper limit!
143 Double_t fDplusCuts[12]; // cuts on Dplus candidates
144 // (to be passed to AliAODRecoDecayHF2Prong::SelectDplus())
145 // 0 = inv. mass half width [GeV]
148 // 3 = d0K [cm] lower limit!
149 // 4 = d0Pi [cm] lower limit!
151 // 6 = sigmavert (cm)
152 // 7 = dist prim-sec (cm)
153 // 8 = pM=Max{pT1,pT2,pT3} (GeV/c)
155 // 10 = Sum d0^2 (cm^2)
157 Double_t fDsCuts[1]; // cuts on Ds candidates
158 // (to be passed to AliAODRecoDecayHF2Prong::SelectDs())
159 // 0 = inv. mass half width [GeV]
160 Double_t fLcCuts[1]; // cuts on Lambdac candidates
161 // (to be passed to AliAODRecoDecayHF2Prong::SelectLc())
162 // 0 = inv. mass half width [GeV]
165 AliESDVertex* OwnPrimaryVertex(Int_t ntrks,TObjArray *trkArray,AliESDEvent *esd) const;
166 Bool_t SelectInvMass(Int_t decay,Int_t nprongs,
167 Double_t *px,Double_t *py,Double_t *pz) const;
168 void SelectTracks(AliESDEvent *esd,
169 TObjArray &trksP,Int_t &nTrksP,
170 TObjArray &trksN,Int_t &nTrksN) const;
171 void SetPrimaryVertex(AliESDVertex* v1) { fV1 = v1; }
172 Bool_t SingleTrkCuts(AliESDtrack& trk) const;
173 AliESDVertex* ReconstructSecondaryVertex(TObjArray *trkArray) const;
175 ClassDef(AliAnalysisVertexingHF,2) // Reconstruction of HF decay candidates