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 m_propMgr.declareProperty(
"UseBFieldCorr", m_useBFC =
true);
35 jobSvc->setMyProperties(
"LocalLambdaSelector", &m_propMgr);
43 if ( fabs(lambda->
vertexId()) != 3122 )
return false;
47 if ((
mass <= m_minMass)||(
mass >= m_maxMass))
return false;
48 if ( lambda->
chi2() >= m_maxChisq )
return false;
52 int index[2] = {0, 1};
75 if( !m_doSecondaryVFit )
return true;
92 HepSymMatrix evWideVertex(3, 0);
94 evWideVertex[0][0] = 1.0e12;
95 evWideVertex[1][1] = 1.0e12;
96 evWideVertex[2][2] = 1.0e12;
100 HepSymMatrix evBeamSpot(3, 0);
103 Gaudi::svcLocator()->service(
"VertexDbSvc", vtxsvc);
107 for (
unsigned int ivx = 0; ivx < 3; ivx++){
108 vBeamSpot[ivx] = dbv[ivx];
109 evBeamSpot[ivx][ivx] = vv[ivx] * vv[ivx];
113 cout <<
"LambdaSELECTOR ERROR: Could not find a vertex from VertexDbSvc" << endl;
121 wideVertex.
setVx(vWideVertex);
122 wideVertex.
setEvx(evWideVertex);
132 bool fitok = vtxfitr->
Fit();
134 HepLorentzVector ppr = vtxfitr->
pfit(0);
135 HepLorentzVector ppi = vtxfitr->
pfit(1);
136 HepLorentzVector plambda = ppr + ppi;
138 double mass = plambda.m();
139 double chisqvtx = vtxfitr->
chisq(0);
142 if ((
mass <= m_minMass)||(
mass >= m_maxMass))
return false;
144 if ( chisqvtx >= m_maxChisq )
return false;
146 if( !m_doSecondaryVFit )
return true;
156 beamSpot.
setVx(vBeamSpot);
157 beamSpot.
setEvx(evBeamSpot);
170 if( !svtxfit->
Fit() )
return false;
175 double vfitchi2 = svtxfit->
chisq();
176 double flightsig = 0;
178 flightsig = vfitlength/vfiterror;
182 if( vfitchi2 > m_maxVFitChisq )
return false;
183 if( flightsig < m_minFlightSig )
return false;
190 wideVertex.
setVx(vWideVertex);
191 wideVertex.
setEvx(evWideVertex);
209 HepLorentzVector plambda = wlambda.
p();
211 double mass = plambda.m();
212 double chisqvtx = vtxfit->
chisq(0);
215 if ((
mass <= m_minMass)||(
mass >= m_maxMass))
return false;
217 if ( chisqvtx >= m_maxChisq )
return false;
219 if( !m_doSecondaryVFit )
return true;
228 beamSpot.
setVx(vBeamSpot);
229 beamSpot.
setEvx(evBeamSpot);
242 if( !svtxfit->
Fit() )
return false;
247 double vfitchi2 = svtxfit->
chisq();
248 double flightsig = 0;
250 flightsig = vfitlength/vfiterror;
254 if( vfitchi2 > m_maxVFitChisq )
return false;
255 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
HepLorentzVector pfit(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)
HepLorentzVector p() const