\(\mu\)¶
-
class
MuonSelector
¶ Inherits from xAH::Algorithm
Public Functions
-
MuonSelector
()¶
-
~MuonSelector
()¶
-
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
()¶
-
bool
executeSelection
(const xAOD::MuonContainer *inMuons, float mcEvtWeight, bool countPass, ConstDataVector<xAOD::MuonContainer> *selectedMuons)¶
-
int
passCuts
(const xAOD::Muon *muon, const xAOD::Vertex *primaryVertex)¶
-
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
-
bool
m_useCutFlow
= true¶
-
std::string
m_inContainerName
= ""¶ input container name
-
std::string
m_outContainerName
= ""¶ output container name
-
std::string
m_outAuxContainerName
¶ output auxiliary container name
-
std::string
m_inputAlgoSystNames
= ""¶
-
std::string
m_outputAlgoSystNames
= "MuonSelector_Syst"¶
-
bool
m_decorateSelectedObjects
= true¶ decorate selected objects - default “passSel”
-
bool
m_createSelectedContainer
= false¶ fill using SG::VIEW_ELEMENTS to be light weight
-
int
m_nToProcess
= -1¶ look at n objects
-
int
m_pass_min
= -1¶ minimum number of objects passing cuts
-
int
m_pass_max
= -1¶ maximum number of objects passing cuts
-
float
m_pT_max
= 1e8¶ require pT < pt_max
-
float
m_pT_min
= 1e8¶ require pT > pt_min
-
std::string
m_muonQualityStr
= "Medium"¶ require quality
-
float
m_eta_max
= 1e8¶ require type require |eta| < eta_max
-
float
m_d0_max
= 1e8¶ require d0 < m_d0_max
-
float
m_d0sig_max
= 1e8¶ require d0 significance (at BL) < m_d0sig_max
-
float
m_z0sintheta_max
= 1e8¶ require z0*sin(theta) (at BL - corrected with vertex info) < m_z0sintheta_max
-
bool
m_removeCosmicMuon
= false¶ Remove cosmic muons that fail absolute z0 and d0 selections.
-
bool
m_removeEventBadMuon
= true¶ Remove events with a bad muon, defined by poor q/p.
-
std::string
m_MinIsoWPCut
= ""¶ reject objects which do not pass this isolation cut - default = “” (no cut)
-
std::string
m_IsoWPList
= "LooseTrackOnly,Loose,Tight,Gradient,GradientLoose"¶ decorate objects with ‘isIsolated_*’ flag for each WP in this input list - default = all current ASG WPs
-
std::string
m_CaloIsoEff
= "0.1*x+90"¶ to define a custom WP - make sure “UserDefined” is added in the above input list!
-
std::string
m_TrackIsoEff
= "98"¶ to define a custom WP - make sure “UserDefined” is added in the above input list!
-
std::string
m_CaloBasedIsoType
= "topoetcone20"¶ to define a custom WP - make sure “UserDefined” is added in the above input list!
-
std::string
m_TrackBasedIsoType
= "ptvarcone30"¶ to define a custom WP - make sure “UserDefined” is added in the above input list!
-
std::string
m_singleMuTrigChains
= ""¶ A comma-separated string w/ alll the HLT single muon trigger chains for which you want to perform the matching. If left empty (as it is by default), no trigger matching will be attempted at all
-
std::string
m_diMuTrigChains
= ""¶ A comma-separated string w/ all the HLT dimuon trigger chains for which you want to perform the matching. If left empty (as it is by default), no trigger matching will be attempted at all
-
double
m_minDeltaR
= 0.1¶ Recommended threshold for muon triggers: see https://svnweb.cern.ch/trac/atlasoff/browser/Trigger/TrigAnalysis/TriggerMatchingTool/trunk/src/TestMatchingToolAlg.cxx.
-
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_muonQuality
¶
-
int
m_numEvent
¶
-
int
m_numObject
¶
-
int
m_numEventPass
¶
-
int
m_weightNumEventPass
¶
-
int
m_numObjectPass
¶
-
TH1D *
m_cutflowHist
= nullptr¶
-
TH1D *
m_cutflowHistW
= nullptr¶
-
int
m_cutflow_bin
¶
-
bool
m_isUsedBefore
¶
-
TH1D *
m_mu_cutflowHist_1
= nullptr¶
-
TH1D *
m_mu_cutflowHist_2
= nullptr¶
-
int
m_mu_cutflow_all
¶
-
int
m_mu_cutflow_eta_and_quaility_cut
¶
-
int
m_mu_cutflow_ptmax_cut
¶
-
int
m_mu_cutflow_ptmin_cut
¶
-
int
m_mu_cutflow_type_cut
¶
-
int
m_mu_cutflow_z0sintheta_cut
¶
-
int
m_mu_cutflow_d0_cut
¶
-
int
m_mu_cutflow_d0sig_cut
¶
-
int
m_mu_cutflow_iso_cut
¶
-
int
m_mu_cutflow_cosmic_cut
¶
-
std::vector<std::string>
m_IsoKeys
¶
-
std::vector<std::string>
m_singleMuTrigChainsList
¶
-
std::vector<std::string>
m_diMuTrigChainsList
¶ /* contains all the HLT trigger chains tokens extracted from m_singleMuTrigChains */
-
asg::AnaToolHandle<CP::IIsolationSelectionTool>
m_isolationSelectionTool_handle
= {"CP::IsolationSelectionTool/IsolationSelectionTool", PRIVATETOOL}¶ /* contains all the HLT trigger chains tokens extracted from m_diMuTrigChains */
-
CP::IsolationSelectionTool *
m_isolationSelectionTool
= {nullptr}¶
-
asg::AnaToolHandle<CP::IMuonSelectionTool>
m_muonSelectionTool_handle
= {"CP::MuonSelectionTool/MuonSelectionTool" , PRIVATETOOL}¶
-
asg::AnaToolHandle<Trig::IMatchingTool>
m_trigMuonMatchTool_handle
= {"Trig::MatchingTool/MatchingTool" , PRIVATETOOL}¶
-
asg::AnaToolHandle<Trig::TrigDecisionTool>
m_trigDecTool_handle
= {"Trig::TrigDecisionTool/TrigDecisionTool" }¶
-
bool
m_doTrigMatch
= true¶ This internal variable gets set to false if no triggers are defined or if TrigDecisionTool is missing.
-