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)
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 and MK0*-MKpi) [GeV]
167 // If candidate Ds does not pass the cuts return kFALSE
169 Double_t mDsKKpi,mDspiKK;
170 okDsKKpi=1; okDspiKK=1;
172 Double_t mDsPDG = TDatabasePDG::Instance()->GetParticle(431)->Mass();
174 mDsKKpi=InvMassDsKKpi();
175 mDspiKK=InvMassDspiKK();
177 if(TMath::Abs(mDsKKpi-mDsPDG)>cuts[0]) okDsKKpi = 0;
178 if(TMath::Abs(mDspiKK-mDsPDG)>cuts[0]) okDspiKK = 0;
179 if(!okDsKKpi && !okDspiKK) return kFALSE;
182 if(TMath::Abs(PtProng(0)) < cuts[1] || TMath::Abs(Getd0Prong(0))<cuts[3])return kFALSE;//Kaon1
183 if(TMath::Abs(PtProng(1)) < cuts[1] || TMath::Abs(Getd0Prong(1))<cuts[3])return kFALSE;//Kaon2
184 if(TMath::Abs(PtProng(2)) < cuts[2] || TMath::Abs(Getd0Prong(2))<cuts[4])return kFALSE;//Pion
186 // cuts on resonant decays (via Phi or K0*)
188 Double_t mass01phi=InvMass2Prongs(0,1,321,321);
189 Double_t mass12phi=InvMass2Prongs(1,2,321,321);
190 Double_t mPhiPDG = TDatabasePDG::Instance()->GetParticle(333)->Mass();
191 if(TMath::Abs(mass01phi-mPhiPDG)>cuts[12] && TMath::Abs(mass12phi-mPhiPDG)>cuts[12]) okMassPhi = 0;
192 Bool_t okMassK0star=1;
193 Double_t mass01K0s=InvMass2Prongs(0,1,211,321);
194 Double_t mass12K0s=InvMass2Prongs(1,2,321,211);
195 Double_t mK0sPDG = TDatabasePDG::Instance()->GetParticle(313)->Mass();
196 if(TMath::Abs(mass01K0s-mK0sPDG)>cuts[12] && TMath::Abs(mass12K0s-mK0sPDG)>cuts[12]) okMassK0star = 0;
197 if(!okMassPhi && !okMassK0star) return kFALSE;
200 for(Int_t i=0;i<3;i++) if(GetDCA(i)>cuts[11])return kFALSE;
203 if(fDist12toPrim<cuts[5] || fDist23toPrim<cuts[5])return kFALSE;
206 if(fSigmaVert>cuts[6])return kFALSE;
208 if(DecayLength()<cuts[7])return kFALSE;
210 if(TMath::Abs(PtProng(0))<cuts[8] && TMath::Abs(PtProng(1))<cuts[8] && TMath::Abs(PtProng(2))<cuts[8])return kFALSE;
211 if(CosPointingAngle() < cuts[9])return kFALSE;
212 Double_t sum2=Getd0Prong(0)*Getd0Prong(0)+Getd0Prong(1)*Getd0Prong(1)+Getd0Prong(2)*Getd0Prong(2);
213 if(sum2<cuts[10])return kFALSE;
217 //--------------------------------------------------------------------------
218 Bool_t AliAODRecoDecayHF3Prong::SelectLc(const Double_t *cuts,Int_t &okLcpKpi,Int_t &okLcpiKp)
221 // This function compares the Lc with a set of cuts
222 // (same variables as D+, for now)
224 // cuts[0] = inv. mass half width [GeV]
225 // cuts[1] = pTP [GeV/c]
226 // cuts[2] = pTPi and pTK [GeV/c]
227 // cuts[3] = d0P [cm] lower limit!
228 // cuts[4] = d0Pi and d0K [cm] lower limit!
229 // cuts[5] = dist12 (cm)
230 // cuts[6] = sigmavert (cm)
231 // cuts[7] = dist prim-sec (cm)
232 // cuts[8] = pM=Max{pT1,pT2,pT3} (GeV/c)
233 // cuts[9] = cosThetaPoint
234 // cuts[10] = Sum d0^2 (cm^2)
235 // cuts[11] = dca cut (cm)
237 // If candidate Lc does not pass the cuts return kFALSE
239 Double_t mLcpKpi,mLcpiKp;
240 okLcpKpi=1; okLcpiKp=1;
242 Double_t mLcPDG = TDatabasePDG::Instance()->GetParticle(4122)->Mass();
244 mLcpKpi=InvMassLcpKpi();
245 mLcpiKp=InvMassLcpiKp();
247 if(TMath::Abs(mLcpKpi-mLcPDG)>cuts[0]) okLcpKpi = 0;
248 if(TMath::Abs(mLcpiKp-mLcPDG)>cuts[0]) okLcpiKp = 0;
249 if(!okLcpKpi && !okLcpiKp) return kFALSE;
252 if(TMath::Abs(PtProng(0)) < cuts[1] || TMath::Abs(Getd0Prong(0))<cuts[3])return kFALSE;//Proton
253 if(TMath::Abs(PtProng(1)) < cuts[2] || TMath::Abs(Getd0Prong(1))<cuts[4])return kFALSE;//Kaon
254 if(TMath::Abs(PtProng(2)) < cuts[2] || TMath::Abs(Getd0Prong(2))<cuts[4])return kFALSE;//Pion
257 for(Int_t i=0;i<3;i++) if(GetDCA(i)>cuts[11])return kFALSE;
260 if(fDist12toPrim<cuts[5] || fDist23toPrim<cuts[5])return kFALSE;
261 if(Getd0Prong(0)*Getd0Prong(1)<0. && Getd0Prong(2)*Getd0Prong(1)<0.)return kFALSE;
264 if(fSigmaVert>cuts[6])return kFALSE;
266 if(DecayLength()<cuts[7])return kFALSE;
268 if(TMath::Abs(PtProng(0))<cuts[8] && TMath::Abs(PtProng(1))<cuts[8] && TMath::Abs(PtProng(2))<cuts[8])return kFALSE;
269 if(CosPointingAngle() < cuts[9])return kFALSE;
270 Double_t sum2=Getd0Prong(0)*Getd0Prong(0)+Getd0Prong(1)*Getd0Prong(1)+Getd0Prong(2)*Getd0Prong(2);
271 if(sum2<cuts[10])return kFALSE;