Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
73 return StatusCode::SUCCESS;
79 execute (
const EventContext &ctx)
const
115 auto decorateWithNumber = [&truthParticle, &tau]<
typename T>(T & writeHandles, T::mapped_type::accessor_t::element_type
v)->
void{
116 for (
auto& [
acc, writeHandle] : writeHandles) {
117 if ((!truthParticle) or (!
acc->isAvailable(*truthParticle)) ) {
118 writeHandle(*tau) =
v;
120 writeHandle(*tau) = (*acc)(*truthParticle);
124 decorateWithNumber(doubleWriteHandles, -999.
f);
125 decorateWithNumber(floatWriteHandles, -999.
f);
126 decorateWithNumber(intWriteHandles, 0);
127 decorateWithNumber(unsignedIntWriteHandles, 0);
128 decorateWithNumber(charWriteHandles, 0);
134 const xAOD::Jet *truthJet = xAOD::TauHelpers::getLink<xAOD::Jet>(tau,
"truthJetLink");
135 if (truthJet !=
nullptr) {
136 partonTruthLabelIDHandle(*tau) = acc_PartonTruthLabelID(*truthJet);
140 return StatusCode::SUCCESS;
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
std::unordered_map< std::unique_ptr< SG::AuxElement::ConstAccessor< char > >, SG::WriteDecorHandleKey< xAOD::TauJetContainer > > m_charWriteHandleKeys
SG::WriteDecorHandleKey< xAOD::TauJetContainer > m_truthDecayModeKey
Gaudi::Property< std::vector< std::string > > m_doubleDecorations
the decoration for the tau scale factor
Gaudi::Property< std::vector< std::string > > m_unsignedIntDecorations
Gaudi::Property< std::string > m_prefix
StatusCode initialize() override
std::unordered_map< std::unique_ptr< SG::AuxElement::ConstAccessor< float > >, SG::WriteDecorHandleKey< xAOD::TauJetContainer > > m_floatWriteHandleKeys
SG::WriteDecorHandleKey< xAOD::TauJetContainer > m_truthParticleTypeKey
Helper class to provide constant type-safe access to aux data.
Gaudi::Property< std::vector< std::string > > m_floatDecorations
Select isolated Photons, Electrons and Muons.
StatusCode execute(const EventContext &ctx) const override
const xAOD::TruthParticle * getTruthParticle(const xAOD::IParticle *, bool debug=false)
return the truthParticle associated to the given IParticle (if any)
::StatusCode StatusCode
StatusCode definition for legacy code.
Class describing a truth particle in the MC record.
Handle class for adding a decoration to an object.
Class describing a tau jet.
Gaudi::Property< std::vector< std::string > > m_intDecorations
std::unordered_map< std::unique_ptr< SG::AuxElement::ConstAccessor< double > >, SG::WriteDecorHandleKey< xAOD::TauJetContainer > > m_doubleWriteHandleKeys
std::unordered_map< std::unique_ptr< SG::AuxElement::ConstAccessor< int > >, SG::WriteDecorHandleKey< xAOD::TauJetContainer > > m_intWriteHandleKeys
SG::ReadHandleKey< xAOD::TauJetContainer > m_tausKey
the tau collection we run on
SG::WriteDecorHandleKey< xAOD::TauJetContainer > m_partonTruthLabelIDKey
std::unordered_map< std::unique_ptr< SG::AuxElement::ConstAccessor< unsigned int > >, SG::WriteDecorHandleKey< xAOD::TauJetContainer > > m_unsignedIntWriteHandleKeys
Gaudi::Property< std::vector< std::string > > m_charDecorations
Base class for elements of a container that can have aux data.