\(j\)

class JetCalibrator : public xAH::Algorithm

A wrapper to a few JetETMiss packages. By setting the configuration parameters detailed in the header documentation, one can:

  • calibrate a given jet collection

  • apply systematic variations for JES

  • apply systematic variations for JER

  • decorate the jet with the decision of the Jet Cleaning tool

When considering systematics, a new xAOD::JetCollection is created for each systematic variation. The names are then saved in a vector for downstream algorithms to use.

Public Functions

JetCalibrator()
virtual EL::StatusCode setupJob(EL::Job &job)
virtual EL::StatusCode fileExecute()
virtual EL::StatusCode histInitialize()
virtual EL::StatusCode changeInput(bool firstFile)
virtual EL::StatusCode initialize()
virtual EL::StatusCode execute()
virtual EL::StatusCode postExecute()
virtual EL::StatusCode finalize()
virtual EL::StatusCode histFinalize()

Public Members

std::string m_inContainerName = ""

The name of the input container for this algorithm to read from TEvent or TStore

std::string m_outContainerName = ""

The name of the nominal output container written by the algorithm to TStore

If the algorithm applies systematic variations, for each shallow copy saved to TStore, the systematic name will be appended to this.

std::string m_jetAlgo = ""

set to AntiKt4EMTopo for AntiKt4EMTopoJets

std::string m_outputAlgo = ""

name of vector holding names of jet systematics given by the JetEtmiss Tools

bool m_writeSystToMetadata = false

Write systematics names to metadata.

bool m_recalibrateHLTJets = false

whether to run HLT jet re-calibration

std::string m_HLTVertexContainerName = "HLT_IDVertex_FS"

vertex container name to use for HLT jet re-calibration

std::string m_HLTAvgMuDecor = "EventInfo.AvgMu"

HLT average mu decoration on EventInfo after formatting.

std::string m_EvtInfoHLTNPVDecor = ""

location of the HLT NPV on EventInfo object (e.g. EventInfo.NPV) this defaults to an empty string and is only configured in JetCalibrationTool when a non-empty string is provided

std::string m_calibGSCDepth = ""

GSCDepth property to override GSCDepth in config file when set to a non-empty string and GSC is in the calibration sequence.

std::string m_calibConfigDir = ""

config for JetCalibrationTool ConfigDir, set it to override tool defaults

std::string m_calibConfigData = "JES_data2017_2016_2015_Recommendation_Aug2018_rel21.config"

config for JetCalibrationTool for Data

std::string m_calibConfigFullSim = "JES_data2017_2016_2015_Recommendation_Aug2018_rel21.config"

config for JetCalibrationTool for Full Sim MC

std::string m_calibConfigAFII = "JES_MC16Recommendation_AFII_EMTopo_April2018_rel21.config"

config for JetCalibrationTool for AFII MC

std::string m_calibSequence = ""

List of calibration steps. Auto-configured to the Jet/Etmiss recommendation if left blank.

std::string m_uncertConfig = ""

config for Jet Uncertainty Tool

std::string m_uncertMCType = ""

MC type for Jet Uncertainty Tool (need to be set for FullSim)

std::string m_overrideCalibArea = ""

Override CalibArea tag (default recommended)

std::string m_overrideUncertCalibArea = ""

Override uncertainties CalibArea tag (default recommended)

std::string m_overrideAnalysisFile = ""

Set analysis-specific jet flavour composition file for JetUncertainties (default: unknown comp.)

std::string m_overrideUncertPath = ""

Override uncertainties path (not recommended)

bool m_forceInsitu = false

when running data “_Insitu” is appended to calibration sequence

bool m_forceSmear = false

when running FullSim “_Smear” is appended to calibration sequence

bool m_jetCalibToolsDEV = false

when using DEV mode of JetCalibTools

bool m_addGhostMuonsToJets = false

Run muon-to-jet ghost association (recommended for MET)

bool m_doCleaning = true

enable to apply jet cleaning decoration

std::string m_jetCleanCutLevel = "LooseBad"

Cut Level.

bool m_saveAllCleanDecisions = false

Save all cleaning decisions as decorators.

bool m_jetCleanUgly = false

Do Ugly cleaning ( i.e. TileGap 3 )

bool m_sort = true

Sort the processed container elements by transverse momentum.

bool m_cleanParent = false

Apply jet cleaning to parent jet.

bool m_applyFatJetPreSel = false
bool m_useLargeRTruthLabelingTool = true

Use large-R jet truth labeling tool (needed for systematics)

std::string m_truthLabelName = "R10TruthLabel_R21Consolidated"

Name of the large-R jet truth labeling definition.

bool m_isTruthJetCol = false

Flag to indicate if using a truth jet collection.

bool m_useTRUTH3 = true

Flag to indicate if input xAOD uses TRUTH3 style containers.

std::string m_truthParticleContainerName = "TruthParticles"

Name of the truth particle container if not using TRUTH3 containers.

std::string m_truthBosonContainerName = "TruthBosonsWithDecayParticles"

Name of the truth boson container if using TRUTH3 containers.

std::string m_truthTopQuarkContainerName = "TruthTopQuarkWithDecayParticles"

Name of the truth top quark container if using TRUTH3 containers.

bool m_doJetTileCorr = false

jet tile correction

bool m_pseudoData = false

needed in case want to treat MC as pseudoData for JER uncertainty propagation

bool m_mcAndPseudoData = false

Treat MC as usual, then run the JER uncertainties on it a second time treating it as pseudodata. Overrides m_pseudodata if true.

Private Functions

EL::StatusCode executeSystematic(const CP::SystematicSet &thisSyst, const xAOD::JetContainer *inJets, std::pair<xAOD::JetContainer*, xAOD::ShallowAuxContainer*> &calibJetsSC, std::vector<std::string> &vecOutContainerNames, bool isPDCopy)
EL::StatusCode initializeUncertaintiesTool(asg::AnaToolHandle<ICPJetUncertaintiesTool> &uncToolHandle, bool isData)

Private Members

bool m_runSysts = false

set to true if systematics asked for and exist

int m_numEvent
int m_numObject
std::string m_calibConfig
std::vector<CP::SystematicSet> m_systList
asg::AnaToolHandle<IJetCalibrationTool> m_JetCalibrationTool_handle = {"JetCalibrationTool", this}
asg::AnaToolHandle<ICPJetUncertaintiesTool> m_JetUncertaintiesTool_handle = {"JetUncertaintiesTool", this}
asg::AnaToolHandle<ICPJetUncertaintiesTool> m_pseudodataJERTool_handle = {"PseudodataJERTool", this}
asg::AnaToolHandle<IJetSelector> m_JetCleaningTool_handle = {"JetCleaningTool", this}
std::vector<asg::AnaToolHandle<IJetSelector>> m_AllJetCleaningTool_handles
std::vector<std::string> m_decisionNames