1#include "GaudiKernel/Bootstrap.h"
2#include "GaudiKernel/IJobOptionsSvc.h"
3#include "GaudiKernel/ISvcLocator.h"
4#include "GaudiKernel/PropertyMgr.h"
17 IJobOptionsSvc* jobSvc;
18 Gaudi::svcLocator()->service(
"JobOptionsSvc", jobSvc);
20 PropertyMgr m_propMgr;
22 m_propMgr.declareProperty(
"LambdaMinMassCut", m_minMass = 1.10 );
23 m_propMgr.declareProperty(
"LambdaMaxMassCut", m_maxMass = 1.13 );
24 m_propMgr.declareProperty(
"LambdaMaxChisq", m_maxChisq = 100 );
25 m_propMgr.declareProperty(
"UseProtonPID", m_UseProtonPID =
true );
26 m_propMgr.declareProperty(
"ProtonPIDChiCut", m_ChiCut = 8);
28 m_propMgr.declareProperty(
"DoSecondaryVFit", m_doSecondaryVFit =
false );
29 m_propMgr.declareProperty(
"LambdaMaxVFitChisq", m_maxVFitChisq = 100 );
30 m_propMgr.declareProperty(
"LambdaMinFlightSig", m_minFlightSig = 2.0 );
31 m_propMgr.declareProperty(
"UseVFRefine", m_useVFrefine =
true);
33 jobSvc->setMyProperties(
"LocalLambdaSelector", &m_propMgr);
41 if ( fabs(lambda->
vertexId()) != 3122 )
return false;
44 if ((
mass <= m_minMass)||(
mass >= m_maxMass))
return false;
45 if ( lambda->
chi2() >= m_maxChisq )
return false;
49 int index[2] = {0, 1};
71 if( !m_doSecondaryVFit )
return true;
87 HepSymMatrix evWideVertex(3, 0);
89 evWideVertex[0][0] = 1.0e12;
90 evWideVertex[1][1] = 1.0e12;
91 evWideVertex[2][2] = 1.0e12;
95 HepSymMatrix evBeamSpot(3, 0);
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];
108 cout <<
"LambdaSELECTOR ERROR: Could not find a vertex from VertexDbSvc" << endl;
116 wideVertex.
setVx(vWideVertex);
117 wideVertex.
setEvx(evWideVertex);
127 bool fitok = vtxfitr->
Fit();
136 beamSpot.
setVx(vBeamSpot);
137 beamSpot.
setEvx(evBeamSpot);
150 if( !svtxfit->
Fit() )
return false;
155 double vfitchi2 = svtxfit->
chisq();
156 double flightsig = 0;
158 flightsig = vfitlength/vfiterror;
162 if( vfitchi2 > m_maxVFitChisq )
return false;
163 if( flightsig < m_minFlightSig )
return false;
170 wideVertex.
setVx(vWideVertex);
171 wideVertex.
setEvx(evWideVertex);
193 beamSpot.
setVx(vBeamSpot);
194 beamSpot.
setEvx(evBeamSpot);
207 if( !svtxfit->
Fit() )
return false;
212 double vfitchi2 = svtxfit->
chisq();
213 double flightsig = 0;
215 flightsig = vfitlength/vfiterror;
219 if( vfitchi2 > m_maxVFitChisq )
return false;
220 if( flightsig < m_minFlightSig )
return false;
LocalLambdaSelector lambdaSelector
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
bool operator()(CDLambda &aLambda)
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)