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(mass < 0.487 || mass > 0.511)
43
44 if( !m_doSecondaryVFit ) return true;
45
46
47
48
49
53
57
60 HepSymMatrix evWideVertex(3, 0);
61
62 evWideVertex[0][0] = 1.0e12;
63 evWideVertex[1][1] = 1.0e12;
64 evWideVertex[2][2] = 1.0e12;
65
66 wideVertex.
setVx(vWideVertex);
67 wideVertex.
setEvx(evWideVertex);
68
69
72
73
74 vtxfit->
AddTrack(0,veeInitialWTrack1);
75 vtxfit->
AddTrack(1,veeInitialWTrack2);
77
78
82
83
86
87
90 HepSymMatrix evBeamSpot(3, 0);
91
93 Gaudi::svcLocator()->service("VertexDbSvc", vtxsvc);
97 for (unsigned int ivx = 0; ivx < 3; ivx++){
98 vBeamSpot[ivx] = dbv[ivx];
99 evBeamSpot[ivx][ivx] = vv[ivx] * vv[ivx];
100 }
101 }
102 else{
103 cout << "KSSELECTOR ERROR: Could not find a vertex from VertexDbSvc" << endl;
104 return false;
105 }
106
107 beamSpot.
setVx(vBeamSpot);
108 beamSpot.
setEvx(evBeamSpot);
109
112
113
115
116
118
119
120
121 if( !svtxfit->
Fit() )
return false;
122
123
126 double vfitchi2 = svtxfit->
chisq();
127 double flightsig = 0;
128 if( vfiterror != 0 )
129 flightsig = vfitlength/vfiterror;
130
131
132
133 if( vfitchi2 > m_maxVFitChisq ) return false;
134 if( flightsig < m_minFlightSig ) return false;
135
136 return true;
137}
virtual const EvtRecVeeVertex * navKshort() const
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)