3from AnalysisAlgorithmsConfig.ConfigBlock
import ConfigBlock
4from AsgAnalysisAlgorithms.AsgAnalysisConfig
import makeEventCutFlowConfig
5from AnalysisAlgorithmsConfig.ConfigAccumulator
import DataType
9 """ConfigBlock for merging the output of various selection streams"""
12 super(EventSelectionMergerConfig, self).
__init__()
13 self.setBlockName(
'EventSelectionMerger')
14 self.addOption(
'selections', [], type=list,
15 info=
"the selection decisions to unify into a "
16 "final decision (internally: `selection_1 || selection_2 || ...`). ")
17 self.addOption(
'noFilter',
False, type=bool,
18 info=
"do not apply an event filter, i.e. setting it to `False` "
19 "removes events not passing the full list of selection cuts.")
22 """Return the instance name for this block"""
28 raise ValueError(
'EventSelectionMerger requires a non-empty list of selection strings to be '
29 'passed as `selections`!')
30 alg = config.createAlgorithm(
'CP::SaveFilterAlg',
'EventSelectionMerger' + self.
selections[0].
split(
"_%SYS%")[0])
31 alg.FilterDescription =
'events passing at least one EventSelection algorithm'
32 alg.eventDecisionOutputDecoration =
'ignore_anySelection_%SYS%'
33 alg.selection =
'||'.join([sel+
',as_char' for sel
in self.
selections if sel])
34 alg.noFilter = self.noFilter
35 alg.selectionName =
'pass_anySelection_%SYS%'
36 alg.decorationName =
'ntuplepass_anySelection_%SYS%'
39 """ConfigBlock for interpreting text-based event selections"""
42 super(EventSelectionConfig, self).
__init__()
43 self.setBlockName(
'EventSelection')
44 self.addOption(
'name',
'', type=str,
46 info=
"the name of the event selection, used to uniquely identify "
47 "the `EventSelectionConfig` block.")
48 self.addOption(
'electrons',
"", type=str,
49 info=
"the input electron container, with a possible selection, in "
50 "the format `container` or `container.selection`.")
51 self.addOption(
'muons',
"", type=str,
52 info=
"the input muon container, with a possible selection, in the "
53 "format `container` or `container.selection`.")
54 self.addOption(
'jets',
"", type=str,
55 info=
"the input jet container, with a possible selection, in the "
56 "format `container` or `container.selection`.")
57 self.addOption(
'largeRjets',
"", type=str,
58 info=
"the large-R jet container, with a possible selection, in "
59 "the format `container` or `container.selection`.")
60 self.addOption(
'photons',
"", type=str,
61 info=
"the input photon container, with a possible selection, in "
62 "the format `container` or `container.selection`.")
63 self.addOption(
'taus',
"", type=str,
64 info=
"the input tau-jet container, with a possible selection, in "
65 "the format `container` or `container.selection`.")
66 self.addOption(
'met',
"", type=str,
67 info=
"the input MET container.")
68 self.addOption(
'metTerm',
"Final", type=str,
69 info=
"the MET term to use when computing MET-based quantities.")
70 self.addOption(
'btagDecoration',
"", type=str,
71 info=
"the b-tagging decoration to use when defining b-jets.")
72 self.addOption(
'preselection',
"", type=str,
73 info=
"the event-wise selection flag to start this event selection "
75 self.addOption(
'selectionCuts',
"", type=str,
77 info=
"a single string listing one selection cut per line. "
78 "See [available keywords](https://topcptoolkit.docs.cern.ch/latest/settings/eventselection/#available-keywords).")
79 self.addOption(
'noFilter',
False, type=bool,
80 info=
"do not apply an event filter, i.e. setting it to `False` "
81 "removes events not passing the full list of selection cuts.")
82 self.addOption(
'debugMode',
False, type=bool,
83 info=
"whether to create an output branch for every single line "
84 "of the selection cuts. Setting it to `False` only saves the"
86 self.addOption(
'useDressedProperties',
True, type=bool,
87 info=
"whether to use dressed truth electron and truth muon "
88 "kinematics rather than simple 4-vector kinematics.")
94 """Return the instance name for this block"""
105 if self.selectionCuts
is None:
106 raise ValueError (
"[EventSelectionConfig] You must provide the 'selectionCuts' option to 'EventSelectionConfig': "
107 "a single string where each line represents a different selection cut to apply in order.")
108 for line
in self.selectionCuts.
split(
"\n"):
116 if text.startswith(
"#"):
119 if "EL_N" in text.split():
121 elif "MU_N" in text.split():
123 elif "SUM_EL_N_MU_N" in text.split():
125 elif "SUM_EL_N_MU_N_TAU_N" in text.split():
127 elif "JET_N_GHOST" in text.split():
129 elif "JET_N" in text.split():
131 elif "JET_N_BTAG" in text.split():
133 elif "PH_N" in text.split():
135 elif "TAU_N" in text.split():
137 elif "LJET_N_GHOST" in text.split():
139 elif "LJET_N" in text.split():
141 elif "OBJ_N" in text.split():
143 elif "MET" in text.split():
145 elif "MWT" in text.split():
147 elif "MET+MWT" in text.split():
149 elif "MLL" in text.split():
151 elif "MLLWINDOW" in text.split():
153 elif "OS" in text.split():
155 elif "SS" in text.split():
157 elif "MLL_OSSF" in text.split():
159 elif "LJETMASS_N" in text.split():
161 elif "LJETMASSWINDOW_N" in text.split():
163 elif "SAVE" in text.split():
165 elif "IMPORT" in text.split():
167 elif "EVENTFLAG" in text.split():
169 elif "GLOBALTRIGMATCH" in text.split():
171 elif "RUN_NUMBER" in text.split():
174 raise ValueError (f
"[EventSelectionConfig] The following selection cut is not recognised! --> {text}")
177 raise ValueError (f
"[EventSelectionConfig] Misconfiguration! Check {keyword} in: {text}")
180 raise ValueError (f
"[EventSelectionConfig] Misconfiguration! Missing input collection for {collection}")
185 if not requirePositive
or value >= 0:
188 raise ValueError (f
"[EventSelectionConfig] Misconfiguration! Float {test} is not positive!")
190 raise ValueError (f
"[EventSelectionConfig] Misconfiguration! {test} should be a float, not {type(test)}!")
195 if value == float(test):
196 if not requirePositive
or value >= 0:
199 raise ValueError (f
"[EventSelectionConfig] Misconfiguration! Int {test} us not positive!")
201 raise ValueError (f
"[EventSelectionConfig] Misconfiguration! {test} should be an int, not a float!")
203 raise ValueError (f
"[EventSelectionConfig] Misconfiguration! {test} should be an int, not {type(test)}")
206 if not isinstance(test, str):
207 raise ValueError (f
"[EventSelectionConfig] Misconfiguration! {test} should be a string, not a number!")
222 raise KeyError (f
"[EventSelectionConfig] Misconfiguration! {test} should be one of {list(mapping.keys())}")
225 test = test.split(
":")
227 raise ValueError (f
"[EventSelectionConfig] Misconfiguration! {test} should be provided as 'btagger:btagWP'")
233 values = test.split(
"!")
235 "B":
"GhostBHadronsFinalCount",
236 "C":
"GhostCHadronsFinalCount",
237 "T":
"GhostTQuarksFinalCount",
238 "W":
"GhostWBosonsCount",
239 "Z":
"GhostZBosonsCount",
240 "H":
"GhostHBosonsCount",
241 "TAU":
"GhostTausFinalCount"
243 return [ghost_map.get(value.upper(), value)
for value
in values]
249 self.
cutflow.append( decoration )
250 if algorithm
is not None:
251 algorithm.decorationName = f
'{decoration},as_char'
254 config.addOutputVar(
'EventInfo', decoration, decoration.split(
"_%SYS%")[0])
260 config.addSelection(
'EventInfo',
'', decoration)
266 decoration = decoration.split(
"&&")
267 decoration = [sub +
',as_char' if ',as_char' not in sub
else sub
for sub
in decoration]
268 return '&&'.join(decoration)
272 return oldSelection +
"&&" + config.getFullSelection(container, newSelection)
274 return config.getFullSelection(container, newSelection)
279 if items[0] !=
"IMPORT":
287 self.
currentDecoration = f
'{self.currentDecoration},as_char&&pass_{region}_%SYS%'
289 imported_cuts = [cut
for cut
in config.getSelectionCutFlow(
'EventInfo',
'')
if cut.startswith(region)]
295 if items[0] !=
"EL_N":
297 if len(items) != 4
and len(items) != 5:
301 thisalg = f
'{self.name}_NEL_{self.step}'
302 alg = config.createAlgorithm(
'CP::NObjectPtSelectorAlg', thisalg)
303 alg.particles, alg.objectSelection = config.readNameAndSelection(self.
electrons)
305 alg.useDressedProperties = self.useDressedProperties
311 elif len(items) == 5:
322 if items[0] !=
"MU_N":
324 if len(items) != 4
and len(items) != 5:
328 thisalg = f
'{self.name}_NMU_{self.step}'
329 alg = config.createAlgorithm(
'CP::NObjectPtSelectorAlg', thisalg)
330 alg.particles, alg.objectSelection = config.readNameAndSelection(self.
muons)
331 if "Truth" in self.
muons:
332 alg.useDressedProperties = self.useDressedProperties
338 elif len(items) == 5:
349 if items[0] !=
"SUM_EL_N_MU_N":
351 if len(items) != 4
and len(items) != 5
and len(items) != 7:
355 thisalg = f
'{self.name}_SUMNELNMU_{self.step}'
356 alg = config.createAlgorithm(
'CP::SumNLeptonPtSelectorAlg', thisalg)
357 alg.electrons, alg.electronSelection = config.readNameAndSelection(self.
electrons)
358 alg.muons, alg.muonSelection = config.readNameAndSelection(self.
muons)
360 alg.useDressedProperties = self.useDressedProperties
367 elif len(items) == 5:
372 elif len(items) == 7:
386 if items[0] !=
"SUM_EL_N_MU_N_TAU_N":
388 if len(items) != 4
and len(items) != 6
and len(items) != 9:
392 thisalg = f
'{self.name}_SUMNLEPTONS_{self.step}'
393 alg = config.createAlgorithm(
'CP::SumNLeptonPtSelectorAlg', thisalg)
394 alg.electrons, alg.electronSelection = config.readNameAndSelection(self.
electrons)
395 alg.muons, alg.muonSelection = config.readNameAndSelection(self.
muons)
396 alg.taus, alg.tauSelection = config.readNameAndSelection(self.
taus)
398 alg.useDressedProperties = self.useDressedProperties
406 elif len(items) == 6:
412 elif len(items) == 9:
429 if items[0] !=
"JET_N":
431 if len(items) != 4
and len(items) != 5:
435 thisalg = f
'{self.name}_NJET_{self.step}'
436 alg = config.createAlgorithm(
'CP::NObjectPtSelectorAlg', thisalg)
437 alg.particles, alg.objectSelection = config.readNameAndSelection(self.
jets)
443 elif len(items) == 5:
454 if items[0] !=
"JET_N_BTAG":
456 if len(items) != 3
and len(items) != 4
and len(items) != 5:
460 thisalg = f
'{self.name}_NBJET_{self.step}'
461 alg = config.createAlgorithm(
'CP::NObjectPtSelectorAlg', thisalg)
462 particles, selection = config.readNameAndSelection(self.
jets)
463 alg.particles = particles
464 alg.objectSelection = f
'{selection}&&{self.btagDecoration},as_char' if selection
else f
'{self.btagDecoration},as_char'
469 elif len(items) == 4:
472 customBtag = f
'ftag_select_{btagger}_{btagWP}'
473 alg.objectSelection = f
'{selection}&&{customBtag},as_char' if selection
else f
'{customBtag},as_char'
479 elif len(items) == 5:
482 customBtag = f
'ftag_select_{btagger}_{btagWP}'
483 alg.objectSelection = f
'{selection}&&{customBtag},as_char' if selection
else f
'{customBtag},as_char'
492 if items[0] !=
"PH_N":
494 if len(items) != 4
and len(items) != 5:
498 thisalg = f
'{self.name}_NPH_{self.step}'
499 alg = config.createAlgorithm(
'CP::NObjectPtSelectorAlg', thisalg)
500 alg.particles, alg.objectSelection = config.readNameAndSelection(self.
photons)
506 elif len(items) == 5:
517 if items[0] !=
"TAU_N":
519 if len(items) != 4
and len(items) != 5:
523 thisalg = f
'{self.name}_NTAU_{self.step}'
524 alg = config.createAlgorithm(
'CP::NObjectPtSelectorAlg', thisalg)
525 alg.particles, alg.objectSelection = config.readNameAndSelection(self.
taus)
531 elif len(items) == 5:
542 if items[0] !=
"LJET_N":
544 if len(items) != 4
and len(items) != 5:
546 thisalg = f
'{self.name}_NLJET_{self.step}'
547 alg = config.createAlgorithm(
'CP::NObjectPtSelectorAlg', thisalg)
548 alg.particles, alg.objectSelection = config.readNameAndSelection(self.largeRjets)
554 elif len(items) == 5:
565 if items[0] !=
"LJETMASS_N":
567 if len(items) != 4
and len(items) != 5:
569 thisalg = f
'{self.name}_NLJETMASS_{self.step}'
570 alg = config.createAlgorithm(
'CP::NObjectMassSelectorAlg', thisalg)
571 alg.particles, alg.objectSelection = config.readNameAndSelection(self.largeRjets)
577 elif len(items) == 5:
588 if items[0] !=
"LJETMASSWINDOW_N":
590 if len(items) != 5
and len(items) != 6
and len(items) != 7:
592 thisalg = f
'{self.name}_NLJETMASSWINDOW_{self.step}'
593 alg = config.createAlgorithm(
'CP::NLargeRJetMassWindowSelectorAlg', thisalg)
594 alg.ljets, alg.ljetSelection = config.readNameAndSelection(self.largeRjets)
595 vetoMode = items[-1] ==
'veto' or items[-1] ==
'VETO'
596 if len(items) == 5
or (len(items) == 6
and vetoMode):
601 alg.vetoMode = vetoMode
602 elif (len(items) == 6
and not vetoMode)
or len(items) == 7:
609 alg.vetoMode = vetoMode
616 if items[0] !=
"JET_N_GHOST":
618 if len(items) != 4
and len(items) != 5:
620 thisalg = f
'{self.name}_NJETGHOST_{self.step}'
621 alg = config.createAlgorithm(
'CP::JetNGhostSelectorAlg', thisalg)
622 alg.jets, alg.jetSelection = config.readNameAndSelection(self.
jets)
624 alg.ghost = ghosts[0]
630 elif len(items) == 5:
640 if items[0] !=
"LJET_N_GHOST":
642 if len(items) != 4
and len(items) != 5:
644 thisalg = f
'{self.name}_NLJETGHOST_{self.step}'
645 alg = config.createAlgorithm(
'CP::JetNGhostSelectorAlg', thisalg)
646 alg.jets, alg.jetSelection = config.readNameAndSelection(self.largeRjets)
648 alg.ghost = ghosts[0]
654 elif len(items) == 5:
664 if items[0] !=
"OBJ_N":
668 thisalg = f
'{self.name}_NOBJ_{self.step}'
669 alg = config.createAlgorithm(
'CP::NObjectPtSelectorAlg', thisalg)
670 alg.particles, alg.objectSelection = config.readNameAndSelection(self.
check_string(items[1]))
680 if items[0] !=
"MET":
686 thisalg = f
'{self.name}_MET_{self.step}'
687 alg = config.createAlgorithm(
'CP::MissingETSelectorAlg', thisalg)
688 alg.met = config.readName(self.
met)
689 alg.metTerm = self.metTerm
698 if items[0] !=
"MWT":
704 thisalg = f
'{self.name}_MWT_{self.step}'
705 alg = config.createAlgorithm(
'CP::TransverseMassSelectorAlg', thisalg)
706 alg.met = config.readName(self.
met)
707 alg.metTerm = self.metTerm
708 alg.electrons, alg.electronSelection = config.readNameAndSelection(self.
electrons)
709 alg.muons, alg.muonSelection = config.readNameAndSelection(self.
muons)
711 alg.useDressedProperties = self.useDressedProperties
720 if items[0] !=
"MET+MWT":
728 thisalg = f
'{self.name}_METMWT_{self.step}'
729 alg = config.createAlgorithm(
'CP::MissingETPlusTransverseMassSelectorAlg', thisalg)
730 alg.met = config.readName(self.
met)
731 alg.metTerm = self.metTerm
732 alg.electrons, alg.electronSelection = config.readNameAndSelection(self.
electrons)
733 alg.muons, alg.muonSelection = config.readNameAndSelection(self.
muons)
735 alg.useDressedProperties = self.useDressedProperties
744 if items[0] !=
"MLL":
750 thisalg = f
'{self.name}_MLL_{self.step}'
751 alg = config.createAlgorithm(
'CP::DileptonInvariantMassSelectorAlg', thisalg)
753 alg.electrons, alg.electronSelection = config.readNameAndSelection(self.
electrons)
755 alg.muons, alg.muonSelection = config.readNameAndSelection(self.
muons)
757 alg.useDressedProperties = self.useDressedProperties
766 if items[0] !=
"MLLWINDOW":
768 if len(items) != 3
and len(items) != 4:
772 thisalg = f
'{self.name}_MLLWINDOW_{self.step}'
773 alg = config.createAlgorithm(
'CP::DileptonInvariantMassWindowSelectorAlg', thisalg)
775 alg.electrons, alg.electronSelection = config.readNameAndSelection(self.
electrons)
777 alg.muons, alg.muonSelection = config.readNameAndSelection(self.
muons)
779 alg.useDressedProperties = self.useDressedProperties
782 alg.vetoMode = (len(items) == 4
and self.
check_string(items[3]).lower() ==
"veto")
789 if not items
or len(items) > 4:
793 thisalg = f
'{self.name}_OS_{self.step}'
794 alg = config.createAlgorithm(
'CP::ChargeSelectorAlg', thisalg)
795 if self.
electrons and (len(items) == 1
or "el" in items):
797 alg.truthElectrons, alg.truthElectronSelection = config.readNameAndSelection(self.
electrons)
799 alg.electrons, alg.electronSelection = config.readNameAndSelection(self.
electrons)
800 if self.
muons and (len(items) == 1
or "mu" in items):
801 if "Particle" in self.
muons or "Truth" in self.
muons:
802 alg.truthMuons, alg.truthMuonSelection = config.readNameAndSelection(self.
muons)
804 alg.muons, alg.muonSelection = config.readNameAndSelection(self.
muons)
805 if self.
taus and (len(items) == 1
or "tau" in items):
806 if "Particle" in self.
taus or "Truth" in self.
taus:
807 alg.truthTaus, alg.truthTauSelection = config.readNameAndSelection(self.
taus)
809 alg.taus, alg.tauSelection = config.readNameAndSelection(self.
taus)
817 if not items
or len(items) > 4:
821 thisalg = f
'{self.name}_SS_{self.step}'
822 alg = config.createAlgorithm(
'CP::ChargeSelectorAlg', thisalg)
823 if self.
electrons and (len(items) == 1
or "el" in items):
825 alg.truthElectrons, alg.truthElectronSelection = config.readNameAndSelection(self.
electrons)
827 alg.electrons, alg.electronSelection = config.readNameAndSelection(self.
electrons)
828 if self.
muons and (len(items) == 1
or "mu" in items):
829 if "Particle" in self.
muons or "Truth" in self.
muons:
830 alg.truthMuons, alg.truthMuonSelection = config.readNameAndSelection(self.
muons)
832 alg.muons, alg.muonSelection = config.readNameAndSelection(self.
muons)
833 if self.
taus and (len(items) == 1
or "tau" in items):
834 if "Particle" in self.
taus or "Truth" in self.
taus:
835 alg.truthTaus, alg.truthTauSelection = config.readNameAndSelection(self.
taus)
837 alg.taus, alg.tauSelection = config.readNameAndSelection(self.
taus)
845 if items[0] !=
"MLL_OSSF":
847 if len(items) != 3
and len(items) != 4:
851 thisalg = f
'{self.name}_MLL_OSSF_{self.step}'
852 alg = config.createAlgorithm(
'CP::DileptonOSSFInvariantMassWindowSelectorAlg', thisalg)
855 alg.truthElectrons, alg.truthElectronSelection = config.readNameAndSelection(self.
electrons)
857 alg.electrons, alg.electronSelection = config.readNameAndSelection(self.
electrons)
859 if "Particle" in self.
muons or "Truth" in self.
muons:
860 alg.truthMuons, alg.truthMuonSelection = config.readNameAndSelection(self.
muons)
862 alg.muons, alg.muonSelection = config.readNameAndSelection(self.
muons)
864 alg.useDressedProperties = self.useDressedProperties
867 alg.vetoMode = (len(items) == 4
and self.
check_string(items[3]).lower() ==
"veto")
874 if items[0] !=
"EVENTFLAG":
884 if items[0] !=
"GLOBALTRIGMATCH":
886 if len(items) != 1
and len(items) != 2 :
892 self.
setDecorationName(
None, config, f
"globalTriggerMatch{postfix}_%SYS%,as_char")
897 if items[0] !=
"RUN_NUMBER":
901 thisalg = f
'{self.name}_RUN_NUMBER_{self.step}'
902 alg = config.createAlgorithm(
'CP::RunNumberSelectorAlg', thisalg)
905 alg.useRandomRunNumber = config.dataType()
is not DataType.Data
912 if items[0] !=
"SAVE":
916 thisalg = f
'{self.name}_SAVE'
917 alg = config.createAlgorithm(
'CP::SaveFilterAlg', thisalg)
918 alg.FilterDescription = f
'events passing < {self.name} >'
919 alg.eventDecisionOutputDecoration = f
'ignore_{self.name}_%SYS%'
921 alg.noFilter = self.noFilter
922 alg.selectionName = f
'pass_{self.name}_%SYS%,as_char'
923 alg.decorationName = f
'ntuplepass_{self.name}_%SYS%'
924 config.addOutputVar(
'EventInfo', f
'ntuplepass_{self.name}_%SYS%', f
'pass_{self.name}')
929 electrons=None, muons=None, jets=None,
931 photons=None, taus=None, met=None, metTerm=None,
932 btagDecoration=None, preselection=None,
933 selectionCuts=None, noFilter=None,
934 debugMode=None, cutFlowHistograms=None):
935 """Create an event selection config block
938 name -- the name defining this selection
939 electrons -- the electron container and selection
940 muons -- the muon container and selection
941 jets -- the jet container and selection
942 largeRjets -- the large-R jet container and selection
943 photons -- the photon container and selection
944 taus -- the tau-jet container and selection
945 met -- the MET container
946 metTerm -- the MET term to use (e.g. 'Final', 'NonInt')
947 btagDecoration -- the b-tagging decoration to use when defining b-jets
948 preselection -- optional event-wise selection flag to start from
949 selectionCuts -- a string listing one selection cut per line
950 noFilter -- whether to disable the event filter
951 debugMode -- enables saving all intermediate decorations
952 cutFlowHistograms -- whether to toggle event cutflow histograms per systematic
956 config.setOptionValue (
'name', name)
957 config.setOptionValue (
'electrons', electrons)
958 config.setOptionValue (
'muons', muons)
959 config.setOptionValue (
'jets', jets)
960 config.setOptionValue (
'largeRjets', largeRjets)
961 config.setOptionValue (
'photons', photons)
962 config.setOptionValue (
'taus', taus)
963 config.setOptionValue (
'met', met)
964 config.setOptionValue (
'metTerm', metTerm)
965 config.setOptionValue (
'btagDecoration', btagDecoration)
966 config.setOptionValue (
'preselection', preselection)
967 config.setOptionValue (
'selectionCuts', selectionCuts)
968 config.setOptionValue (
'noFilter', noFilter)
969 config.setOptionValue (
'debugMode', debugMode)
973 if cutFlowHistograms:
974 makeEventCutFlowConfig(seq,
'EventInfo', selectionName=
'', postfix=name,
975 customSelections=name)
978 electrons=None, muons=None, jets=None,
980 photons=None, taus=None, met=None, metTerm=None,
981 btagDecoration=None, preselection=None,
982 selectionCutsDict=None, noFilter=None,
983 debugMode=None, cutFlowHistograms=None):
984 """Create multiple event selection config blocks
987 electrons -- the electron container and selection
988 muons -- the muon container and selection
989 jets -- the jet container and selection
990 largeRjets -- the large-R jet container and selection
991 photons -- the photon container and selection
992 taus -- the tau-jet container and selection
993 met -- the MET container
994 metTerm -- the MET term to use (e.g. 'Final', 'NonInt')
995 btagDecoration -- the b-tagging decoration to use when defining b-jets
996 preselection -- optional event-wise selection flag to start from
997 selectionCutsDict -- a dictionary with key the name of the selection and value a string listing one selection cut per line
998 noFilter -- whether to disable the event filter
999 debugMode -- enables saving all intermediate decorations
1000 cutFlowHistograms -- whether to toggle event cutflow histograms per region and per systematic
1005 for name, selectionCuts
in selectionCutsDict.items():
1006 makeEventSelectionConfig(seq, name, electrons, muons, jets, largeRjets, photons, taus, met, metTerm, btagDecoration, preselection, selectionCuts, noFilter=
True, debugMode=debugMode, cutFlowHistograms=cutFlowHistograms)
1011 config.setOptionValue (
'selections', [f
'pass_{name}_%SYS%' for name
in selectionCutsDict.keys()
if not name.startswith(
"SUB")])
1012 config.setOptionValue (
'noFilter', noFilter)
void print(char *figname, TCanvas *c1)
add_NJET_selector(self, text, config)
setDecorationName(self, algorithm, config, decoration)
add_SUMNELNMU_selector(self, text, config)
raise_missinginput(self, collection)
extendObjectSelection(self, config, container, oldSelection, newSelection)
add_NEL_selector(self, text, config)
add_RUNNUMBER(self, text, config)
add_MLL_selector(self, text, config)
check_int(self, test, requirePositive=True)
add_METMWT_selector(self, text, config)
add_EVENTFLAG(self, text, config)
add_NLJETGHOST_selector(self, text, config)
add_NOBJ_selector(self, text, config)
add_NMU_selector(self, text, config)
add_MWT_selector(self, text, config)
add_SUMNLEPTONS_selector(self, text, config)
add_IMPORT(self, text, config)
add_NLJET_selector(self, text, config)
add_GLOBALTRIGMATCH(self, text, config)
raise_misconfig(self, text, keyword)
add_NBJET_selector(self, text, config)
add_SS_selector(self, text, config)
checkDecorationName(self, decoration)
add_NLJETMASS_selector(self, text, config)
check_float(self, test, requirePositive=True)
interpret(self, text, cfg)
add_OS_selector(self, text, config)
add_MET_selector(self, text, config)
add_NTAU_selector(self, text, config)
check_btagging(self, test)
add_NPH_selector(self, text, config)
add_MLLWINDOW_selector(self, text, config)
add_SAVE(self, text, config)
add_NJETGHOST_selector(self, text, config)
add_NLJETMASSWINDOW_selector(self, text, config)
add_MLL_OSSF_selector(self, text, config)
std::vector< std::string > split(const std::string &s, const std::string &t=":")
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)
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)