ATLAS Offline Software
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 823 of file EventSelectionConfig.py.

824  name,
825  electrons=None, muons=None, jets=None,
826  largeRjets=None,
827  photons=None, taus=None, met=None, metTerm=None,
828  btagDecoration=None, preselection=None,
829  selectionCuts=None, noFilter=None,
830  debugMode=None, cutFlowHistograms=None):
831  """Create an event selection config block
832 
833  Keyword arguments:
834  name -- the name defining this selection
835  electrons -- the electron container and selection
836  muons -- the muon container and selection
837  jets -- the jet container and selection
838  largeRjets -- the large-R jet container and selection
839  photons -- the photon container and selection
840  taus -- the tau-jet container and selection
841  met -- the MET container
842  metTerm -- the MET term to use (e.g. 'Final', 'NonInt')
843  btagDecoration -- the b-tagging decoration to use when defining b-jets
844  preselection -- optional event-wise selection flag to start from
845  selectionCuts -- a string listing one selection cut per line
846  noFilter -- whether to disable the event filter
847  debugMode -- enables saving all intermediate decorations
848  cutFlowHistograms -- whether to toggle event cutflow histograms per systematic
849  """
850 
851  config = EventSelectionConfig(name)
852  config.setOptionValue ('electrons', electrons)
853  config.setOptionValue ('muons', muons)
854  config.setOptionValue ('jets', jets)
855  config.setOptionValue ('largeRjets', largeRjets)
856  config.setOptionValue ('photons', photons)
857  config.setOptionValue ('taus', taus)
858  config.setOptionValue ('met', met)
859  config.setOptionValue ('metTerm', metTerm)
860  config.setOptionValue ('btagDecoration', btagDecoration)
861  config.setOptionValue ('preselection', preselection)
862  config.setOptionValue ('selectionCuts', selectionCuts)
863  config.setOptionValue ('noFilter', noFilter)
864  config.setOptionValue ('debugMode', debugMode)
865  seq.append(config)
866 
867  # add event cutflow algorithm
868  if cutFlowHistograms:
869  makeEventCutFlowConfig(seq, 'EventInfo', selectionName='', postfix=name,
870  customSelections=name)
871 

◆ 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 872 of file EventSelectionConfig.py.

873  electrons=None, muons=None, jets=None,
874  largeRjets=None,
875  photons=None, taus=None, met=None, metTerm=None,
876  btagDecoration=None, preselection=None,
877  selectionCutsDict=None, noFilter=None,
878  debugMode=None, cutFlowHistograms=None):
879  """Create multiple event selection config blocks
880 
881  Keyword arguments:
882  electrons -- the electron container and selection
883  muons -- the muon container and selection
884  jets -- the jet container and selection
885  largeRjets -- the large-R jet container and selection
886  photons -- the photon container and selection
887  taus -- the tau-jet container and selection
888  met -- the MET container
889  metTerm -- the MET term to use (e.g. 'Final', 'NonInt')
890  btagDecoration -- the b-tagging decoration to use when defining b-jets
891  preselection -- optional event-wise selection flag to start from
892  selectionCutsDict -- a dictionary with key the name of the selection and value a string listing one selection cut per line
893  noFilter -- whether to disable the event filter
894  debugMode -- enables saving all intermediate decorations
895  cutFlowHistograms -- whether to toggle event cutflow histograms per region and per systematic
896  """
897 
898  # handle the case where a user is only providing one selection
899  if len(list(selectionCutsDict.keys())) == 1:
900  name, selectionCuts = list(selectionCutsDict.items())[0]
901  makeEventSelectionConfig(seq, name, electrons, muons, jets, largeRjets, photons, taus, met, metTerm, btagDecoration, preselection, selectionCuts, noFilter=noFilter, debugMode=debugMode, cutFlowHistograms=cutFlowHistograms)
902  return
903 
904  # first, we generate all the individual event selections
905  # !!! it's important to pass noFilter=True, to avoid applying the individual filters in series
906  for name, selectionCuts in selectionCutsDict.items():
907  makeEventSelectionConfig(seq, name, electrons, muons, jets, largeRjets, photons, taus, met, metTerm, btagDecoration, preselection, selectionCuts, noFilter=True, debugMode=debugMode, cutFlowHistograms=cutFlowHistograms)
908 
909  # now we are ready to collect all the filters and apply their logical OR
910  # !!! subregions (name starts with "SUB") are not used in the final filtering
911  config = EventSelectionMergerConfig()
912  config.setOptionValue ('selections', [f'pass_{name}_%SYS%' for name in selectionCutsDict.keys() if not name.startswith("SUB")])
913  config.setOptionValue ('noFilter', noFilter)
914  seq.append(config)
python.AsgAnalysisConfig.makeEventCutFlowConfig
def makeEventCutFlowConfig(seq, containerName, *postfix=None, selectionName, customSelections=None)
Definition: AsgAnalysisConfig.py:669
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:872
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:823