ATLAS Offline Software
TrigAFPToFHypoTool.cxx
Go to the documentation of this file.
1 
2 /*
3 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
4 */
5 
6 #include "TrigAFPToFHypoTool.h"
7 
8 using namespace TrigCompositeUtils;
9 
10 TrigAFPToFHypoTool::TrigAFPToFHypoTool(const std::string &type, const std::string &name, const IInterface *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 
22 StatusCode 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 }
grepfile.info
info
Definition: grepfile.py:38
HLT::Identifier::numeric
TrigCompositeUtils::DecisionID numeric() const
numeric ID
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:47
TrigCompositeUtils::addDecisionID
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
Definition: TrigCompositeUtilsRoot.cxx:61
TrigAFPToFHypoTool.h
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
postInclude.inputs
inputs
Definition: postInclude.SortInput.py:15
TrigAFPToFHypoTool::TrigAFPToFHypoTool
TrigAFPToFHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TrigAFPToFHypoTool.cxx:10
HLT
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
Definition: HLTResultReader.h:26
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TrigAFPToFHypoTool::m_deltaZCut
Gaudi::Property< float > m_deltaZCut
Definition: TrigAFPToFHypoTool.h:42
TrigAFPToFHypoTool::decide
StatusCode decide(std::vector< AFPToFHypoToolInfo > &inputs) const
Definition: TrigAFPToFHypoTool.cxx:22
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TrigAFPToFHypoTool::AFPToFHypoToolInfo
Definition: TrigAFPToFHypoTool.h:27
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TrigAFPToFHypoTool::m_acceptAll
Gaudi::Property< bool > m_acceptAll
Definition: TrigAFPToFHypoTool.h:43
TrigCompositeUtils
Definition: Event/xAOD/xAODTrigger/xAODTrigger/TrigComposite.h:19
TrigAFPToFHypoTool::m_decisionId
HLT::Identifier m_decisionId
Definition: TrigAFPToFHypoTool.h:41
AthAlgTool
Definition: AthAlgTool.h:26
TrigAFPToFHypoTool::initialize
virtual StatusCode initialize() override
Definition: TrigAFPToFHypoTool.cxx:14
Identifier
Definition: IdentifierFieldParser.cxx:14