Event

class BasicEventSelection : public xAH::Algorithm

This algorithm performs the very basic event selection. This should be the first algo in the algo chain. It can create weighted and unweighted cutflow objects to be picked up downstream by other xAH algos, and your own. The selection applied in data only is:

  • GRL (can be turned off)

  • LAr Error

  • Tile Error

  • Core Flag

Note

For MC only, the pileup reweight can also be applied.

In both data and simulation (MC), the following cuts are applied

For derivations, the metadata can be accessed and added to the cutflow for normalization. The parameters to control the trigger are described in this header file. If one wants to write out some of the trigger information into a tree using HelpTreeBase, flags must be set here.

Public Functions

BasicEventSelection()
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()

Public Members

bool m_truthLevelOnly = false

Protection when running on truth xAOD.

bool m_setAFII = false

SimulationFlavour will be determined from the sample MetaData, unless AFII or FS is explicitely requested with the following flags.

bool m_setFS = false
bool m_applyGRLCut = false

Apply GRL selection.

std::string m_GRLxml = ""

Path to GRL XML file.

std::string m_GRLExcludeList = ""

Run numbers to skip in GRL.

bool m_cleanPowheg = false

Clean Powheg huge weight.

bool m_reweightSherpa22 = false

Reweight Sherpa 2.2 Samples.

bool m_doPUreweighting = false

Reweight pile-up profile \(\mu\)

bool m_doPUreweightingSys = false
std::string m_lumiCalcFileNames = ""

Comma separated list of filenames.

std::string m_PRWFileNames = ""

Comma separated list of filenames.

bool m_autoconfigPRW = false

Automatically configure PRW using config files from SUSYTools instead of using m_PRWFileNames.

std::string m_prwActualMu2016File = ""

actualMu configuration file for the MC16a campaign (2015/2016). Added to the PRW tool when using PRW autoconfiguration.

std::string m_prwActualMu2017File = ""

actualMu configuration file for the MC16d campaign (2017). Added to the PRW tool when using PRW autoconfiguration.

std::string m_prwActualMu2018File = ""

actualMu configuration file for the MC16e campaign (2018). Added to the PRW tool when using PRW autoconfiguration.

std::string m_mcCampaign

mc16(acd) to bypass the automatic campaign determination from AMI, several campaigns can be separated by a comma. Only used when m_autoconfigPRW is true

std::string m_periodConfig = "auto"

Use Period Configuration or auto.

int m_actualMuMin = -1

The minimum threshold for EventInfo::actualInteractionsPerCrossing()

int m_actualMuMax = -1

The maximum threshold for EventInfo::actualInteractionsPerCrossing()

bool m_calcBCIDInfo = false

Calculate distance to nearest empty and unpaired BCIDs.

bool m_applyPrimaryVertexCut = false

Enable to apply a primary vertex cut.

int m_PVNTrack = 2

Minimum number of tracks from the primary vertex (Harmonized Cut)

bool m_applyEventCleaningCut = false
bool m_applyCoreFlagsCut = false
bool m_applyJetCleaningEventFlag = false

recommended way to clean all jets, but especially collections other than EMTopo … equivalent to “loose” jet-by-jet cleaning!

bool m_applyIsBadBatmanFlag = false

should only ever be used in 2015 and 2016 data, for analyses which may be of interest for analyses where fake MET can be an issue

bool m_printBranchList = false
std::string m_triggerSelection = ""

RegEx expression to choose triggers to consider to be cut on with m_applyTriggerCut

std::string m_extraTriggerSelection = ""

Decisions of triggers which are saved but not cut on.

bool m_applyTriggerCut = false

Skip events in which the trigger string m_triggerSelection does not fire

bool m_storeTrigDecisions = false

Save string of fired triggers matching m_triggerSelection

bool m_storePassL1 = false

Save if any L1 trigger fired, e.g. "L1_.*"

bool m_storePassHLT = false

Save if any HLT trigger fired, e.g. "HLT_.*"

bool m_storeTrigKeys = false

Save master, L1, and HLT key.

bool m_storePrescaleWeight = true

Save the trigger prescale weight.

std::string m_derivationName = ""

The name of the derivation (use this as an override)

bool m_useMetaData = true

Retrieve and save information on DAOD selection.

std::string m_metaDataStreamName = "metadata"
std::string m_cutFlowStreamName = "cutflow"
std::string m_duplicatesStreamName = "duplicates_tree"
bool m_checkDuplicatesData = false

Check for duplicated events in data

bool m_checkDuplicatesMC = false

Check for duplicated events in MC

Private Functions

StatusCode autoconfigurePileupRWTool()

Automatically add the required PRW config file for the DSID being processed to the PRW tool.

helper functions

The PRW config files stored by SUSYTools are added to the m_pileup_tool_handle. If the m_mcCampaign is not set, the campaign is determined automatically. If it is set, then all of the campaings listed in the setting are added.

Private Members

std::set<std::pair<uint32_t, uint32_t>> m_RunNr_VS_EvtNr
std::vector<std::string> m_triggerUnprescaleList
std::vector<std::string> m_extraTriggerSelectionList
asg::AnaToolHandle<IGoodRunsListSelectionTool> m_grl_handle = {"GoodRunsListSelectionTool", }
asg::AnaToolHandle<CP::IPileupReweightingTool> m_pileup_tool_handle = {"CP::PileupReweightingTool/Pileup"}
asg::AnaToolHandle<TrigConf::ITrigConfigTool> m_trigConfTool_handle = {"TrigConf::xAODConfigTool/xAODConfigTool", }
asg::AnaToolHandle<Trig::TrigDecisionTool> m_trigDecTool_handle = {"Trig::TrigDecisionTool/TrigDecisionTool"}
asg::AnaToolHandle<IWeightTool> m_reweightSherpa22_tool_handle = {"PMGTools::PMGSherpa22VJetsWeightTool/PMGSherpa22VJetsWeightTool", }
int m_eventCounter
TH1D *m_histSumW = nullptr
TH1D *m_histEventCount = nullptr
uint64_t m_MD_initialNevents
uint64_t m_MD_finalNevents
double m_MD_initialSumW
double m_MD_finalSumW
double m_MD_initialSumWSquared
double m_MD_finalSumWSquared
std::string m_mcCampaignMD
TH1D *m_cutflowHist = nullptr
TH1D *m_cutflowHistW = nullptr
int m_cutflow_all
int m_cutflow_init
int m_cutflow_duplicates
int m_cutflow_grl
int m_cutflow_lar
int m_cutflow_tile
int m_cutflow_SCT
int m_cutflow_core
int m_cutflow_jetcleaning
int m_cutflow_isbadbatman
int m_cutflow_npv
int m_cutflow_trigger
TH1D *m_el_cutflowHist_1 = nullptr
TH1D *m_el_cutflowHist_2 = nullptr
TH1D *m_mu_cutflowHist_1 = nullptr
TH1D *m_mu_cutflowHist_2 = nullptr
TH1D *m_ph_cutflowHist_1 = nullptr
TH1D *m_tau_cutflowHist_1 = nullptr
TH1D *m_tau_cutflowHist_2 = nullptr
TH1D *m_jet_cutflowHist_1 = nullptr
TH1D *m_trk_cutflowHist_1 = nullptr
TH1D *m_truth_cutflowHist_1 = nullptr
TTree *m_duplicatesTree = nullptr

TTree for duplicates bookeeping

int m_duplRunNumber
long int m_duplEventNumber