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 **************************************************************************/
18 /////////////////////////////////////////////////////////////
20 // Base class for AOD reconstructed heavy-flavour 3-prong decay
22 // Author: E.Bruna bruna@to.infn.it, F.Prino prino@to.infn.it
23 /////////////////////////////////////////////////////////////
25 #include <TDatabasePDG.h>
26 #include "AliAODRecoDecayHF.h"
27 #include "AliAODRecoDecayHF3Prong.h"
28 #include "AliAODTrack.h"
30 ClassImp(AliAODRecoDecayHF3Prong)
32 //--------------------------------------------------------------------------
33 AliAODRecoDecayHF3Prong::AliAODRecoDecayHF3Prong() :
40 // Default Constructor
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),
51 fDist12toPrim(dist12),
55 // Constructor with AliAODVertex for decay vertex
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),
66 fDist12toPrim(dist12),
70 // Constructor with AliAODVertex for decay vertex and without prongs momenta
74 //--------------------------------------------------------------------------
75 AliAODRecoDecayHF3Prong::AliAODRecoDecayHF3Prong(const AliAODRecoDecayHF3Prong &source) :
76 AliAODRecoDecayHF(source),
77 fSigmaVert(source.fSigmaVert),
78 fDist12toPrim(source.fDist12toPrim),
79 fDist23toPrim(source.fDist23toPrim)
85 //--------------------------------------------------------------------------
86 AliAODRecoDecayHF3Prong &AliAODRecoDecayHF3Prong::operator=(const AliAODRecoDecayHF3Prong &source)
89 // assignment operator
91 if(&source == this) return *this;
93 AliAODRecoDecayHF::operator=(source);
95 fDist12toPrim= source.fDist12toPrim;
96 fDist23toPrim= source.fDist23toPrim;
97 fSigmaVert= source.fSigmaVert;
101 //-------------Temporary fix: overload AliAODRecoDecay::Charge()-----------
102 Short_t AliAODRecoDecayHF3Prong::Charge() const {
104 for(Int_t daught=0;daught<=2;daught++)charge=charge+((AliAODTrack*)GetDaughter(daught))->Charge();
107 //--------------------------------------------------------------------------
108 Bool_t AliAODRecoDecayHF3Prong::SelectDplus(const Double_t *cuts)
111 // This function compares the Dplus with a set of cuts:
113 // cuts[0] = inv. mass half width [GeV]
114 // cuts[1] = pTK [GeV/c]
115 // cuts[2] = pTPi [GeV/c]
116 // cuts[3] = d0K [cm] lower limit!
117 // cuts[4] = d0Pi [cm] lower limit!
118 // cuts[5] = dist12 (cm)
119 // cuts[6] = sigmavert (cm)
120 // cuts[7] = dist prim-sec (cm)
121 // cuts[8] = pM=Max{pT1,pT2,pT3} (GeV/c)
122 // cuts[9] = cosThetaPoint
123 // cuts[10] = Sum d0^2 (cm^2)
124 // cuts[11] = dca cut (cm)
126 // If candidate Dplus does not pass the cuts return kFALSE
129 Double_t mDplusPDG = TDatabasePDG::Instance()->GetParticle(411)->Mass();
130 Double_t mDplus=InvMassDplus();
131 if(TMath::Abs(mDplus-mDplusPDG)>cuts[0])return kFALSE;
133 if(TMath::Abs(PtProng(1)) < cuts[1] || TMath::Abs(Getd0Prong(1))<cuts[3])return kFALSE;//Kaon
134 if(TMath::Abs(PtProng(0)) < cuts[2] || TMath::Abs(Getd0Prong(0))<cuts[4])return kFALSE;//Pion1
135 if(TMath::Abs(PtProng(2)) < cuts[2] || TMath::Abs(Getd0Prong(2))<cuts[4])return kFALSE;//Pion2
138 for(Int_t i=0;i<3;i++) if(GetDCA(i)>cuts[11])return kFALSE;
141 if(fDist12toPrim<cuts[5] || fDist23toPrim<cuts[5])return kFALSE;
142 if(Getd0Prong(0)*Getd0Prong(1)<0. && Getd0Prong(2)*Getd0Prong(1)<0.)return kFALSE;
145 if(fSigmaVert>cuts[6])return kFALSE;
147 if(DecayLength()<cuts[7])return kFALSE;
149 if(TMath::Abs(PtProng(0))<cuts[8] && TMath::Abs(PtProng(1))<cuts[8] && TMath::Abs(PtProng(2))<cuts[8])return kFALSE;
150 if(CosPointingAngle() < cuts[9])return kFALSE;
151 Double_t sum2=Getd0Prong(0)*Getd0Prong(0)+Getd0Prong(1)*Getd0Prong(1)+Getd0Prong(2)*Getd0Prong(2);
152 if(sum2<cuts[10])return kFALSE;
155 //--------------------------------------------------------------------------
156 Bool_t AliAODRecoDecayHF3Prong::SelectDs(const Double_t *cuts,Int_t &okDsKKpi,Int_t &okDspiKK, Int_t &okMassPhi, Int_t &okMassK0star)
159 // This function compares the Ds with a set of cuts
160 // (same variables as D+, for now)
162 // cuts[0] = inv. mass half width [GeV]
163 // cuts[1] = pTK [GeV/c]
164 // cuts[2] = pTPi [GeV/c]
165 // cuts[3] = d0K [cm] lower limit!
166 // cuts[4] = d0Pi [cm] lower limit!
167 // cuts[5] = dist12 (cm)
168 // cuts[6] = sigmavert (cm)
169 // cuts[7] = dist prim-sec (cm)
170 // cuts[8] = pM=Max{pT1,pT2,pT3} (GeV/c)
171 // cuts[9] = cosThetaPoint
172 // cuts[10] = Sum d0^2 (cm^2)
173 // cuts[11] = dca cut (cm)
174 // cuts[12] = max. inv. mass difference(Mphi-MKK) [GeV]
175 // cuts[13] = max. inv. mass difference(MK0*-MKpi) [GeV]
177 // If candidate Ds does not pass the cuts return kFALSE
179 Double_t mDsKKpi,mDspiKK;
180 okDsKKpi=1; okDspiKK=1;
181 okMassPhi=0; okMassK0star=0;
183 Double_t mDsPDG = TDatabasePDG::Instance()->GetParticle(431)->Mass();
185 mDsKKpi=InvMassDsKKpi();
186 mDspiKK=InvMassDspiKK();
188 if(TMath::Abs(mDsKKpi-mDsPDG)>cuts[0]) okDsKKpi = 0;
189 if(TMath::Abs(mDspiKK-mDsPDG)>cuts[0]) okDspiKK = 0;
190 if(!okDsKKpi && !okDspiKK) return kFALSE;
193 if(TMath::Abs(PtProng(0)) < cuts[1] || TMath::Abs(Getd0Prong(0))<cuts[3])return kFALSE;//Kaon1
194 if(TMath::Abs(PtProng(1)) < cuts[1] || TMath::Abs(Getd0Prong(1))<cuts[3])return kFALSE;//Kaon2
195 if(TMath::Abs(PtProng(2)) < cuts[2] || TMath::Abs(Getd0Prong(2))<cuts[4])return kFALSE;//Pion
197 // cuts on resonant decays (via Phi or K0*)
198 Double_t mPhiPDG = TDatabasePDG::Instance()->GetParticle(333)->Mass();
199 Double_t mK0starPDG = TDatabasePDG::Instance()->GetParticle(313)->Mass();
201 Double_t mass01phi=InvMass2Prongs(0,1,321,321);
202 Double_t mass12K0s=InvMass2Prongs(1,2,321,211);
203 if(TMath::Abs(mass01phi-mPhiPDG)<cuts[12]) okMassPhi=1;
204 if(TMath::Abs(mass12K0s-mK0starPDG)<cuts[13]) okMassK0star = 1;
205 if(!okMassPhi && !okMassK0star) okDsKKpi=kFALSE;
208 Double_t mass01K0s=InvMass2Prongs(0,1,211,321);
209 Double_t mass12phi=InvMass2Prongs(1,2,321,321);
210 if(TMath::Abs(mass01K0s-mK0starPDG)<cuts[13]) okMassK0star = 1;
211 if(TMath::Abs(mass12phi-mPhiPDG)<cuts[12]) okMassPhi=1;
212 if(!okMassPhi && !okMassK0star) okDspiKK=kFALSE;
214 if(!okDsKKpi && !okDspiKK) return kFALSE;
220 for(Int_t i=0;i<3;i++) if(GetDCA(i)>cuts[11])return kFALSE;
223 if(fDist12toPrim<cuts[5] || fDist23toPrim<cuts[5])return kFALSE;
226 if(fSigmaVert>cuts[6])return kFALSE;
228 if(DecayLength()<cuts[7])return kFALSE;
230 if(TMath::Abs(PtProng(0))<cuts[8] && TMath::Abs(PtProng(1))<cuts[8] && TMath::Abs(PtProng(2))<cuts[8])return kFALSE;
231 if(CosPointingAngle() < cuts[9])return kFALSE;
232 Double_t sum2=Getd0Prong(0)*Getd0Prong(0)+Getd0Prong(1)*Getd0Prong(1)+Getd0Prong(2)*Getd0Prong(2);
233 if(sum2<cuts[10])return kFALSE;
237 //--------------------------------------------------------------------------
238 Bool_t AliAODRecoDecayHF3Prong::SelectLc(const Double_t *cuts,Int_t &okLcpKpi,Int_t &okLcpiKp)
241 // This function compares the Lc with a set of cuts
242 // (same variables as D+, for now)
244 // cuts[0] = inv. mass half width [GeV]
245 // cuts[1] = pTP [GeV/c]
246 // cuts[2] = pTPi and pTK [GeV/c]
247 // cuts[3] = d0P [cm] lower limit!
248 // cuts[4] = d0Pi and d0K [cm] lower limit!
249 // cuts[5] = dist12 (cm)
250 // cuts[6] = sigmavert (cm)
251 // cuts[7] = dist prim-sec (cm)
252 // cuts[8] = pM=Max{pT1,pT2,pT3} (GeV/c)
253 // cuts[9] = cosThetaPoint
254 // cuts[10] = Sum d0^2 (cm^2)
255 // cuts[11] = dca cut (cm)
257 // If candidate Lc does not pass the cuts return kFALSE
259 Double_t mLcpKpi,mLcpiKp;
260 okLcpKpi=1; okLcpiKp=1;
262 Double_t mLcPDG = TDatabasePDG::Instance()->GetParticle(4122)->Mass();
264 mLcpKpi=InvMassLcpKpi();
265 mLcpiKp=InvMassLcpiKp();
267 if(TMath::Abs(mLcpKpi-mLcPDG)>cuts[0]) okLcpKpi = 0;
268 if(TMath::Abs(mLcpiKp-mLcPDG)>cuts[0]) okLcpiKp = 0;
269 if(!okLcpKpi && !okLcpiKp) return kFALSE;
272 if(TMath::Abs(PtProng(0)) < cuts[1] || TMath::Abs(Getd0Prong(0))<cuts[3])return kFALSE;//Proton
273 if(TMath::Abs(PtProng(1)) < cuts[2] || TMath::Abs(Getd0Prong(1))<cuts[4])return kFALSE;//Kaon
274 if(TMath::Abs(PtProng(2)) < cuts[2] || TMath::Abs(Getd0Prong(2))<cuts[4])return kFALSE;//Pion
277 for(Int_t i=0;i<3;i++) if(GetDCA(i)>cuts[11])return kFALSE;
280 if(fDist12toPrim<cuts[5] || fDist23toPrim<cuts[5])return kFALSE;
281 if(Getd0Prong(0)*Getd0Prong(1)<0. && Getd0Prong(2)*Getd0Prong(1)<0.)return kFALSE;
284 if(fSigmaVert>cuts[6])return kFALSE;
286 if(DecayLength()<cuts[7])return kFALSE;
288 if(TMath::Abs(PtProng(0))<cuts[8] && TMath::Abs(PtProng(1))<cuts[8] && TMath::Abs(PtProng(2))<cuts[8])return kFALSE;
289 if(CosPointingAngle() < cuts[9])return kFALSE;
290 Double_t sum2=Getd0Prong(0)*Getd0Prong(0)+Getd0Prong(1)*Getd0Prong(1)+Getd0Prong(2)*Getd0Prong(2);
291 if(sum2<cuts[10])return kFALSE;