36 {
37
40
41 if ( fabs(lambda->
vertexId()) != 3122 )
return false;
42
44 if ((
mass <= m_minMass)||(
mass >= m_maxMass))
return false;
45 if ( lambda->
chi2() >= m_maxChisq )
return false;
46
47
48
49 int index[2] = {0, 1};
51 index[0] = 1;
52 index[1] = 0;
53 }
54
57
58 if(m_UseProtonPID){
64
69 }
70
71 if( !m_doSecondaryVFit ) return true;
72
73
74
75
80
84
85
87 HepSymMatrix evWideVertex(3, 0);
88
89 evWideVertex[0][0] = 1.0e12;
90 evWideVertex[1][1] = 1.0e12;
91 evWideVertex[2][2] = 1.0e12;
92
93
95 HepSymMatrix evBeamSpot(3, 0);
96
98 Gaudi::svcLocator()->service("VertexDbSvc", vtxsvc);
102 for (unsigned int ivx = 0; ivx < 3; ivx++){
103 vBeamSpot[ivx] = dbv[ivx];
104 evBeamSpot[ivx][ivx] = vv[ivx] * vv[ivx];
105 }
106 }
107 else{
108 cout << "LambdaSELECTOR ERROR: Could not find a vertex from VertexDbSvc" << endl;
109 return false;
110 }
111
112 if(m_useVFrefine){
113
115
116 wideVertex.
setVx(vWideVertex);
117 wideVertex.
setEvx(evWideVertex);
118
119
122
126
127 bool fitok = vtxfitr->
Fit();
128
129
132
133
135
136 beamSpot.
setVx(vBeamSpot);
137 beamSpot.
setEvx(evBeamSpot);
138
141
142
144
145
147
148
149
150 if( !svtxfit->
Fit() )
return false;
151
152
155 double vfitchi2 = svtxfit->
chisq();
156 double flightsig = 0;
157 if( vfiterror != 0 )
158 flightsig = vfitlength/vfiterror;
159
160
161
162 if( vfitchi2 > m_maxVFitChisq ) return false;
163 if( flightsig < m_minFlightSig ) return false;
164
165 return true;
166
167 }else{
169
170 wideVertex.
setVx(vWideVertex);
171 wideVertex.
setEvx(evWideVertex);
172
173
176
177
181
182
186
187
190
191
193 beamSpot.
setVx(vBeamSpot);
194 beamSpot.
setEvx(evBeamSpot);
195
198
199
201
202
204
205
206
207 if( !svtxfit->
Fit() )
return false;
208
209
212 double vfitchi2 = svtxfit->
chisq();
213 double flightsig = 0;
214 if( vfiterror != 0 )
215 flightsig = vfitlength/vfiterror;
216
217
218
219 if( vfitchi2 > m_maxVFitChisq ) return false;
220 if( flightsig < m_minFlightSig ) return false;
221
222 return true;
223
224
225 }
226
227
228
229
230
231
232}
virtual const EvtRecVeeVertex * navLambda() const
static void setPidType(PidType pidType)
RecMdcKalTrack * mdcKalTrack()
SmartRef< EvtRecTrack > & daughter(int i)
virtual bool isVertexValid()=0
virtual double * SigmaPrimaryVertex()=0
virtual double * PrimaryVertex()=0
int methodProbability() const
void setChiMinCut(const double chi=4)
void setRecTrack(EvtRecTrack *trk)
void setMethod(const int method)
void identify(const int pidcase)
void usePidSys(const int pidsys)
static ParticleID * instance()
double probProton() const
const HepVector & getZHelix() const
const HepSymMatrix & getZError() const
HepSymMatrix & getZErrorP()
void setPrimaryVertex(const VertexParameter vpar)
double decayLength() const
double decayLengthError() const
static SecondVertexFit * instance()
void setVpar(const VertexParameter vpar)
void AddTrack(const int number, const double mass, const RecMdcTrack *trk)
WTrackParameter wVirtualTrack(int n) const
void AddTrack(const int index, RecMdcKalTrack *p, const RecMdcKalTrack::PidType pid)
static VertexFitRefine * instance()
void AddVertex(int number, VertexParameter vpar, std::vector< int > lis)
VertexParameter vpar(int n) const
WTrackParameter wVirtualTrack(int n) const
void AddVertex(int number, VertexParameter vpar, std::vector< int > lis)
static VertexFit * instance()
VertexParameter vpar(int n) const
void BuildVirtualParticle(int number)
void setEvx(const HepSymMatrix &eVx)
void setVx(const HepPoint3D &vx)