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"
27 ClassImp(AliAODRecoDecayHF3Prong)
29 //--------------------------------------------------------------------------
30 AliAODRecoDecayHF3Prong::AliAODRecoDecayHF3Prong() :
37 // Default Constructor
40 //--------------------------------------------------------------------------
41 AliAODRecoDecayHF3Prong::AliAODRecoDecayHF3Prong(AliAODVertex *vtx2,
42 Double_t *px,Double_t *py,Double_t *pz,
43 Double_t *d0,Double_t *d0err,
44 Double_t *dca, Double_t sigvert,
45 Double_t dist12,Double_t dist23,Short_t charge) :
46 AliAODRecoDecayHF(vtx2,3,charge,px,py,pz,d0,d0err),
48 fDist12toPrim(dist12),
52 // Constructor with AliAODVertex for decay vertex
56 //--------------------------------------------------------------------------
57 AliAODRecoDecayHF3Prong::AliAODRecoDecayHF3Prong(AliAODVertex *vtx2,
58 Double_t *d0,Double_t *d0err,
59 Double_t *dca, Double_t sigvert,
60 Double_t dist12,Double_t dist23, Short_t charge) :
61 AliAODRecoDecayHF(vtx2,3,charge,d0,d0err),
63 fDist12toPrim(dist12),
67 // Constructor with AliAODVertex for decay vertex and without prongs momenta
71 //--------------------------------------------------------------------------
72 AliAODRecoDecayHF3Prong::AliAODRecoDecayHF3Prong(const AliAODRecoDecayHF3Prong &source) :
73 AliAODRecoDecayHF(source),
74 fSigmaVert(source.fSigmaVert),
75 fDist12toPrim(source.fDist12toPrim),
76 fDist23toPrim(source.fDist23toPrim)
82 //--------------------------------------------------------------------------
83 AliAODRecoDecayHF3Prong &AliAODRecoDecayHF3Prong::operator=(const AliAODRecoDecayHF3Prong &source)
86 // assignment operator
88 if(&source == this) return *this;
90 AliAODRecoDecayHF::operator=(source);
92 fDist12toPrim= source.fDist12toPrim;
93 fDist23toPrim= source.fDist23toPrim;
94 fSigmaVert= source.fSigmaVert;
98 //--------------------------------------------------------------------------
99 Bool_t AliAODRecoDecayHF3Prong::SelectDplus(const Double_t *cuts)
102 // This function compares the Dplus with a set of cuts:
104 // cuts[0] = inv. mass half width [GeV]
105 // cuts[1] = pTK [GeV/c]
106 // cuts[2] = pTPi [GeV/c]
107 // cuts[3] = d0K [cm] lower limit!
108 // cuts[4] = d0Pi [cm] lower limit!
109 // cuts[5] = dist12 (cm)
110 // cuts[6] = sigmavert (cm)
111 // cuts[7] = dist prim-sec (cm)
112 // cuts[8] = pM=Max{pT1,pT2,pT3} (GeV/c)
113 // cuts[9] = cosThetaPoint
114 // cuts[10] = Sum d0^2 (cm^2)
115 // cuts[11] = dca cut (cm)
117 // If candidate Dplus does not pass the cuts return kFALSE
120 Double_t mDplusPDG = TDatabasePDG::Instance()->GetParticle(411)->Mass();
121 Double_t mDplus=InvMassDplus();
122 if(TMath::Abs(mDplus-mDplusPDG)>cuts[0])return kFALSE;
124 if(TMath::Abs(PtProng(1)) < cuts[1] || TMath::Abs(Getd0Prong(1))<cuts[3])return kFALSE;//Kaon
125 if(TMath::Abs(PtProng(0)) < cuts[2] || TMath::Abs(Getd0Prong(0))<cuts[4])return kFALSE;//Pion1
126 if(TMath::Abs(PtProng(2)) < cuts[2] || TMath::Abs(Getd0Prong(2))<cuts[4])return kFALSE;//Pion2
129 for(Int_t i=0;i<3;i++) if(GetDCA(i)>cuts[11])return kFALSE;
132 if(fDist12toPrim<cuts[5] || fDist23toPrim<cuts[5])return kFALSE;
133 if(Getd0Prong(0)*Getd0Prong(1)<0. && Getd0Prong(2)*Getd0Prong(1)<0.)return kFALSE;
136 if(fSigmaVert>cuts[6])return kFALSE;
138 if(DecayLength()<cuts[7])return kFALSE;
140 if(TMath::Abs(PtProng(0))<cuts[8] && TMath::Abs(PtProng(1))<cuts[8] && TMath::Abs(PtProng(2))<cuts[8])return kFALSE;
141 if(CosPointingAngle() < cuts[9])return kFALSE;
142 Double_t sum2=Getd0Prong(0)*Getd0Prong(0)+Getd0Prong(1)*Getd0Prong(1)+Getd0Prong(2)*Getd0Prong(2);
143 if(sum2<cuts[10])return kFALSE;
146 //--------------------------------------------------------------------------
147 Bool_t AliAODRecoDecayHF3Prong::SelectDs(const Double_t *cuts,Int_t &okDsKKpi,Int_t &okDspiKK, Int_t &okMassPhi, Int_t &okMassK0star)
150 // This function compares the Ds with a set of cuts
151 // (same variables as D+, for now)
153 // cuts[0] = inv. mass half width [GeV]
154 // cuts[1] = pTK [GeV/c]
155 // cuts[2] = pTPi [GeV/c]
156 // cuts[3] = d0K [cm] lower limit!
157 // cuts[4] = d0Pi [cm] lower limit!
158 // cuts[5] = dist12 (cm)
159 // cuts[6] = sigmavert (cm)
160 // cuts[7] = dist prim-sec (cm)
161 // cuts[8] = pM=Max{pT1,pT2,pT3} (GeV/c)
162 // cuts[9] = cosThetaPoint
163 // cuts[10] = Sum d0^2 (cm^2)
164 // cuts[11] = dca cut (cm)
165 // cuts[12] = max. inv. mass difference(Mphi-MKK) [GeV]
166 // cuts[13] = max. inv. mass difference(MK0*-MKpi) [GeV]
168 // If candidate Ds does not pass the cuts return kFALSE
170 Double_t mDsKKpi,mDspiKK;
171 okDsKKpi=1; okDspiKK=1;
172 okMassPhi=0; okMassK0star=0;
174 Double_t mDsPDG = TDatabasePDG::Instance()->GetParticle(431)->Mass();
176 mDsKKpi=InvMassDsKKpi();
177 mDspiKK=InvMassDspiKK();
179 if(TMath::Abs(mDsKKpi-mDsPDG)>cuts[0]) okDsKKpi = 0;
180 if(TMath::Abs(mDspiKK-mDsPDG)>cuts[0]) okDspiKK = 0;
181 if(!okDsKKpi && !okDspiKK) return kFALSE;
184 if(TMath::Abs(PtProng(0)) < cuts[1] || TMath::Abs(Getd0Prong(0))<cuts[3])return kFALSE;//Kaon1
185 if(TMath::Abs(PtProng(1)) < cuts[1] || TMath::Abs(Getd0Prong(1))<cuts[3])return kFALSE;//Kaon2
186 if(TMath::Abs(PtProng(2)) < cuts[2] || TMath::Abs(Getd0Prong(2))<cuts[4])return kFALSE;//Pion
188 // cuts on resonant decays (via Phi or K0*)
189 Double_t mPhiPDG = TDatabasePDG::Instance()->GetParticle(333)->Mass();
190 Double_t mK0starPDG = TDatabasePDG::Instance()->GetParticle(313)->Mass();
192 Double_t mass01phi=InvMass2Prongs(0,1,321,321);
193 Double_t mass12K0s=InvMass2Prongs(1,2,321,211);
194 if(TMath::Abs(mass01phi-mPhiPDG)<cuts[12]) okMassPhi=1;
195 if(TMath::Abs(mass12K0s-mK0starPDG)<cuts[13]) okMassK0star = 1;
196 if(!okMassPhi && !okMassK0star) okDsKKpi=kFALSE;
199 Double_t mass01K0s=InvMass2Prongs(0,1,211,321);
200 Double_t mass12phi=InvMass2Prongs(1,2,321,321);
201 if(TMath::Abs(mass01K0s-mK0starPDG)<cuts[13]) okMassK0star = 1;
202 if(TMath::Abs(mass12phi-mPhiPDG)<cuts[12]) okMassPhi=1;
203 if(!okMassPhi && !okMassK0star) okDspiKK=kFALSE;
205 if(!okDsKKpi && !okDspiKK) return kFALSE;
211 for(Int_t i=0;i<3;i++) if(GetDCA(i)>cuts[11])return kFALSE;
214 if(fDist12toPrim<cuts[5] || fDist23toPrim<cuts[5])return kFALSE;
217 if(fSigmaVert>cuts[6])return kFALSE;
219 if(DecayLength()<cuts[7])return kFALSE;
221 if(TMath::Abs(PtProng(0))<cuts[8] && TMath::Abs(PtProng(1))<cuts[8] && TMath::Abs(PtProng(2))<cuts[8])return kFALSE;
222 if(CosPointingAngle() < cuts[9])return kFALSE;
223 Double_t sum2=Getd0Prong(0)*Getd0Prong(0)+Getd0Prong(1)*Getd0Prong(1)+Getd0Prong(2)*Getd0Prong(2);
224 if(sum2<cuts[10])return kFALSE;
228 //--------------------------------------------------------------------------
229 Bool_t AliAODRecoDecayHF3Prong::SelectLc(const Double_t *cuts,Int_t &okLcpKpi,Int_t &okLcpiKp)
232 // This function compares the Lc with a set of cuts
233 // (same variables as D+, for now)
235 // cuts[0] = inv. mass half width [GeV]
236 // cuts[1] = pTP [GeV/c]
237 // cuts[2] = pTPi and pTK [GeV/c]
238 // cuts[3] = d0P [cm] lower limit!
239 // cuts[4] = d0Pi and d0K [cm] lower limit!
240 // cuts[5] = dist12 (cm)
241 // cuts[6] = sigmavert (cm)
242 // cuts[7] = dist prim-sec (cm)
243 // cuts[8] = pM=Max{pT1,pT2,pT3} (GeV/c)
244 // cuts[9] = cosThetaPoint
245 // cuts[10] = Sum d0^2 (cm^2)
246 // cuts[11] = dca cut (cm)
248 // If candidate Lc does not pass the cuts return kFALSE
250 Double_t mLcpKpi,mLcpiKp;
251 okLcpKpi=1; okLcpiKp=1;
253 Double_t mLcPDG = TDatabasePDG::Instance()->GetParticle(4122)->Mass();
255 mLcpKpi=InvMassLcpKpi();
256 mLcpiKp=InvMassLcpiKp();
258 if(TMath::Abs(mLcpKpi-mLcPDG)>cuts[0]) okLcpKpi = 0;
259 if(TMath::Abs(mLcpiKp-mLcPDG)>cuts[0]) okLcpiKp = 0;
260 if(!okLcpKpi && !okLcpiKp) return kFALSE;
263 if(TMath::Abs(PtProng(0)) < cuts[1] || TMath::Abs(Getd0Prong(0))<cuts[3])return kFALSE;//Proton
264 if(TMath::Abs(PtProng(1)) < cuts[2] || TMath::Abs(Getd0Prong(1))<cuts[4])return kFALSE;//Kaon
265 if(TMath::Abs(PtProng(2)) < cuts[2] || TMath::Abs(Getd0Prong(2))<cuts[4])return kFALSE;//Pion
268 for(Int_t i=0;i<3;i++) if(GetDCA(i)>cuts[11])return kFALSE;
271 if(fDist12toPrim<cuts[5] || fDist23toPrim<cuts[5])return kFALSE;
272 if(Getd0Prong(0)*Getd0Prong(1)<0. && Getd0Prong(2)*Getd0Prong(1)<0.)return kFALSE;
275 if(fSigmaVert>cuts[6])return kFALSE;
277 if(DecayLength()<cuts[7])return kFALSE;
279 if(TMath::Abs(PtProng(0))<cuts[8] && TMath::Abs(PtProng(1))<cuts[8] && TMath::Abs(PtProng(2))<cuts[8])return kFALSE;
280 if(CosPointingAngle() < cuts[9])return kFALSE;
281 Double_t sum2=Getd0Prong(0)*Getd0Prong(0)+Getd0Prong(1)*Getd0Prong(1)+Getd0Prong(2)*Getd0Prong(2);
282 if(sum2<cuts[10])return kFALSE;