ATLAS Offline Software
Loading...
Searching...
No Matches
MuonScaleFactorTestAlg.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 )

small test algorithm to quickly test/demonstrate the usage of the MuonEfficiencyCorrections code within athena

Regular Algorithm constructor

Function initialising the algorithm

Function finalizing the algortihm

Function executing the algorithm

muon container

Scale factor tool

Definition at line 1 of file MuonScaleFactorTestAlg.h.

24 {
25
27
28 class MuonScaleFactorTestAlg: public AthHistogramAlgorithm {
29
30 public:
32 MuonScaleFactorTestAlg(const std::string& name, ISvcLocator* svcLoc);
33
35 StatusCode initialize() override;
37 StatusCode finalize() override;
39 StatusCode execute(const EventContext& ctx) override;
40 virtual ~MuonScaleFactorTestAlg() = default;
41
42 private:
43 SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo{this, "EventInfoContName", "EventInfo", "event info key"};
45 SG::ReadHandleKey<xAOD::MuonContainer> m_sgKey{this, "SGKey", "Muons"};
46
47 ToolHandleArray<IMuonEfficiencyScaleFactors> m_effiTools{this, "EfficiencyTools", {}};
48 ToolHandleArray<IMuonEfficiencyScaleFactors> m_comparisonTools{this, "EfficiencyToolsForComparison", {}};
49
51 ToolHandle<IPileupReweightingTool> m_prw_Tool{this, "PileupReweightingTool", ""};
52 ToolHandle<IMuonSelectionTool> m_sel_tool{this, "MuonSelectionTool", ""};
53
54
55
56
57 Gaudi::Property<std::string> m_defaultRelease{this, "DefaultRelease", ""};
58 Gaudi::Property<std::string> m_validRelease{this, "ValidationRelease", ""};
59
60 Gaudi::Property<float> m_pt_cut{this, "MinPt", -1.};
61 Gaudi::Property<float> m_eta_cut{this, "MaxEta", -1.};
62 Gaudi::Property<int> m_muon_quality{this, "MinQuality",
63 static_cast<int>(xAOD::Muon::Quality::Loose)};
64
65 MuonVal::MuonTesterTree m_tree{"MuonSFTester", "MUONEFFTESTER"};
66
67 MuonVal::ScalarBranch<float>& m_muonPt{m_tree.newScalar<float>("muon_pt")};
68 MuonVal::ScalarBranch<float>& m_muonEta{m_tree.newScalar<float>("muon_eta")};
69 MuonVal::ScalarBranch<float>& m_muonPhi{m_tree.newScalar<float>("muon_phi")};
70 MuonVal::ScalarBranch<int>& m_muonQ{m_tree.newScalar<int>("muon_q")};
71
72 std::vector<std::shared_ptr<TestMuonSF::MuonEffiBranch>> m_sfBranches{};
73
74
75
76 };
77
78} // namespace ADD_CMODE(CP)
virtual StatusCode execute(const EventContext &ctx)=0
Execute method.
ID3PD * m_tree
Pointer to the ID3PD object used.
::StatusCode StatusCode
StatusCode definition for legacy code.
finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition PyTestsLib.py:50
void initialize()