ATLAS Offline Software
TrackRoiSelectionTool.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_TRACKROISELECTIONTOOL_H
6 #define INDETTRACKPERFMON_TRACKROISELECTIONTOOL_H
7 
15 #include "AsgTools/AsgTool.h"
18 
21 
23 #include <string>
24 #include <vector>
25 
26 class TrigRoiDescriptor;
27 
28 typedef struct {
29  float z;
30  float r;
31  float tantheta;
32 } exitPoint_t;
33 
34 
35 namespace IDTPM {
36 
38  public virtual ITrackSelectionTool,
39  public asg::AsgTool {
40 
41  public:
42 
44 
46  TrackRoiSelectionTool( const std::string& name );
47 
49  virtual ~TrackRoiSelectionTool() = default;
50 
52  virtual StatusCode initialize() override;
53 
56  TrackAnalysisCollections& trkAnaColls,
57  const ElementLink< TrigRoiDescriptorCollection >& roiLink ) override;
58 
61  TrackAnalysisCollections& ) override {
62  ATH_MSG_WARNING( "selectTracks method is disabled" );
63  return StatusCode::SUCCESS;
64  }
65 
67  template< class T >
68  bool accept( const T& t, const TrigRoiDescriptor* r ) const;
69 
71  template< class T >
72  std::vector< const T* > getTracks(
73  const std::vector< const T* >& tvec,
74  const TrigRoiDescriptor* r ) const;
75 
77  std::vector< const xAOD::TrackParticle* > getTrigTracks(
79  const ElementLink< TrigRoiDescriptorCollection >& roiLink ) const;
80 
81  private:
82 
84  exitPoint_t getExitPoint( float tz0, float teta ) const;
85 
86  float getOuterPhi( float pt, float phi, float r=1000. ) const;
87 
90  this, "TriggerTrkParticleContainerName", "HLT_IDTrack_Electron_IDTrig", "Name of container of trigger tracks" };
91 
93  PublicToolHandle< Trig::TrigDecisionTool > m_trigDecTool {
94  this, "TrigDecisionTool", "Trig::TrigDecisionTool/TrigDecisionTool", "" };
95 
96  }; // class TrackRoiSelectionTool
97 
98 } // namespace IDTPM
99 
100 
101 #endif // > !INDETTRACKPERFMON_TRACKROISELECTIONTOOL_H
beamspotman.r
def r
Definition: beamspotman.py:676
IDTPM::TrackRoiSelectionTool::getExitPoint
exitPoint_t getExitPoint(float tz0, float teta) const
Geometric utility methods for track-RoI association.
Definition: TrackRoiSelectionTool.cxx:155
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
IDTPM::TrackAnalysisCollections
Definition: TrackAnalysisCollections.h:44
test_pyathena.pt
pt
Definition: test_pyathena.py:11
TrigDecisionTool.h
TrigRoiDescriptor
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
Definition: TrigRoiDescriptor.h:56
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
IDTPM::TrackRoiSelectionTool::selectTracks
virtual StatusCode selectTracks(TrackAnalysisCollections &) override
Dummy method - Disabled.
Definition: TrackRoiSelectionTool.h:60
SG::ReadHandleKey< xAOD::TrackParticleContainer >
IDTPM::TrackRoiSelectionTool::getOuterPhi
float getOuterPhi(float pt, float phi, float r=1000.) const
Definition: TrackRoiSelectionTool.cxx:127
IDTPM::TrackRoiSelectionTool::initialize
virtual StatusCode initialize() override
Initialize.
Definition: TrackRoiSelectionTool.cxx:37
IDTPM::phi
float phi(const U &p)
Definition: TrackParametersHelper.h:59
exitPoint_t::r
float r
Definition: TrackRoiSelectionTool.h:30
exitPoint_t
Definition: TrackRoiSelectionTool.h:28
IDTPM::TrackRoiSelectionTool::getTracks
std::vector< const T * > getTracks(const std::vector< const T * > &tvec, const TrigRoiDescriptor *r) const
track getter function (for offline tracks or truth particles)
Definition: TrackRoiSelectionTool.cxx:198
exitPoint_t::tantheta
float tantheta
Definition: TrackRoiSelectionTool.h:31
IDTPM::TrackRoiSelectionTool::accept
bool accept(const T &t, const TrigRoiDescriptor *r) const
geometric RoI filters - for non-trigger tracks (e.g. offline, truth, etc.)
Definition: TrackRoiSelectionTool.cxx:56
IDTPM::TrackRoiSelectionTool::m_triggerTrkParticleName
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_triggerTrkParticleName
Trigger TrackParticleContainer's name.
Definition: TrackRoiSelectionTool.h:89
IDTPM::TrackRoiSelectionTool::selectTracksInRoI
virtual StatusCode selectTracksInRoI(TrackAnalysisCollections &trkAnaColls, const ElementLink< TrigRoiDescriptorCollection > &roiLink) override
Main Track selection method.
Definition: TrackRoiSelectionTool.cxx:251
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
exitPoint_t::z
float z
Definition: TrackRoiSelectionTool.h:29
IDTPM::ITrackSelectionTool
Definition: ITrackSelectionTool.h:27
IDTPM::TrackRoiSelectionTool::ASG_TOOL_CLASS
ASG_TOOL_CLASS(TrackRoiSelectionTool, ITrackSelectionTool)
IDTPM::TrackRoiSelectionTool::~TrackRoiSelectionTool
virtual ~TrackRoiSelectionTool()=default
Destructor.
IDTPM::TrackRoiSelectionTool::m_trigDecTool
PublicToolHandle< Trig::TrigDecisionTool > m_trigDecTool
TrigDecTool.
Definition: TrackRoiSelectionTool.h:93
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
IDTPM::TrackRoiSelectionTool::getTrigTracks
std::vector< const xAOD::TrackParticle * > getTrigTracks(const SG::ReadHandleKey< xAOD::TrackParticleContainer > &handleKey, const ElementLink< TrigRoiDescriptorCollection > &roiLink) const
TrigDecTool- and EventView-based getter function for trigger tracks.
Definition: TrackRoiSelectionTool.cxx:231
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ITrackSelectionTool.h
header file for interface for all the various track selection tools in this package
IDTPM::TrackRoiSelectionTool
Definition: TrackRoiSelectionTool.h:39
IDTPM
Athena include(s).
Definition: IPlotsDefinitionSvc.h:25
AsgTool.h
IDTPM::TrackRoiSelectionTool::TrackRoiSelectionTool
TrackRoiSelectionTool(const std::string &name)
Constructor.
Definition: TrackRoiSelectionTool.cxx:29