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