Helper Classes

namespace HelperClasses

Enums

enum class ContainerType

Values:

enumerator UNKNOWN
enumerator CONSTDV
enumerator CONSTCONT
enum class ToolName

Values:

enumerator MUONSELECTOR
enumerator ELECTRONSELECTOR
enumerator PHOTONSELECTOR
enumerator JETSELECTOR
enumerator BJETSELECTOR
enumerator CALIBRATOR
enumerator CORRECTOR
enumerator SELECTOR
enumerator DEFAULT
template<typename T>
class EnumParser
#include <HelperClasses.h>

template enum parser. Copied from: http://stackoverflow.com/a/726681

class InfoSwitch
#include <HelperClasses.h>

A struct that is used for parsing configuration strings and assigning booleans to various properties. Currently used in plotting code.

Strings are used to turn on and off histograms and branches in the tree The following structs hold the bools used to control the content and also have the string which is necessary to turn a set on. See the derived members for more information about what is supported. Each derived member should provide a table of parameters, patterns, and type of matching scheme used. The pattern will use standard PCRE-syntax when appropriate.

We support two major matching schemes:

Exact

If a variable is matched exactly to a string, then a boolean is set to True or False based on whether an exact match exists or not.

Partial

If a variable is partially matched to a string, then there is some specific pattern we are extracting that will succeed the partial match that determines what the variable will be set to (usually not a bool).

Subclassed by HelperClasses::EventInfoSwitch, HelperClasses::IParticleInfoSwitch, HelperClasses::METInfoSwitch, HelperClasses::TrackInfoSwitch, HelperClasses::TriggerInfoSwitch

Public Functions

inline InfoSwitch(const std::string configStr)

Constructor. Take in input string, create vector of tokens.

Parameters

configStr – The configuration string to split up.

inline bool has_exact(const std::string flag)

Search for an exact match in m_configDetails.

Parameters

flag – The string we search for.

inline bool has_match(const std::string flag)

Search for a partial match in m_configStr.

Parameters

flag – The string we search for.

std::string get_working_point(const std::string flag)

Search for a single flag in m_configDetails and parse out the working point.

Parameters

flag – The string we search for.

std::vector<std::string> get_working_points(const std::string flag)

Search for multiple flags in m_configDetails and parse out the working points.

Parameters

flag – The string we search for.

Protected Attributes

const std::string m_configStr

The input configuration string from which we split up into tokens.

std::set<std::string> m_configDetails

The vector of tokens from which we search through for finding matches.

class EventInfoSwitch : public HelperClasses::InfoSwitch
#include <HelperClasses.h>

The HelperClasses::InfoSwitch struct for Event Information.

Parameter

Pattern

Match

m_noDataInfo

noDataInfo

exact

m_eventCleaning

eventCleaning

exact

m_bcidInfo

bcidInfo

exact

m_pileup

pileup

exact

m_pileupsys

pileupsys

exact

m_shapeEM

shapeEM

exact

m_shapeEMPFLOW

shapeEMPFLOW

exact

m_shapeLC

shapeLC

exact

m_truth

truth

exact

m_caloClus

caloClusters

exact

m_weightsSys

weightsSys

exact

m_beamspotweight

beamspotweight

exact

class TriggerInfoSwitch : public HelperClasses::InfoSwitch
#include <HelperClasses.h>

The HelperClasses::InfoSwitch struct for Trigger Information.

Parameter

Pattern

Match

m_basic

basic

exact

m_menuKeys

menuKeys

exact

m_passTriggers

passTriggers

exact

m_passTrigBits

passTrigBits

exact

m_prescales

prescales

exact

m_prescalesLumi

prescalesLumi

exact

Note

m_prescales contains information from the TrigDecisionTool for every trigger used in event selection and event trigger-matching. m_prescalesLumi contains information retrieved from the pile-up reweighting tool based on the actual luminosities of triggers.

class IParticleInfoSwitch : public HelperClasses::InfoSwitch
#include <HelperClasses.h>

The HelperClasses::InfoSwitch struct for IParticle Information.

Parameter

Pattern

Match

m_noMultiplicity

noMultiplicity

exact

m_kinematic

kinematic

exact

m_numLeading

NLeading

partial

m_useTheS

useTheS

exact

Note

m_numLeading requires a number XX to follow it, defining the number of leading partiles and associate it with that variable.

For example:

m_configStr = "... NLeading4 ..."

will define int m_numLeading = 4.

Subclassed by HelperClasses::ClusterInfoSwitch, HelperClasses::ElectronInfoSwitch, HelperClasses::JetInfoSwitch, HelperClasses::MuonInfoSwitch, HelperClasses::PhotonInfoSwitch, HelperClasses::TauInfoSwitch, HelperClasses::TruthInfoSwitch

class MuonInfoSwitch : public HelperClasses::IParticleInfoSwitch
#include <HelperClasses.h>

The HelperClasses::IParticleInfoSwitch class for Muon Information.

Parameter

