|
ATLAS Offline Software
|
Go to the documentation of this file.
4 #ifndef XAOD_STANDALONE
5 #ifndef MUONEFFICIENCYCORRECTION_MUONSFTESTHELPER_H
6 #define MUONEFFICIENCYCORRECTION_MUONSFTESTHELPER_H
20 #include <GaudiKernel/ToolHandle.h>
38 const ToolHandle<CP::IMuonTriggerScaleFactors>& Handle,
40 const std::string& Trigger);
43 bool fill(
const EventContext& ctx)
override final;
44 bool init() override final;
49 const CP::SystematicVariation &syst);
53 ToolHandle<CP::IMuonTriggerScaleFactors>
m_handle{};
74 const ToolHandle<CP::IMuonEfficiencyScaleFactors> &handle,
75 const std::string& rel_name =
"");
82 bool fill(
const EventContext& ctx)
override final;
84 bool init() override final;
88 return set.name().empty() ? std::string(
"") : std::string(
"__") +
set.name();
92 ToolHandle<CP::IMuonEfficiencyScaleFactors>
m_handle{};
106 bool fill(
const EventContext& ctx) {
121 std::vector<std::unique_ptr<SFSet>>
m_SFs{};
132 const ToolHandle<CP::IMuonEfficiencyScaleFactors> &handle,
133 const std::string& rel_name =
"");
137 bool init()
override;
139 bool fill(
const EventContext& ctx)
override;
142 ToolHandle<CP::IMuonEfficiencyScaleFactors>
m_handle{};
144 std::map<CP::SystematicSet, std::shared_ptr<MuonVal::VectorBranch<float>>>
m_SFs{};
xAOD::MuonContainer * muonContainer
MuonVal::ScalarBranch< double > m_sys_up_SF
bool fill(const EventContext &ctx) override
The fill method checks if enough information is provided such that the branch is cleared from the inf...
MuonVal::ScalarBranch< float > mcEff
TriggerSFBranches(MuonVal::MuonTesterTree &tree, const ToolHandle< CP::IMuonTriggerScaleFactors > &Handle, const std::string &muonContainer, const std::string &Trigger)
virtual ~TriggerSFBranches()=default
bool fill(const EventContext &ctx) override
The fill method checks if enough information is provided such that the branch is cleared from the inf...
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".
ToolHandle< CP::IMuonEfficiencyScaleFactors > m_handle
bool fill(const EventContext &ctx) override final
The fill method checks if enough information is provided such that the branch is cleared from the inf...
void setMuon(const xAOD::Muon &muon) override final
Class to wrap a set of SystematicVariations.
Helper struct to store scale factor, data efficiency + mc efficiency for each systematic variation.
bool init()
Initialization of the branches.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
const CP::SystematicSet cpSet
Systematic set.
bool const RAWDATA *ch2 const
SFSet(const CP::SystematicSet &_cpSet, MuonSFBranches &_parent)
Select isolated Photons, Electrons and Muons.
bool init() override
The init method checks whether the branch name has already registered to the MuonTree and tries then ...
TTree * tree() override final
Returns the underlying TTree object.
ToolHandle< CP::IMuonTriggerScaleFactors > m_handle
ToolHandle< CP::IMuonEfficiencyScaleFactors > m_handle
MuonVal::ScalarBranch< double > m_nominal_SF
MuonVal::ScalarBranch< double > m_sys_down_SF
virtual ~MuonSFBranches()=default
bool fill(const EventContext &ctx) override final
The fill method checks if enough information is provided such that the branch is cleared from the inf...
MuonVal::ScalarBranch< double > m_stat_up_SF
std::string name() const override final
Returns the name of the branch.
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
CP::CorrectionCode fillSystematic(const xAOD::Muon &muon, SFSet &set)
bool init() override
The init method checks whether the branch name has already registered to the MuonTree and tries then ...
Class to store array like branches into the n-tuples.
virtual void setMuon(const xAOD::Muon &muon)=0
MuonVal::ScalarBranch< float > scaleFactor
Actual branches storing scaleFactor & mcEff & dataEff.
MuonVal::ScalarBranch< float > dataEff
void setMuon(const xAOD::Muon &muon) override final
bool init() override final
The init method checks whether the branch name has already registered to the MuonTree and tries then ...
MuonSFBranches(MuonVal::MuonTesterTree &tree, const ToolHandle< CP::IMuonEfficiencyScaleFactors > &handle, const std::string &rel_name="")
std::vector< std::unique_ptr< SFSet > > m_SFs
Return value from object correction CP tools.
MuonVal::ScalarBranch< double > m_stat_down_SF
MuonSFBranches & parent
Parent from which the TTree pointer & name is retrieved.
bool fill(const EventContext &ctx)
check that all branches are set properly
CP::CorrectionCode getSF(const xAOD::MuonContainer *muons, MuonVal::ScalarBranch< double > &Var, const CP::SystematicVariation &syst)
SG::ReadHandleKey< xAOD::MuonContainer > m_key
std::map< CP::SystematicSet, std::shared_ptr< MuonVal::VectorBranch< float > > > m_SFs
bool init() override final
The init method checks whether the branch name has already registered to the MuonTree and tries then ...
MuonReplicaBranches(MuonVal::MuonTesterTree &tree, const ToolHandle< CP::IMuonEfficiencyScaleFactors > &handle, const std::string &rel_name="")
static std::string systName(const CP::SystematicSet &set)
Dummy helper function that encodes the systname set.