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):
12
14
18
20
22
23namespace CP {
24
26
28
29 public:
31 MuonScaleFactorTestAlg(const std::string& name, ISvcLocator* svcLoc);
32
34 StatusCode initialize() override;
36 StatusCode finalize() override;
38 StatusCode execute() override;
39 virtual ~MuonScaleFactorTestAlg() = default;
40
41 private:
42 SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo{this, "EventInfoContName", "EventInfo", "event info key"};
45
46 ToolHandleArray<IMuonEfficiencyScaleFactors> m_effiTools{this, "EfficiencyTools", {}};
47 ToolHandleArray<IMuonEfficiencyScaleFactors> m_comparisonTools{this, "EfficiencyToolsForComparison", {}};
48
50 ToolHandle<IPileupReweightingTool> m_prw_Tool{this, "PileupReweightingTool", ""};
51 ToolHandle<IMuonSelectionTool> m_sel_tool{this, "MuonSelectionTool", ""};
52
53
54
55
56 Gaudi::Property<std::string> m_defaultRelease{this, "DefaultRelease", ""};
57 Gaudi::Property<std::string> m_validRelease{this, "ValidationRelease", ""};
58
59 Gaudi::Property<float> m_pt_cut{this, "MinPt", -1.};
60 Gaudi::Property<float> m_eta_cut{this, "MaxEta", -1.};
61 Gaudi::Property<int> m_muon_quality{this, "MinQuality", xAOD::Muon::Loose};
62
63 MuonVal::MuonTesterTree m_tree{"MuonSFTester", "MUONEFFTESTER"};
64
65 MuonVal::ScalarBranch<float>& m_muonPt{m_tree.newScalar<float>("muon_pt")};
66 MuonVal::ScalarBranch<float>& m_muonEta{m_tree.newScalar<float>("muon_eta")};
67 MuonVal::ScalarBranch<float>& m_muonPhi{m_tree.newScalar<float>("muon_phi")};
68 MuonVal::ScalarBranch<int>& m_muonQ{m_tree.newScalar<int>("muon_q")};
69
70 std::vector<std::shared_ptr<TestMuonSF::MuonEffiBranch>> m_sfBranches{};
71
72
73
74 };
75
76} // namespace CP
77
78#endif //CPTOOLTESTS_MuonEfficiencyCorrections_TESTALG
Property holding a SG store/key/clid from which a ReadHandle is made.
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
MuonVal::ScalarBranch< float > & m_muonPt
ToolHandle< IPileupReweightingTool > m_prw_Tool
Scale factor tool.
ToolHandleArray< IMuonEfficiencyScaleFactors > m_effiTools
StatusCode finalize() override
Function finalizing the algortihm.
SG::ReadHandleKey< xAOD::MuonContainer > m_sgKey
muon container
virtual ~MuonScaleFactorTestAlg()=default
Gaudi::Property< std::string > m_validRelease
ToolHandle< IMuonSelectionTool > m_sel_tool
MuonVal::MuonTesterTree m_tree
std::vector< std::shared_ptr< TestMuonSF::MuonEffiBranch > > m_sfBranches
Gaudi::Property< float > m_eta_cut
MuonVal::ScalarBranch< float > & m_muonPhi
ToolHandleArray< IMuonEfficiencyScaleFactors > m_comparisonTools
StatusCode execute() override
Function executing the algorithm.
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo
Gaudi::Property< std::string > m_defaultRelease
MuonScaleFactorTestAlg(const std::string &name, ISvcLocator *svcLoc)
Regular Algorithm constructor.
Gaudi::Property< int > m_muon_quality
Gaudi::Property< float > m_pt_cut
MuonVal::ScalarBranch< int > & m_muonQ
StatusCode initialize() override
Function initialising the algorithm.
MuonVal::ScalarBranch< float > & m_muonEta
Property holding a SG store/key/clid from which a ReadHandle is made.
Select isolated Photons, Electrons and Muons.