940 debugMode=None, cutFlowHistograms=None):
941 """Create an event selection config block
942
943 Keyword arguments:
944 name -- the name defining this selection
945 electrons -- the electron container and selection
946 muons -- the muon container and selection
947 jets -- the jet container and selection
948 largeRjets -- the large-R jet container and selection
949 photons -- the photon container and selection
950 taus -- the tau-jet container and selection
951 met -- the MET container
952 metTerm -- the MET term to use (e.g. 'Final', 'NonInt')
953 btagDecoration -- the b-tagging decoration to use when defining b-jets
954 preselection -- optional event-wise selection flag to start from
955 selectionCuts -- a string listing one selection cut per line
956 noFilter -- whether to disable the event filter
957 debugMode -- enables saving all intermediate decorations
958 cutFlowHistograms -- whether to toggle event cutflow histograms per systematic
959 """
960
961 config = EventSelectionConfig()
962 config.setOptionValue ('name', name)
963 config.setOptionValue ('electrons', electrons)
964 config.setOptionValue ('muons', muons)
965 config.setOptionValue ('jets', jets)
966 config.setOptionValue ('largeRjets', largeRjets)
967 config.setOptionValue ('photons', photons)
968 config.setOptionValue ('taus', taus)
969 config.setOptionValue ('met', met)
970 config.setOptionValue ('metTerm', metTerm)
971 config.setOptionValue ('btagDecoration', btagDecoration)
972 config.setOptionValue ('preselection', preselection)
973 config.setOptionValue ('selectionCuts', selectionCuts)
974 config.setOptionValue ('noFilter', noFilter)
975 config.setOptionValue ('debugMode', debugMode)
976 seq.append(config)
977
978
979 if cutFlowHistograms:
980 makeEventCutFlowConfig(seq, 'EventInfo', selectionName='', postfix=name,
981 customSelections=name)
982