ATLAS Offline Software
MuidMuonRecovery.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // MuidMuonRecovery
7 // AlgTool performing MS hit reallocation for a likely spectrometer-indet
8 // match which has given combined fit problems.
9 // Extrapolates indet track to MS.
10 // Returns a combined track with full track fit.
11 //
13 
14 #ifndef MUIDCOMBINEDTOOLS_MUIDMUONRECOVERY_H
15 #define MUIDCOMBINEDTOOLS_MUIDMUONRECOVERY_H
16 
18 #include "GaudiKernel/ServiceHandle.h"
19 #include "GaudiKernel/ToolHandle.h"
27 
28 namespace Rec {
29 
30  class MuidMuonRecovery : public AthAlgTool, virtual public IMuidMuonRecovery {
31  public:
32  MuidMuonRecovery(const std::string& type, const std::string& name, const IInterface* parent);
33  ~MuidMuonRecovery() = default;
34 
35  StatusCode initialize() override;
36  StatusCode finalize() override;
37 
40  std::unique_ptr<Trk::Track> recoverableMatch(const Trk::Track& indetTrack, const Trk::Track& spectrometerTrack,
41  const EventContext& ctx) const override;
42 
43  private:
44  // helpers, managers, tools
45  ToolHandle<Trk::IExtrapolator> m_extrapolator{
46  this,
47  "Extrapolator",
48  "Trk::Extrapolator/AtlasExtrapolator",
49  "Extrapolator tool",
50  };
51 
53  this,
54  "edmHelper",
55  "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
56  "Handle to the service providing the IMuonEDMHelperSvc interface",
57  }; //<! multipurpose helper tool
58 
60  this,
61  "MuonIdHelperSvc",
62  "Muon::MuonIdHelperSvc/MuonIdHelperSvc",
63  };
64  PublicToolHandle<Muon::MuonEDMPrinterTool> m_printer{
65  this,
66  "Printer",
67  "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool",
68  "Tool to print EDM objects",
69  }; //<! tool to print EDM objects
70 
71  ToolHandle<Trk::IResidualPullCalculator> m_residualCalculator{
72  this,
73  "ResidualPullCalculator",
74  "Trk::ResidualPullCalculator/ResidualPullCalculator",
75  "Residual calculator tool",
76  };
77 
78  ToolHandle<ICombinedMuonTrackBuilder> m_trackBuilder{
79  this,
80  "TrackBuilder",
81  "Rec::CombinedMuonTrackBuilder/CombinedMuonTrackBuilder",
82  "Track builder tool",
83  };
84 
85  // configurable cuts and tolerances
86  Gaudi::Property<double> m_minP{this, "MinP", 10. * Gaudi::Units::GeV};
87  Gaudi::Property<double> m_minPt{this, "MinPt", 5. * Gaudi::Units::GeV};
88  Gaudi::Property<double> m_pullCut{this, "PullCut", 10.};
89 
90  // counters
91  mutable std::atomic<unsigned int> m_recoveryAttempts{0};
92  mutable std::atomic<unsigned int> m_recoveryFitFailure{0};
93  mutable std::atomic<unsigned int> m_recoverySuccess{0};
94 
95  }; // end of class MuidMuonRecovery
96 
97 } // end of namespace Rec
98 
99 #endif // MUIDCOMBINEDTOOLS_MUIDMUONRECOVERY_H
ICombinedMuonTrackBuilder.h
Rec::MuidMuonRecovery::m_trackBuilder
ToolHandle< ICombinedMuonTrackBuilder > m_trackBuilder
Definition: MuidMuonRecovery.h:78
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
MuonEDMPrinterTool.h
Rec::MuidMuonRecovery::finalize
StatusCode finalize() override
Definition: MuidMuonRecovery.cxx:66
IExtrapolator.h
Rec::MuidMuonRecovery::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: MuidMuonRecovery.h:45
Rec::MuidMuonRecovery::m_residualCalculator
ToolHandle< Trk::IResidualPullCalculator > m_residualCalculator
Definition: MuidMuonRecovery.h:71
Rec::MuidMuonRecovery::m_recoveryFitFailure
std::atomic< unsigned int > m_recoveryFitFailure
Definition: MuidMuonRecovery.h:92
Rec::MuidMuonRecovery::m_edmHelperSvc
ServiceHandle< Muon::IMuonEDMHelperSvc > m_edmHelperSvc
Definition: MuidMuonRecovery.h:52
Rec::MuidMuonRecovery::m_minP
Gaudi::Property< double > m_minP
Definition: MuidMuonRecovery.h:86
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
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Rec::MuidMuonRecovery::MuidMuonRecovery
MuidMuonRecovery(const std::string &type, const std::string &name, const IInterface *parent)
Definition: MuidMuonRecovery.cxx:36
Rec::MuidMuonRecovery::initialize
StatusCode initialize() override
Definition: MuidMuonRecovery.cxx:43
Rec::MuidMuonRecovery::m_pullCut
Gaudi::Property< double > m_pullCut
Definition: MuidMuonRecovery.h:88
IMuonEDMHelperSvc.h
Rec::MuidMuonRecovery::m_recoveryAttempts
std::atomic< unsigned int > m_recoveryAttempts
Definition: MuidMuonRecovery.h:91
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Rec::MuidMuonRecovery
Definition: MuidMuonRecovery.h:30
Rec::IMuidMuonRecovery
Interface ID for IMuidMuonRecovery.
Definition: IMuidMuonRecovery.h:32
IResidualPullCalculator.h
Rec::MuidMuonRecovery::m_recoverySuccess
std::atomic< unsigned int > m_recoverySuccess
Definition: MuidMuonRecovery.h:93
Rec::MuidMuonRecovery::m_printer
PublicToolHandle< Muon::MuonEDMPrinterTool > m_printer
Definition: MuidMuonRecovery.h:64
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Rec::MuidMuonRecovery::m_minPt
Gaudi::Property< double > m_minPt
Definition: MuidMuonRecovery.h:87
Rec::MuidMuonRecovery::recoverableMatch
std::unique_ptr< Trk::Track > recoverableMatch(const Trk::Track &indetTrack, const Trk::Track &spectrometerTrack, const EventContext &ctx) const override
IMuidMuonRecovery interface: algorithmic code for recovering muon spectrometer using the inner detect...
Definition: MuidMuonRecovery.cxx:72
IMuidMuonRecovery.h
Rec::MuidMuonRecovery::~MuidMuonRecovery
~MuidMuonRecovery()=default
Rec::MuidMuonRecovery::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuidMuonRecovery.h:59
AthAlgTool
Definition: AthAlgTool.h:26
IMuonIdHelperSvc.h
ServiceHandle< Muon::IMuonEDMHelperSvc >