1#include "GaudiKernel/Bootstrap.h"
2#include "GaudiKernel/IJobOptionsSvc.h"
3#include "GaudiKernel/ISvcLocator.h"
4#include "GaudiKernel/PropertyMgr.h"
6#include "EvtRecEvent/EvtRecVeeVertex.h"
7#include "DTagAlg/LocalLambdaSelector.h"
8#include "VertexFit/VertexFit.h"
9#include "VertexFit/SecondVertexFit.h"
10#include "VertexFit/IVertexDbSvc.h"
11#include "ParticleID/ParticleID.h"
16 IJobOptionsSvc* jobSvc;
17 Gaudi::svcLocator()->service(
"JobOptionsSvc", jobSvc);
19 PropertyMgr m_propMgr;
21 m_propMgr.declareProperty(
"LambdaMinMassCut", m_minMass = 1.10 );
22 m_propMgr.declareProperty(
"LambdaMaxMassCut", m_maxMass = 1.13 );
23 m_propMgr.declareProperty(
"LambdaMaxChisq", m_maxChisq = 100 );
24 m_propMgr.declareProperty(
"UseProtonPID", m_UseProtonPID =
true );
25 m_propMgr.declareProperty(
"ProtonPIDChiCut", m_ChiCut = 8);
27 m_propMgr.declareProperty(
"DoSecondaryVFit", m_doSecondaryVFit =
false );
28 m_propMgr.declareProperty(
"LambdaMaxVFitChisq", m_maxVFitChisq = 100 );
29 m_propMgr.declareProperty(
"LambdaMinFlightSig", m_minFlightSig = 2.0 );
31 jobSvc->setMyProperties(
"LocalLambdaSelector", &m_propMgr);
39 if ( fabs(lambda->
vertexId()) != 3122 )
return false;
42 if ((
mass <= m_minMass)||(
mass >= m_maxMass))
return false;
43 if ( lambda->
chi2() >= m_maxChisq )
return false;
47 int index[2] = {0, 1};
69 if( !m_doSecondaryVFit )
return true;
85 HepSymMatrix evWideVertex(3, 0);
87 evWideVertex[0][0] = 1.0e12;
88 evWideVertex[1][1] = 1.0e12;
89 evWideVertex[2][2] = 1.0e12;
91 wideVertex.
setVx(vWideVertex);
92 wideVertex.
setEvx(evWideVertex);
115 HepSymMatrix evBeamSpot(3, 0);
118 Gaudi::svcLocator()->service(
"VertexDbSvc", vtxsvc);
122 for (
unsigned int ivx = 0; ivx < 3; ivx++){
123 vBeamSpot[ivx] = dbv[ivx];
124 evBeamSpot[ivx][ivx] = vv[ivx] * vv[ivx];
128 cout <<
"LambdaSELECTOR ERROR: Could not find a vertex from VertexDbSvc" << endl;
132 beamSpot.
setVx(vBeamSpot);
133 beamSpot.
setEvx(evBeamSpot);
146 if( !svtxfit->
Fit() )
return false;
151 double vfitchi2 = svtxfit->
chisq();
152 double flightsig = 0;
154 flightsig = vfitlength/vfiterror;
158 if( vfitchi2 > m_maxVFitChisq )
return false;
159 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 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)