ATLAS Offline Software
Loading...
Searching...
No Matches
MuonScaleFactorTestAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4
5#ifndef CPTOOLTESTS_MuonEfficiencyCorrections_TESTALG
6#define CPTOOLTESTS_MuonEfficiencyCorrections_TESTALG
7
8// Gaudi/Athena include(s):
13
15
19
21
23
24namespace ADD_CMODE(CP) {
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)
79
80#endif //CPTOOLTESTS_MuonEfficiencyCorrections_TESTALG
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
void initialize()