1#include "GaudiKernel/Bootstrap.h"
2#include "GaudiKernel/IJobOptionsSvc.h"
3#include "GaudiKernel/ISvcLocator.h"
4#include "GaudiKernel/PropertyMgr.h"
21 IJobOptionsSvc* jobSvc;
22 Gaudi::svcLocator()->service(
"JobOptionsSvc", jobSvc);
24 PropertyMgr m_propMgr;
27 m_propMgr.declareProperty(
"RxyCut", m_VrCut = 1.0);
28 m_propMgr.declareProperty(
"Vz0Cut", m_VzCut = 10.0);
29 m_propMgr.declareProperty(
"CosThetaCut", m_CosThetaCut = 0.93);
31 m_propMgr.declareProperty(
"PID", m_PID =
true);
32 m_propMgr.declareProperty(
"ChiCut", m_ChiCut = 8);
34 m_propMgr.declareProperty(
"PidUseDedx", m_useDedx =
true);
35 m_propMgr.declareProperty(
"PidUseTof1", m_useTof1 =
true);
36 m_propMgr.declareProperty(
"PidUseTof2", m_useTof2 =
true);
37 m_propMgr.declareProperty(
"PidUseTofE", m_useTofE =
false);
38 m_propMgr.declareProperty(
"PidUseTofQ", m_useTofQ =
false);
39 m_propMgr.declareProperty(
"PidUseEmc", m_useEmc =
false);
40 m_propMgr.declareProperty(
"PidUseMuc", m_useMuc =
false);
42 m_propMgr.declareProperty(
"PidwithProbability", m_probability =
true);
43 m_propMgr.declareProperty(
"PidProbCut", m_PidProbCut = 0.001);
44 m_propMgr.declareProperty(
"RejectKaon", m_rejectKaon =
true);
45 m_propMgr.declareProperty(
"RejectPion", m_rejectPion =
true);
47 m_propMgr.declareProperty(
"PidwithLikelihood", m_likelihood =
false);
48 m_propMgr.declareProperty(
"PidwithNeuronNetwork", m_neuronNetwork =
false);
49 m_neuronValCut.clear();
50 m_neuronValCut.push_back(1.5);
51 m_neuronValCut.push_back(2.5);
52 m_propMgr.declareProperty(
"NeuronValue", m_neuronValCut);
54 jobSvc->setMyProperties(
"LocalProtonSelector", &m_propMgr);
67 if ( mdcKalTrk->
charge()==0 )
return false;
69 Hep3Vector xorigin(0,0,0);
71 Gaudi::svcLocator()->service(
"VertexDbSvc", vtxsvc);
82 HepPoint3D IP(xorigin[0],xorigin[1],xorigin[2]);
85 HepVector vecipa = helixip3.
a();
87 double dr=fabs(vecipa[0]);
88 double dz=fabs(vecipa[3]);
90 if ( dr>= m_VrCut )
return false;
91 if ( dz>= m_VzCut )
return false;
92 if ( fabs(
costheta) >= m_CosThetaCut )
return false;
94 if(!m_PID)
return true;
111 if(m_pidtype==0)
return true;
double cos(const BesAngle a)
LocalProtonSelector protonSelector
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)
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.