Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Classes | Functions
python.EventSelectionConfig Namespace Reference

Classes

class  EventSelectionConfig
 
class  EventSelectionMergerConfig
 

Functions

def makeEventSelectionConfig (seq, name, electrons=None, muons=None, jets=None, largeRjets=None, photons=None, taus=None, met=None, metTerm=None, btagDecoration=None, preselection=None, selectionCuts=None, noFilter=None, debugMode=None, cutFlowHistograms=None)
 
def makeMultipleEventSelectionConfigs (seq, electrons=None, muons=None, jets=None, largeRjets=None, photons=None, taus=None, met=None, metTerm=None, btagDecoration=None, preselection=None, selectionCutsDict=None, noFilter=None, debugMode=None, cutFlowHistograms=None)
 

Function Documentation

◆ makeEventSelectionConfig()

def python.EventSelectionConfig.makeEventSelectionConfig (   seq,
  name,
  electrons = None,
  muons = None,
  jets = None,
  largeRjets = None,
  photons = None,
  taus = None,
  met = None,
  metTerm = None,
  btagDecoration = None,
  preselection = None,
  selectionCuts = None,
  noFilter = None,
  debugMode = None,
  cutFlowHistograms = None 
)
Create an event selection config block

Keyword arguments:
    name -- the name defining this selection
    electrons -- the electron container and selection
    muons -- the muon container and selection
    jets -- the jet container and selection
    largeRjets -- the large-R jet container and selection
    photons -- the photon container and selection
    taus -- the tau-jet container and selection
    met -- the MET container
    metTerm -- the MET term to use (e.g. 'Final', 'NonInt')
    btagDecoration -- the b-tagging decoration to use when defining b-jets
    preselection -- optional event-wise selection flag to start from
    selectionCuts -- a string listing one selection cut per line
    noFilter -- whether to disable the event filter
    debugMode -- enables saving all intermediate decorations
    cutFlowHistograms -- whether to toggle event cutflow histograms per systematic

Definition at line 913 of file EventSelectionConfig.py.

914  name,
915  electrons=None, muons=None, jets=None,
916  largeRjets=None,
917  photons=None, taus=None, met=None, metTerm=None,
918  btagDecoration=None, preselection=None,
919  selectionCuts=None, noFilter=None,
920  debugMode=None, cutFlowHistograms=None):
921  """Create an event selection config block
922 
923  Keyword arguments:
924  name -- the name defining this selection
925  electrons -- the electron container and selection
926  muons -- the muon container and selection
927  jets -- the jet container and selection
928  largeRjets -- the large-R jet container and selection
929  photons -- the photon container and selection
930  taus -- the tau-jet container and selection
931  met -- the MET container
932  metTerm -- the MET term to use (e.g. 'Final', 'NonInt')
933  btagDecoration -- the b-tagging decoration to use when defining b-jets
934  preselection -- optional event-wise selection flag to start from
935  selectionCuts -- a string listing one selection cut per line
936  noFilter -- whether to disable the event filter
937  debugMode -- enables saving all intermediate decorations
938  cutFlowHistograms -- whether to toggle event cutflow histograms per systematic
939  """
940 
941  config = EventSelectionConfig(name)
942  config.setOptionValue ('electrons', electrons)
943  config.setOptionValue ('muons', muons)
944  config.setOptionValue ('jets', jets)
945  config.setOptionValue ('largeRjets', largeRjets)
946  config.setOptionValue ('photons', photons)
947  config.setOptionValue ('taus', taus)
948  config.setOptionValue ('met', met)
949  config.setOptionValue ('metTerm', metTerm)
950  config.setOptionValue ('btagDecoration', btagDecoration)
951  config.setOptionValue ('preselection', preselection)
952  config.setOptionValue ('selectionCuts', selectionCuts)
953  config.setOptionValue ('noFilter', noFilter)
954  config.setOptionValue ('debugMode', debugMode)
955  seq.append(config)
956 
957  # add event cutflow algorithm
958  if cutFlowHistograms:
959  makeEventCutFlowConfig(seq, 'EventInfo', selectionName='', postfix=name,
960  customSelections=name)
961 

◆ makeMultipleEventSelectionConfigs()

