ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigSteer
HLTSeeding
src
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
*/
5
#include "
HLTSeedingNoCtpForTesting.h
"
6
#include "
TrigCompositeUtils/TrigCompositeUtils.h
"
7
#include "
TrigConfL1Data/ThresholdConfig.h
"
8
#include "
TrigConfL1Data/TriggerThreshold.h
"
9
#include "
TrigT1Interfaces/RecEmTauRoI.h
"
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
19
StatusCode
HLTSeedingNoCtpForTesting::initialize
() {
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
30
StatusCode
HLTSeedingNoCtpForTesting::execute
(
const
EventContext& ctx)
const
{
31
using namespace
TrigCompositeUtils
;
32
SG::ReadHandle<ROIB::RoIBResult>
roibH(
m_RoIBResultKey
, ctx );
33
ATH_CHECK
( roibH.
isValid
() );
34
35
SG::WriteHandle<TrigRoiDescriptorCollection>
emRoIs =
createAndStoreNoAux
(
m_trigEMRoIsKey
, ctx);
36
SG::WriteHandle<TrigRoiDescriptorCollection>
fsRoIs =
createAndStoreNoAux
(
m_trigFSRoIKey
, ctx);
37
fsRoIs->push_back( std::make_unique<TrigRoiDescriptor>(
true
) );
38
using namespace
TrigConf
;
39
TrigConf::TriggerThreshold
threshold
;
40
41
SG::WriteHandle<DecisionContainer>
decisionOutput =
createAndStore
(
m_EMDecisionsKey
, ctx );
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
(),
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
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition
AthMsgStreamMacros.h:28
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
HLTSeedingNoCtpForTesting.h
Decision
xAOD::TrigComposite Decision
Definition
TrigComposite.h:20
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:28
RecEmTauRoI.h
WriteHandle.h
Handle class for recording to StoreGate.
ThresholdConfig.h
TrigCompositeUtils.h
addDecisionID
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
Definition
TrigCompositeUtilsRoot.cxx:59
TriggerThreshold.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
ElementLink
ElementLink implementation for ROOT usage.
Definition
A/AthLinks/ElementLink.h:40
HLTSeedingNoCtpForTesting::m_RoIBResultKey
SG::ReadHandleKey< ROIB::RoIBResult > m_RoIBResultKey
Definition
HLTSeedingNoCtpForTesting.h:31
HLTSeedingNoCtpForTesting::m_roIWidth
float m_roIWidth
Definition
HLTSeedingNoCtpForTesting.h:43
HLTSeedingNoCtpForTesting::initialize
virtual StatusCode initialize() override
Definition
HLTSeedingNoCtpForTesting.cxx:19
HLTSeedingNoCtpForTesting::HLTSeedingNoCtpForTesting
HLTSeedingNoCtpForTesting(const std::string &name, ISvcLocator *pSvcLocator)
Definition
HLTSeedingNoCtpForTesting.cxx:15
HLTSeedingNoCtpForTesting::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition
HLTSeedingNoCtpForTesting.cxx:30
HLTSeedingNoCtpForTesting::m_EMDecisionsKey
SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > m_EMDecisionsKey
Definition
HLTSeedingNoCtpForTesting.h:37
HLTSeedingNoCtpForTesting::m_trigFSRoIKey
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_trigFSRoIKey
Definition
HLTSeedingNoCtpForTesting.h:40
HLTSeedingNoCtpForTesting::m_trigEMRoIsKey
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_trigEMRoIsKey
Definition
HLTSeedingNoCtpForTesting.h:34
HLT::Identifier
Definition
TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:19
LVL1::RecEmTauRoI
This class defines the reconstructed em/tau hadron ROI.
Definition
RecEmTauRoI.h:44
LVL1::RecEmTauRoI::eta
virtual double eta() const
returns eta coord of ROI
Definition
RecEmTauRoI.cxx:342
LVL1::RecEmTauRoI::phi
virtual double phi() const
returns phi coord of ROI
Definition
RecEmTauRoI.cxx:332
LVL1::TrigT1CaloDefs::EMRoIWordType
@ EMRoIWordType
Definition
TrigT1CaloDefs.h:173
SG::ReadHandle
Definition
StoreGate/StoreGate/ReadHandle.h:67
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::WriteHandle
Definition
StoreGate/StoreGate/WriteHandle.h:73
SG::WriteHandle::ptr
pointer_type ptr()
Dereference the pointer.
TrigConf::TriggerThreshold
Definition
TriggerThreshold.h:20
xAOD::TrigComposite_v1::setObjectLink
bool setObjectLink(const std::string &name, const ElementLink< CONTAINER > &link)
Set the link to an object.
TrigCompositeUtils
Definition
TrigComposite.h:19
TrigCompositeUtils::createAndStoreNoAux
SG::WriteHandle< CONT > createAndStoreNoAux(const SG::WriteHandleKey< CONT > &key, const EventContext &ctx)
Creates and right away records the Container CONT with the key.
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:44
TrigCompositeUtils::initialRoIString
const std::string & initialRoIString()
Definition
TrigCompositeUtils.h:418
TrigCompositeUtils::hltSeedingNodeName
const std::string & hltSeedingNodeName()
Definition
TrigCompositeUtils.h:425
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition
Config.h:22
threshold
Definition
chainparser.cxx:74
Generated on
for ATLAS Offline Software by
1.17.0