1#include "GaudiKernel/Bootstrap.h"
2#include "GaudiKernel/ISvcLocator.h"
4#include "EvtRecEvent/EvtRecTrack.h"
6#include "ParticleID/ParticleID.h"
8#include "VertexDbSvc/IVertexDbSvc.h"
9#include "VertexFit/Helix.h"
14 const IInterface* parent )
15 : base_class(
type, name, parent ) {
19 declareProperty(
"RxyCut", m_VrCut = 1.0 );
20 declareProperty(
"Vz0Cut", m_VzCut = 10.0 );
21 declareProperty(
"CosThetaCut", m_CosThetaCut = 0.93 );
23 declareProperty(
"PID", m_PID =
true );
24 declareProperty(
"ChiCut", m_ChiCut = 8 );
26 declareProperty(
"PidUseDedx", m_useDedx =
true );
27 declareProperty(
"PidUseTof1", m_useTof1 =
true );
28 declareProperty(
"PidUseTof2", m_useTof2 =
true );
29 declareProperty(
"PidUseTofE", m_useTofE =
false );
30 declareProperty(
"PidUseTofQ", m_useTofQ =
false );
31 declareProperty(
"PidUseEmc", m_useEmc =
false );
32 declareProperty(
"PidUseMuc", m_useMuc =
false );
34 declareProperty(
"PidwithProbability", m_probability =
true );
35 declareProperty(
"PidProbCut", m_PidProbCut = 0.001 );
36 declareProperty(
"RejectKaon", m_rejectKaon =
true );
37 declareProperty(
"RejectPion", m_rejectPion =
true );
39 declareProperty(
"PidwithLikelihood", m_likelihood =
false );
40 declareProperty(
"PidwithNeuronNetwork", m_neuronNetwork =
false );
41 declareProperty(
"NeuronValue", m_neuronValCut = { 1.5, 2.5 } );
54 if ( mdcKalTrk->
charge() == 0 )
return false;
56 Hep3Vector xorigin( 0, 0, 0 );
58 StatusCode sc = serviceLocator()->service(
"VertexDbSvc", vtxsvc );
63 xorigin.setX( dbv[0] );
64 xorigin.setY( dbv[1] );
65 xorigin.setZ( dbv[2] );
70 HepPoint3D IP( xorigin[0], xorigin[1], xorigin[2] );
71 VFHelix helixip3( point0, a, Ea );
73 HepVector vecipa = helixip3.
a();
75 double dr = fabs( vecipa[0] );
76 double dz = fabs( vecipa[3] );
77 double costheta =
cos( mdcKalTrk->
theta() );
78 if ( dr >= m_VrCut )
return false;
79 if ( dz >= m_VzCut )
return false;
80 if ( fabs( costheta ) >= m_CosThetaCut )
return false;
82 if ( !m_PID )
return true;
99 if ( m_pidtype == 0 )
return true;
101 if ( aProton.
userTag() == 1 )
return true;
DECLARE_COMPONENT(BesBdkRc)
HepGeom::Point3D< double > HepPoint3D
CDChargedVisible< DBCandidate::kProton > CDProton
double cos(const BesAngle a)
virtual const EvtRecTrack * track() const
const double theta() const
static void setPidType(PidType pidType)
bool isMdcKalTrackValid()
RecMdcKalTrack * mdcKalTrack()
virtual bool isVertexValid()=0
virtual double * SigmaPrimaryVertex()=0
virtual double * PrimaryVertex()=0
bool operator()(CDProton &aProton) override
LocalProtonSelector(const std::string &type, const std::string &name, const IInterface *parent)
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
HepSymMatrix & getZErrorP()
const HepPoint3D & pivot(void) const
returns pivot position.
const HepVector & a(void) const
returns helix parameters.