]>
Commit | Line | Data |
---|---|---|
3244eeed | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-2006, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | ///////////////////////////////////////////////////////////// | |
17 | // | |
18 | // Base class for AOD reconstructed heavy-flavour 3-prong decay | |
19 | // | |
20 | // Author: E.Bruna bruna@to.infn.it, F.Prino prino@to.infn.it | |
21 | ///////////////////////////////////////////////////////////// | |
22 | ||
23 | #include <TDatabasePDG.h> | |
24 | #include "AliAODRecoDecayHF.h" | |
25 | #include "AliAODRecoDecayHF3Prong.h" | |
16156b6d | 26 | #include "AliAODTrack.h" |
3244eeed | 27 | |
28 | ClassImp(AliAODRecoDecayHF3Prong) | |
29 | ||
30 | //-------------------------------------------------------------------------- | |
31 | AliAODRecoDecayHF3Prong::AliAODRecoDecayHF3Prong() : | |
32 | AliAODRecoDecayHF(), | |
33 | fSigmaVert(0), | |
34 | fDist12toPrim(0), | |
35 | fDist23toPrim(0) | |
36 | { | |
37 | // | |
38 | // Default Constructor | |
39 | // | |
40 | } | |
41 | //-------------------------------------------------------------------------- | |
42 | AliAODRecoDecayHF3Prong::AliAODRecoDecayHF3Prong(AliAODVertex *vtx2, | |
43 | Double_t *px,Double_t *py,Double_t *pz, | |
44 | Double_t *d0,Double_t *d0err, | |
45 | Double_t *dca, Double_t sigvert, | |
46 | Double_t dist12,Double_t dist23,Short_t charge) : | |
47 | AliAODRecoDecayHF(vtx2,3,charge,px,py,pz,d0,d0err), | |
48 | fSigmaVert(sigvert), | |
49 | fDist12toPrim(dist12), | |
50 | fDist23toPrim(dist23) | |
51 | { | |
52 | // | |
53 | // Constructor with AliAODVertex for decay vertex | |
54 | // | |
6185d025 | 55 | SetDCAs(3,dca); |
3244eeed | 56 | } |
57 | //-------------------------------------------------------------------------- | |
58 | AliAODRecoDecayHF3Prong::AliAODRecoDecayHF3Prong(AliAODVertex *vtx2, | |
59 | Double_t *d0,Double_t *d0err, | |
60 | Double_t *dca, Double_t sigvert, | |
61 | Double_t dist12,Double_t dist23, Short_t charge) : | |
62 | AliAODRecoDecayHF(vtx2,3,charge,d0,d0err), | |
63 | fSigmaVert(sigvert), | |
64 | fDist12toPrim(dist12), | |
65 | fDist23toPrim(dist23) | |
66 | { | |
67 | // | |
68 | // Constructor with AliAODVertex for decay vertex and without prongs momenta | |
69 | // | |
6185d025 | 70 | SetDCAs(3,dca); |
3244eeed | 71 | } |
72 | //-------------------------------------------------------------------------- | |
73 | AliAODRecoDecayHF3Prong::AliAODRecoDecayHF3Prong(const AliAODRecoDecayHF3Prong &source) : | |
74 | AliAODRecoDecayHF(source), | |
75 | fSigmaVert(source.fSigmaVert), | |
76 | fDist12toPrim(source.fDist12toPrim), | |
77 | fDist23toPrim(source.fDist23toPrim) | |
78 | { | |
79 | // | |
80 | // Copy constructor | |
81 | // | |
82 | } | |
83 | //-------------------------------------------------------------------------- | |
84 | AliAODRecoDecayHF3Prong &AliAODRecoDecayHF3Prong::operator=(const AliAODRecoDecayHF3Prong &source) | |
85 | { | |
86 | // | |
87 | // assignment operator | |
88 | // | |
89 | if(&source == this) return *this; | |
dcb444c9 | 90 | |
91 | AliAODRecoDecayHF::operator=(source); | |
92 | ||
3244eeed | 93 | fDist12toPrim= source.fDist12toPrim; |
94 | fDist23toPrim= source.fDist23toPrim; | |
95 | fSigmaVert= source.fSigmaVert; | |
dcb444c9 | 96 | |
3244eeed | 97 | return *this; |
98 | } | |
16156b6d | 99 | //-------------Temporary fix: overload AliAODRecoDecay::Charge()----------- |
100 | Short_t AliAODRecoDecayHF3Prong::Charge() const { | |
101 | Short_t charge=0; | |
102 | for(Int_t daught=0;daught<=2;daught++)charge=charge+((AliAODTrack*)GetDaughter(daught))->Charge(); | |
103 | return charge; | |
104 | } | |
3244eeed | 105 | //-------------------------------------------------------------------------- |
106 | Bool_t AliAODRecoDecayHF3Prong::SelectDplus(const Double_t *cuts) | |
107 | const { | |
108 | // | |
109 | // This function compares the Dplus with a set of cuts: | |
110 | // | |
111 | // cuts[0] = inv. mass half width [GeV] | |
112 | // cuts[1] = pTK [GeV/c] | |
113 | // cuts[2] = pTPi [GeV/c] | |
114 | // cuts[3] = d0K [cm] lower limit! | |
115 | // cuts[4] = d0Pi [cm] lower limit! | |
116 | // cuts[5] = dist12 (cm) | |
117 | // cuts[6] = sigmavert (cm) | |
118 | // cuts[7] = dist prim-sec (cm) | |
119 | // cuts[8] = pM=Max{pT1,pT2,pT3} (GeV/c) | |
120 | // cuts[9] = cosThetaPoint | |
121 | // cuts[10] = Sum d0^2 (cm^2) | |
122 | // cuts[11] = dca cut (cm) | |
123 | // | |
124 | // If candidate Dplus does not pass the cuts return kFALSE | |
125 | // | |
126 | ||
127 | Double_t mDplusPDG = TDatabasePDG::Instance()->GetParticle(411)->Mass(); | |
128 | Double_t mDplus=InvMassDplus(); | |
129 | if(TMath::Abs(mDplus-mDplusPDG)>cuts[0])return kFALSE; | |
130 | //single track | |
131 | if(TMath::Abs(PtProng(1)) < cuts[1] || TMath::Abs(Getd0Prong(1))<cuts[3])return kFALSE;//Kaon | |
132 | if(TMath::Abs(PtProng(0)) < cuts[2] || TMath::Abs(Getd0Prong(0))<cuts[4])return kFALSE;//Pion1 | |
133 | if(TMath::Abs(PtProng(2)) < cuts[2] || TMath::Abs(Getd0Prong(2))<cuts[4])return kFALSE;//Pion2 | |
134 | ||
135 | //DCA | |
81679460 | 136 | for(Int_t i=0;i<3;i++) if(GetDCA(i)>cuts[11])return kFALSE; |
3244eeed | 137 | |
138 | //2track cuts | |
139 | if(fDist12toPrim<cuts[5] || fDist23toPrim<cuts[5])return kFALSE; | |
140 | if(Getd0Prong(0)*Getd0Prong(1)<0. && Getd0Prong(2)*Getd0Prong(1)<0.)return kFALSE; | |
141 | ||
142 | //sec vert | |
143 | if(fSigmaVert>cuts[6])return kFALSE; | |
144 | ||
145 | if(DecayLength()<cuts[7])return kFALSE; | |
146 | ||
147 | if(TMath::Abs(PtProng(0))<cuts[8] && TMath::Abs(PtProng(1))<cuts[8] && TMath::Abs(PtProng(2))<cuts[8])return kFALSE; | |
148 | if(CosPointingAngle() < cuts[9])return kFALSE; | |
149 | Double_t sum2=Getd0Prong(0)*Getd0Prong(0)+Getd0Prong(1)*Getd0Prong(1)+Getd0Prong(2)*Getd0Prong(2); | |
150 | if(sum2<cuts[10])return kFALSE; | |
151 | return kTRUE; | |
152 | } | |
79250a2b | 153 | //-------------------------------------------------------------------------- |
9fce5365 | 154 | Bool_t AliAODRecoDecayHF3Prong::SelectDs(const Double_t *cuts,Int_t &okDsKKpi,Int_t &okDspiKK, Int_t &okMassPhi, Int_t &okMassK0star) |
79250a2b | 155 | const { |
156 | // | |
6ea608bf | 157 | // This function compares the Ds with a set of cuts |
158 | // (same variables as D+, for now) | |
79250a2b | 159 | // |
160 | // cuts[0] = inv. mass half width [GeV] | |
6ea608bf | 161 | // cuts[1] = pTK [GeV/c] |
162 | // cuts[2] = pTPi [GeV/c] | |
163 | // cuts[3] = d0K [cm] lower limit! | |
164 | // cuts[4] = d0Pi [cm] lower limit! | |
165 | // cuts[5] = dist12 (cm) | |
166 | // cuts[6] = sigmavert (cm) | |
167 | // cuts[7] = dist prim-sec (cm) | |
168 | // cuts[8] = pM=Max{pT1,pT2,pT3} (GeV/c) | |
169 | // cuts[9] = cosThetaPoint | |
170 | // cuts[10] = Sum d0^2 (cm^2) | |
171 | // cuts[11] = dca cut (cm) | |
9fce5365 | 172 | // cuts[12] = max. inv. mass difference(Mphi-MKK) [GeV] |
173 | // cuts[13] = max. inv. mass difference(MK0*-MKpi) [GeV] | |
79250a2b | 174 | // |
175 | // If candidate Ds does not pass the cuts return kFALSE | |
176 | // | |
177 | Double_t mDsKKpi,mDspiKK; | |
178 | okDsKKpi=1; okDspiKK=1; | |
9fce5365 | 179 | okMassPhi=0; okMassK0star=0; |
79250a2b | 180 | |
181 | Double_t mDsPDG = TDatabasePDG::Instance()->GetParticle(431)->Mass(); | |
182 | ||
183 | mDsKKpi=InvMassDsKKpi(); | |
184 | mDspiKK=InvMassDspiKK(); | |
185 | ||
186 | if(TMath::Abs(mDsKKpi-mDsPDG)>cuts[0]) okDsKKpi = 0; | |
187 | if(TMath::Abs(mDspiKK-mDsPDG)>cuts[0]) okDspiKK = 0; | |
188 | if(!okDsKKpi && !okDspiKK) return kFALSE; | |
189 | ||
6ea608bf | 190 | //single track |
191 | if(TMath::Abs(PtProng(0)) < cuts[1] || TMath::Abs(Getd0Prong(0))<cuts[3])return kFALSE;//Kaon1 | |
192 | if(TMath::Abs(PtProng(1)) < cuts[1] || TMath::Abs(Getd0Prong(1))<cuts[3])return kFALSE;//Kaon2 | |
81679460 | 193 | if(TMath::Abs(PtProng(2)) < cuts[2] || TMath::Abs(Getd0Prong(2))<cuts[4])return kFALSE;//Pion |
6ea608bf | 194 | |
81679460 | 195 | // cuts on resonant decays (via Phi or K0*) |
81679460 | 196 | Double_t mPhiPDG = TDatabasePDG::Instance()->GetParticle(333)->Mass(); |
9fce5365 | 197 | Double_t mK0starPDG = TDatabasePDG::Instance()->GetParticle(313)->Mass(); |
198 | if(okDsKKpi){ | |
199 | Double_t mass01phi=InvMass2Prongs(0,1,321,321); | |
200 | Double_t mass12K0s=InvMass2Prongs(1,2,321,211); | |
201 | if(TMath::Abs(mass01phi-mPhiPDG)<cuts[12]) okMassPhi=1; | |
202 | if(TMath::Abs(mass12K0s-mK0starPDG)<cuts[13]) okMassK0star = 1; | |
203 | if(!okMassPhi && !okMassK0star) okDsKKpi=kFALSE; | |
204 | } | |
205 | if(okDspiKK){ | |
206 | Double_t mass01K0s=InvMass2Prongs(0,1,211,321); | |
207 | Double_t mass12phi=InvMass2Prongs(1,2,321,321); | |
208 | if(TMath::Abs(mass01K0s-mK0starPDG)<cuts[13]) okMassK0star = 1; | |
209 | if(TMath::Abs(mass12phi-mPhiPDG)<cuts[12]) okMassPhi=1; | |
210 | if(!okMassPhi && !okMassK0star) okDspiKK=kFALSE; | |
211 | } | |
212 | if(!okDsKKpi && !okDspiKK) return kFALSE; | |
213 | ||
214 | ||
215 | ||
81679460 | 216 | |
6ea608bf | 217 | //DCA |
81679460 | 218 | for(Int_t i=0;i<3;i++) if(GetDCA(i)>cuts[11])return kFALSE; |
6ea608bf | 219 | |
220 | //2track cuts | |
221 | if(fDist12toPrim<cuts[5] || fDist23toPrim<cuts[5])return kFALSE; | |
6ea608bf | 222 | |
223 | //sec vert | |
224 | if(fSigmaVert>cuts[6])return kFALSE; | |
225 | ||
226 | if(DecayLength()<cuts[7])return kFALSE; | |
227 | ||
228 | if(TMath::Abs(PtProng(0))<cuts[8] && TMath::Abs(PtProng(1))<cuts[8] && TMath::Abs(PtProng(2))<cuts[8])return kFALSE; | |
229 | if(CosPointingAngle() < cuts[9])return kFALSE; | |
230 | Double_t sum2=Getd0Prong(0)*Getd0Prong(0)+Getd0Prong(1)*Getd0Prong(1)+Getd0Prong(2)*Getd0Prong(2); | |
231 | if(sum2<cuts[10])return kFALSE; | |
232 | ||
79250a2b | 233 | return kTRUE; |
234 | } | |
235 | //-------------------------------------------------------------------------- | |
236 | Bool_t AliAODRecoDecayHF3Prong::SelectLc(const Double_t *cuts,Int_t &okLcpKpi,Int_t &okLcpiKp) | |
237 | const { | |
238 | // | |
6ea608bf | 239 | // This function compares the Lc with a set of cuts |
240 | // (same variables as D+, for now) | |
79250a2b | 241 | // |
242 | // cuts[0] = inv. mass half width [GeV] | |
6ea608bf | 243 | // cuts[1] = pTP [GeV/c] |
244 | // cuts[2] = pTPi and pTK [GeV/c] | |
245 | // cuts[3] = d0P [cm] lower limit! | |
246 | // cuts[4] = d0Pi and d0K [cm] lower limit! | |
247 | // cuts[5] = dist12 (cm) | |
248 | // cuts[6] = sigmavert (cm) | |
249 | // cuts[7] = dist prim-sec (cm) | |
250 | // cuts[8] = pM=Max{pT1,pT2,pT3} (GeV/c) | |
251 | // cuts[9] = cosThetaPoint | |
252 | // cuts[10] = Sum d0^2 (cm^2) | |
253 | // cuts[11] = dca cut (cm) | |
79250a2b | 254 | // |
255 | // If candidate Lc does not pass the cuts return kFALSE | |
256 | // | |
257 | Double_t mLcpKpi,mLcpiKp; | |
258 | okLcpKpi=1; okLcpiKp=1; | |
259 | ||
260 | Double_t mLcPDG = TDatabasePDG::Instance()->GetParticle(4122)->Mass(); | |
261 | ||
262 | mLcpKpi=InvMassLcpKpi(); | |
263 | mLcpiKp=InvMassLcpiKp(); | |
264 | ||
265 | if(TMath::Abs(mLcpKpi-mLcPDG)>cuts[0]) okLcpKpi = 0; | |
266 | if(TMath::Abs(mLcpiKp-mLcPDG)>cuts[0]) okLcpiKp = 0; | |
267 | if(!okLcpKpi && !okLcpiKp) return kFALSE; | |
268 | ||
6ea608bf | 269 | //single track |
270 | if(TMath::Abs(PtProng(0)) < cuts[1] || TMath::Abs(Getd0Prong(0))<cuts[3])return kFALSE;//Proton | |
271 | if(TMath::Abs(PtProng(1)) < cuts[2] || TMath::Abs(Getd0Prong(1))<cuts[4])return kFALSE;//Kaon | |
272 | if(TMath::Abs(PtProng(2)) < cuts[2] || TMath::Abs(Getd0Prong(2))<cuts[4])return kFALSE;//Pion | |
273 | ||
274 | //DCA | |
81679460 | 275 | for(Int_t i=0;i<3;i++) if(GetDCA(i)>cuts[11])return kFALSE; |
6ea608bf | 276 | |
277 | //2track cuts | |
278 | if(fDist12toPrim<cuts[5] || fDist23toPrim<cuts[5])return kFALSE; | |
279 | if(Getd0Prong(0)*Getd0Prong(1)<0. && Getd0Prong(2)*Getd0Prong(1)<0.)return kFALSE; | |
280 | ||
281 | //sec vert | |
282 | if(fSigmaVert>cuts[6])return kFALSE; | |
283 | ||
284 | if(DecayLength()<cuts[7])return kFALSE; | |
285 | ||
286 | if(TMath::Abs(PtProng(0))<cuts[8] && TMath::Abs(PtProng(1))<cuts[8] && TMath::Abs(PtProng(2))<cuts[8])return kFALSE; | |
287 | if(CosPointingAngle() < cuts[9])return kFALSE; | |
288 | Double_t sum2=Getd0Prong(0)*Getd0Prong(0)+Getd0Prong(1)*Getd0Prong(1)+Getd0Prong(2)*Getd0Prong(2); | |
289 | if(sum2<cuts[10])return kFALSE; | |
290 | ||
79250a2b | 291 | return kTRUE; |
292 | } |