1 /**************************************************************************
2 * Copyright(c) 1998-2006, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 /////////////////////////////////////////////////////////////
18 // Base class for AOD reconstructed heavy-flavour 3-prong decay
20 // Author: E.Bruna bruna@to.infn.it, F.Prino prino@to.infn.it
21 /////////////////////////////////////////////////////////////
23 #include <TDatabasePDG.h>
24 #include "AliAODRecoDecayHF.h"
25 #include "AliAODRecoDecayHF3Prong.h"
26 #include "AliAODTrack.h"
28 ClassImp(AliAODRecoDecayHF3Prong)
30 //--------------------------------------------------------------------------
31 AliAODRecoDecayHF3Prong::AliAODRecoDecayHF3Prong() :
38 // Default Constructor
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),
49 fDist12toPrim(dist12),
53 // Constructor with AliAODVertex for decay vertex
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),
64 fDist12toPrim(dist12),
68 // Constructor with AliAODVertex for decay vertex and without prongs momenta
72 //--------------------------------------------------------------------------
73 AliAODRecoDecayHF3Prong::AliAODRecoDecayHF3Prong(const AliAODRecoDecayHF3Prong &source) :
74 AliAODRecoDecayHF(source),
75 fSigmaVert(source.fSigmaVert),
76 fDist12toPrim(source.fDist12toPrim),
77 fDist23toPrim(source.fDist23toPrim)
83 //--------------------------------------------------------------------------
84 AliAODRecoDecayHF3Prong &AliAODRecoDecayHF3Prong::operator=(const AliAODRecoDecayHF3Prong &source)
87 // assignment operator
89 if(&source == this) return *this;
91 AliAODRecoDecayHF::operator=(source);
93 fDist12toPrim= source.fDist12toPrim;
94 fDist23toPrim= source.fDist23toPrim;
95 fSigmaVert= source.fSigmaVert;
99 //-------------Temporary fix: overload AliAODRecoDecay::Charge()-----------
100 Short_t AliAODRecoDecayHF3Prong::Charge() const {
102 for(Int_t daught=0;daught<=2;daught++)charge=charge+((AliAODTrack*)GetDaughter(daught))->Charge();
105 //--------------------------------------------------------------------------
106 Bool_t AliAODRecoDecayHF3Prong::SelectDplus(const Double_t *cuts)
109 // This function compares the Dplus with a set of cuts:
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)
124 // If candidate Dplus does not pass the cuts return kFALSE
127 Double_t mDplusPDG = TDatabasePDG::Instance()->GetParticle(411)->Mass();
128 Double_t mDplus=InvMassDplus();
129 if(TMath::Abs(mDplus-mDplusPDG)>cuts[0])return kFALSE;
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
136 for(Int_t i=0;i<3;i++) if(GetDCA(i)>cuts[11])return kFALSE;
139 if(fDist12toPrim<cuts[5] || fDist23toPrim<cuts[5])return kFALSE;
140 if(Getd0Prong(0)*Getd0Prong(1)<0. && Getd0Prong(2)*Getd0Prong(1)<0.)return kFALSE;
143 if(fSigmaVert>cuts[6])return kFALSE;
145 if(DecayLength()<cuts[7])return kFALSE;
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;
153 //--------------------------------------------------------------------------
154 Bool_t AliAODRecoDecayHF3Prong::SelectDs(const Double_t *cuts,Int_t &okDsKKpi,Int_t &okDspiKK, Int_t &okMassPhi, Int_t &okMassK0star)
157 // This function compares the Ds with a set of cuts
158 // (same variables as D+, for now)
160 // cuts[0] = inv. mass half width [GeV]
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)
172 // cuts[12] = max. inv. mass difference(Mphi-MKK) [GeV]
173 // cuts[13] = max. inv. mass difference(MK0*-MKpi) [GeV]
175 // If candidate Ds does not pass the cuts return kFALSE
177 Double_t mDsKKpi,mDspiKK;
178 okDsKKpi=1; okDspiKK=1;
179 okMassPhi=0; okMassK0star=0;
181 Double_t mDsPDG = TDatabasePDG::Instance()->GetParticle(431)->Mass();
183 mDsKKpi=InvMassDsKKpi();
184 mDspiKK=InvMassDspiKK();
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;
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
193 if(TMath::Abs(PtProng(2)) < cuts[2] || TMath::Abs(Getd0Prong(2))<cuts[4])return kFALSE;//Pion
195 // cuts on resonant decays (via Phi or K0*)
196 Double_t mPhiPDG = TDatabasePDG::Instance()->GetParticle(333)->Mass();
197 Double_t mK0starPDG = TDatabasePDG::Instance()->GetParticle(313)->Mass();
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;
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;
212 if(!okDsKKpi && !okDspiKK) return kFALSE;
218 for(Int_t i=0;i<3;i++) if(GetDCA(i)>cuts[11])return kFALSE;
221 if(fDist12toPrim<cuts[5] || fDist23toPrim<cuts[5])return kFALSE;
224 if(fSigmaVert>cuts[6])return kFALSE;
226 if(DecayLength()<cuts[7])return kFALSE;
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;
235 //--------------------------------------------------------------------------
236 Bool_t AliAODRecoDecayHF3Prong::SelectLc(const Double_t *cuts,Int_t &okLcpKpi,Int_t &okLcpiKp)
239 // This function compares the Lc with a set of cuts
240 // (same variables as D+, for now)
242 // cuts[0] = inv. mass half width [GeV]
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)
255 // If candidate Lc does not pass the cuts return kFALSE
257 Double_t mLcpKpi,mLcpiKp;
258 okLcpKpi=1; okLcpiKp=1;
260 Double_t mLcPDG = TDatabasePDG::Instance()->GetParticle(4122)->Mass();
262 mLcpKpi=InvMassLcpKpi();
263 mLcpiKp=InvMassLcpiKp();
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;
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
275 for(Int_t i=0;i<3;i++) if(GetDCA(i)>cuts[11])return kFALSE;
278 if(fDist12toPrim<cuts[5] || fDist23toPrim<cuts[5])return kFALSE;
279 if(Getd0Prong(0)*Getd0Prong(1)<0. && Getd0Prong(2)*Getd0Prong(1)<0.)return kFALSE;
282 if(fSigmaVert>cuts[6])return kFALSE;
284 if(DecayLength()<cuts[7])return kFALSE;
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;