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"
11#include "SimplePIDSvc/ISimplePIDSvc.h"
16 const IInterface* parent )
17 : base_class(
type, name, parent ) {
21 declareProperty(
"RxyCut", m_VrCut = 1.0 );
22 declareProperty(
"Vz0Cut", m_VzCut = 10.0 );
23 declareProperty(
"CosThetaCut", m_CosThetaCut = 0.93 );
25 declareProperty(
"PID", m_PID =
true );
26 declareProperty(
"useSimplePID", m_useSimplePID =
true );
28 declareProperty(
"PidUseDedx", m_useDedx =
true );
29 declareProperty(
"PidUseTof1", m_useTof1 =
true );
30 declareProperty(
"PidUseTof2", m_useTof2 =
true );
31 declareProperty(
"PidUseTofE", m_useTofE =
false );
32 declareProperty(
"PidUseTofQ", m_useTofQ =
false );
33 declareProperty(
"PidUseEmc", m_useEmc =
false );
34 declareProperty(
"PidUseMuc", m_useMuc =
false );
36 declareProperty(
"PidwithProbability", m_probability =
true );
37 declareProperty(
"PidProbCut", m_PidProbCut = 0.001 );
38 declareProperty(
"RejectPion", m_rejectPion =
true );
39 declareProperty(
"RejectProton", m_rejectProton =
false );
41 declareProperty(
"PidwithLikelihood", m_likelihood =
false );
42 declareProperty(
"PidwithNeuronNetwork", m_neuronNetwork =
false );
43 declareProperty(
"NeuronValue", m_neuronValCut = { 1.5, 2.5 } );
56 if ( mdcKalTrk->
charge() == 0 )
return false;
58 Hep3Vector xorigin( 0, 0, 0 );
60 StatusCode sc = serviceLocator()->service(
"VertexDbSvc", vtxsvc );
65 xorigin.setX( dbv[0] );
66 xorigin.setY( dbv[1] );
67 xorigin.setZ( dbv[2] );
72 HepPoint3D IP( xorigin[0], xorigin[1], xorigin[2] );
73 VFHelix helixip3( point0, a, Ea );
75 HepVector vecipa = helixip3.
a();
77 double dr = fabs( vecipa[0] );
78 double dz = fabs( vecipa[3] );
79 double costheta =
cos( mdcKalTrk->
theta() );
80 if ( dr >= m_VrCut )
return false;
81 if ( dz >= m_VzCut )
return false;
82 if ( fabs( costheta ) >= m_CosThetaCut )
return false;
84 if ( !m_PID )
return true;
90 StatusCode sc = serviceLocator()->service(
"SimplePIDSvc", m_simplePIDSvc );
110 if ( m_pidtype == 0 )
return true;
112 if ( aKaon.
userTag() == 1 )
return true;
DECLARE_COMPONENT(BesBdkRc)
HepGeom::Point3D< double > HepPoint3D
CDChargedVisible< DBCandidate::kChargedKaon > CDChargedKaon
double cos(const BesAngle a)
virtual const EvtRecTrack * track() const
const double theta() const
static void setPidType(PidType pidType)
bool isMdcKalTrackValid()
RecMdcKalTrack * mdcKalTrack()
virtual void preparePID(EvtRecTrack *track)=0
virtual bool isVertexValid()=0
virtual double * SigmaPrimaryVertex()=0
virtual double * PrimaryVertex()=0
LocalKaonSelector(const std::string &type, const std::string &name, const IInterface *parent)
bool operator()(CDChargedKaon &aKaon) override
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()
HepSymMatrix & getZErrorK()
const HepPoint3D & pivot(void) const
returns pivot position.
const HepVector & a(void) const
returns helix parameters.