def python.EventSelectionConfig.makeMultipleEventSelectionConfigs (   seq,
  electrons = None,
  muons = None,
  jets = None,
  largeRjets = None,
  photons = None,
  taus = None,
  met = None,
  metTerm = None,
  btagDecoration = None,
  preselection = None,
  selectionCutsDict = None,
  noFilter = None,
  debugMode = None,
  cutFlowHistograms = None 
)
Create multiple event selection config blocks

   Keyword arguments:
    electrons -- the electron container and selection
    muons -- the muon container and selection
    jets -- the jet container and selection
    largeRjets -- the large-R jet container and selection
    photons -- the photon container and selection
    taus -- the tau-jet container and selection
    met -- the MET container
    metTerm -- the MET term to use (e.g. 'Final', 'NonInt')
    btagDecoration -- the b-tagging decoration to use when defining b-jets
    preselection -- optional event-wise selection flag to start from
    selectionCutsDict -- a dictionary with key the name of the selection and value a string listing one selection cut per line
    noFilter -- whether to disable the event filter
    debugMode -- enables saving all intermediate decorations
    cutFlowHistograms -- whether to toggle event cutflow histograms per region and per systematic

Definition at line 962 of file EventSelectionConfig.py.

963  electrons=None, muons=None, jets=None,
964  largeRjets=None,
965  photons=None, taus=None, met=None, metTerm=None,
966  btagDecoration=None, preselection=None,
967  selectionCutsDict=None, noFilter=None,
968  debugMode=None, cutFlowHistograms=None):
969  """Create multiple event selection config blocks
970 
971  Keyword arguments:
972  electrons -- the electron container and selection
973  muons -- the muon container and selection
974  jets -- the jet container and selection
975  largeRjets -- the large-R jet container and selection
976  photons -- the photon container and selection
977  taus -- the tau-jet container and selection
978  met -- the MET container
979  metTerm -- the MET term to use (e.g. 'Final', 'NonInt')
980  btagDecoration -- the b-tagging decoration to use when defining b-jets
981  preselection -- optional event-wise selection flag to start from
982  selectionCutsDict -- a dictionary with key the name of the selection and value a string listing one selection cut per line
983  noFilter -- whether to disable the event filter
984  debugMode -- enables saving all intermediate decorations
985  cutFlowHistograms -- whether to toggle event cutflow histograms per region and per systematic
986  """
987 
988  # handle the case where a user is only providing one selection
989  if len(list(selectionCutsDict.keys())) == 1:
990  name, selectionCuts = list(selectionCutsDict.items())[0]
991  makeEventSelectionConfig(seq, name, electrons, muons, jets, largeRjets, photons, taus, met, metTerm, btagDecoration, preselection, selectionCuts, noFilter=noFilter, debugMode=debugMode, cutFlowHistograms=cutFlowHistograms)
992  return
993 
994  # first, we generate all the individual event selections
995  # !!! it's important to pass noFilter=True, to avoid applying the individual filters in series
996  for name, selectionCuts in selectionCutsDict.items():
997  makeEventSelectionConfig(seq, name, electrons, muons, jets, largeRjets, photons, taus, met, metTerm, btagDecoration, preselection, selectionCuts, noFilter=True, debugMode=debugMode, cutFlowHistograms=cutFlowHistograms)
998 
999  # now we are ready to collect all the filters and apply their logical OR
1000  # !!! subregions (name starts with "SUB") are not used in the final filtering
1001  config = EventSelectionMergerConfig()
1002  config.setOptionValue ('selections', [f'pass_{name}_%SYS%' for name in selectionCutsDict.keys() if not name.startswith("SUB")])
1003  config.setOptionValue ('noFilter', noFilter)
1004  seq.append(config)
python.AsgAnalysisConfig.makeEventCutFlowConfig
def makeEventCutFlowConfig(seq, containerName, *postfix=None, selectionName, customSelections=None)
Definition: AsgAnalysisConfig.py:659
python.EventSelectionConfig.makeMultipleEventSelectionConfigs
def makeMultipleEventSelectionConfigs(seq, electrons=None, muons=None, jets=None, largeRjets=None, photons=None, taus=None, met=None, metTerm=None, btagDecoration=None, preselection=None, selectionCutsDict=None, noFilter=None, debugMode=None, cutFlowHistograms=None)
Definition: EventSelectionConfig.py:962
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
python.EventSelectionConfig.makeEventSelectionConfig
def makeEventSelectionConfig(seq, name, electrons=None, muons=None, jets=None, largeRjets=None, photons=None, taus=None, met=None, metTerm=None, btagDecoration=None, preselection=None, selectionCuts=None, noFilter=None, debugMode=None, cutFlowHistograms=None)
Definition: EventSelectionConfig.py:913