ATLAS Offline Software
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 
23 namespace 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 
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
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
CP::MuonScaleFactorTestAlg::~MuonScaleFactorTestAlg
virtual ~MuonScaleFactorTestAlg()=default
CP::MuonScaleFactorTestAlg
small test algorithm to quickly test/demonstrate the usage of the MuonEfficiencyCorrections code with...
Definition: MuonScaleFactorTestAlg.h:27
LikeEnum::Loose
@ Loose
Definition: LikelihoodEnums.h:12
CP::MuonScaleFactorTestAlg::m_validRelease
Gaudi::Property< std::string > m_validRelease
Definition: MuonScaleFactorTestAlg.h:57
CP::MuonScaleFactorTestAlg::m_sgKey
SG::ReadHandleKey< xAOD::MuonContainer > m_sgKey
muon container
Definition: MuonScaleFactorTestAlg.h:44
CP::MuonScaleFactorTestAlg::execute
StatusCode execute() override
Function executing the algorithm.
Definition: MuonScaleFactorTestAlg.cxx:63
CP::MuonScaleFactorTestAlg::m_muonPt
MuonVal::ScalarBranch< float > & m_muonPt
Definition: MuonScaleFactorTestAlg.h:65
CP::MuonScaleFactorTestAlg::m_tree
MuonVal::MuonTesterTree m_tree
Definition: MuonScaleFactorTestAlg.h:63
CP::MuonScaleFactorTestAlg::initialize
StatusCode initialize() override
Function initialising the algorithm.
Definition: MuonScaleFactorTestAlg.cxx:23
MuonTesterTree.h
SG::ReadHandleKey< xAOD::EventInfo >
CP::MuonScaleFactorTestAlg::m_comparisonTools
ToolHandleArray< IMuonEfficiencyScaleFactors > m_comparisonTools
Definition: MuonScaleFactorTestAlg.h:47
CP::MuonScaleFactorTestAlg::m_muon_quality
Gaudi::Property< int > m_muon_quality
Definition: MuonScaleFactorTestAlg.h:61
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
CP::MuonScaleFactorTestAlg::MuonScaleFactorTestAlg
MuonScaleFactorTestAlg(const std::string &name, ISvcLocator *svcLoc)
Regular Algorithm constructor.
Definition: MuonScaleFactorTestAlg.cxx:17
CP::MuonScaleFactorTestAlg::m_muonEta
MuonVal::ScalarBranch< float > & m_muonEta
Definition: MuonScaleFactorTestAlg.h:66
CP::MuonScaleFactorTestAlg::m_eta_cut
Gaudi::Property< float > m_eta_cut
Definition: MuonScaleFactorTestAlg.h:60
AthHistogramAlgorithm.h
IMuonSelectionTool.h
IMuonEfficiencyScaleFactors.h
CP::MuonScaleFactorTestAlg::m_defaultRelease
Gaudi::Property< std::string > m_defaultRelease
Definition: MuonScaleFactorTestAlg.h:56
IPileupReweightingTool.h
MuonVal::MuonTesterTree
Definition: MuonTesterTree.h:30
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IMuonTriggerScaleFactors.h
AthHistogramAlgorithm
Definition: AthHistogramAlgorithm.h:32
CP::MuonScaleFactorTestAlg::finalize
StatusCode finalize() override
Function finalizing the algortihm.
Definition: MuonScaleFactorTestAlg.cxx:58
CP::MuonScaleFactorTestAlg::m_prw_Tool
ToolHandle< IPileupReweightingTool > m_prw_Tool
Scale factor tool.
Definition: MuonScaleFactorTestAlg.h:50
MuonVal::ScalarBranch< float >
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
MuonVal::MuonTesterTree::newScalar
ScalarBranch< T > & newScalar(const std::string &name)
CP::MuonScaleFactorTestAlg::m_eventInfo
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo
Definition: MuonScaleFactorTestAlg.h:42
CP::MuonScaleFactorTestAlg::m_effiTools
ToolHandleArray< IMuonEfficiencyScaleFactors > m_effiTools
Definition: MuonScaleFactorTestAlg.h:46
EventInfo.h
MuonSFTestHelper.h
CP::MuonScaleFactorTestAlg::m_sfBranches
std::vector< std::shared_ptr< TestMuonSF::MuonEffiBranch > > m_sfBranches
Definition: MuonScaleFactorTestAlg.h:70
CP::MuonScaleFactorTestAlg::m_pt_cut
Gaudi::Property< float > m_pt_cut
Definition: MuonScaleFactorTestAlg.h:59
CP::MuonScaleFactorTestAlg::m_sel_tool
ToolHandle< IMuonSelectionTool > m_sel_tool
Definition: MuonScaleFactorTestAlg.h:51
CP::MuonScaleFactorTestAlg::m_muonQ
MuonVal::ScalarBranch< int > & m_muonQ
Definition: MuonScaleFactorTestAlg.h:68
CP::MuonScaleFactorTestAlg::m_muonPhi
MuonVal::ScalarBranch< float > & m_muonPhi
Definition: MuonScaleFactorTestAlg.h:67