LocalKaonSelector Class Reference

#include <LocalKaonSelector.h>

Inheritance diagram for LocalKaonSelector:

DCSelectionFunction< Arg > List of all members.

Public Member Functions

 LocalKaonSelector ()
bool operator() (CDChargedKaon &aKaon)
void setpidtype (int type)
virtual bool operator() (Arg &)=0
bool operator() (Arg &iArg) const

Private Member Functions

 LocalKaonSelector (const LocalKaonSelector &)
const LocalKaonSelectoroperator= (const LocalKaonSelector &)

Private Attributes

int m_pidtype
double m_VrCut
double m_VzCut
double m_CosThetaCut
bool m_useSimplePID
bool m_useDedx
bool m_useTof1
bool m_useTof2
bool m_useTofE
bool m_useTofQ
bool m_useEmc
bool m_useMuc
bool m_probability
double m_PidProbCut
bool m_rejectPion
bool m_rejectProton
bool m_likelihood
bool m_neuronNetwork
std::vector< double > m_neuronValCut

Detailed Description

Definition at line 7 of file LocalKaonSelector.h.


Constructor & Destructor Documentation

LocalKaonSelector::LocalKaonSelector (  ) 

Definition at line 19 of file LocalKaonSelector.cxx.

References m_CosThetaCut, m_likelihood, m_neuronNetwork, m_neuronValCut, m_PidProbCut, m_pidtype, m_probability, m_rejectPion, m_rejectProton, m_useDedx, m_useEmc, m_useMuc, m_useSimplePID, m_useTof1, m_useTof2, m_useTofE, m_useTofQ, m_VrCut, and m_VzCut.

00020 {
00021   m_pidtype=0;
00022   
00023   IJobOptionsSvc* jobSvc;
00024   Gaudi::svcLocator()->service("JobOptionsSvc", jobSvc);
00025   
00026   PropertyMgr m_propMgr;
00027   
00028   //Declare the properties
00029   m_propMgr.declareProperty("RxyCut",               m_VrCut           = 1.0);
00030   m_propMgr.declareProperty("Vz0Cut",               m_VzCut           = 10.0);
00031   m_propMgr.declareProperty("CosThetaCut",          m_CosThetaCut     = 0.93);
00032   
00033   m_propMgr.declareProperty("useSimplePID",         m_useSimplePID    = true);
00034 
00035   m_propMgr.declareProperty("PidUseDedx",           m_useDedx         = true);
00036   m_propMgr.declareProperty("PidUseTof1",           m_useTof1         = true);
00037   m_propMgr.declareProperty("PidUseTof2",           m_useTof2         = true);
00038   m_propMgr.declareProperty("PidUseTofE",           m_useTofE         = false);
00039   m_propMgr.declareProperty("PidUseTofQ",           m_useTofQ         = false);
00040   m_propMgr.declareProperty("PidUseEmc",            m_useEmc          = false);
00041   m_propMgr.declareProperty("PidUseMuc",            m_useMuc          = false);
00042   
00043   m_propMgr.declareProperty("PidwithProbability",   m_probability     = true);
00044   m_propMgr.declareProperty("PidProbCut",           m_PidProbCut      = 0.001);
00045   m_propMgr.declareProperty("RejectPion",           m_rejectPion      = true);
00046   m_propMgr.declareProperty("RejectProton",         m_rejectProton    = false);
00047   
00048   m_propMgr.declareProperty("PidwithLikelihood",    m_likelihood      = false);
00049   m_propMgr.declareProperty("PidwithNeuronNetwork", m_neuronNetwork   = false);
00050   m_neuronValCut.clear();
00051   m_neuronValCut.push_back(1.5);
00052   m_neuronValCut.push_back(2.5);
00053   m_propMgr.declareProperty("NeuronValue",      m_neuronValCut);
00054   
00055   jobSvc->setMyProperties("LocalKaonSelector", &m_propMgr);
00056 }

LocalKaonSelector::LocalKaonSelector ( const LocalKaonSelector  )  [private]


Member Function Documentation

template<class Arg>
bool DCSelectionFunction< Arg >::operator() ( Arg &  iArg  )  const [inline, inherited]

Definition at line 78 of file DCSelectionFunction.h.

