27 return StatusCode::SUCCESS;
41 ATH_CHECK(h_TLAPhotons.
record(std::make_unique<xAOD::PhotonContainer>(),
42 std::make_unique<xAOD::PhotonAuxContainer>()));
47 ATH_CHECK(previousDecisionHandle.isValid());
60 for (
const auto previousDecision : *previousDecisionHandle)
66 ATH_MSG_DEBUG(
"This decision has " << prevPhotons.size() <<
" photons");
69 if (prevPhotons.size() != 1) {
70 ATH_MSG_ERROR(
"Did not locate exactly one photon for this Decision Object, found " << prevPhotons.size());
71 return StatusCode::FAILURE;
75 auto prevPhotonLink = prevPhotons.at(0).link;
77 photonPrev = *prevPhotonLink;
80 h_TLAPhotons->push_back(copiedPhoton);
81 *copiedPhoton = *photonPrev;
90 ATH_MSG_DEBUG(
"Copied photon with pT: " << copiedPhoton->
pt() <<
" from decision " << nDecision);
96 ATH_MSG_DEBUG(
"Now computing decision for HypoTool: " << tool->name());
103 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
ElementLink implementation for ROOT usage.
const SG::ReadHandleKey< TrigCompositeUtils::DecisionContainer > & decisionInput() const
methods for derived classes to access handles of the base class input other read/write handles may be...
const SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > & decisionOutput() const
methods for derived classes to access handles of the base class output other read/write handles may b...
StatusCode hypoBaseOutputProcessing(SG::WriteHandle< TrigCompositeUtils::DecisionContainer > &outputHandle, MSG::Level lvl=MSG::DEBUG) const
Base class function to be called once slice specific code has finished. Handles debug printing and va...
HypoBase(const std::string &name, ISvcLocator *pSvcLocator)
constructor, to be called by sub-class constructors
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
pointer_type ptr()
Dereference the pointer.
virtual StatusCode initialize() override
TrigEgammaTLAPhotonHypoAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::WriteHandleKey< xAOD::PhotonContainer > m_TLAPhotonsKey
virtual StatusCode execute(const EventContext &context) const override
ToolHandleArray< TrigEgammaTLAPhotonHypoTool > m_hypoTools
virtual double pt() const override final
The transverse momentum ( ) of the particle.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Decision * newDecisionIn(DecisionContainer *dc, const std::string &name)
Helper method to create a Decision object, place it in the container and return a pointer to it.
const std::string & featureString()
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
void findLinks(const Decision *start, const std::string &linkName, std::vector< LinkInfo< T > > &links, unsigned int behaviour=TrigDefs::allFeaturesOfType, std::set< const xAOD::TrigComposite * > *fullyExploredFrom=nullptr)
search back the TC links for the object of type T linked to the one of TC (recursively) Populates pro...
const std::string & hypoAlgNodeName()
void linkToPrevious(Decision *d, const std::string &previousCollectionKey, size_t previousIndex)
Links to the previous object, location of previous 'seed' decision supplied by hand.
xAOD::TrigCompositeContainer DecisionContainer
static const unsigned int lastFeatureOfType
Run 3 "enum". Only return the final feature along each route through the navigation.
PhotonContainer_v1 PhotonContainer
Definition of the current "photon container version".
Photon_v1 Photon
Definition of the current "egamma version".