ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigSteer
DecisionHandling
src
DebugComboHypoTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
DecisionHandling/DebugComboHypoTool.h
"
6
#include "
TrigSteeringEvent/TrigRoiDescriptorCollection.h
"
7
#include <algorithm>
8
#include <cmath>
9
10
using namespace
TrigCompositeUtils
;
11
12
DebugComboHypoTool::DebugComboHypoTool
(
const
std::string&
type
,
13
const
std::string& name,
14
const
IInterface* parent)
15
:
ComboHypoToolBase
(
type
, name, parent)
16
{ }
17
18
19
StatusCode
DebugComboHypoTool::initialize
() {
20
return
StatusCode::SUCCESS;
21
}
22
23
24
bool
DebugComboHypoTool::executeAlg
(
const
std::vector<Combo::LegDecision>& combination,
25
const
EventContext&
/*ctx*/
)
const
{
26
ATH_MSG_ALWAYS
(
"Next Combination:"
);
27
using namespace
TrigCompositeUtils
;
28
// Passes if *at least one* physics object with pT > 45 MeV is supplied on *each* leg.
29
// NOTE: Chains with only one leg have legMultiplicity().size() == 0
30
std::vector<uint8_t> legPasses(std::max((
int
)
legMultiplicity
().
size
(), 1), 0);
31
for
(
const
Combo::LegDecision& ld : combination) {
32
DecisionID
id
= ld.first;
// Specifies which leg this physics object is being supplied on for this combination
33
ElementLink<DecisionContainer>
d = ld.second;
// The physics object's navigation Decision Object.
34
ElementLink<xAOD::IParticleContainer>
f = (*d)->objectLink<
xAOD::IParticleContainer
>(
featureString
());
// The actual physics object itself.
35
ATH_MSG_ALWAYS
(
"-- "
<<
HLT::Identifier
(
id
) <<
" f:"
<< f.dataID() <<
" i:"
<< f.index() <<
" pT:"
<< (*f)->pt());
36
if
((*f)->pt() > 45.0) {
37
const
size_t
index
= (
legMultiplicity
().size() > 0 ?
getIndexFromLeg
(
id
) : 0);
38
legPasses.at(
index
) = 1;
39
}
40
}
41
for
(
const
uint8_t pass : legPasses) {
42
if
(!pass) {
43
return
false
;
44
}
45
}
46
return
true
;
47
}
ATH_MSG_ALWAYS
#define ATH_MSG_ALWAYS(x)
Definition
AthMsgStreamMacros.h:35
DebugComboHypoTool.h
size
size_t size() const
Number of registered mappings.
TrigRoiDescriptorCollection.h
ComboHypoToolBase::legMultiplicity
const std::vector< int > & legMultiplicity() const
Gets the number of legs and the multiplicity required on each leg.
Definition
ComboHypoToolBase.h:54
ComboHypoToolBase::ComboHypoToolBase
ComboHypoToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Definition
ComboHypoToolBase.cxx:10
DebugComboHypoTool::executeAlg
bool executeAlg(const std::vector< Combo::LegDecision > &combination, const EventContext &ctx) const override
Only a dummy implementation exists in ComboHypoToolBase.
Definition
DebugComboHypoTool.cxx:24
DebugComboHypoTool::DebugComboHypoTool
DebugComboHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition
DebugComboHypoTool.cxx:12
DebugComboHypoTool::initialize
virtual StatusCode initialize() override
Definition
DebugComboHypoTool.cxx:19
ElementLink
ElementLink implementation for ROOT usage.
Definition
A/AthLinks/ElementLink.h:40
HLT::Identifier
Definition
TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:19
TrigCompositeUtils
Definition
TrigComposite.h:19
TrigCompositeUtils::DecisionID
unsigned int DecisionID
Definition
TrigComposite_v1.h:27
TrigCompositeUtils::featureString
const std::string & featureString()
Definition
TrigCompositeUtils.h:422
TrigCompositeUtils::getIndexFromLeg
int32_t getIndexFromLeg(const HLT::Identifier &legIdentifier)
Extract the numeric index of a leg identifier.
Definition
TrigCompositeUtilsRoot.cxx:191
index
Definition
index.py:1
xAOD::IParticleContainer
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.
Definition
xAOD/xAODBase/xAODBase/IParticleContainer.h:32
type
Generated on
for ATLAS Offline Software by
1.17.0