2#include "GaudiKernel/Bootstrap.h"
3#include "GaudiKernel/ISvcLocator.h"
5#include "EvtRecEvent/EvtRecTrack.h"
7#include "ParticleID/ParticleID.h"
9#include "VertexDbSvc/IVertexDbSvc.h"
10#include "VertexFit/Helix.h"
12#include "SimplePIDSvc/ISimplePIDSvc.h"
17 const IInterface* parent )
18 : base_class(
type, name, parent ) {
22 declareProperty(
"RxyCut", m_VrCut = 1.0 );
23 declareProperty(
"Vz0Cut", m_VzCut = 10.0 );
24 declareProperty(
"CosThetaCut", m_CosThetaCut = 0.93 );
26 declareProperty(
"PID", m_PID =
true );
27 declareProperty(
"useSimplePID", m_useSimplePID =
true );
29 declareProperty(
"PidUseDedx", m_useDedx =
true );
30 declareProperty(
"PidUseTof1", m_useTof1 =
true );
31 declareProperty(
"PidUseTof2", m_useTof2 =
true );
32 declareProperty(
"PidUseTofE", m_useTofE =
false );
33 declareProperty(
"PidUseTofQ", m_useTofQ =
false );
34 declareProperty(
"PidUseEmc", m_useEmc =
false );
35 declareProperty(
"PidUseMuc", m_useMuc =
false );
37 declareProperty(
"PidwithProbability", m_probability =
true );
38 declareProperty(
"PidProbCut", m_PidProbCut = 0.001 );
39 declareProperty(
"RejectKaon", m_rejectKaon =
true );
40 declareProperty(
"RejectProton", m_rejectProton =
false );
42 declareProperty(
"PidwithLikelihood", m_likelihood =
false );
43 declareProperty(
"PidwithNeuronNetwork", m_neuronNetwork =
false );
44 declareProperty(
"NeuronValue", m_neuronValCut = { 1.5, 2.5 } );
57 if ( mdcKalTrk->
charge() == 0 )
return false;
59 Hep3Vector xorigin( 0, 0, 0 );
61 StatusCode sc = serviceLocator()->service(
"VertexDbSvc", vtxsvc );
66 xorigin.setX( dbv[0] );
67 xorigin.setY( dbv[1] );
68 xorigin.setZ( dbv[2] );
73 HepPoint3D IP( xorigin[0], xorigin[1], xorigin[2] );
74 VFHelix helixip3( point0, a, Ea );
76 HepVector vecipa = helixip3.
a();
78 double dr = fabs( vecipa[0] );
79 double dz = fabs( vecipa[3] );
80 double costheta =
cos( mdcKalTrk->
theta() );
81 if ( dr >= m_VrCut )
return false;
82 if ( dz >= m_VzCut )
return false;
83 if ( fabs( costheta ) >= m_CosThetaCut )
return false;
85 if ( !m_PID )
return true;
91 StatusCode sc = serviceLocator()->service(
"SimplePIDSvc", m_simplePIDSvc );
110 if ( m_pidtype == 0 )
return true;
112 if ( aPion.
userTag() == 1 )
return true;
DECLARE_COMPONENT(BesBdkRc)
HepGeom::Point3D< double > HepPoint3D
CDChargedVisible< DBCandidate::kChargedPion > CDChargedPion
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
bool operator()(CDChargedPion &aPion) override
LocalPionSelector(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()
const HepVector & getZHelix() const
const HepSymMatrix & getZError() const
const HepPoint3D & pivot(void) const
returns pivot position.
const HepVector & a(void) const
returns helix parameters.