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 2-prong decay
20 // Author: A.Dainese, andrea.dainese@lnl.infn.it
21 /////////////////////////////////////////////////////////////
23 #include <TDatabasePDG.h>
24 #include "AliAODRecoDecayHF.h"
25 #include "AliAODRecoDecayHF2Prong.h"
27 ClassImp(AliAODRecoDecayHF2Prong)
29 //--------------------------------------------------------------------------
30 AliAODRecoDecayHF2Prong::AliAODRecoDecayHF2Prong() :
34 // Default Constructor
37 //--------------------------------------------------------------------------
38 AliAODRecoDecayHF2Prong::AliAODRecoDecayHF2Prong(AliAODVertex *vtx2,
39 Double_t *px,Double_t *py,Double_t *pz,
40 Double_t *d0,Double_t *d0err,Float_t dca) :
41 AliAODRecoDecayHF(vtx2,2,0,px,py,pz,d0,d0err)
44 // Constructor with AliAODVertex for decay vertex
48 //--------------------------------------------------------------------------
49 AliAODRecoDecayHF2Prong::AliAODRecoDecayHF2Prong(AliAODVertex *vtx2,
50 Double_t *d0,Double_t *d0err,Float_t dca) :
51 AliAODRecoDecayHF(vtx2,2,0,d0,d0err)
54 // Constructor with AliAODVertex for decay vertex and without prongs momenta
58 //--------------------------------------------------------------------------
59 AliAODRecoDecayHF2Prong::AliAODRecoDecayHF2Prong(const AliAODRecoDecayHF2Prong &source) :
60 AliAODRecoDecayHF(source)
66 //--------------------------------------------------------------------------
67 AliAODRecoDecayHF2Prong &AliAODRecoDecayHF2Prong::operator=(const AliAODRecoDecayHF2Prong &source)
70 // assignment operator
72 if(&source == this) return *this;
74 AliAODRecoDecayHF::operator=(source);
78 //--------------------------------------------------------------------------
79 Bool_t AliAODRecoDecayHF2Prong::SelectD0(const Double_t *cuts,Int_t &okD0,Int_t &okD0bar)
82 // This function compares the D0 with a set of cuts:
84 // cuts[0] = inv. mass half width [GeV]
86 // cuts[2] = cosThetaStar
87 // cuts[3] = pTK [GeV/c]
88 // cuts[4] = pTPi [GeV/c]
89 // cuts[5] = d0K [cm] upper limit!
90 // cuts[6] = d0Pi [cm] upper limit!
91 // cuts[7] = d0d0 [cm^2]
92 // cuts[8] = cosThetaPoint
94 // If the D0/D0bar doesn't pass the cuts it sets the weights to 0
95 // If neither D0 nor D0bar pass the cuts return kFALSE
97 Double_t mD0,mD0bar,ctsD0,ctsD0bar;
100 Double_t mD0PDG = TDatabasePDG::Instance()->GetParticle(421)->Mass();
102 if(PtProng(1) < cuts[3] || PtProng(0) < cuts[4]) okD0 = 0;
103 if(PtProng(0) < cuts[3] || PtProng(1) < cuts[4]) okD0bar = 0;
104 if(!okD0 && !okD0bar) return kFALSE;
106 if(TMath::Abs(Getd0Prong(1)) > cuts[5] ||
107 TMath::Abs(Getd0Prong(0)) > cuts[6]) okD0 = 0;
108 if(TMath::Abs(Getd0Prong(0)) > cuts[6] ||
109 TMath::Abs(Getd0Prong(1)) > cuts[5]) okD0bar = 0;
110 if(!okD0 && !okD0bar) return kFALSE;
112 if(GetDCA() > cuts[1]) { okD0 = okD0bar = 0; return kFALSE; }
114 InvMassD0(mD0,mD0bar);
115 if(TMath::Abs(mD0-mD0PDG) > cuts[0]) okD0 = 0;
116 if(TMath::Abs(mD0bar-mD0PDG) > cuts[0]) okD0bar = 0;
117 if(!okD0 && !okD0bar) return kFALSE;
119 CosThetaStarD0(ctsD0,ctsD0bar);
120 if(TMath::Abs(ctsD0) > cuts[2]) okD0 = 0;
121 if(TMath::Abs(ctsD0bar) > cuts[2]) okD0bar = 0;
122 if(!okD0 && !okD0bar) return kFALSE;
124 if(Prodd0d0() > cuts[7]) { okD0 = okD0bar = 0; return kFALSE; }
126 if(CosPointingAngle() < cuts[8]) { okD0 = okD0bar = 0; return kFALSE; }
130 //-----------------------------------------------------------------------------
131 Bool_t AliAODRecoDecayHF2Prong::SelectBtoJPSI(const Double_t *cuts,Int_t &okB)
134 // This function compares the Secondary JPSI candidates with a set of cuts:
136 // cuts[0] = inv. mass half width [GeV]
137 // cuts[1] = dca [cm]
138 // cuts[2] = cosThetaStar (negative electron)
139 // cuts[3] = pTP [GeV/c]
140 // cuts[4] = pTN [GeV/c]
141 // cuts[5] = d0P [cm] upper limit!
142 // cuts[6] = d0N [cm] upper limit!
143 // cuts[7] = d0d0 [cm^2]
144 // cuts[8] = cosThetaPoint
146 // If the candidate doesn't pass the cuts it sets the weight to 0
149 Double_t mJPsi,ctsJPsi;
152 Double_t mJPSIPDG = TDatabasePDG::Instance()->GetParticle(443)->Mass();
154 if(PtProng(1) < cuts[3] || PtProng(0) < cuts[4]) okB = 0;
155 if(!okB) return kFALSE;
157 if(TMath::Abs(Getd0Prong(1)) > cuts[5] ||
158 TMath::Abs(Getd0Prong(0)) > cuts[6]) okB = 0;
159 if(!okB) return kFALSE;
161 if(GetDCA() > cuts[1]) { okB = 0; return kFALSE; }
163 mJPsi=InvMassJPSIee();
164 if(TMath::Abs(mJPsi-mJPSIPDG) > cuts[0]) okB = 0;
165 if(!okB) return kFALSE;
167 ctsJPsi=CosThetaStarJPSI();
168 if(TMath::Abs(ctsJPsi) > cuts[2]) okB = 0;
169 if(!okB) return kFALSE;
171 if(Prodd0d0() > cuts[7]) { okB = 0; return kFALSE; }
173 if(CosPointingAngle() < cuts[8]) { okB = 0; return kFALSE; }
177 //-----------------------------------------------------------------------------