14 #include "CLHEP/Units/SystemOfUnits.h"
19 m_maxRStartPrimary ( 25.0*
CLHEP::
mm),
20 m_maxZStartPrimary ( 200.0*
CLHEP::
mm),
21 m_minREndPrimary ( 400.0*
CLHEP::
mm),
22 m_minZEndPrimary (2300.0*
CLHEP::
mm),
23 m_maxRStartSecondary ( 360.0*
CLHEP::
mm),
24 m_maxZStartSecondary (2000.0*
CLHEP::
mm),
25 m_minREndSecondary (1000.0*
CLHEP::
mm),
26 m_minZEndSecondary (3200.0*
CLHEP::
mm)
28 declareInterface<ITrackTruthClassifier>(
this);
46 return StatusCode::SUCCESS;
51 return StatusCode::SUCCESS;
56 const std::vector<HepMC::ConstGenParticlePtr>* )
const {
76 if (genParticle->production_vertex()) {
77 HepMC::FourVector startVertex = genParticle->production_vertex()->position();
80 if ( fabs(startVertex.perp()) < m_maxRStartPrimary
81 && fabs(startVertex.z()) < m_maxZStartPrimary)
83 if (genParticle->end_vertex() ==
nullptr) {
86 HepMC::FourVector endVertex = genParticle->end_vertex()->position();
87 if ( endVertex.perp() > m_minREndPrimary
88 || fabs(startVertex.z()) > m_minZEndPrimary)
89 primary=
true;
else truncated =
true;
92 else if ( startVertex.perp() < m_maxRStartSecondary &&
93 fabs(startVertex.z()) < m_maxZStartSecondary)
95 if (genParticle->end_vertex() ==
nullptr) {
98 HepMC::FourVector endVertex = genParticle->end_vertex()->position();
99 if (endVertex.perp() > m_minREndSecondary
100 || fabs(endVertex.z()) > m_minZEndSecondary) {
110 ATH_MSG_DEBUG (
"Could not classify this particle: " << genParticle );