30 {
31
34
35 if ( ks->
vertexId() != 310 )
return false;
36
38 if ((
mass <= m_minMass)||(
mass >= m_maxMass))
return false;
39 if ( ks->
chi2() >= m_maxChisq )
return false;
40
41 if( !m_doSecondaryVFit ) return true;
42
43
44
45
46
51
56
59 HepSymMatrix evWideVertex(3, 0);
60
61 evWideVertex[0][0] = 1.0e12;
62 evWideVertex[1][1] = 1.0e12;
63 evWideVertex[2][2] = 1.0e12;
64
65 wideVertex.
setVx(vWideVertex);
66 wideVertex.
setEvx(evWideVertex);
67
68
71
72
73 vtxfit->
AddTrack(0,veeInitialWTrack1);
74 vtxfit->
AddTrack(1,veeInitialWTrack2);
76
77
81
82
85
86
89 HepSymMatrix evBeamSpot(3, 0);
90
92 Gaudi::svcLocator()->service("VertexDbSvc", vtxsvc);
96 for (unsigned int ivx = 0; ivx < 3; ivx++){
97 vBeamSpot[ivx] = dbv[ivx];
98 evBeamSpot[ivx][ivx] = vv[ivx] * vv[ivx];
99 }
100 }
101 else{
102 cout << "KSSELECTOR ERROR: Could not find a vertex from VertexDbSvc" << endl;
103 return false;
104 }
105
106 beamSpot.
setVx(vBeamSpot);
107 beamSpot.
setEvx(evBeamSpot);
108
111
112
114
115
117
118
119
120 if( !svtxfit->
Fit() )
return false;
121
122
125 double vfitchi2 = svtxfit->
chisq();
126 double flightsig = 0;
127 if( vfiterror != 0 )
128 flightsig = vfitlength/vfiterror;
129
130
131
132 if( vfitchi2 > m_maxVFitChisq ) return false;
133 if( flightsig < m_minFlightSig ) return false;
134
135 return true;
136}
virtual const EvtRecVeeVertex * navKshort() const
static void setPidType(PidType pidType)
RecMdcKalTrack * mdcKalTrack()
std::pair< SmartRef< EvtRecTrack >, SmartRef< EvtRecTrack > > & pairDaughters()
virtual bool isVertexValid()=0
virtual double * SigmaPrimaryVertex()=0
virtual double * PrimaryVertex()=0
const HepVector & getZHelix() const
const HepSymMatrix & getZError() const
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 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)