]>
Commit | Line | Data |
---|---|---|
1 | /************************************************************************** | |
2 | * Copyright(c) 1998-2006, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
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 | **************************************************************************/ | |
15 | ||
16 | ///////////////////////////////////////////////////////////// | |
17 | // | |
18 | // Base class for AOD reconstructed heavy-flavour 4-prong decay | |
19 | // | |
20 | // Authors: G.E.Bruno Giuseppe.Bruno@to.infn.it, R.Romita Rossella.Romita@ba.infn.it | |
21 | ///////////////////////////////////////////////////////////// | |
22 | ||
23 | #include <TDatabasePDG.h> | |
24 | #include "AliAODRecoDecayHF.h" | |
25 | #include "AliAODRecoDecayHF4Prong.h" | |
26 | ||
27 | ClassImp(AliAODRecoDecayHF4Prong) | |
28 | ||
29 | //-------------------------------------------------------------------------- | |
30 | AliAODRecoDecayHF4Prong::AliAODRecoDecayHF4Prong() : | |
31 | AliAODRecoDecayHF(), | |
32 | fDist12toPrim(0), | |
33 | fDist3toPrim(0), | |
34 | fDist4toPrim(0) | |
35 | { | |
36 | // | |
37 | // Default Constructor | |
38 | // | |
39 | } | |
40 | //-------------------------------------------------------------------------- | |
41 | AliAODRecoDecayHF4Prong::AliAODRecoDecayHF4Prong(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 dist3, | |
46 | Double_t dist4, | |
47 | Short_t charge) : | |
48 | AliAODRecoDecayHF(vtx2,4,charge,px,py,pz,d0,d0err), | |
49 | // fSigmaVert(sigvert), | |
50 | fDist12toPrim(dist12), | |
51 | fDist3toPrim(dist3), | |
52 | fDist4toPrim(dist4) | |
53 | { | |
54 | // | |
55 | // Constructor with AliAODVertex for decay vertex | |
56 | // | |
57 | SetDCAs(6,dca); | |
58 | } | |
59 | //-------------------------------------------------------------------------- | |
60 | AliAODRecoDecayHF4Prong::AliAODRecoDecayHF4Prong(AliAODVertex *vtx2, | |
61 | Double_t *d0,Double_t *d0err, | |
62 | Double_t *dca, //Double_t sigvert, | |
63 | Double_t dist12,Double_t dist3, | |
64 | Double_t dist4, | |
65 | Short_t charge) : | |
66 | AliAODRecoDecayHF(vtx2,4,charge,d0,d0err), | |
67 | //fSigmaVert(sigvert), | |
68 | fDist12toPrim(dist12), | |
69 | fDist3toPrim(dist3), | |
70 | fDist4toPrim(dist4) | |
71 | { | |
72 | // | |
73 | // Constructor with AliAODVertex for decay vertex and without prongs momenta | |
74 | // | |
75 | SetDCAs(6,dca); | |
76 | } | |
77 | //-------------------------------------------------------------------------- | |
78 | AliAODRecoDecayHF4Prong::AliAODRecoDecayHF4Prong(const AliAODRecoDecayHF4Prong &source) : | |
79 | AliAODRecoDecayHF(source), | |
80 | //fSigmaVert(source.fSigmaVert), | |
81 | fDist12toPrim(source.fDist12toPrim), | |
82 | fDist3toPrim(source.fDist3toPrim), | |
83 | fDist4toPrim(source.fDist4toPrim) | |
84 | { | |
85 | // | |
86 | // Copy constructor | |
87 | // | |
88 | } | |
89 | //-------------------------------------------------------------------------- | |
90 | AliAODRecoDecayHF4Prong &AliAODRecoDecayHF4Prong::operator=(const AliAODRecoDecayHF4Prong &source) | |
91 | { | |
92 | // | |
93 | // assignment operator | |
94 | // | |
95 | if(&source == this) return *this; | |
96 | ||
97 | AliAODRecoDecayHF::operator=(source); | |
98 | ||
99 | fDist12toPrim= source.fDist12toPrim; | |
100 | fDist3toPrim= source.fDist3toPrim; | |
101 | fDist4toPrim= source.fDist4toPrim; | |
102 | //fSigmaVert= source.fSigmaVert; | |
103 | ||
104 | return *this; | |
105 | } | |
106 | //-------------------------------------------------------------------------- | |
107 | void AliAODRecoDecayHF4Prong::InvMassD0(Double_t mD0[2]) const { | |
108 | // | |
109 | // Mass for the two D0 hypotheses | |
110 | // | |
111 | UInt_t pdg[4]; | |
112 | pdg[0]=211; pdg[1]=321; pdg[2]=211; pdg[3]=211; | |
113 | mD0[0]=InvMass(4,pdg); | |
114 | pdg[1]=211; pdg[3]=321; | |
115 | mD0[1]=InvMass(4,pdg); | |
116 | ||
117 | return; | |
118 | } | |
119 | //-------------------------------------------------------------------------- | |
120 | void AliAODRecoDecayHF4Prong::InvMassD0bar(Double_t mD0bar[2]) const { | |
121 | // | |
122 | // Mass for the two D0bar hypotheses | |
123 | // | |
124 | UInt_t pdg[4]; | |
125 | pdg[0]=321; pdg[1]=211; pdg[2]=211; pdg[3]=211; | |
126 | mD0bar[0]=InvMass(4,pdg); | |
127 | pdg[0]=211; pdg[2]=321; | |
128 | mD0bar[1]=InvMass(4,pdg); | |
129 | ||
130 | return; | |
131 | } | |
132 | //-------------------------------------------------------------------------- | |
133 | ||
134 | Bool_t AliAODRecoDecayHF4Prong::SelectD0(const Double_t *cuts,Int_t &okD0,Int_t &okD0bar) const | |
135 | { | |
136 | // | |
137 | // This function compares the D0 with a set of cuts: | |
138 | // | |
139 | // cuts[0] = D0 invariant mass | |
140 | // cuts[1] = DCA between opposite sign tracks | |
141 | // cuts[2] = Distance between primary and two tracks vertex fDist12toPrim | |
142 | // cuts[3] = Distance between primary and three tracks vertex fDist3toPrim | |
143 | // cuts[4] = Distance between primary and two tracks vertex fDist4toPrim | |
144 | // cuts[5] = Cosinus of the pointing angle | |
145 | // cuts[6] = Transverse momentum of the D0 candidate | |
146 | // cuts[7] = Mass Pi+Pi- = mass of the rho0 | |
147 | // cuts[8] = PID cut (one K in the quadruplet) | |
148 | // | |
149 | // If candidate D0 does not pass the cuts return kFALSE | |
150 | // | |
151 | ||
152 | okD0=0; okD0bar=0; | |
153 | Double_t mD0PDG = TDatabasePDG::Instance()->GetParticle(421)->Mass(); | |
154 | Double_t mD0[2]; | |
155 | Double_t mD0bar[2]; | |
156 | InvMassD0(mD0); | |
157 | InvMassD0bar(mD0bar); | |
158 | Bool_t goodMass=kFALSE; | |
159 | if(TMath::Abs(mD0[0]-mD0PDG)<=cuts[0]) {goodMass=kTRUE; okD0=1;} | |
160 | if(TMath::Abs(mD0[1]-mD0PDG)<=cuts[0]) {goodMass=kTRUE; okD0=1;} | |
161 | if(TMath::Abs(mD0bar[0]-mD0PDG)<=cuts[0]) {goodMass=kTRUE; okD0bar=1;} | |
162 | if(TMath::Abs(mD0bar[1]-mD0PDG)<=cuts[0]) {goodMass=kTRUE; okD0bar=1;} | |
163 | if(!goodMass) return kFALSE; | |
164 | ||
165 | //DCA btw opposite sign tracks | |
166 | if(cuts[1]>0.){ | |
167 | if(GetDCA(0)>cuts[1]) return kFALSE; | |
168 | if(GetDCA(1)>cuts[1]) return kFALSE; | |
169 | if(GetDCA(2)>cuts[1]) return kFALSE; | |
170 | if(GetDCA(3)>cuts[1]) return kFALSE; | |
171 | if(GetDCA(4)>cuts[1]) return kFALSE; | |
172 | if(GetDCA(5)>cuts[1]) return kFALSE; | |
173 | } | |
174 | //2track cuts | |
175 | if(cuts[2]>0.){ | |
176 | if(fDist12toPrim>10.)return kFALSE; | |
177 | if(fDist12toPrim<cuts[2])return kFALSE; | |
178 | } | |
179 | //3track cuts | |
180 | if(cuts[3]>0.){ | |
181 | if(fDist3toPrim<cuts[3])return kFALSE; | |
182 | } | |
183 | //4track cuts | |
184 | if(cuts[4]>0.){ | |
185 | if(fDist4toPrim<cuts[4])return kFALSE; | |
186 | } | |
187 | if(cuts[5]>-1.1){ | |
188 | if(CosPointingAngle()<cuts[5])return kFALSE; | |
189 | } | |
190 | if(cuts[6]>0.){ | |
191 | if(Pt()<cuts[6])return kFALSE; | |
192 | } | |
193 | if(cuts[7]>0.){ | |
194 | Double_t massD0[2]; | |
195 | Double_t massD0bar[2]; | |
196 | Bool_t good=CutRhoMass(massD0,massD0bar,cuts[0],cuts[7]); | |
197 | if(!good) return kFALSE; | |
198 | } | |
199 | ||
200 | return kTRUE; | |
201 | } | |
202 | //---------------------------------------------------------------------------- | |
203 | Bool_t AliAODRecoDecayHF4Prong::CutRhoMass(Double_t massD0[2],Double_t massD0bar[2],Double_t cutMass,Double_t cutRho) const | |
204 | { | |
205 | // | |
206 | // Cut on rho->pipi mass for any of the pairs | |
207 | // | |
208 | Bool_t isGood=kFALSE; | |
209 | Int_t nprongs=4; | |
210 | for(Int_t i=0;i<2;i++){massD0[i]=0.;massD0bar[i]=0.;} | |
211 | Bool_t isRho=kFALSE; | |
212 | Bool_t isTrue=kFALSE; | |
213 | Double_t mPDG=TDatabasePDG::Instance()->GetParticle(421)->Mass(); | |
214 | Double_t mPDGRho=TDatabasePDG::Instance()->GetParticle(113)->Mass(); | |
215 | Double_t minv01=InvMassRho(0,1); | |
216 | if(TMath::Abs(minv01-mPDGRho)<cutRho) isRho=kTRUE; | |
217 | if(isRho){ | |
218 | UInt_t pdg1[4]={211,211,321,211}; | |
219 | Double_t mass1=InvMass(nprongs,pdg1); | |
220 | if(TMath::Abs(mass1-mPDG)<cutMass) {isTrue=kTRUE;isGood=kTRUE;} | |
221 | if(isTrue) massD0bar[1]=mass1; | |
222 | isTrue=kFALSE; | |
223 | UInt_t pdg2[4]={211,211,211,321}; | |
224 | Double_t mass2=InvMass(4,pdg2); | |
225 | if(TMath::Abs(mass2-mPDG)<cutMass) {isTrue=kTRUE;isGood=kTRUE;} | |
226 | if(isTrue) massD0[1]=mass2; | |
227 | isTrue=kFALSE; | |
228 | } | |
229 | Double_t minv03=InvMassRho(0,3); | |
230 | if(TMath::Abs(minv03-mPDGRho)<cutRho) isRho=kTRUE; | |
231 | if(isRho){ | |
232 | UInt_t pdg1[4]={211,211,321,211}; | |
233 | Double_t mass1=InvMass(4,pdg1); | |
234 | if(TMath::Abs(mass1-mPDG)<cutMass) {isTrue=kTRUE;isGood=kTRUE;} | |
235 | if(isTrue) massD0bar[1]=mass1; | |
236 | isTrue=kFALSE; | |
237 | UInt_t pdg2[4]={211,321,211,211}; | |
238 | Double_t mass2=InvMass(4,pdg2); | |
239 | if(TMath::Abs(mass2-mPDG)<cutMass) {isTrue=kTRUE;isGood=kTRUE;} | |
240 | if(isTrue) massD0[0]=mass2; | |
241 | isTrue=kFALSE; | |
242 | } | |
243 | Double_t minv12=InvMassRho(1,2); | |
244 | if(TMath::Abs(minv12-mPDGRho)<cutRho) isRho=kTRUE; | |
245 | if(isRho){ | |
246 | UInt_t pdg1[4]={321,211,211,211}; | |
247 | Double_t mass1=InvMass(4,pdg1); | |
248 | if(TMath::Abs(mass1-mPDG)<cutMass) {isTrue=kTRUE;isGood=kTRUE;} | |
249 | if(isTrue) massD0bar[0]=mass1; | |
250 | isTrue=kFALSE; | |
251 | UInt_t pdg2[4]={211,211,211,321}; | |
252 | Double_t mass2=InvMass(4,pdg2); | |
253 | if(TMath::Abs(mass2-mPDG)<cutMass) {isTrue=kTRUE;isGood=kTRUE;} | |
254 | if(isTrue) massD0[1]=mass2; | |
255 | isTrue=kFALSE; | |
256 | } | |
257 | Double_t minv23=InvMassRho(2,3); | |
258 | if(TMath::Abs(minv23-mPDGRho)<cutRho) isRho=kTRUE; | |
259 | if(isRho){ | |
260 | UInt_t pdg1[4]={321,211,211,211}; | |
261 | Double_t mass1=InvMass(4,pdg1); | |
262 | if(TMath::Abs(mass1-mPDG)<cutMass) {isTrue=kTRUE;isGood=kTRUE;} | |
263 | if(isTrue) massD0bar[0]=mass1; | |
264 | isTrue=kFALSE; | |
265 | UInt_t pdg2[4]={211,321,211,211}; | |
266 | Double_t mass2=InvMass(4,pdg2); | |
267 | if(TMath::Abs(mass2-mPDG)<cutMass) {isTrue=kTRUE;isGood=kTRUE;} | |
268 | if(isTrue) massD0[0]=mass2; | |
269 | isTrue=kFALSE; | |
270 | } | |
271 | return isGood; | |
272 | } |