ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
MuonID
MuonIDAnalysis
MuonEfficiencyCorrections
src
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):
9
#include "
AthenaBaseComps/AthHistogramAlgorithm.h
"
10
#include "
StoreGate/ReadHandleKey.h
"
11
#include "
xAODEventInfo/EventInfo.h
"
12
13
#include "
MuonEfficiencyCorrections/MuonSFTestHelper.h
"
14
15
#include "
MuonAnalysisInterfaces/IMuonEfficiencyScaleFactors.h
"
16
#include "
MuonAnalysisInterfaces/IMuonTriggerScaleFactors.h
"
17
#include "
MuonAnalysisInterfaces/IMuonSelectionTool.h
"
18
19
#include "
AsgAnalysisInterfaces/IPileupReweightingTool.h
"
20
21
#include "
MuonTesterTree/MuonTesterTree.h
"
22
23
namespace
CP
{
24
26
27
class
MuonScaleFactorTestAlg
:
public
AthHistogramAlgorithm
{
28
29
public
:
31
MuonScaleFactorTestAlg
(
const
std::string&
name
, ISvcLocator* svcLoc);
32
34
StatusCode
initialize
()
override
;
36
StatusCode
finalize
()
override
;
38
StatusCode
execute
(
const
EventContext& ctx)
override
;
39
virtual
~MuonScaleFactorTestAlg
() =
default
;
40
41
private
:
42
SG::ReadHandleKey<xAOD::EventInfo>
m_eventInfo
{
this
,
"EventInfoContName"
,
"EventInfo"
,
"event info key"
};
44
SG::ReadHandleKey<xAOD::MuonContainer>
m_sgKey
{
this
,
"SGKey"
,
"Muons"
};
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"
,
62
static_cast<
int
>
(xAOD::Muon::Quality::Loose)};
63
64
MuonVal::MuonTesterTree
m_tree
{
"MuonSFTester"
,
"MUONEFFTESTER"
};
65
66
MuonVal::ScalarBranch<float>
&
m_muonPt
{
m_tree
.newScalar<
float
>(
"muon_pt"
)};
67
MuonVal::ScalarBranch<float>
&
m_muonEta
{
m_tree
.newScalar<
float
>(
"muon_eta"
)};
68
MuonVal::ScalarBranch<float>
&
m_muonPhi
{
m_tree
.newScalar<
float
>(
"muon_phi"
)};
69
MuonVal::ScalarBranch<int>
&
m_muonQ
{
m_tree
.newScalar<
int
>(
"muon_q"
)};
70
71
std::vector<std::shared_ptr<TestMuonSF::MuonEffiBranch>>
m_sfBranches
{};
72
73
74
75
};
76
77
}
// namespace CP
78
79
#endif
//CPTOOLTESTS_MuonEfficiencyCorrections_TESTALG
AthHistogramAlgorithm.h
IMuonEfficiencyScaleFactors.h
IMuonSelectionTool.h
IMuonTriggerScaleFactors.h
IPileupReweightingTool.h
MuonSFTestHelper.h
MuonTesterTree.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
AthHistogramAlgorithm::AthHistogramAlgorithm
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Definition
AthHistogramAlgorithm.cxx:31
CP::MuonScaleFactorTestAlg::m_muonPt
MuonVal::ScalarBranch< float > & m_muonPt
Definition
MuonScaleFactorTestAlg.h:66
CP::MuonScaleFactorTestAlg::m_prw_Tool
ToolHandle< IPileupReweightingTool > m_prw_Tool
Scale factor tool.
Definition
MuonScaleFactorTestAlg.h:50
CP::MuonScaleFactorTestAlg::m_effiTools
ToolHandleArray< IMuonEfficiencyScaleFactors > m_effiTools
Definition
MuonScaleFactorTestAlg.h:46
CP::MuonScaleFactorTestAlg::finalize
StatusCode finalize() override
Function finalizing the algortihm.
Definition
MuonScaleFactorTestAlg.cxx:58
CP::MuonScaleFactorTestAlg::execute
StatusCode execute(const EventContext &ctx) override
Function executing the algorithm.
Definition
MuonScaleFactorTestAlg.cxx:63
CP::MuonScaleFactorTestAlg::m_sgKey
SG::ReadHandleKey< xAOD::MuonContainer > m_sgKey
muon container
Definition
MuonScaleFactorTestAlg.h:44
CP::MuonScaleFactorTestAlg::~MuonScaleFactorTestAlg
virtual ~MuonScaleFactorTestAlg()=default
CP::MuonScaleFactorTestAlg::m_validRelease
Gaudi::Property< std::string > m_validRelease
Definition
MuonScaleFactorTestAlg.h:57
CP::MuonScaleFactorTestAlg::m_sel_tool
ToolHandle< IMuonSelectionTool > m_sel_tool
Definition
MuonScaleFactorTestAlg.h:51
CP::MuonScaleFactorTestAlg::m_tree
MuonVal::MuonTesterTree m_tree
Definition
MuonScaleFactorTestAlg.h:64
CP::MuonScaleFactorTestAlg::m_sfBranches
std::vector< std::shared_ptr< TestMuonSF::MuonEffiBranch > > m_sfBranches
Definition
MuonScaleFactorTestAlg.h:71
CP::MuonScaleFactorTestAlg::m_eta_cut
Gaudi::Property< float > m_eta_cut
Definition
MuonScaleFactorTestAlg.h:60
CP::MuonScaleFactorTestAlg::m_muonPhi
MuonVal::ScalarBranch< float > & m_muonPhi
Definition
MuonScaleFactorTestAlg.h:68
CP::MuonScaleFactorTestAlg::m_comparisonTools
ToolHandleArray< IMuonEfficiencyScaleFactors > m_comparisonTools
Definition
MuonScaleFactorTestAlg.h:47
CP::MuonScaleFactorTestAlg::m_eventInfo
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo
Definition
MuonScaleFactorTestAlg.h:42
CP::MuonScaleFactorTestAlg::m_defaultRelease
Gaudi::Property< std::string > m_defaultRelease
Definition
MuonScaleFactorTestAlg.h:56
CP::MuonScaleFactorTestAlg::MuonScaleFactorTestAlg
MuonScaleFactorTestAlg(const std::string &name, ISvcLocator *svcLoc)
Regular Algorithm constructor.
Definition
MuonScaleFactorTestAlg.cxx:17
CP::MuonScaleFactorTestAlg::m_muon_quality
Gaudi::Property< int > m_muon_quality
Definition
MuonScaleFactorTestAlg.h:61
CP::MuonScaleFactorTestAlg::m_pt_cut
Gaudi::Property< float > m_pt_cut
Definition
MuonScaleFactorTestAlg.h:59
CP::MuonScaleFactorTestAlg::m_muonQ
MuonVal::ScalarBranch< int > & m_muonQ
Definition
MuonScaleFactorTestAlg.h:69
CP::MuonScaleFactorTestAlg::initialize
StatusCode initialize() override
Function initialising the algorithm.
Definition
MuonScaleFactorTestAlg.cxx:23
CP::MuonScaleFactorTestAlg::m_muonEta
MuonVal::ScalarBranch< float > & m_muonEta
Definition
MuonScaleFactorTestAlg.h:67
MuonVal::MuonTesterTree
Definition
MuonTesterTree.h:38
MuonVal::ScalarBranch
Definition
ScalarBranch.h:12
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
xAOD::name
name
Definition
TriggerMenuJson_v1.cxx:29
EventInfo.h
Generated on
for ATLAS Offline Software by
1.17.0