ATLAS Offline Software
RoiSelectionTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef INDETTRACKPERFMON_ROISELECTIONTOOL_H
6 #define INDETTRACKPERFMON_ROISELECTIONTOOL_H
7 
9 #include "AsgTools/AsgTool.h"
12 
14 //#include "TrackRoiSelectionTool.h" // TODO - to be included in later MRs
15 
17 #include <string>
18 #include <vector>
19 
28 namespace IDTPM {
29 
31 
33  public virtual asg::IAsgTool,
34  public asg::AsgTool {
35 
37 
38  public:
39 
41  RoiSelectionTool( const std::string& name );
42 
44  virtual ~RoiSelectionTool() = default;
45 
47  virtual StatusCode initialize() override;
48 
50  std::vector< roiCollection_t > getRois(
51  const std::string& chainName ) const;
52 
53  private:
54 
56  std::vector< roiCollection_t > retrieveRois(
57  const std::string& chainName,
58  const std::string& roiKey,
59  const int& chainLeg=-1 ) const;
60 
62  std::vector< roiCollection_t > getRoisStandard(
63  const std::string& chainName ) const;
64 
66  std::vector< roiCollection_t > getRoisTnP(
67  const std::string& chainName ) const;
68 
70  StringProperty m_roiKey { this, "RoiKey", "", "RoI name to process" };
71 
72  IntegerProperty m_chainLeg {
73  this, "ChainLeg", -1, "Restrict to a specific \"leg\" of a multi-object trigger chain (default = all)" };
74 
75  BooleanProperty m_doTnP { this, "doTagNProbe", false, "Do Tag&Probe RoI selection" };
76 
77  StringProperty m_roiKeyTag { this, "RoiKeyTag", "", "RoI name for the tag" };
78 
79  IntegerProperty m_chainLegTag {
80  this, "ChainLegTag", 0, "Tag \"leg\" of a multi-object trigger chain (default = 0)" };
81 
82  StringProperty m_roiKeyProbe { this, "RoiKeyProbe", "", "RoI name for the probe" };
83 
84  IntegerProperty m_chainLegProbe {
85  this, "ChainLegProbe", 1, "Probe \"leg\" of a multi-object trigger chain (default = 1)" };
86 
87  PublicToolHandle<Trig::TrigDecisionTool> m_trigDecTool {
88  this, "TrigDecisionTool", "Trig::TrigDecisionTool/TrigDecisionTool", "" };
89 
90  }; // class RoiSelectionTool
91 
92 } // namespace IDTPM
93 
94 
95 #endif // > !INDETTRACKPERFMON_ROISELECTIONTOOL_H
IDTPM::RoiSelectionTool::RoiSelectionTool
RoiSelectionTool(const std::string &name)
Constructor.
Definition: RoiSelectionTool.cxx:16
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
IDTPM::RoiSelectionTool::m_roiKeyTag
StringProperty m_roiKeyTag
Definition: RoiSelectionTool.h:77
IDTPM::RoiSelectionTool::m_roiKey
StringProperty m_roiKey
Properties to fine-tune the tool behaviour.
Definition: RoiSelectionTool.h:70
asg::IAsgTool
Base class for the dual-use tool interface classes.
Definition: IAsgTool.h:41
TrigDecisionTool.h
IDTPM::RoiSelectionTool::getRois
std::vector< roiCollection_t > getRois(const std::string &chainName) const
Main method to get selected RoIs.
Definition: RoiSelectionTool.cxx:137
IDTPM::RoiSelectionTool::m_chainLegTag
IntegerProperty m_chainLegTag
Definition: RoiSelectionTool.h:79
IDTPM::RoiSelectionTool::ASG_TOOL_CLASS
ASG_TOOL_CLASS(RoiSelectionTool, IAsgTool)
IDTPM::RoiSelectionTool::getRoisStandard
std::vector< roiCollection_t > getRoisStandard(const std::string &chainName) const
get selected RoIs (non-Tag&Probe selection)
Definition: RoiSelectionTool.cxx:98
IDTPM::RoiSelectionTool
Definition: RoiSelectionTool.h:34
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
IDTPM::RoiSelectionTool::m_trigDecTool
PublicToolHandle< Trig::TrigDecisionTool > m_trigDecTool
Definition: RoiSelectionTool.h:87
IDTPM::RoiSelectionTool::m_roiKeyProbe
StringProperty m_roiKeyProbe
Definition: RoiSelectionTool.h:82
IDTPM::RoiSelectionTool::initialize
virtual StatusCode initialize() override
RoiSelectionTool methods.
Definition: RoiSelectionTool.cxx:24
IDTPM::RoiSelectionTool::getRoisTnP
std::vector< roiCollection_t > getRoisTnP(const std::string &chainName) const
get selected RoIs (Tag&Probe selection)
Definition: RoiSelectionTool.cxx:110
TrigCompositeUtils::LinkInfo
Helper to keep a Decision object, ElementLink and ActiveState (with respect to some requested ChainGr...
Definition: LinkInfo.h:28
python.TriggerAPI.TriggerAPISession.chainName
chainName
Definition: TriggerAPISession.py:353
IDTPM::RoiSelectionTool::m_chainLegProbe
IntegerProperty m_chainLegProbe
Definition: RoiSelectionTool.h:84
IDTPM::roiCollection_t
TrigCompositeUtils::LinkInfo< TrigRoiDescriptorCollection > roiCollection_t
Definition: RoiSelectionTool.h:30
TrigRoiDescriptor.h
IDTPM::RoiSelectionTool::m_chainLeg
IntegerProperty m_chainLeg
Definition: RoiSelectionTool.h:72
IDTPM
Athena include(s).
Definition: IPlotsDefinitionSvc.h:25
AsgTool.h
IDTPM::RoiSelectionTool::m_doTnP
BooleanProperty m_doTnP
Definition: RoiSelectionTool.h:75
IDTPM::RoiSelectionTool::~RoiSelectionTool
virtual ~RoiSelectionTool()=default
Destructor.
IDTPM::RoiSelectionTool::retrieveRois
std::vector< roiCollection_t > retrieveRois(const std::string &chainName, const std::string &roiKey, const int &chainLeg=-1) const
Retrieve RoIs.
Definition: RoiSelectionTool.cxx:39