19 ISvcLocator* pSvcLocator ) :
28 return StatusCode::SUCCESS;
40 std::make_unique<xAOD::JetAuxContainer>()));
45 ATH_CHECK(previousDecisionHandle.isValid());
46 ATH_MSG_DEBUG(
"Running with " << previousDecisionHandle->size() <<
" previous decisions");
55 for (
const auto previousDecision : *previousDecisionHandle)
60 ATH_MSG_DEBUG(
"This decision has " << prevJets.size() <<
" jets");
63 for (
const auto&
jet : prevJets)
65 auto prevJetLink =
jet.link;
67 jetPrev = *prevJetLink;
76 bool duplicate_found(
false);
77 for (
unsigned idx_tla_jet = 0; idx_tla_jet!=h_TLAJets->size(); idx_tla_jet++){
78 const xAOD::Jet* tla_jet = h_TLAJets->at(idx_tla_jet);
79 if (*original_jet_link == *getOriginalObjectLink(*tla_jet)) {
80 ATH_MSG_DEBUG(
"Jet already found! Adding to decision but not to TLA jet container...");
82 duplicate_found =
true;
85 if (duplicate_found)
continue;
88 h_TLAJets->push_back(copiedJet);
89 *copiedJet = *jetPrev;
92 ATH_MSG_DEBUG(
"Copied jet with pT: " << copiedJet->
pt() <<
" and eta "<<copiedJet->
eta()<<
" from decision " << nDecision);
102 ATH_MSG_DEBUG(
"Saved "<<nSavedJets<<
" TLA jets from "<<nDecision<<
" input decisions.");
106 ATH_MSG_DEBUG(
"Now computing decision for " << tool->name());
107 CHECK(tool->decide(outputDecisions));
114 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define CHECK(...)
Evaluate an expression and check for errors.
ElementLink implementation for ROOT usage.
IndexingPolicy::ElementConstPointer ElementConstPointer
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.
SG::WriteHandleKey< xAOD::JetContainer > m_TLAjetsKey
virtual StatusCode execute(const EventContext &context) const override
virtual StatusCode initialize() override
TrigJetTLAHypoAlg(const std::string &name, ISvcLocator *pSvcLocator)
ToolHandleArray< TrigJetTLAHypoTool > m_hypoTools
virtual double pt() const
The transverse momentum ( ) of the particle.
virtual double eta() const
The pseudorapidity ( ) 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.
Jet_v1 Jet
Definition of the current "jet version".
JetContainer_v1 JetContainer
Definition of the current "jet container version".