AliPhysics  2c6b7ad (2c6b7ad)
AliAODRecoDecayHF4Prong.cxx
Go to the documentation of this file.
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 /* $Id$ */
17 
19 //
20 // Base class for AOD reconstructed heavy-flavour 4-prong decay
21 //
22 // Authors: G.E.Bruno Giuseppe.Bruno@to.infn.it, R.Romita Rossella.Romita@ba.infn.it
24 
25 #include <TDatabasePDG.h>
26 #include "AliAODRecoDecayHF.h"
28 
30 ClassImp(AliAODRecoDecayHF4Prong);
32 
33 //--------------------------------------------------------------------------
36  fDist12toPrim(0),
37  fDist3toPrim(0),
38  fDist4toPrim(0)
39 {
40  //
42  //
43 }
44 //--------------------------------------------------------------------------
46  Double_t *px,Double_t *py,Double_t *pz,
47  Double_t *d0,Double_t *d0err,
48  Double_t *dca, //Double_t sigvert,
49  Double_t dist12,Double_t dist3,
50  Double_t dist4,
51  Short_t charge) :
52  AliAODRecoDecayHF(vtx2,4,charge,px,py,pz,d0,d0err),
53  // fSigmaVert(sigvert),
54  fDist12toPrim(dist12),
55  fDist3toPrim(dist3),
56  fDist4toPrim(dist4)
57 {
58  //
60  //
61  SetDCAs(6,dca);
62 }
63 //--------------------------------------------------------------------------
65  Double_t *d0,Double_t *d0err,
66  Double_t *dca, //Double_t sigvert,
67  Double_t dist12,Double_t dist3,
68  Double_t dist4,
69  Short_t charge) :
70  AliAODRecoDecayHF(vtx2,4,charge,d0,d0err),
71  //fSigmaVert(sigvert),
72  fDist12toPrim(dist12),
73  fDist3toPrim(dist3),
74  fDist4toPrim(dist4)
75 {
76  //
78  //
79  SetDCAs(6,dca);
80 }
81 //--------------------------------------------------------------------------
83  AliAODRecoDecayHF(source),
84  //fSigmaVert(source.fSigmaVert),
86  fDist3toPrim(source.fDist3toPrim),
88 {
89  //
91  //
92 }
93 //--------------------------------------------------------------------------
95 {
96  //
98  //
99  if(&source == this) return *this;
100 
102 
104  fDist3toPrim= source.fDist3toPrim;
105  fDist4toPrim= source.fDist4toPrim;
106  //fSigmaVert= source.fSigmaVert;
107 
108  return *this;
109 }
110 //--------------------------------------------------------------------------
112  //
114  //
115  UInt_t pdg[4];
116  pdg[0]=211; pdg[1]=321; pdg[2]=211; pdg[3]=211;
117  mD0[0]=InvMass(4,pdg);
118  pdg[1]=211; pdg[3]=321;
119  mD0[1]=InvMass(4,pdg);
120 
121  return;
122 }
123 //--------------------------------------------------------------------------
125  //
127  //
128  UInt_t pdg[4];
129  pdg[0]=321; pdg[1]=211; pdg[2]=211; pdg[3]=211;
130  mD0bar[0]=InvMass(4,pdg);
131  pdg[0]=211; pdg[2]=321;
132  mD0bar[1]=InvMass(4,pdg);
133 
134  return;
135 }
136 //--------------------------------------------------------------------------
137 
139 {
155 
156  okD0=0; okD0bar=0;
157  Double_t mD0PDG = TDatabasePDG::Instance()->GetParticle(421)->Mass();
158  Double_t mD0[2];
159  Double_t mD0bar[2];
160  InvMassD0(mD0);
161  InvMassD0bar(mD0bar);
162  Bool_t goodMass=kFALSE;
163  if(TMath::Abs(mD0[0]-mD0PDG)<=cuts[0]) {goodMass=kTRUE; okD0=1;}
164  if(TMath::Abs(mD0[1]-mD0PDG)<=cuts[0]) {goodMass=kTRUE; okD0=1;}
165  if(TMath::Abs(mD0bar[0]-mD0PDG)<=cuts[0]) {goodMass=kTRUE; okD0bar=1;}
166  if(TMath::Abs(mD0bar[1]-mD0PDG)<=cuts[0]) {goodMass=kTRUE; okD0bar=1;}
167  if(!goodMass) return kFALSE;
168 
169  //DCA btw opposite sign tracks
170  if(cuts[1]>0.){
171  if(GetDCA(0)>cuts[1]) return kFALSE;
172  if(GetDCA(1)>cuts[1]) return kFALSE;
173  if(GetDCA(2)>cuts[1]) return kFALSE;
174  if(GetDCA(3)>cuts[1]) return kFALSE;
175  if(GetDCA(4)>cuts[1]) return kFALSE;
176  if(GetDCA(5)>cuts[1]) return kFALSE;
177  }
178  //2track cuts
179  if(cuts[2]>0.){
180  if(fDist12toPrim>10.)return kFALSE;
181  if(fDist12toPrim<cuts[2])return kFALSE;
182  }
183  //3track cuts
184  if(cuts[3]>0.){
185  if(fDist3toPrim<cuts[3])return kFALSE;
186  }
187  //4track cuts
188  if(cuts[4]>0.){
189  if(fDist4toPrim<cuts[4])return kFALSE;
190  }
191  if(cuts[5]>-1.1){
192  if(CosPointingAngle()<cuts[5])return kFALSE;
193  }
194  if(cuts[6]>0.){
195  if(Pt()<cuts[6])return kFALSE;
196  }
197  if(cuts[7]>0.){
198  Double_t massD0[2];
199  Double_t massD0bar[2];
200  Bool_t good=CutRhoMass(massD0,massD0bar,cuts[0],cuts[7]);
201  if(!good) return kFALSE;
202  }
203 
204  return kTRUE;
205 }
206 //----------------------------------------------------------------------------
207 Bool_t AliAODRecoDecayHF4Prong::CutRhoMass(Double_t massD0[2],Double_t massD0bar[2],Double_t cutMass,Double_t cutRho) const
208 {
209  //
211  //
212  Bool_t isGood=kFALSE;
213  Int_t nprongs=4;
214  for(Int_t i=0;i<2;i++){massD0[i]=0.;massD0bar[i]=0.;}
215  Bool_t isRho=kFALSE;
216  Bool_t isTrue=kFALSE;
217  Double_t mPDG=TDatabasePDG::Instance()->GetParticle(421)->Mass();
218  Double_t mPDGRho=TDatabasePDG::Instance()->GetParticle(113)->Mass();
219  Double_t minv01=InvMassRho(0,1);
220  if(TMath::Abs(minv01-mPDGRho)<cutRho) isRho=kTRUE;
221  if(isRho){
222  UInt_t pdg1[4]={211,211,321,211};
223  Double_t mass1=InvMass(nprongs,pdg1);
224  if(TMath::Abs(mass1-mPDG)<cutMass) {isTrue=kTRUE;isGood=kTRUE;}
225  if(isTrue) massD0bar[1]=mass1;
226  isTrue=kFALSE;
227  UInt_t pdg2[4]={211,211,211,321};
228  Double_t mass2=InvMass(4,pdg2);
229  if(TMath::Abs(mass2-mPDG)<cutMass) {isTrue=kTRUE;isGood=kTRUE;}
230  if(isTrue) massD0[1]=mass2;
231  isTrue=kFALSE;
232  }
233  Double_t minv03=InvMassRho(0,3);
234  if(TMath::Abs(minv03-mPDGRho)<cutRho) isRho=kTRUE;
235  if(isRho){
236  UInt_t pdg1[4]={211,211,321,211};
237  Double_t mass1=InvMass(4,pdg1);
238  if(TMath::Abs(mass1-mPDG)<cutMass) {isTrue=kTRUE;isGood=kTRUE;}
239  if(isTrue) massD0bar[1]=mass1;
240  isTrue=kFALSE;
241  UInt_t pdg2[4]={211,321,211,211};
242  Double_t mass2=InvMass(4,pdg2);
243  if(TMath::Abs(mass2-mPDG)<cutMass) {isTrue=kTRUE;isGood=kTRUE;}
244  if(isTrue) massD0[0]=mass2;
245  isTrue=kFALSE;
246  }
247  Double_t minv12=InvMassRho(1,2);
248  if(TMath::Abs(minv12-mPDGRho)<cutRho) isRho=kTRUE;
249  if(isRho){
250  UInt_t pdg1[4]={321,211,211,211};
251  Double_t mass1=InvMass(4,pdg1);
252  if(TMath::Abs(mass1-mPDG)<cutMass) {isTrue=kTRUE;isGood=kTRUE;}
253  if(isTrue) massD0bar[0]=mass1;
254  isTrue=kFALSE;
255  UInt_t pdg2[4]={211,211,211,321};
256  Double_t mass2=InvMass(4,pdg2);
257  if(TMath::Abs(mass2-mPDG)<cutMass) {isTrue=kTRUE;isGood=kTRUE;}
258  if(isTrue) massD0[1]=mass2;
259  isTrue=kFALSE;
260  }
261  Double_t minv23=InvMassRho(2,3);
262  if(TMath::Abs(minv23-mPDGRho)<cutRho) isRho=kTRUE;
263  if(isRho){
264  UInt_t pdg1[4]={321,211,211,211};
265  Double_t mass1=InvMass(4,pdg1);
266  if(TMath::Abs(mass1-mPDG)<cutMass) {isTrue=kTRUE;isGood=kTRUE;}
267  if(isTrue) massD0bar[0]=mass1;
268  isTrue=kFALSE;
269  UInt_t pdg2[4]={211,321,211,211};
270  Double_t mass2=InvMass(4,pdg2);
271  if(TMath::Abs(mass2-mPDG)<cutMass) {isTrue=kTRUE;isGood=kTRUE;}
272  if(isTrue) massD0[0]=mass2;
273  isTrue=kFALSE;
274  }
275  return isGood;
276 }
Int_t charge
AliAODRecoDecayHF4Prong & operator=(const AliAODRecoDecayHF4Prong &source)
Int_t pdg
Bool_t SelectD0(const Double_t *cuts, Int_t &okD0, Int_t &okD0bar) const
AliAODRecoDecayHF & operator=(const AliAODRecoDecayHF &source)
double Double_t
Definition: External.C:58
void InvMass(Int_t icalo, TString particle, TString fileName)
Double_t InvMassRho(Int_t i, Int_t j) const
void InvMassD0(Double_t mD0[2]) const
Bool_t CutRhoMass(Double_t massD0[2], Double_t massD0bar[2], Double_t CutMass, Double_t CutRho) const
Double_t fDist3toPrim
distance prim vert - 2 opposite sign track vertex
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
void InvMassD0bar(Double_t mD0bar[2]) const
Double_t fDist4toPrim
distance prim vert - 3 track vertex
short Short_t
Definition: External.C:23
bool Bool_t
Definition: External.C:53
Double_t CosPointingAngle() const