Pattern

Match

m_trigger

trigger

exact

m_isolation

isolation

exact

m_isolationKinematics

isolationKinematics

exact

m_quality

quality

exact

m_recoparams

recoparams

exact

m_trackparams

trackparams

exact

m_trackhitcont

trackhitcont

exact

m_effSF

effSF

exact

m_energyLoss

energyLoss

exact

m_recoWPs[XYZ]

RECO_XYZ

pattern

m_isolWPs[“”]

ISOL_

exact

m_isolWPs[“”]

ISOL_NONE

exact

m_isolWPs[XYZ]

ISOL_XYZ

pattern

m_trigWPs[XYZ]

TRIG_XYZ

pattern

m_passSel

passSel

exact

m_passOR

passOR

exact

Note

quality, isolation and effSF switches do not enable any additional output by themselves. They require additional working point pattern using RECO_XYZ for quality working points and scale factors, ISOL_XYZ for isolation working points and scale factors, and TRIG_XYZ for trigger scale factors. XYZ in the pattern should be replaced using the working point name, for example:

m_configStr = "... RECO_Medium ..."

will define the Medium quality working point and the accompanying scale factors.

Isolation supports NONE or empty option which will enable scale factors without additional isolation requirements, for example:

m_configStr = "... ISOL_NONE ISOL_Loose ..."

will define the Loose isolation working point status branch, and scale factors without isolation requirements and using the Loose WP.

class ElectronInfoSwitch : public HelperClasses::IParticleInfoSwitch
#include <HelperClasses.h>

The HelperClasses::IParticleInfoSwitch class for Electron Information.

Parameter

Pattern

Match

m_trigger

trigger

exact

m_isolation

isolation

exact

m_isolationKinematics

isolationKinematics

exact

m_PID

PID

exact

m_trackparams

trackparams

exact

m_trackhitcont

trackhitcont

exact

m_effSF

effSF

exact

m_PIDWPs[XYZ]

PID_XYZ

pattern

m_PIDSFWPs[XYZ]

PIDSF_XYZ

pattern

m_isolWPs[“”]

ISOL_

exact

m_isolWPs[“”]

ISOL_NONE

exact

m_isolWPs[XYZ]

ISOL_XYZ

pattern

m_trigWPs[XYZ]

TRIG_XYZ

pattern

m_passSel

passSel

exact

m_passOR

passOR

exact

Note

PID, isolation and effSF switches do not enable any additional output by themselves. They require additional working point pattern using PID_XYZ for PID working points, PIDSF_XYZ for PID scale factors, ISOL_XYZ for isolation working points and scale factors, and TRIG_XYZ for trigger scale factors. XYZ in the pattern should be replaced using the working point name, for example:

m_configStr = "... PID_LHMedium PIDSF_MediumLLH ..."

will define the LHMedium PID working point and the accompanying scale factors. Note that not all PID working points have scale factors available.

Isolation supports NONE or empty option which will enable scale factors without additional isolation requirements, for example:

m_configStr = "... ISOL_NONE ISOL_Loose ..."

will define the Loose isolation working point status branch, and scale factors without isolation requirements and using the Loose WP.

class PhotonInfoSwitch : public HelperClasses::IParticleInfoSwitch
#include <HelperClasses.h>

The HelperClasses::IParticleInfoSwitch class for Photon Information.

Parameter

Pattern

Match

m_isolation

isolation

exact

m_PID

PID

exact

m_purity

purity

exact

m_effSF

effSF

exact

m_trigger

trigger

exact

m_isoCones

isoCone

partial

Note

isoCone can be repeated but requires a number after it, for example:

m_configStr = "... isoCone20 isoCone40 ..."

which will define std::vector<int> m_isoCones = {20,40}.

class ClusterInfoSwitch : public HelperClasses::IParticleInfoSwitch
class JetInfoSwitch : public HelperClasses::IParticleInfoSwitch
#include <HelperClasses.h>

The HelperClasses::IParticleInfoSwitch class for Jet Information.

Parameter

Pattern

Match

m_noMultiplicity

noMultiplicity

exact

m_kinematic

kinematic

exact

m_trigger

trigger

exact

m_substructure

substructure

exact

m_ntrimsubjets

ntrimsubjets

exact

m_bosonCount

bosonCount

exact

m_VTags

VTags

exact

m_rapidity

rapidity

exact

m_clean

clean

exact

m_cleanLight

cleanLight

exact

m_cleanLightLLP

cleanLightLLP

exact

m_cleanTrig

cleanTrig

exact

m_timing

timing

exact

m_energy

energy

exact

m_energyLight

energyLight

exact

m_scales

scales

exact

m_constscaleEta

constscaleEta

exact

m_detectorEta

detectorEta

exact

m_resolution

resolution

exact

m_truth

truth

exact

m_truthDetails

truth_details

exact

m_layer

layer

exact

m_trackPV

trackPV

exact

m_trackAll

trackAll

exact

m_chargedPFOPV

