\(\mu\)¶
-
class
MuonEfficiencyCorrector
¶ Inherits from xAH::Algorithm
Public Functions
-
MuonEfficiencyCorrector
()¶
-
EL::StatusCode
setupJob
(EL::Job &job)¶
-
EL::StatusCode
fileExecute
()¶
-
EL::StatusCode
histInitialize
()¶
-
EL::StatusCode
changeInput
(bool firstFile)¶
-
EL::StatusCode
initialize
()¶
-
EL::StatusCode
execute
()¶
-
EL::StatusCode
postExecute
()¶
-
EL::StatusCode
finalize
()¶
-
EL::StatusCode
histFinalize
()¶
-
EL::StatusCode
executeSF
(const xAOD::EventInfo *eventInfo, const xAOD::MuonContainer *inputMuons, bool nominal, bool writeSystNames)¶
-
StatusCode
algInitialize
()¶ Run any initializations commmon to all xAH Algorithms (such as registerInstance). Call this inside
histInitialize
for best results.
-
StatusCode
algFinalize
()¶ Run any finalizations common to all xAH Algorithms (such as unregisterInstance). Call this inside
histFinalize
for best results.
-
StatusCode
parseSystValVector
()¶ Parse string of systematic sigma levels in m_systValVectorString into m_systValVector.
Public Members
-
std::string
m_inContainerName
= ""¶
-
std::string
m_calibRelease
= "Data15_allPeriods_241115"¶
-
std::string
m_WorkingPointReco
= "Loose"¶
-
std::string
m_WorkingPointIso
= "LooseTrackOnly"¶
-
int
m_runNumber2015
= 276329¶
-
int
m_runNumber2016
= 300345¶
-
bool
m_useRandomRunNumber
= true¶
-
bool
m_AllowZeroSF
= false¶ Use with caution!!!
-
std::string
m_WorkingPointRecoTrig
= "Loose"¶
-
std::string
m_WorkingPointIsoTrig
= "LooseTrackOnly"¶
-
std::string
m_Years
= "2016"¶ comma-separated list of years
-
std::string
m_MCCampaign
= ""¶
-
std::string
m_MuTrigLegs
= "HLT_mu26_imedium"¶ list of comma-separated single-mu trigger corrections. Individual legs of di-mu menus can be parsed
-
std::string
m_WorkingPointTTVA
= "TTVA"¶
-
std::string
m_inputSystNamesMuons
= ""¶ The name of the vector containing the names of the systematically-varied muons-related containers from the upstream algorithm, which will be processed by this algorithm.
Only muon calibration systematics or any other that create shallow copies of electron containers should be passed to this tool. It is advised to run this algorithm before running algorithms combining multiple calibration systematics (e.g. overlap removal).
-
bool
m_writeSystToMetadata
= false¶ Write systematics names to metadata.
-
float
m_systValReco
= 0.0¶
-
float
m_systValIso
= 0.0¶
-
float
m_systValTrig
= 0.0¶
-
float
m_systValTTVA
= 0.0¶
-
std::string
m_systNameReco
= ""¶
-
std::string
m_systNameIso
= ""¶
-
std::string
m_systNameTrig
= ""¶
-
std::string
m_systNameTTVA
= ""¶
-
std::string
m_outputSystNamesReco
= "MuonEfficiencyCorrector_RecoSyst"¶
-
std::string
m_outputSystNamesIso
= "MuonEfficiencyCorrector_IsoSyst"¶
-
std::string
m_outputSystNamesTrig
= "MuonEfficiencyCorrector_TrigSyst"¶
-
std::string
m_outputSystNamesTTVA
= "MuonEfficiencyCorrector_TTVASyst"¶
-
std::string
m_name
= "UnnamedAlgorithm"¶ All algorithms initialized should have a unique name, to differentiate them at the TObject level.
Note,
GetName()
returns achar*
while this returns astd::string
.
-
bool
m_debug
= false¶ m_debug is being deprecated
-
bool
m_verbose
= false¶ m_verbose is being deprecated
-
MSG::Level
m_msgLevel
= MSG::INFO¶ debug level
-
std::string
m_systName
= ""¶ If running systematics, the name of the systematic
-
float
m_systVal
= 0.0¶ If running systematics, the value to set the systematic to
Note
This will set the systematic to the value \(\pm x\).
-
std::string
m_systValVectorString
= ""¶ If running systematics, you can run multiple points and store them in here. A comma separated list of working points should be given to m_systValVectorString, and then parsed by calling parseSystValVector.
-
std::vector<float>
m_systValVector
¶
-
std::string
m_eventInfoContainerName
= "EventInfo"¶ If the xAOD has a different EventInfo container name, set it here
-
int
m_isMC
= -1¶ This is an override at the algorithm level to force analyzing MC or not.
Value Meaning -1 Default, use eventInfo object to determine if data or mc 0 Treat the input as data 1 Treat the input as MC
Protected Functions
-
bool
isMC
()¶ - Try to determine if we are running over data or MC. The
xAH::Algorithm::m_isMC
can be usedto fix the return value. Otherwise the EventInfo object is queried.
An exception is thrown if the type cannot be determined.
Return Value Meaning 0 Data 1 MC
-
void
registerInstance
()¶ Register the given instance under the moniker
xAH::Algorithm::m_className
This will increase the reference count by 1.
-
int
numInstances
()¶ Return number of instances registered under the moniker
xAH::Algorithm::m_className
This will return the reference count.
Warning
If for some reason the instance wasn’t registered, we spit out a warning.
-
void
unregisterInstance
()¶ Unregister the given instance under the moniker
xAH::Algorithm::m_className
This will decrease the reference count by 1.
Warning
If for some reason the instance wasn’t registered, we spit out a warning.
- template <typename T>
-
StatusCode
checkToolStore
(const std::string &tool_name)¶ - Check whether the input CP tool already exists with this name in the asg::ToolStore
Depending on the outcome, the content of the map
xAH::Algorithm::m_toolAlreadyUsed
wll be set accordingly.
-
bool
isToolAlreadyUsed
(const std::string &tool_name)¶ Check whether the input CP tool has been already used by any
xAH::Algorithm
in the current job by scanningxAH::Algorithm::m_toolAlreadyUsed
.
- template <typename T>
-
void
setToolName
(asg::AnaToolHandle<T> &handle, std::string name = "") const¶ Note: This function does nothing in release 21.1! The native private tool mechanism is used instead.
Sets the name of a tool. If no name is needed, the tool will use the name of the algorithm plus a unique identifier (
xAH::Algorithm::getAddress()
) appended to ensure the tool is unique and effectively private.The tool will not be guaranteed unique if two tools of the same type are created without a name passed in. But this is, at this point, up to the user and a more complex scenario than what this function tries to simplify on its own.
-
std::string
getAddress
() const¶ Return a
std::string
representation ofthis
Protected Attributes
-
std::string
m_className
= "Algorithm"¶ The moniker by which all instances are tracked in
xAH::Algorithm::m_instanceRegistry
-
xAOD::TEvent *
m_event
= nullptr¶ The TEvent object
-
xAOD::TStore *
m_store
= nullptr¶ The TStore object
Private Members
-
int
m_numEvent
¶
-
int
m_numObject
¶
-
std::vector<CP::SystematicSet>
m_systListReco
¶
-
std::vector<CP::SystematicSet>
m_systListIso
¶
-
std::vector<CP::SystematicSet>
m_systListTrig
¶
-
std::vector<CP::SystematicSet>
m_systListTTVA
¶
-
std::string
m_outputSystNamesTrigBase
¶
-
asg::AnaToolHandle<CP::IPileupReweightingTool>
m_pileup_tool_handle
¶
-
CP::MuonEfficiencyScaleFactors *
m_muRecoSF_tool
= nullptr¶
-
std::string
m_recoEffSF_tool_name
¶
-
CP::MuonEfficiencyScaleFactors *
m_muIsoSF_tool
= nullptr¶
-
std::string
m_isoEffSF_tool_name
¶
-
std::map<std::string, CP::MuonTriggerScaleFactors *>
m_muTrigSF_tools
¶
-
std::map<std::string, std::string>
m_trigEffSF_tool_names
¶
-
std::vector<std::string>
m_YearsList
¶
-
CP::MuonEfficiencyScaleFactors *
m_muTTVASF_tool
= nullptr¶
-
std::string
m_TTVAEffSF_tool_name
¶
-
std::vector<std::string>
m_SingleMuTriggers
¶
-