00078                                        {
00079          return const_cast<DCSelectionFunction<Arg> *>(this)->operator()(iArg);
00080       }

template<class Arg>
virtual bool DCSelectionFunction< Arg >::operator() ( Arg &   )  [pure virtual, inherited]

Implemented in DChain::DCSimpleSelector< Arg >, ChargedDSelector, DsSelector, LocalEptoPiPiEta3PiSelector, LocalEptoPiPiEtaSelector, LocalEptoRhoGamSelector, LocalEtatoGGSelector, LocalEtatoPiPiPi0Selector, LocalKsSelector, LocalPhotonSelector, LocalPi0Selector, LocalRhotoPiPiSelector, NeutralDSelector, and UserPi0Cut.

bool LocalKaonSelector::operator() ( CDChargedKaon aKaon  ) 

Definition at line 58 of file LocalKaonSelector.cxx.

References VFHelix::a(), DstMdcKalTrack::charge(), cos(), RecMdcKalTrack::getZErrorK(), RecMdcKalTrack::getZHelixK(), ParticleID::instance(), ISimplePIDSvc::iskaon(), EvtRecTrack::isMdcKalTrackValid(), IVertexDbSvc::isVertexValid(), DstMdcKalTrack::kaon, m_CosThetaCut, m_pidtype, m_useSimplePID, m_VrCut, m_VzCut, EvtRecTrack::mdcKalTrack(), pid, VFHelix::pivot(), ISimplePIDSvc::preparePID(), IVertexDbSvc::PrimaryVertex(), DstMdcKalTrack::setPidType(), CDCandidate::setUserTag(), IVertexDbSvc::SigmaPrimaryVertex(), DstMdcKalTrack::theta(), CDChargedVisible< H >::track(), and CDCandidate::userTag().

00058                                                         {
00059   
00060   aKaon.setUserTag(1);
00061   EvtRecTrack* recTrk = const_cast<EvtRecTrack*>( aKaon.track() );
00062   
00063   // MDC track selection
00064 
00065   RecMdcKalTrack::setPidType(RecMdcKalTrack::kaon);
00066   if ( !recTrk->isMdcKalTrackValid() ) return false;
00067   RecMdcKalTrack* mdcKalTrk = recTrk->mdcKalTrack();
00068   if ( mdcKalTrk->charge()==0 ) return false;
00069   
00070   Hep3Vector xorigin(0,0,0);
00071   IVertexDbSvc*  vtxsvc;
00072   Gaudi::svcLocator()->service("VertexDbSvc", vtxsvc);
00073   if(vtxsvc->isVertexValid()){
00074     double* dbv = vtxsvc->PrimaryVertex();
00075     double*  vv = vtxsvc->SigmaPrimaryVertex();
00076     xorigin.setX(dbv[0]);
00077     xorigin.setY(dbv[1]);
00078     xorigin.setZ(dbv[2]);
00079   }
00080   HepVector a = mdcKalTrk->getZHelixK();
00081   HepSymMatrix Ea = mdcKalTrk->getZErrorK();
00082   HepPoint3D point0(0.,0.,0.);
00083   HepPoint3D IP(xorigin[0],xorigin[1],xorigin[2]);
00084   VFHelix helixip3(point0,a,Ea);
00085   helixip3.pivot(IP);
00086   HepVector  vecipa = helixip3.a();
00087   
00088   double dr=fabs(vecipa[0]);
00089   double dz=fabs(vecipa[3]);
00090   double costheta=cos(mdcKalTrk->theta());
00091   if (  dr>= m_VrCut ) return false;
00092   if (  dz>= m_VzCut ) return false;
00093   if ( fabs(costheta) >= m_CosThetaCut ) return false;
00094 
00095   // Simple PID
00096   if(m_useSimplePID){
00097     ISimplePIDSvc* m_simplePIDSvc;
00098     Gaudi::svcLocator()->service("SimplePIDSvc", m_simplePIDSvc);
00099     
00100     m_simplePIDSvc->preparePID(recTrk);
00101     if( !m_simplePIDSvc->iskaon() ){
00102       aKaon.setUserTag(2);
00103     }  
00104   }
00105   else{
00106     //particleID pacakge
00107     ParticleID *pid = ParticleID::instance();
00108     pid->init();
00109     pid->setMethod(pid->methodProbability());
00110     pid->setChiMinCut(4);
00111     pid->setRecTrack(recTrk);
00112     pid->usePidSys(pid->useDedx() | pid->useTof1() | pid->useTof2() | pid->useTof() );
00113     pid->identify(pid->onlyPion() | pid->onlyKaon());
00114     pid->calculate();
00115     
00116     if( !(pid->probKaon()>0 && pid->probKaon()>pid->probPion()) )
00117       aKaon.setUserTag(2);
00118     
00119   }
00120   
00121 
00122   
00123   if(m_pidtype==0) return true;
00124   
00125   if(aKaon.userTag()==1)
00126     return true;
00127   else
00128     return false;
00129   
00130 }

