ATLAS Offline Software
Loading...
Searching...
No Matches
MuonCalibIntScaleSmearTool.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

namespace ADD_CMODE (CP)

Function Documentation

◆ ADD_CMODE()

namespace ADD_CMODE ( CP )

Definition at line 1 of file MuonCalibIntScaleSmearTool.h.

26 {
27
28 class MuonCalibIntScaleSmearTool : public virtual IMuonCalibIntScaleSmearTool,
29 public asg::AsgTool {
30 // Create a proper constructor for Athena
31 ASG_TOOL_CLASS3(MuonCalibIntScaleSmearTool, CP::IMuonCalibIntScaleSmearTool, CP::ISystematicsTool,
32 CP::IReentrantSystematicsTool)
33
34 public:
35 // Interface methods that must be defined
36 // Interface - Apply the correction on a modifyable object
37 virtual CP::CorrectionCode applyCorrection(MCP::MuonObj& mu) const override;
38
39 virtual double getExpectedResolution(const int &DetType, double pT, double eta, double phi, MCP::DataYear year, bool isData) const override;
40
41 // Interface - Is the tool affected by a specific systematic?
42 virtual bool isAffectedBySystematic(const CP::SystematicVariation& systematic) const override;
43 // Interface - Which systematics have an effect on the tool's behaviour?
44 virtual CP::SystematicSet affectingSystematics() const override;
45 // Interface - Systematics to be used for physics analysis
46 virtual CP::SystematicSet recommendedSystematics() const override;
47 // Interface - Use specific systematic
48 virtual StatusCode applySystematicVariation(const CP::SystematicSet& systConfig) override;
49
50 public:
51 // Constructor
52 MuonCalibIntScaleSmearTool(const std::string& name);
53
54 // Destructor
55 virtual ~MuonCalibIntScaleSmearTool() = default;
56
57 virtual StatusCode initialize() override;
58
59 protected:
60 // Event info
61 SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo{this, "EventInfoContName", "EventInfo", "event info key"};
62
63 // Release scheme
64 Gaudi::Property<std::string> m_release{this, "release", "Recs2025_12_11_Run2Run3", "Release"};
65
66 // Systematics scheme
67 Gaudi::Property<std::string> m_sysScheme{this, "systematicScheme", "Corr_Scale", "Systematic scheme to be configured"};
68
69 // See MuonCalibTool
70 Gaudi::Property<int> m_calibMode{this, "calibMode", -1, "Calib mode"};
71
72 typedef std::map<MCP::ScaleResCorrection, std::shared_ptr<MCP::CalibContainer>> ScaleSmearCorrConstMap;
73
74 // For systematics
75 struct ParameterSetScaleSmear
76 {
77 std::map<MCP::ScaleSmearParam, double> m_IDparams;
78 std::map<MCP::ScaleSmearParam, double> m_MEparams;
79 std::map<MCP::ScaleSmearParam, double> m_CBparams;
80 };
81
82 // calculate the parameter set for the given systematic
83 StatusCode calcSystematicVariation(const CP::SystematicSet& systConfig, ParameterSetScaleSmear& param) const;
84
85 CP::SystematicsCache<ParameterSetScaleSmear> m_Parameters{this};
86 const ParameterSetScaleSmear* m_currentParameters{nullptr};
87
88 // Corrections from the data
89 std::map<MCP::DataYear, std::map<MCP::ScaleSmearParam, ScaleSmearCorrConstMap>> m_IDparams;
90 std::map<MCP::DataYear, std::map<MCP::ScaleSmearParam, ScaleSmearCorrConstMap>> m_MEparams;
91 std::map<MCP::DataYear, std::map<MCP::ScaleSmearParam, ScaleSmearCorrConstMap>> m_CBparams;
92
93 // For expected resu
94 std::map<MCP::DataYear, std::map<MCP::ExpectedResParam, std::shared_ptr<MCP::CalibContainer>>> m_IDExpectedResparams;
95 std::map<MCP::DataYear, std::map<MCP::ExpectedResParam, std::shared_ptr<MCP::CalibContainer>>> m_MEExpectedResparams;
96
98
99 std::map<MCP::ScaleSmearParam, double> getConstants(const MCP::TrackCalibObj& trk, const std::map<MCP::ScaleSmearParam, ScaleSmearCorrConstMap>& constants, const std::map<MCP::ScaleSmearParam, double>& direction) const;
100
101 // Apply all the pT corrections
102 double getCorrectedPt(const MCP::MuonObj& mu, const MCP::TrackCalibObj& trk, const std::map<MCP::ScaleSmearParam, double>& calibConstant) const;
103
104 // Get the smearing correction
105 double getSmearCorr(const MCP::MuonObj& mu, const MCP::TrackCalibObj& trk, double r0, double r1, double r2) const;
106
107 // Apply the ID+MS correction on the CB track
108 double getCorrectedCBPtWithIDMSComb(const MCP::MuonObj& mu, const std::map<MCP::ScaleSmearParam, double>&calibIDConstant , const std::map<MCP::ScaleSmearParam, double>& calibMEConstant) const;
109
110 }; // class MuonCalibIntScaleSmearTool
111
112} // namespace ADD_CMODE(CP)
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ASG_TOOL_CLASS3(CLASSNAME, INT1, INT2, INT3)
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
Definition AsgTool.h:133
::StatusCode StatusCode
StatusCode definition for legacy code.
DataYear
Definition EnumDef.h:28