ATLAS Offline Software
Loading...
Searching...
No Matches
HLTSeedingNoCtpForTesting.cxx
Go to the documentation of this file.
1
2/*
3 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
4*/
10
12#include "GaudiKernel/EventContext.h"
13
14
15HLTSeedingNoCtpForTesting::HLTSeedingNoCtpForTesting(const std::string& name, ISvcLocator* pSvcLocator)
16 : AthReentrantAlgorithm(name, pSvcLocator) {}
17
18
20 ATH_MSG_INFO( "Reading RoIB information from: " << m_RoIBResultKey.objKey()
21 << " : " << m_RoIBResultKey.fullKey() << " : " << m_RoIBResultKey.key() );
22 ATH_CHECK( m_RoIBResultKey.initialize( ) );
23 ATH_CHECK( m_trigEMRoIsKey.initialize() );
24 ATH_CHECK( m_EMDecisionsKey.initialize() );
25 ATH_CHECK( m_trigFSRoIKey.initialize() );
26 return StatusCode::SUCCESS;
27}
28
29
30StatusCode HLTSeedingNoCtpForTesting::execute (const EventContext& ctx) const {
31 using namespace TrigCompositeUtils;
33 ATH_CHECK( roibH.isValid() );
34
37 fsRoIs->push_back( std::make_unique<TrigRoiDescriptor>(true) );
38 using namespace TrigConf;
40
42
43 std::vector<TrigConf::TriggerThreshold*> thresholds{ & threshold};
44
45 for ( const auto & emTauFragment : roibH->eMTauResult() ) {
46 for ( const auto & roi : emTauFragment.roIVec() ) {
47 uint32_t roIWord = roi.roIWord();
48 if ( not ( LVL1::TrigT1CaloDefs::EMRoIWordType == roi.roIType() ) ) {
49 ATH_MSG_VERBOSE( "Skipping RoI as it is not EM threshold " << roIWord );
50 continue;
51 }
52 LVL1::RecEmTauRoI recRoI( roIWord, &thresholds );
53
54 emRoIs->push_back( std::make_unique<TrigRoiDescriptor>(
55 roIWord, 0u ,0u,
56 recRoI.eta(), recRoI.eta()-m_roIWidth, recRoI.eta()+m_roIWidth,
57 recRoI.phi(), recRoI.phi()-m_roIWidth, recRoI.phi()+m_roIWidth) );
58
59 ATH_MSG_DEBUG("Decoded EM RoI at position " << *emRoIs->back() );
60
61 Decision* decision = TrigCompositeUtils::newDecisionIn( decisionOutput.ptr(), hltSeedingNodeName() );
63 ElementLink<TrigRoiDescriptorCollection>(m_trigEMRoIsKey.key(), emRoIs->size()-1, ctx) );
64 addDecisionID( HLT::Identifier( "HLT_EMTestChain" ), decision );
65 }
66 }
67
68 return StatusCode::SUCCESS;
69}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
Handle class for recording to StoreGate.
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadHandleKey< ROIB::RoIBResult > m_RoIBResultKey
virtual StatusCode initialize() override
HLTSeedingNoCtpForTesting(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode execute(const EventContext &ctx) const override
SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > m_EMDecisionsKey
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_trigFSRoIKey
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_trigEMRoIsKey
This class defines the reconstructed em/tau hadron ROI.
Definition RecEmTauRoI.h:44
virtual double eta() const
returns eta coord of ROI
virtual double phi() const
returns phi coord of ROI
virtual bool isValid() override final
Can the handle be successfully dereferenced?
pointer_type ptr()
Dereference the pointer.
bool setObjectLink(const std::string &name, const ElementLink< CONTAINER > &link)
Set the link to an object.
SG::WriteHandle< CONT > createAndStoreNoAux(const SG::WriteHandleKey< CONT > &key, const EventContext &ctx)
Creates and right away records the Container CONT with the key.
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 & initialRoIString()
const std::string & hltSeedingNodeName()
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22