|
ATLAS Offline Software
|
Go to the documentation of this file.
17 std::make_unique<SG::AuxElement::Decorator<char>>(
m_isolated.value());
19 std::make_unique<SG::AuxElement::Decorator<char>>(
m_notTauOrigin.value());
23 m_acc_isoVar = std::make_unique<SG::AuxElement::ConstAccessor<float>>(
28 MCTruthPartClassifier::ParticleDef partDef;
30 std::find(partDef.sParticleType.begin(), partDef.sParticleType.end(),
32 if (
it == partDef.sParticleType.end()) {
36 <<
" is not a valid MCTruthPartClassifier::ParticleType string!");
37 return StatusCode::FAILURE;
43 return StatusCode::SUCCESS;
52 "classifierParticleType");
54 "classifierParticleOrigin");
66 if ((*m_acc_isoVar).isAvailable(*
particle)) {
68 isolation && ((*m_acc_isoVar)(*particle) /
particle->pt() <
73 return StatusCode::FAILURE;
76 (*m_dec_isolated)(*particle) = isolation;
79 "Truth particle is missing the decoration: classifierParticleType.");
80 return StatusCode::FAILURE;
85 (*m_dec_notTauOrigin)(*particle) =
89 "Truth particle is missing the decoration: "
90 "classifierParticleOrigin.");
91 return StatusCode::FAILURE;
94 return StatusCode::SUCCESS;
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
std::unique_ptr< const SG::AuxElement::ConstAccessor< float > > m_acc_isoVar
std::string find(const std::string &s)
return a remapped string
std::unique_ptr< const SG::AuxElement::Decorator< char > > m_dec_notTauOrigin
std::unique_ptr< const SG::AuxElement::Decorator< char > > m_dec_isolated
Gaudi::Property< std::string > m_isolated
virtual StatusCode execute() final
Helper class to provide constant type-safe access to aux data.
Select isolated Photons, Electrons and Muons.
Gaudi::Property< std::string > m_notTauOrigin
Helper class to provide type-safe access to aux data.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< float > m_isolationCut
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_particlesKey
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual StatusCode initialize() final
Gaudi::Property< std::string > m_isolationVariable
Gaudi::Property< std::string > m_checkTypeName
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
MCTruthPartClassifier::ParticleType m_checkType
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space