ATLAS Offline Software
TrigTauPrecTrackHypoTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
9 
10 
11 using namespace TrigCompositeUtils;
12 
13 TrigTauPrecTrackHypoTool::TrigTauPrecTrackHypoTool(const std::string& type, const std::string& name, const IInterface* parent)
14  : base_class(type, name, parent), m_decisionId(HLT::Identifier::fromToolName(name))
15 {
16 
17 }
18 
19 
21 {
22  ATH_MSG_DEBUG("Tool configured for chain/id: " << m_decisionId);
23 
24  return StatusCode::SUCCESS;
25 }
26 
27 
29 {
30  // Get RoI descriptor
31  ATH_MSG_DEBUG( "Input RoI eta: " << input.roi->eta() << ", phi: " << input.roi->phi() << ", z: " << input.roi->zed());
32 
33  // Check the input TrackCollection
34  const xAOD::TrackParticleContainer* tracks = input.trackParticles;
35  if(!tracks->empty()){
36  ATH_MSG_DEBUG("Input Precision Tracks collection has size: " << tracks->size());
37  }
38 
39  // This is (for now) a dummy step, so we won't be applying any decision here
40  bool pass = true;
41 
42  return pass;
43 }
44 
45 
46 StatusCode TrigTauPrecTrackHypoTool::decide(std::vector<ITrigTauPrecTrackHypoTool::ToolInfo>& input) const
47 {
48  for(auto& i : input) {
49  if(passed(m_decisionId.numeric(), i.previousDecisionIDs)) {
50  if(decide(i)) {
51  addDecisionID(m_decisionId, i.decision);
52  }
53  }
54  }
55 
56  return StatusCode::SUCCESS;
57 }
ITrigTauPrecTrackHypoTool::ToolInfo
Definition: ITrigTauPrecTrackHypoTool.h:25
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition: TrigCompositeUtilsRoot.cxx:117
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
TrigTauPrecTrackHypoTool.h
TrigTauPrecTrackHypoTool::m_decisionId
HLT::Identifier m_decisionId
Definition: TrigTauPrecTrackHypoTool.h:30
TrigCompositeUtils.h
HLT
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
Definition: HLTResultReader.h:26
lumiFormat.i
int i
Definition: lumiFormat.py:85
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
TrigTauPrecTrackHypoTool::initialize
virtual StatusCode initialize() override
Definition: TrigTauPrecTrackHypoTool.cxx:20
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
test_pyathena.parent
parent
Definition: test_pyathena.py:15
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TrigTauPrecTrackHypoTool::TrigTauPrecTrackHypoTool
TrigTauPrecTrackHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TrigTauPrecTrackHypoTool.cxx:13
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TrigCompositeUtils
Definition: Event/xAOD/xAODTrigger/xAODTrigger/TrigComposite.h:19
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
TrigTauPrecTrackHypoTool::decide
virtual StatusCode decide(std::vector< ITrigTauPrecTrackHypoTool::ToolInfo > &input) const override
Definition: TrigTauPrecTrackHypoTool.cxx:46
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
TrackParticleContainer.h
Identifier
Definition: IdentifierFieldParser.cxx:14