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