ATLAS Offline Software
MuonTrackQuery.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 MUIDTRACKBUILDER_MUONTRACKQUERY_H
6 #define MUIDTRACKBUILDER_MUONTRACKQUERY_H
7 
9 #include "GaudiKernel/ServiceHandle.h"
10 #include "GaudiKernel/ToolHandle.h"
18 namespace Rec {
19 
20  class MuonTrackQuery : public AthAlgTool, virtual public IMuonTrackQuery {
21  public:
22  MuonTrackQuery(const std::string& type, const std::string& name, const IInterface* parent);
23  ~MuonTrackQuery() = default;
24 
25  StatusCode initialize() override;
26 
29  const CaloEnergy* caloEnergy(const Trk::Track& track) const override;
30 
33  double caloEnergyDeposit(const Trk::Track& track, const EventContext& ctx) const override;
34 
37  FieldIntegral fieldIntegral(const Trk::Track& track, const EventContext& ctx) const override;
38 
41  bool isCaloAssociated(const Trk::Track& track, const EventContext& ctx) const override;
42 
45  bool isCombined(const Trk::Track& track, const EventContext& ctx) const override;
46 
49  bool isExtrapolated(const Trk::Track& track, const EventContext& ctx) const override;
50 
53  bool isLineFit(const Trk::Track& track) const override;
54 
57  bool isProjective(const Trk::Track& track) const override;
58 
61  bool isSectorOverlap(const Trk::Track& track) const override;
62 
65  bool isSlimmed(const Trk::Track& track) const override;
66 
69  double momentumBalanceSignificance(const Trk::Track& track, const EventContext& ctx) const override;
70 
73  unsigned numberPseudoMeasurements(const Trk::Track& track) const override;
74 
77  std::unique_ptr<const Trk::Perigee> outgoingPerigee(const Trk::Track& track) const override;
78 
81  ScatteringAngleSignificance scatteringAngleSignificance(const Trk::Track& track, const EventContext& ctx) const override;
82 
85  std::unique_ptr<Trk::TrackParameters> spectrometerParameters(const Trk::Track& track, const EventContext& ctx) const override;
86 
89  unsigned spectrometerPhiQuality(const Trk::Track& track, const EventContext& ctx) const override;
90 
93  std::unique_ptr<const Trk::TrackParameters> triggerStationParameters(const Trk::Track& track,
94  const EventContext& ctx) const override;
95 
96  private:
97  static std::unique_ptr<Trk::TrackParameters> flippedParameters(const Trk::TrackParameters& params);
98 
99  // tools and services
100  ToolHandle<Trk::ITrackFitter> m_fitter{this, "Fitter", "", "Track fitter tool"};
101 
103  this,
104  "edmHelper",
105  "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
106  "Handle to the service providing the IMuonEDMHelperSvc interface",
107  };
108 
109  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
110 
111  ToolHandle<Muon::IMdtDriftCircleOnTrackCreator> m_mdtRotCreator{
112  this, "MdtRotCreator", "Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator", "MdtDriftCircleOnTrackCreator tool"};
113 
115  "Key of the TrackingGeometry conditions data."};
116 
117  inline const Trk::TrackingVolume* getVolume(const std::string&& vol_name, const EventContext& ctx) const {
120  if (!handle.isValid()) {
121  ATH_MSG_WARNING("Could not retrieve a valid tracking geometry");
122  return nullptr;
123  }
124  return handle->trackingVolume(vol_name);
125 
126  }
127 
128  }; // end of class MuonTrackQuery
129 
130 } // end of namespace Rec
131 
132 #endif // MUIDTRACKBUILDER_MUONTRACKQUERY_H
Rec::MuonTrackQuery
Definition: MuonTrackQuery.h:20
Rec::MuonTrackQuery::isSlimmed
bool isSlimmed(const Trk::Track &track) const override
IMuonTrackQuery interface: does track have TrackParameters at every TSOS ?
Definition: MuonTrackQuery.cxx:507
Rec::MuonTrackQuery::fieldIntegral
FieldIntegral fieldIntegral(const Trk::Track &track, const EventContext &ctx) const override
IMuonTrackQuery interface: field integral along track from momentum kick between measurements.
Definition: MuonTrackQuery.cxx:138
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
IMuonTrackQuery.h
Rec::MuonTrackQuery::numberPseudoMeasurements
unsigned numberPseudoMeasurements(const Trk::Track &track) const override
IMuonTrackQuery interface: number of PseudoMeasurements on track (counts one for any vertex measureme...
Definition: MuonTrackQuery.cxx:586
CaloEnergy
class extending the basic Trk::EnergyLoss to describe the measured or parameterised muon energy loss ...
Definition: CaloEnergy.h:28
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
Rec::MuonTrackQuery::outgoingPerigee
std::unique_ptr< const Trk::Perigee > outgoingPerigee(const Trk::Track &track) const override
IMuonTrackQuery interface: perigee expressed outgoing from IP.
Definition: MuonTrackQuery.cxx:601
Rec::MuonTrackQuery::flippedParameters
static std::unique_ptr< Trk::TrackParameters > flippedParameters(const Trk::TrackParameters &params)
Definition: MuonTrackQuery.cxx:889
Rec::MuonTrackQuery::isCaloAssociated
bool isCaloAssociated(const Trk::Track &track, const EventContext &ctx) const override
IMuonTrackQuery interface: does track have at least 3 TSOS's representing calorimeter ?
Definition: MuonTrackQuery.cxx:241
SG::ReadCondHandle::isValid
bool isValid()
Definition: ReadCondHandle.h:206
Rec::MuonTrackQuery::momentumBalanceSignificance
double momentumBalanceSignificance(const Trk::Track &track, const EventContext &ctx) const override
IMuonTrackQuery interface: significance of momentum balance for combined tracks (biassed residual)
Definition: MuonTrackQuery.cxx:521
Rec::MuonTrackQuery::isExtrapolated
bool isExtrapolated(const Trk::Track &track, const EventContext &ctx) const override
IMuonTrackQuery interface: does track have perigee inside indet ?
Definition: MuonTrackQuery.cxx:336
Rec::MuonTrackQuery::m_mdtRotCreator
ToolHandle< Muon::IMdtDriftCircleOnTrackCreator > m_mdtRotCreator
Definition: MuonTrackQuery.h:111
Rec::ScatteringAngleSignificance
Definition: ScatteringAngleSignificance.h:22
Rec::MuonTrackQuery::caloEnergy
const CaloEnergy * caloEnergy(const Trk::Track &track) const override
IMuonTrackQuery interface: caloEnergy from appropriate TSOS.
Definition: MuonTrackQuery.cxx:79
Rec
Name: MuonSpContainer.h Package : offline/Reconstruction/MuonIdentification/muonEvent.
Definition: FakeTrackBuilder.h:10
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Rec::MuonTrackQuery::m_fitter
ToolHandle< Trk::ITrackFitter > m_fitter
Definition: MuonTrackQuery.h:100
Rec::MuonTrackQuery::MuonTrackQuery
MuonTrackQuery(const std::string &type, const std::string &name, const IInterface *parent)
Definition: MuonTrackQuery.cxx:43
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Rec::MuonTrackQuery::isProjective
bool isProjective(const Trk::Track &track) const override
IMuonTrackQuery interface: is track (roughly) projective towards IP?
Definition: MuonTrackQuery.cxx:422
Trk::ParametersBase
Definition: ParametersBase.h:55
Rec::MuonTrackQuery::spectrometerPhiQuality
unsigned spectrometerPhiQuality(const Trk::Track &track, const EventContext &ctx) const override
IMuonTrackQuery interface: assess the number of additional phi measurements needed for MS (or SA) tra...
Definition: MuonTrackQuery.cxx:785
ReadCondHandleKey.h
Rec::MuonTrackQuery::spectrometerParameters
std::unique_ptr< Trk::TrackParameters > spectrometerParameters(const Trk::Track &track, const EventContext &ctx) const override
IMuonTrackQuery interface: trackParameters at innermost measurement TSOS in MS.
Definition: MuonTrackQuery.cxx:749
IMuonEDMHelperSvc.h
Rec::MuonTrackQuery::getVolume
const Trk::TrackingVolume * getVolume(const std::string &&vol_name, const EventContext &ctx) const
Definition: MuonTrackQuery.h:117
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
IMdtDriftCircleOnTrackCreator.h
Rec::MuonTrackQuery::caloEnergyDeposit
double caloEnergyDeposit(const Trk::Track &track, const EventContext &ctx) const override
IMuonTrackQuery interface: track energy deposit in calorimeters (as fitted or otherwise applied)
Definition: MuonTrackQuery.cxx:98
Rec::MuonTrackQuery::isCombined
bool isCombined(const Trk::Track &track, const EventContext &ctx) const override
IMuonTrackQuery interface: does track have measurements from indet and spectrometer ?
Definition: MuonTrackQuery.cxx:281
Rec::MuonTrackQuery::~MuonTrackQuery
~MuonTrackQuery()=default
Rec::MuonTrackQuery::isSectorOverlap
bool isSectorOverlap(const Trk::Track &track) const override
IMuonTrackQuery interface: is there a long/short chamber overlap?
Definition: MuonTrackQuery.cxx:477
SG::ReadCondHandleKey< Trk::TrackingGeometry >
Rec::FieldIntegral
Definition: FieldIntegral.h:22
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Rec::MuonTrackQuery::m_trackingGeometryReadKey
SG::ReadCondHandleKey< Trk::TrackingGeometry > m_trackingGeometryReadKey
Definition: MuonTrackQuery.h:114
Rec::IMuonTrackQuery
Definition: IMuonTrackQuery.h:29
Trk::TrackingGeometry::trackingVolume
const TrackingVolume * trackingVolume(const std::string &name) const
return the tracking Volume by name, 0 if it doesn't exist
Rec::MuonTrackQuery::isLineFit
bool isLineFit(const Trk::Track &track) const override
IMuonTrackQuery interface: does track have fitted curvature ?
Definition: MuonTrackQuery.cxx:396
TrackingGeometry.h
Rec::MuonTrackQuery::scatteringAngleSignificance
ScatteringAngleSignificance scatteringAngleSignificance(const Trk::Track &track, const EventContext &ctx) const override
IMuonTrackQuery interface: significance of early scattering angle pattern for combined tracks (wider ...
Definition: MuonTrackQuery.cxx:626
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
Rec::MuonTrackQuery::triggerStationParameters
std::unique_ptr< const Trk::TrackParameters > triggerStationParameters(const Trk::Track &track, const EventContext &ctx) const override
IMuonTrackQuery interface: trackParameters at innermost trigger chamber TSOS in MS.
Definition: MuonTrackQuery.cxx:850
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
AthAlgTool
Definition: AthAlgTool.h:26
Rec::MuonTrackQuery::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonTrackQuery.h:109
Trk::TrackingVolume
Definition: TrackingVolume.h:121
ITrackFitter.h
Rec::MuonTrackQuery::initialize
StatusCode initialize() override
Definition: MuonTrackQuery.cxx:48
IMuonIdHelperSvc.h
ServiceHandle< Muon::IMuonEDMHelperSvc >
Rec::MuonTrackQuery::m_edmHelperSvc
ServiceHandle< Muon::IMuonEDMHelperSvc > m_edmHelperSvc
Definition: MuonTrackQuery.h:102