\(j\)¶
-
class
JetSelector
¶ Inherits from xAH::Algorithm
Public Functions
-
JetSelector
()¶
-
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::JetContainer *inJets, float mcEvtWeight, bool count, std::string outContainerName, bool isNominal)¶
-
int
PassCuts
(const xAOD::Jet *jet)¶
-
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_truthJetContainer
= "AntiKt4TruthJets"¶ truth jet container name (used for JVT SF)
-
std::string
m_inputAlgo
= ""¶ input type - from xAOD or from xAODAnaHelper Algo output
-
std::string
m_outputAlgo
= ""¶ output type - this is how the vector<string> w/ syst names will be saved in TStore
-
bool
m_writeSystToMetadata
= false¶ Write systematics names to metadata.
-
std::string
m_jetScaleType
= ""¶ Type of Scale Momementum.
-
std::string
m_decor
= "passSel"¶ The decoration key written to passing objects.
-
bool
m_decorateSelectedObjects
= true¶ decorate selected objects? defaul passSel
-
bool
m_createSelectedContainer
= false¶ fill using SG::VIEW_ELEMENTS to be light weight
-
int
m_nToProcess
= -1¶ look at n objects
-
bool
m_cleanJets
= true¶ require cleanJet decoration to not be set and false
-
int
m_cleanEvtLeadJets
= -1¶ kill event if any of the N leading jets are not clean
-
bool
m_cleanEvent
= false¶ Kill event if any passing jets are not clean.
Note
The jets need the cleanJet decoration which is set when you enable
JetCalibrator::m_doCleaning
-
bool
m_markCleanEvent
= false¶ Mark event with decorator if any passing jets are not clean.
-
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
-
float
m_eta_max
= 1e8¶ require eta < eta_max
-
float
m_eta_min
= 1e8¶ require eta > eta_min
-
float
m_detEta_max
= 1e8¶ require detEta < detEta_max
-
float
m_detEta_min
= 1e8¶ require detEta > detEta_min
-
float
m_mass_max
= 1e8¶ require mass < mass_max
-
float
m_mass_min
= 1e8¶ require mass > mass_min
-
float
m_rapidity_max
= 1e8¶ require rapidity < rapidity_max
-
float
m_rapidity_min
= 1e8¶ require rapidity > rapidity_min
-
int
m_truthLabel
= -1¶ require truth level on truth jets
-
bool
m_useHadronConeExcl
= true¶ use HadronConeExclTruthLabelID for truth match (default)
-
bool
m_doJVF
= false¶ check JVF
-
float
m_pt_max_JVF
= 50e3¶ max pT [GeV] (JVF is a pileup cut)
-
float
m_eta_max_JVF
= 2.4¶ detector eta cut
-
float
m_JVFCut
= 0.5¶ cut value
-
bool
m_doJVT
= false¶ check JVT
-
bool
m_noJVTVeto
= false¶ keep JVT-rejected jets and decorate passing status
-
bool
m_dofJVT
= false¶ check forward JVT
-
bool
m_dofJVTVeto
= true¶ Remove jets that fail fJVT. Like JVT, the default is to clean the collection.
-
float
m_pt_max_JVT
= 60e3¶ max pT [GeV] (JVT is a pileup cut)
-
float
m_eta_max_JVT
= 2.4¶ detector eta cut
-
float
m_JVTCut
= -1.0¶ Minimum value of JVT for selecting jets.
Warning
If set to a non-negative value (default is -1.0), it will override any set value for
JetSelector::m_WorkingPointJVT
-
std::string
m_WorkingPointJVT
= "Medium"¶ Available working points for JVT cut from the
CP::IJetJvtEfficiency
tool.The corresponding data/MC SF will be saved as a
std::vector<float>
decoration (for MC only), for nominal WP and the available systematics.Value JVT Cut Efficiency “Medium” (Default) 0.59 92% “Loose” 0.11 97% “Tight” 0.91 85%
-
std::string
m_SFFileJVT
= "JetJvtEfficiency/Moriond2017/JvtSFFile_EM.root"¶ Configuration containting JVT scale factors.
The configuration file with the scale factors calculated by the
CP::IJetJvtEfficiency
.See :https://twiki.cern.ch/twiki/bin/view/AtlasProtected/JVTCalibration for latest recommendation.
-
std::string
m_outputSystNamesJVT
= "JetJvtEfficiency_JVTSyst"¶
-
float
m_systValJVT
= 0.0¶
-
std::string
m_systNameJVT
= ""¶
-
std::string
m_WorkingPointfJVT
= "Medium"¶ Available working points for fJVT cut from the
CP::IJetJvtEfficiency
tool.The corresponding data/MC SF will be saved as a
std::vector<float>
decoration (for MC only), for nominal WP and the available systematics.Value HS Efficiency PU Fake Rate “Medium” 87.1-97.0% 53.4-60.9% “Tight” 79.9-95.6% 45.4-50.3% See :https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/FJVTCalibration for more information.
-
std::string
m_SFFilefJVT
= "JetJvtEfficiency/Moriond2016_v2/fJvtSFFile.root"¶ Configuration containting fJVT scale factors.
The configuration file with the scale factors calculated by the
CP::IJetJvtEfficiency
.See :https://twiki.cern.ch/twiki/bin/view/AtlasProtected/FJVTCalibration for latest recommendation.
-
std::string
m_outputSystNamesfJVT
= "JetJvtEfficiency_fJVTSyst"¶
-
float
m_systValfJVT
= 0.0¶
-
std::string
m_systNamefJVT
= ""¶
-
bool
m_doBTagCut
= false¶ Flag to apply btagging cut, if false just decorate decisions.
-
std::string
m_corrFileName
= "xAODBTaggingEfficiency/cutprofiles_22072015.root"¶
-
std::string
m_jetAuthor
= "AntiKt4EMTopoJets"¶
-
std::string
m_taggerName
= "MV2c20"¶
-
std::string
m_operatingPt
= "FixedCutBEff_70"¶
-
double
m_b_eta_max
= 2.5¶
-
double
m_b_pt_min
= 20e3¶
-
bool
m_doHLTBTagCut
= false¶
-
std::string
m_HLTBTagTaggerName
= "MV2c20"¶
-
float
m_HLTBTagCutValue
= -0.4434¶
-
bool
m_requireHLTVtx
= false¶
-
bool
m_requireNoHLTVtx
= false¶
-
std::string
m_passAuxDecorKeys
= ""¶
-
std::string
m_failAuxDecorKeys
= ""¶
-
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
¶
-
int
m_numEventPass
¶
-
int
m_weightNumEventPass
¶
-
int
m_numObjectPass
¶
-
int
m_pvLocation
¶
-
bool
m_isEMjet
¶
-
bool
m_isLCjet
¶
-
TH1D *
m_cutflowHist
= nullptr¶
-
TH1D *
m_cutflowHistW
= nullptr¶
-
int
m_cutflow_bin
¶
-
std::vector<std::string>
m_passKeys
¶
-
std::vector<std::string>
m_failKeys
¶
-
TH1D *
m_jet_cutflowHist_1
= nullptr¶
-
int
m_jet_cutflow_all
¶
-
int
m_jet_cutflow_cleaning_cut
¶
-
int
m_jet_cutflow_ptmax_cut
¶
-
int
m_jet_cutflow_ptmin_cut
¶
-
int
m_jet_cutflow_eta_cut
¶
-
int
m_jet_cutflow_jvt_cut
¶
-
int
m_jet_cutflow_btag_cut
¶
-
std::vector<CP::SystematicSet>
m_systListJVT
¶
-
std::vector<CP::SystematicSet>
m_systListfJVT
¶
-
asg::AnaToolHandle<CP::IJetJvtEfficiency>
m_JVT_tool_handle
= {"CP::JetJvtEfficiency"}¶
-
asg::AnaToolHandle<CP::IJetJvtEfficiency>
m_fJVT_eff_tool_handle
= {"CP::JetJvtEfficiency"}¶
-
asg::AnaToolHandle<IBTaggingSelectionTool>
m_BJetSelectTool_handle
= {"BTaggingSelectionTool"}¶
-
std::string
m_outputJVTPassed
= "JetJVT_Passed"¶
-
std::string
m_outputfJVTPassed
= "JetfJVT_Passed"¶
-