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