const LocalKaonSelector& LocalKaonSelector::operator= ( const LocalKaonSelector  )  [private]

void LocalKaonSelector::setpidtype ( int  type  )  [inline]

Definition at line 15 of file LocalKaonSelector.h.

References m_pidtype.

Referenced by NeutralDReconstruction::execute(), DsReconstruction::execute(), and ChargedDReconstruction::execute().

00015 {m_pidtype=type;}      


Member Data Documentation

double LocalKaonSelector::m_CosThetaCut [private]

Definition at line 26 of file LocalKaonSelector.h.

Referenced by LocalKaonSelector(), and operator()().

bool LocalKaonSelector::m_likelihood [private]

Definition at line 42 of file LocalKaonSelector.h.

Referenced by LocalKaonSelector().

bool LocalKaonSelector::m_neuronNetwork [private]

Definition at line 43 of file LocalKaonSelector.h.

Referenced by LocalKaonSelector().

std::vector<double> LocalKaonSelector::m_neuronValCut [private]

Definition at line 44 of file LocalKaonSelector.h.

Referenced by LocalKaonSelector().

double LocalKaonSelector::m_PidProbCut [private]

Definition at line 38 of file LocalKaonSelector.h.

Referenced by LocalKaonSelector().

int LocalKaonSelector::m_pidtype [private]

Definition at line 22 of file LocalKaonSelector.h.

Referenced by LocalKaonSelector(), operator()(), and setpidtype().

bool LocalKaonSelector::m_probability [private]

Definition at line 37 of file LocalKaonSelector.h.

Referenced by LocalKaonSelector().

bool LocalKaonSelector::m_rejectPion [private]

Definition at line 39 of file LocalKaonSelector.h.

Referenced by LocalKaonSelector().

bool LocalKaonSelector::m_rejectProton [private]

Definition at line 40 of file LocalKaonSelector.h.

Referenced by LocalKaonSelector().

bool LocalKaonSelector::m_useDedx [private]

Definition at line 29 of file LocalKaonSelector.h.

Referenced by LocalKaonSelector().

bool LocalKaonSelector::m_useEmc [private]

Definition at line 34 of file LocalKaonSelector.h.

Referenced by LocalKaonSelector().

bool LocalKaonSelector::m_useMuc [private]

Definition at line 35 of file LocalKaonSelector.h.

Referenced by LocalKaonSelector().

bool LocalKaonSelector::m_useSimplePID [private]

Definition at line 28 of file LocalKaonSelector.h.

Referenced by LocalKaonSelector(), and operator()().

bool LocalKaonSelector::m_useTof1 [private]

Definition at line 30 of file LocalKaonSelector.h.

Referenced by LocalKaonSelector().

bool LocalKaonSelector::m_useTof2 [private]

Definition at line 31 of file LocalKaonSelector.h.

Referenced by LocalKaonSelector().

bool LocalKaonSelector::m_useTofE [private]

Definition at line 32 of file LocalKaonSelector.h.

Referenced by LocalKaonSelector().

bool LocalKaonSelector::m_useTofQ [private]

Definition at line 33 of file LocalKaonSelector.h.

Referenced by LocalKaonSelector().

double LocalKaonSelector::m_VrCut [private]

Definition at line 24 of file LocalKaonSelector.h.

Referenced by LocalKaonSelector(), and operator()().

double LocalKaonSelector::m_VzCut [private]

Definition at line 25 of file LocalKaonSelector.h.

Referenced by LocalKaonSelector(), and operator()().


Generated on Tue Nov 29 23:20:02 2016 for BOSS_7.0.2 by  doxygen 1.4.7