ATLAS Offline Software
MuonTrackTagTestTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONCOMBINEDTOOLS_MUONTRACKTAGTESTTOOL_H
6 #define MUONCOMBINEDTOOLS_MUONTRACKTAGTESTTOOL_H
7 
8 #include <string>
9 
11 #include "GaudiKernel/ServiceHandle.h"
12 #include "GaudiKernel/ToolHandle.h"
18 
19 namespace MuonCombined {
20 
21  class MuonTrackTagTestTool : public AthAlgTool, virtual public IMuonTrackTagTool {
22  public:
23  MuonTrackTagTestTool(const std::string& type, const std::string& name, const IInterface* parent);
24  ~MuonTrackTagTestTool() = default;
25 
26  StatusCode initialize() override;
27 
28  double chi2(const Trk::TrackParameters& idParsAtEntry, const Trk::TrackParameters& msParsAtEntry) const override;
29  double chi2(const Trk::Track& id, const Trk::Track& ms, const EventContext& ctx) const override;
30 
31  private:
32  ToolHandle<Trk::IExtrapolator> m_extrapolator{
33  this,
34  "ExtrapolatorTool",
35  "Trk::Extrapolator/AtlasExtrapolator",
36  };
38  "Key of input TrackingGeometry"};
39 
40 
41  double m_chi2cut;
42 #ifdef MUONCOMBDEBUG
43  bool m_truth;
44 #endif
45  inline const Trk::TrackingVolume* getVolume(const std::string&& vol_name, const EventContext& ctx) const {
48  if (!handle.isValid()) {
49  ATH_MSG_WARNING("Could not retrieve a valid tracking geometry");
50  return nullptr;
51  }
52  return handle.cptr()->trackingVolume(vol_name);
53 
54  }
55  };
56 
57 } // namespace MuonCombined
58 
59 #endif
MuonCombined::MuonTrackTagTestTool::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: MuonTrackTagTestTool.h:32
MuonCombined::MuonTrackTagTestTool::chi2
double chi2(const Trk::TrackParameters &idParsAtEntry, const Trk::TrackParameters &msParsAtEntry) const override
Definition: MuonTrackTagTestTool.cxx:215
MuonCombined::IMuonTrackTagTool
Definition: IMuonTrackTagTool.h:14
TrackParameters.h
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
SG::ReadCondHandle::isValid
bool isValid()
Definition: ReadCondHandle.h:205
MuonCombined::MuonTrackTagTestTool::initialize
StatusCode initialize() override
Definition: MuonTrackTagTestTool.cxx:38
IExtrapolator.h
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Trk::ParametersBase
Definition: ParametersBase.h:55
ReadCondHandleKey.h
MuonCombined::MuonTrackTagTestTool::~MuonTrackTagTestTool
~MuonTrackTagTestTool()=default
MuonCombined::MuonTrackTagTestTool::m_trackingGeometryReadKey
SG::ReadCondHandleKey< Trk::TrackingGeometry > m_trackingGeometryReadKey
Definition: MuonTrackTagTestTool.h:37
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
MuonCombined::MuonTrackTagTestTool::m_chi2cut
double m_chi2cut
Definition: MuonTrackTagTestTool.h:41
IMuonTrackTagTool.h
SG::ReadCondHandleKey< Trk::TrackingGeometry >
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MuonCombined
The MuonTagToSegMap is an auxillary construct that links the MuonSegments associated with a combined ...
Definition: IMuonSystemExtensionTool.h:23
Trk::TrackingGeometry::trackingVolume
const TrackingVolume * trackingVolume(const std::string &name) const
return the tracking Volume by name, 0 if it doesn't exist
TrackingGeometry.h
MuonCombined::MuonTrackTagTestTool::MuonTrackTagTestTool
MuonTrackTagTestTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: MuonTrackTagTestTool.cxx:29
AthAlgTool
Definition: AthAlgTool.h:26
MuonCombined::MuonTrackTagTestTool
Definition: MuonTrackTagTestTool.h:21
Trk::TrackingVolume
Definition: TrackingVolume.h:121
MuonCombined::MuonTrackTagTestTool::getVolume
const Trk::TrackingVolume * getVolume(const std::string &&vol_name, const EventContext &ctx) const
Definition: MuonTrackTagTestTool.h:45
SG::ReadCondHandle::cptr
const_pointer_type cptr()
Definition: ReadCondHandle.h:67