#include <LocalKaonSelector.h>
Inheritance diagram for LocalKaonSelector:
|
00012 { 00013 IJobOptionsSvc* jobSvc; 00014 Gaudi::svcLocator()->service("JobOptionsSvc", jobSvc); 00015 00016 PropertyMgr m_propMgr; 00017 00018 //Declare the properties 00019 m_propMgr.declareProperty("RxyCut", m_VrCut = 1.0); 00020 m_propMgr.declareProperty("Vz0Cut", m_VzCut = 5.0); 00021 m_propMgr.declareProperty("CosThetaCut", m_CosThetaCut = 0.93); 00022 00023 m_propMgr.declareProperty("PidUseDedx", m_useDedx = true); 00024 m_propMgr.declareProperty("PidUseTof1", m_useTof1 = true); 00025 m_propMgr.declareProperty("PidUseTof2", m_useTof2 = true); 00026 m_propMgr.declareProperty("PidUseTofE", m_useTofE = false); 00027 m_propMgr.declareProperty("PidUseTofQ", m_useTofQ = false); 00028 m_propMgr.declareProperty("PidUseEmc", m_useEmc = false); 00029 m_propMgr.declareProperty("PidUseMuc", m_useMuc = false); 00030 00031 m_propMgr.declareProperty("PidwithProbability", m_probability = true); 00032 m_propMgr.declareProperty("PidProbCut", m_PidProbCut = 0.001); 00033 m_propMgr.declareProperty("RejectPion", m_rejectPion = false); 00034 m_propMgr.declareProperty("RejectProton", m_rejectProton = false); 00035 00036 m_propMgr.declareProperty("PidwithLikelihood", m_likelihood = false); 00037 m_propMgr.declareProperty("PidwithNeuronNetwork", m_neuronNetwork = false); 00038 m_neuronValCut.clear(); 00039 m_neuronValCut.push_back(1.5); 00040 m_neuronValCut.push_back(2.5); 00041 m_propMgr.declareProperty("NeuronValue", m_neuronValCut); 00042 00043 jobSvc->setMyProperties("LocalKaonSelector", &m_propMgr); 00044 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
00078 { 00079 return const_cast<DCSelectionFunction<Arg> *>(this)->operator()(iArg); 00080 }
|
|
00078 { 00079 return const_cast<DCSelectionFunction<Arg> *>(this)->operator()(iArg); 00080 }
|
|
Implements DCSelectionFunction< CDChargedKaon >. |
|
Implements DCSelectionFunction< CDChargedKaon >. |
|
Implements DCSelectionFunction< CDChargedKaon >. |
|
Implements DCSelectionFunction< CDChargedKaon >. 00046 { 00047 00048 EvtRecTrack* recTrk = const_cast<EvtRecTrack*>( aKaon.track() ); 00049 00050 // MDC track selection 00051 RecMdcKalTrack::setPidType(RecMdcKalTrack::kaon); 00052 00053 if ( !recTrk->isMdcKalTrackValid() ) return false; 00054 RecMdcKalTrack* mdcKalTrk = recTrk->mdcKalTrack(); 00055 if ( mdcKalTrk->charge() == 0 ) return false; 00056 00057 // apply the vertex cut 00058 Hep3Vector xorigin(0,0,0); 00059 if ( vtxDbSvc()->isVertexValid() ) { 00060 double* dbv = vtxDbSvc()->PrimaryVertex(); 00061 xorigin.setX(dbv[0]); 00062 xorigin.setY(dbv[1]); 00063 xorigin.setZ(dbv[2]); 00064 } 00065 HepPoint3D IP(xorigin[0], xorigin[1], xorigin[2]); 00066 00067 RecMdcTrack * mdcTrk = recTrk->mdcTrack(); 00068 HepVector a = mdcTrk->helix(); 00069 HepSymMatrix Ea = mdcTrk->err(); 00070 HepPoint3D point0(0., 0., 0.); 00071 VFHelix helixip(point0, a, Ea); 00072 helixip.pivot(IP); 00073 HepVector vecipa = helixip.a(); 00074 double Rvxy = fabs(vecipa[0]); 00075 double Rvz = vecipa[3]; 00076 00077 if ( Rvxy >= m_VrCut ) return false; 00078 if ( fabs(Rvz) >= m_VzCut ) return false; 00079 00080 //if ( fabs(mdcKalTrk->z()) >= m_VzCut ) return false; 00081 //if ( fabs(mdcKalTrk->r()) >= m_VrCut ) return false; 00082 //double costhe = cos(mdcKalTrk->theta()); 00083 //if ( fabs(costhe) >= m_CosThetaCut ) return false; 00084 00085 // PID 00086 ParticleID *pid = ParticleID::instance(); 00087 00088 pid->init(); 00089 pid->setRecTrack(recTrk); 00090 pid->setMethod(pid->methodProbability() | pid->methodNeuronNetwork()); 00091 pid->setChiMinCut(4.0); 00092 // use PID sub-system 00093 if ( m_useDedx ) pid->usePidSys( pid->useDedx() ); 00094 if ( m_useTof1 ) pid->usePidSys( pid->useTof1() ); 00095 if ( m_useTof2 ) pid->usePidSys( pid->useTof2() ); 00096 if ( m_useTofE ) pid->usePidSys( pid->useTofE() ); 00097 if ( m_useTofQ ) pid->usePidSys( pid->useTofQ() ); 00098 if ( m_useEmc ) pid->usePidSys( pid->useEmc() ); 00099 if ( m_probability || m_neuronNetwork ) pid->identify( pid->onlyKaon() ); 00100 if ( m_rejectPion ) pid->identify( pid->onlyPion() ); 00101 if ( m_rejectProton ) pid->identify( pid->onlyProton() ); 00102 pid->calculate(); 00103 00104 if ( m_probability ) { 00105 if ( !pid->IsPidInfoValid() ) return false; 00106 if ( m_probability && pid->ndof() <= 0 ) return false; 00107 00108 double probKaon = pid->probKaon(); 00109 if ( probKaon < m_PidProbCut ) return false; 00110 if ( m_rejectPion && (probKaon < pid->probPion()) ) return false; 00111 if ( m_rejectProton && (probKaon < pid->probProton()) ) return false; 00112 } 00113 00114 if ( m_neuronNetwork ) { 00115 if ( m_neuronNetwork && (pid->neuronStat() <= 0) ) return false; 00116 00117 if ( (pid->neuronVal() < m_neuronValCut[0]) || 00118 (pid->neuronVal() > m_neuronValCut[1]) ) return false; 00119 } 00120 00121 return true; 00122 }
|
|
|
|
|
|
|
|
|
|
00015 {m_pidtype=type;}
|
|
00015 {m_pidtype=type;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|