ATLAS Offline Software
Loading...
Searching...
No Matches
TrigAFPToFHypoTool.cxx
Go to the documentation of this file.
1
2/*
3Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
4*/
5
7
8using namespace TrigCompositeUtils;
9
10TrigAFPToFHypoTool::TrigAFPToFHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
11 : AthAlgTool(type, name, parent),
12 m_decisionId(HLT::Identifier::fromToolName(name)) {}
13
15{
16 ATH_MSG_DEBUG("TrigAFPToFHypoTool::initialize()");
17 ATH_MSG_DEBUG("m_deltaZCut: " << m_deltaZCut);
18 ATH_MSG_DEBUG("m_acceptAll: " << m_acceptAll);
19 return StatusCode::SUCCESS;
20}
21
22StatusCode TrigAFPToFHypoTool::decide(std::vector<AFPToFHypoToolInfo>& inputs) const
23{
24 ATH_MSG_DEBUG("Executing the TrigAFPToFHypoTool selection for chain: " << name());
25
26 //Make decision here with input AFP vertex and dijet vertex
27 for (AFPToFHypoToolInfo& info : inputs) {
28 if (info.inputPassingChains.count(m_decisionId.numeric()) == 0) {
29 ATH_MSG_VERBOSE("This DecisionObject is not active for this chain coming into this step");
30 continue;
31 }
32
33 bool pass = true;
34
35 ATH_MSG_DEBUG("AFP ToF vertex z position: " << info.afpVtx->position()
36 << " ID vertex z position: " << info.idVtx->z()
37 << " deltaZCut: " << m_deltaZCut);
38
39 if( std::abs( info.afpVtx->position() - info.idVtx->z() ) > m_deltaZCut) pass = false;
40
41 if(pass or m_acceptAll) {
42 addDecisionID(m_decisionId.numeric(), info.outputDecision);
43 ATH_MSG_DEBUG("AFP ToF vertex accepted");
44 }
45 else ATH_MSG_DEBUG("AFP ToF vertex rejected");
46 }
47
48 return StatusCode::SUCCESS;
49}
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Gaudi::Property< bool > m_acceptAll
virtual StatusCode initialize() override
StatusCode decide(std::vector< AFPToFHypoToolInfo > &inputs) const
HLT::Identifier m_decisionId
Gaudi::Property< float > m_deltaZCut
TrigAFPToFHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.