ATLAS Offline Software
HLTSeedingNoCtpForTesting.cxx
Go to the documentation of this file.
1 
2 /*
3  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
4 */
10 
11 #include "StoreGate/WriteHandle.h"
12 #include "GaudiKernel/EventContext.h"
13 
14 
15 HLTSeedingNoCtpForTesting::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() );
24  ATH_CHECK( m_EMDecisionsKey.initialize() );
26  return StatusCode::SUCCESS;
27 }
28 
29 
30 StatusCode 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() );
62  decision->setObjectLink( initialRoIString(),
64  addDecisionID( HLT::Identifier( "HLT_EMTestChain" ), decision );
65  }
66  }
67 
68  return StatusCode::SUCCESS;
69 }
RecEmTauRoI.h
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
HLTSeedingNoCtpForTesting.h
TrigCompositeUtils::hltSeedingNodeName
const std::string & hltSeedingNodeName()
Definition: TrigCompositeUtilsRoot.cxx:892
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TrigCompositeUtils::newDecisionIn
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.
Definition: TrigCompositeUtilsRoot.cxx:46
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
TrigCompositeUtils::addDecisionID
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
Definition: TrigCompositeUtilsRoot.cxx:61
ROIB::RoIBResult::eMTauResult
const std::vector< EMTauResult > & eMTauResult() const
Gets the egamma part of the L1 RDO.
Definition: RoIBResult.cxx:68
HLTSeedingNoCtpForTesting::m_roIWidth
float m_roIWidth
Definition: HLTSeedingNoCtpForTesting.h:43
TrigCompositeUtils::createAndStore
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
Definition: TrigCompositeUtilsRoot.cxx:30
HLTSeedingNoCtpForTesting::HLTSeedingNoCtpForTesting
HLTSeedingNoCtpForTesting(const std::string &name, ISvcLocator *pSvcLocator)
Definition: HLTSeedingNoCtpForTesting.cxx:15
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
ThresholdConfig.h
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition: Config.h:22
TrigCompositeUtils.h
WriteHandle.h
Handle class for recording to StoreGate.
HLTSeedingNoCtpForTesting::m_EMDecisionsKey
SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > m_EMDecisionsKey
Definition: HLTSeedingNoCtpForTesting.h:37
xAOD::TrigComposite_v1::setObjectLink
bool setObjectLink(const std::string &name, const ElementLink< CONTAINER > &link)
Set the link to an object.
TrigCompositeUtils::initialRoIString
const std::string & initialRoIString()
Definition: TrigCompositeUtilsRoot.cxx:868
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SG::WriteHandle::ptr
pointer_type ptr()
Dereference the pointer.
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LVL1::RecEmTauRoI
This class defines the reconstructed em/tau hadron ROI.
Definition: RecEmTauRoI.h:44
TriggerThreshold.h
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
TrigCompositeUtils::createAndStoreNoAux
SG::WriteHandle< CONT > createAndStoreNoAux(const SG::WriteHandleKey< CONT > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Creates and right away records the Container CONT with the key.
xAOD::TrigComposite_v1
Class used to describe composite objects in the HLT.
Definition: TrigComposite_v1.h:52
DataVector::back
const T * back() const
Access the last element in the collection as an rvalue.
HLT::Identifier
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:20
HLTSeedingNoCtpForTesting::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: HLTSeedingNoCtpForTesting.cxx:30
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
LVL1::RecEmTauRoI::phi
virtual double phi() const
returns phi coord of ROI
Definition: RecEmTauRoI.cxx:333
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
threshold
Definition: chainparser.cxx:74
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::WriteHandle< TrigRoiDescriptorCollection >
HLTSeedingNoCtpForTesting::initialize
virtual StatusCode initialize() override
Definition: HLTSeedingNoCtpForTesting.cxx:19
HLTSeedingNoCtpForTesting::m_RoIBResultKey
SG::ReadHandleKey< ROIB::RoIBResult > m_RoIBResultKey
Definition: HLTSeedingNoCtpForTesting.h:31
LVL1::TrigT1CaloDefs::EMRoIWordType
@ EMRoIWordType
Definition: TrigT1CaloDefs.h:173
TrigCompositeUtils
Definition: Event/xAOD/xAODTrigger/xAODTrigger/TrigComposite.h:19
HLTSeedingNoCtpForTesting::m_trigFSRoIKey
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_trigFSRoIKey
Definition: HLTSeedingNoCtpForTesting.h:40
HLTSeedingNoCtpForTesting::m_trigEMRoIsKey
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_trigEMRoIsKey
Definition: HLTSeedingNoCtpForTesting.h:34
LVL1::RecEmTauRoI::eta
virtual double eta() const
returns eta coord of ROI
Definition: RecEmTauRoI.cxx:343
TrigConf::TriggerThreshold
Definition: TriggerThreshold.h:20
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
dumpTgcDigiThreshold.threshold
list threshold
Definition: dumpTgcDigiThreshold.py:34