chargedPFOPV

exact

m_jvt

JVT

exact

m_NNJvt

NNJvt

exact

m_sfJVTName

sfJVT

partial

m_sffJVTName

sffJVT

partial

m_allTrack

allTrack

exact

m_allTrackPVSel

allTrackPVSel

exact

m_allTrackDetail

allTrackDetail

exact

m_constituent

constituent

exact

m_constituentAll

constituentAll

exact

m_flavorTag

flavorTag

exact

m_flavorTagHLT

flavorTagHLT

exact

m_sfFTagFix

sfFTagFix

partial

m_sfFTagFlt

sfFTagFlt

partial

m_sfFTagHyb

sfFTagHyb

partial

m_jetBTag

jetBTag

partial

m_area

area

exact

m_JVC

JVC

exact

m_tracksInJet

tracksInJet

partial

m_trackJetName

trackJetName

partial

m_hltVtxComp

hltVtxComp

exact

m_onlineBS

onlineBS

exact

m_onlineBSTool

onlineBSTool

exact

m_charge

charge

exact

m_passSel

passSel

exact

m_passOR

passOR

exact

m_vsLumiBlock

vsLumiBlock

exact

m_vsActualMu

vsActualMu

exact

m_lumiB_runN

lumiB_runN

exact

m_byAverageMu

byAverageMu

exact

m_byEta

byEta

exact

m_etaPhiMap

etaPhiMap

exact

m_muonCorrection

muonCorrection

exact

trackJetName expects one or more track jet container names separated by an underscore. For example, the string trackJetName_GhostAntiKt2TrackJet_GhostVR30Rmax4Rmin02TrackJet will set the attriubte m_trackJetNames to {"GhostAntiKt2TrackJet", "GhostVR30Rmax4Rmin02TrackJet"}.

Note

sfJVT requires a working point after it, for example:

m_configStr = "... sfJVTMedium ..."

jetBTag expects the format jetBTag_tagger_type_AABB..MM..YY.ZZ. This will create a vector of working points (AA, BB, CC, …, ZZ) associated with that tagger. Several entries can be given. For example:

m_configStr = “… jetBTag_DL1r_FixedCutBEff_60707785 …”

class TruthInfoSwitch : public HelperClasses::IParticleInfoSwitch
#include <HelperClasses.h>

The HelperClasses::InfoSwitch struct for Truth Information.

Parameter

Pattern

Match

m_noMultiplicity

noMultiplicity

exact

m_kinematic

kinematic

exact

m_type

type

exact

m_bVtx

bVtx

exact

m_parents

parents

exact

m_children

children

exact

m_dressed

dressed

exact

m_origin

origin

exact

m_particleType

particleType

exact

m_pdgIdOnly

pdgIdOnly

exact

class TrackInfoSwitch : public HelperClasses::InfoSwitch
#include <HelperClasses.h>

The HelperClasses::InfoSwitch struct for Track Information.

Parameter

Pattern

Match

m_noMultiplicity

noMultiplicity

exact

m_kinematic

kinematic

exact

m_fitpars

fitpars

exact

m_numbers

numbers

exact

m_vertex

vertex

exact

m_useTheS

useTheS

exact

class TauInfoSwitch : public HelperClasses::IParticleInfoSwitch
#include <HelperClasses.h>

The HelperClasses::IParticleInfoSwitch struct for Tau Information.

Note

identification and effSF switches do not enable any additional output by themselves. They require additional working point pattern using TAUEFF_XYZ for combined scale factors, and TRIG_XYZ for trigger scale factors. XYZ in the pattern should be replaced using the working point name, for example:

m_configStr = "... TAUEFF_EleOLRElectronEleRNNLoose_TauIDMedium ... TRIG_EleOLRElectronEleRNNMedium_TauIDLoose_TrigMyTriggerMenu"

Notice that the working point for TAUEFF is a combination of two working points from EleOLRElectron and TauID.

class METInfoSwitch : public HelperClasses::InfoSwitch
#include <HelperClasses.h>

The HelperClasses::InfoSwitch struct for Missing \(\text{E}_{\text{T}}\) Information.

Parameter

Pattern

Match

m_metClus

metClus

exact

m_metTrk

metTrk

exact

m_sigClus

sigClus|all

exact

m_sigTrk

sigTrk|all

exact

m_sigResolutionClus

sigResolutionClus|all

exact

m_sigResolutionTrk

sigResolutionTrk|all

exact

m_refEle

refEle|all

exact

m_refGamma

refGamma|all

exact

m_refTau

refTau|all

exact

m_refMuons

refMuons|all

exact

m_refJet

refJet|all

exact

m_refJetTrk

refJetTrk

exact

m_softClus

softClus|all

exact

m_softTrk

softTrk|all

exact

m_noExtra

noExtra

exact

Note

For all except m_refJetTrk, you can pass in the string "all" to enable all information. You can force only calocluster- or track-based MET using m_metClus or m_metTrk.