MultijetBalanceAlgo¶
-
class
MultijetBalanceAlgo¶ Event selection of the Multijet Balance.
Public Functions
-
MultijetBalanceAlgo(std::string name)¶ Standard constructor.
-
~MultijetBalanceAlgo()¶ Standard destructor.
-
virtual EL::StatusCode
setupJob(EL::Job &job)¶ Setup the job (inherits from Algorithm)
-
virtual EL::StatusCode
fileExecute()¶ Execute the file (inherits from Algorithm)
-
virtual EL::StatusCode
histInitialize()¶ Initialize the output histograms before any input file is attached (inherits from Algorithm)
-
virtual EL::StatusCode
changeInput(bool firstFile)¶ Change to the next input file (inherits from Algorithm)
-
virtual EL::StatusCode
initialize()¶ Initialize the input file (inherits from Algorithm)
-
virtual EL::StatusCode
execute()¶ Execute each event of the input file (inherits from Algorithm)
-
virtual EL::StatusCode
postExecute()¶ End the event execution (inherits from Algorithm)
-
virtual EL::StatusCode
finalize()¶ Finalize the input file (inherits from Algorithm)
-
virtual EL::StatusCode
histFinalize()¶ Finalize the histograms after all files (inherits from Algorithm)
-
virtual EL::StatusCode
configure()¶ Configure the variables once before running.
-
MultijetBalanceAlgo::ClassDef(MultijetBalanceAlgo, 1) Used to distribute the algorithm to the workers.
Public Members
-
xAOD::TEvent *
m_event¶ TEvent object.
-
xAOD::TStore *
m_store¶ TStore object for variable storage.
-
int
m_eventCounter¶ Count of the current event.
-
std::string
m_name¶ Global name to give to the algorithm.
-
std::string
m_comEnergy¶ Center of mass energy used to define which file the cross-sections come from.
-
std::string
m_inContainerName¶ Input container name for jet collection.
-
std::string
m_triggerAndPt¶ String consisting of triggers and their recoil \(p_{T}\) thresholds.
- Note
- Each trigger / recoil \(p_{T}\) combination is separated by a colon ”:”, and each combination is separated by a comma ”,”.
-
int
m_MJBIteration¶ The iteration of the current MJB.
- Note
- MJB is an iterative procedure, with each iteration using outputs from the previous. The procedure starts at a m_MJBIteration value of 0, and is increased by 1 for each iteration. This value corresponds directly to the entries in MultijetBalanceAlgo::m_MJBIterationThreshold.
-
std::string
m_MJBIterationThreshold¶ A comma separated list of subleading jet \(p_{T}\) thresholds.
- Note
- The comma separated list is translated into a vector of values. Each vector entry corresponds to a potential MJB iteration, and the value used is chosen by MultijetBalanceAlgo::m_MJBIteration.
-
std::string
m_MJBCorrectionFile¶ The location of the file containing previous MJB calibrations.
- Note
- The file corresponds to previous MJB calibrations and will not be used for a MultijetBalanceAlgo::m_MJBIteration of zero. The naming convention of the calibration histograms should agree with the iteration.
-
std::string
m_sysVariations¶ Dash “-” separated list of systematic variations to use.
- Note
- Systematic variations are chosen according to their name in the MJB or their respective calibration tools. For example including “EtaIntercalibration” will grab the JetUncertainties \(\eta\)-intercalibration systematics. Short-cut strings are also accepted, including:
- Nominal : Include the nominal result
- AllSystematic : Include every defined systematic
- MJB : Include all MJB systematics (defined in MultijetBalanceAlgo::loadVariations)
- AllZjet : Include all Z+jet in-situ calibration systematics
- AllGjet : Include all \(\gamma\)+jet in-situ calibration systematics
- AllXXX : Include all JetUncertainties systematics include the substring “XXX”
- Special : Include all JetUncertainties systematics including EtaIntercalibration, Pileup, Flavor, or PunchThrough
- JetCalibSequence : Include each stage of the jet calibration procedure (origin, etaJES, GSC, etc.)
-
bool
m_MJBStatsOn¶ Use MJB statistical uncertainties.
- Note
- This is untested, do not use!
-
unsigned int
m_numJets¶ Selection for the minimum number of jets in the event (Default of 3)
-
float
m_ptAsym¶ Selection for the \(p_{T}\) asymmetry of the event (Default 0.8)
-
float
m_alpha¶ Selection for the \(\alpha\) of the event (Default 0.3)
-
float
m_beta¶ Selection for the \(\beta\) of any jet in the event (Default 1.0)
-
float
m_ptThresh¶ \(p_{T}\) threshold for each jet to be included (default 25 GeV)
-
bool
m_allJetBeta¶ Boolean requiring each jet to pass the MultijetBalanceAlgo::m_beta selection, otherwise it is only applied to jets with \(p_{T}\) > 25% of the leading jet \(p_{T}\).
-
bool
m_bootstrap¶ Run in Bootstrap mode (See Instructions)
-
bool
m_leadingInsitu¶ Apply in-situ calibration to the leading jet for Validation mode.
-
bool
m_noLimitJESPt¶ Do not apply a \(p_{T}\) requirement on JES uncertainty application for Validation mode.
-
bool
m_closureTest¶ Apply previous MJB calibration to the leading jet, performing a closure test.
-
bool
m_leadJetMJBCorrection¶ Apply MJB correction derived as a function of leading jet \(p_{T}\), not recoil system \(p_{T}\).
- Note
- Experimental functionality, you should likely not use this
-
bool
m_reverseSubleading¶ Reverse the subleading jet \(p_{T}\) requirement, accepting only dijet like events.
-
bool
m_writeTree¶ True value will allow TTree output.
-
bool
m_writeNominalTree¶ True value will write out only the Nominal TTree.
-
std::string
m_MJBDetailStr¶ Control substrings for creating MJB histograms.
-
std::string
m_eventDetailStr¶ Control substrings for creating event-level histograms.
-
std::string
m_jetDetailStr¶ Control substrings for creating jet-level histograms.
-
std::string
m_trigDetailStr¶ Control substrings for creating trigger-level histograms.
-
bool
m_debug¶ Set verbose mode.
-
int
m_maxEvent¶ Maximum number of events to run over.
-
std::string
m_MCPileupCheckContainer¶ Name of the truth xAOD container for MC Pileup Check, set to “None” if not used.
-
bool
m_isAFII¶ Setting for ATLAS Fastsim production samples.
-
bool
m_isDAOD¶ Setting for Derived xAODs, rather than original xAODs.
-
bool
m_useCutFlow¶ Option to output the cutflow histograms.
-
int
m_systTool_nToys¶ Number of toys used by the bootstrapping procedure. Recommendation is 100.
-
std::string
m_binning¶ Comma separated list of bin edges for recoil \(p_{T}\).
-
std::string
m_VjetCalibFile¶ Root file containing intermediate V+jet in-situ calibrations, set to empty if no such calibrations are applied.
-
bool
m_bTag¶ Boolean for performing b-tagging on jets.
-
std::string
m_bTagWPsString¶ Comma separated list of of b-tag working point efficiency percentages.
-
std::string
m_bTagFileName¶ Path to b-tagging CDI file.
-
std::string
m_bTagVar¶ Variable for b-taggign (i.e. MV2c20)
-
bool
m_useDevelopmentFile¶ Propagated option from b-tagging tool.
-
bool
m_useConeFlavourLabel¶ Propagated option from b-tagging tool.
-
bool
m_isMC¶ If input is MC, as automatically determined from xAOD::EventInfo::IS_SIMULATION.
-
std::vector<float>
m_subLeadingPtThreshold¶ Vector of subleading jet \(p_{T}\) selection thresholds, filled automatically from MultijetBalanceAlgo::m_MJBIterationThreshold.
-
std::vector<std::string>
m_bTagWPs¶ Vector of b-tag working point efficiency percentages, filled automatically from MultijetBalanceAlgo::m_bTag.
-
bool
m_useMCPileupCheck¶ Set to true automatically if MultijetBalanceAlgo::m_MCPileupCheckContainer is not “None”.
-
bool
m_iterateBootstrap¶ Set to true for iterations beyond the first, as bootstrap mode propagation is handled differently.
-
std::vector<std::string>
m_triggers¶ Vector of triggers, filled automatically from MultijetBalanceAlgo::m_triggerAndPt.
-
std::vector<float>
m_triggerThresholds¶ Vector of trigger thresholds, filled automatically from MultijetBalanceAlgo::m_triggerAndPt.
-
std::vector<double>
m_bins¶ Vector of bins, filled automatically from MultijetBalanceAlgo::m_binning.
-
bool
m_VjetCalib¶ Whether to use V+jet intermediate calibrations, set to true if MultijetBalanceAlgo::m_VjetCalibFile.size()
-
std::string
m_jetDef¶ Jet definition (e.g. AntiKt4EMTopo). Propagated option for Jet Tools.
-
std::string
m_jetCalibSequence¶ Calibration sequence for JetCalibTools.
-
std::string
m_jetCalibConfig¶ Configuration file for JetCalibTools.
-
std::string
m_jetCleanCutLevel¶ Jet cleaning level (i.e. LooseBad), propagated to JetCleaningTool.
-
bool
m_jetCleanUgly¶ True to clean ugly jets, propagated to JetCleaningTool.
-
float
m_JVTCut¶ JVT cut value to apply.
-
std::string
m_jetUncertaintyConfig¶ Configuration file for JetUncertainties.
-
SystContainer *
systTool¶ SystTool object for Boostrap mode.
-
std::vector<TH1D *>
m_cutflowHist¶ Vector of cutflows, for each systematic variation, showing the integer number of events passing each selection.
-
std::vector<TH1D *>
m_cutflowHistW¶ Vector of weighted cutflows, for each systematic variation, showing the weighted number of events passing each selection.
-
unsigned int
m_cutflowFirst¶ Bin index corresponding to the first new selection.
- Note
- The cutflow histograms are grabbed from previous xAH algorithms and already include entries. The first location of the new MJB entr is stored here.
-
unsigned int
m_iCutflow¶ Automatically updating index of the current selection, used by passCutAll() and passCut()
Private Functions
-
EL::StatusCode
passCutAll()¶ Update every cutflow for this selection.
- Note
- The current selection is determined by the variable m_iCutflow, which automatically updates with each use
-
EL::StatusCode
passCut(int iVar)¶ Update cutflow iVar for this selection.
- Note
- The current selection is determined by the variable m_iCutflow, which automatically updates with each use
- Parameters
iVar-The index of the current systematic variation whose cutflow is to be filled
-
double
DeltaPhi(double phi1, double phi2)¶ Calculate the \(\Delta\phi\) between two objects.
-
double
DeltaR(double eta1, double phi1, double eta2, double phi2)¶ Calculate the \(\Delta R\) between two objects.
-
EL::StatusCode
getLumiWeights(const xAOD::EventInfo *eventInfo)¶ Retrieve event info from the xAOD::EventInfo object and the file TODO.
- Note
- : Fills in values for MultijetBalanceAlgo::m_runNumber, MultijetBalanceAlgo::m_mcChannelNumber, MultijetBalanceAlgo::m_xs, MultijetBalanceAlgo::m_acceptance
-
EL::StatusCode
loadVariations()¶ Load all the systematic variations from MultijetBalanceAlgo::m_sysVariations.
-
EL::StatusCode
loadTriggerTool()¶ Load the trigger tools.
-
EL::StatusCode
loadJVTTool()¶ Load the JVT correction Tool.
-
EL::StatusCode
loadJetCalibrationTool()¶ Load the JetCalibTool.
-
EL::StatusCode
setupJetCalibrationStages()¶ Find and connect the jet calibration stages for MultijetBalanceAlgo::m_JCSTokens and MultijetBalanceAlgo::m_JCSStrings.
-
EL::StatusCode
loadJetCleaningTool()¶ Load the JetCleaningTool.
-
EL::StatusCode
loadJetUncertaintyTool()¶ Load the JetUncertainties.
-
EL::StatusCode
loadVjetCalibration()¶ Load the intermediate V+jet in-situ calibration from MultijetBalanceAlgo::m_VjetCalibFile.
-
EL::StatusCode
loadMJBCalibration()¶ Load the previous MJB calibrations from MultijetBalanceAlgo::m_MJBCorrectionFile.
-
EL::StatusCode
loadBTagTools()¶ Load the b-tagging tools.
-
EL::StatusCode
applyJetCalibrationTool(xAOD::Jet *jet)¶ Apply the JetCalibTool.
-
EL::StatusCode
applyJetCleaningTool()¶ Apply the JetCleaningTool.
-
EL::StatusCode
applyJetUncertaintyTool(xAOD::Jet *jet, int iVar)¶ Apply the JetUncertainties.
-
EL::StatusCode
applyVjetCalibration(xAOD::Jet *jet, int iVar)¶ Apply the intermediate V+jet in-situ calibrations.
-
EL::StatusCode
applyMJBCalibration(xAOD::Jet *jet, int iVar, bool isLead)¶ Apply the MJB calibration from previous iterations.
-
EL::StatusCode
reorderJets(std::vector<xAOD::Jet *> *signalJets)¶ Order the jets in a collection to descend in \(p_{T}\).
Private Members
-
JetCalibrationTool *
m_JetCalibrationTool¶ JetCalibrationTool instance.
-
JetCleaningTool *
m_JetCleaningTool¶ JetCleaningTool instance.
-
JetUncertaintiesTool *
m_JetUncertaintiesTool¶ JetUncertaintiesTool instance.
-
std::vector<BTaggingSelectionTool *>
m_BJetSelectTools¶ Vector of BTaggingSelectionTool instances.
-
std::vector<BTaggingEfficiencyTool *>
m_BJetEffSFTools¶ Vector of BTaggingEfficiencyTool instances.
-
std::vector<TrigConf::xAODConfigTool *>
m_trigConfTools¶ Vector of trigger TrigConf::xAODConfigTool instances.
-
std::vector<Trig::TrigDecisionTool *>
m_trigDecTools¶ Vector of trigger Trig::TrigDecisionTool instances.
-
JetVertexTaggerTool *
m_JVTTool¶ JetVertexTaggerTool instance.
-
ToolHandle<IJetUpdateJvt>
m_JVTToolHandle¶ ToolHandle<IJetUpdateJvt> instance.
-
int
m_pvLocation¶ Location of primary vertex within xAOD::VertexContainer.
-
float
m_mcEventWeight¶ Event weight from the MC generation.
-
float
m_xs¶ AMI cross-section weight, grabbed from file TODO.
-
float
m_acceptance¶ AMI acceptance weight, grabbed from file TODO.
-
int
m_numAMIEvents¶ AMI number of events, grabbed from file TODO.
-
int
m_mcChannelNumber¶ Channel number assigned to the MC sample.
-
int
m_runNumber¶ Run number assigned to the data.
-
std::stringstream
m_ss¶ A stringstream object for various uses.
-
std::vector<std::string>
m_sysVar¶ Vector of each individual systematic variation.
-
std::vector<int>
m_sysTool¶ Integer corresponding to the type of systematic used.
- Note
- Value is -1 for Nominal, 0 for JetUncertainties, 1 for JetCalibSequence, 2 for MJB alpha, 3 for MJB beta, 4 for MJB \(p_{T}\) asymmetry, 5 for MJB \(p_{T}\) threshold, 6 for MJB statistical uncertainty.
-
std::vector<int>
m_sysToolIndex¶ Integer corresponding to the position of a uncertainty in it’s tool.
- Note
- For example, this would be the number assigned to a JES systematic uncertainty in the JetUncertainties tool
-
std::vector<int>
m_sysSign¶ Sign of the systematic uncertainty. 0 for negative, 1 for positive.
-
int
m_NominalIndex¶ Position of the Nominal result within m_sysVar.
-
std::vector<TH1F *>
m_VjetHists¶ V+jet in-situ calibration histograms taken from MultijetBalanceAlgo::m_VjetCalibFile.
-
std::vector<TH1D *>
m_MJBHists¶ MJB in-situ calibration histograms from previous iterations taken from MultijetBalanceAlgo::m_MJBCorrectionFile.
-
std::vector<std::string>
m_JCSTokens¶ Substring name given to each JES calibration stage in MultijetBalanceAlgo::m_jetCalibSequence, used for JetCalibSequence option of MultijetBalanceAlgo::m_sysVariations.
-
std::vector<std::string>
m_JCSStrings¶ Full name of each JES calibration stage (i.e. JetGSCScaleMomentum). Has a direct correspondence with MultijetBalanceAlgo::m_JCSTokens.
-
std::vector<MiniTree *>
m_treeList¶ Vector of MiniTree objects to output, each corresponding to a different systematic.
-
std::vector<MultijetHists *>
m_jetHists¶ Vector of MultijetHists objects to output, each corresponding to a different systematic.
-