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.addOption(
'selections', [], type=list,
14 info=
"the selection decisions to unify into a "
15 "final decision (internally: `selection_1 || selection_2 || ...`). ")
16 self.addOption(
'noFilter',
False, type=bool,
17 info=
"do not apply an event filter, i.e. setting it to `False` "
18 "removes events not passing the full list of selection cuts.")
21 """Return the instance name for this block"""
27 raise ValueError(
'EventSelectionMerger requires a non-empty list of selection strings to be '
28 'passed as `selections`!')
29 alg = config.createAlgorithm(
'CP::SaveFilterAlg',
'EventSelectionMerger' + self.
selections[0].
split(
"_%SYS%")[0])
30 alg.FilterDescription =
'events passing at least one EventSelection algorithm'
31 alg.eventDecisionOutputDecoration =
'ignore_anySelection_%SYS%'
32 alg.selection =
'||'.join([sel+
',as_char' for sel
in self.
selections if sel])
33 alg.noFilter = self.noFilter
34 alg.selectionName =
'pass_anySelection_%SYS%'
35 alg.decorationName =
'ntuplepass_anySelection_%SYS%'
38 """ConfigBlock for interpreting text-based event selections"""
41 super(EventSelectionConfig, self).
__init__()
42 self.setBlockName(
'EventSelection')
43 self.addOption(
'name',
'', type=str,
45 info=
"the name of the event selection, used to uniquely identify "
46 "the `EventSelectionConfig` block.")
47 self.addOption(
'electrons',
"", type=str,
48 info=
"the input electron container, with a possible selection, in "
49 "the format `container` or `container.selection`.")
50 self.addOption(
'muons',
"", type=str,
51 info=
"the input muon container, with a possible selection, in the "
52 "format `container` or `container.selection`.")
53 self.addOption(
'jets',
"", type=str,
54 info=
"the input jet container, with a possible selection, in the "
55 "format `container` or `container.selection`.")
56 self.addOption(
'largeRjets',
"", type=str,
57 info=
"the large-R jet container, with a possible selection, in "
58 "the format `container` or `container.selection`.")
59 self.addOption(
'photons',
"", type=str,
60 info=
"the input photon container, with a possible selection, in "
61 "the format `container` or `container.selection`.")
62 self.addOption(
'taus',
"", type=str,
63 info=
"the input tau-jet container, with a possible selection, in "
64 "the format `container` or `container.selection`.")
65 self.addOption(
'met',
"", type=str,
66 info=
"the input MET container.")
67 self.addOption(
'metTerm',
"Final", type=str,
68 info=
"the MET term to use when computing MET-based quantities.")
69 self.addOption(
'btagDecoration',
"", type=str,
70 info=
"the b-tagging decoration to use when defining b-jets.")
71 self.addOption(
'preselection',
"", type=str,
72 info=
"the event-wise selection flag to start this event selection "
74 self.addOption(
'selectionCuts',
"", type=str,
76 info=
"a single string listing one selection cut per line. "
77 "See [available keywords](https://topcptoolkit.docs.cern.ch/latest/settings/eventselection/#available-keywords).")
78 self.addOption(
'noFilter',
False, type=bool,
79 info=
"do not apply an event filter, i.e. setting it to `False` "
80 "removes events not passing the full list of selection cuts.")
81 self.addOption(
'debugMode',
False, type=bool,
82 info=
"whether to create an output branch for every single line "
83 "of the selection cuts. Setting it to `False` only saves the"
85 self.addOption(
'useDressedProperties',
True, type=bool,
86 info=
"whether to use dressed truth electron and truth muon "
87 "kinematics rather than simple 4-vector kinematics.")
93 """Return the instance name for this block"""
104 if self.selectionCuts
is None:
105 raise ValueError (
"[EventSelectionConfig] You must provide the 'selectionCuts' option to 'EventSelectionConfig': "
106 "a single string where each line represents a different selection cut to apply in order.")
107 for line
in self.selectionCuts.
split(
"\n"):
115 if text.startswith(
"#"):
118 if "EL_N" in text.split():
120 elif "MU_N" in text.split():
122 elif "SUM_EL_N_MU_N" in text.split():
124 elif "SUM_EL_N_MU_N_TAU_N" in text.split():
126 elif "JET_N_GHOST" in text.split():
128 elif "JET_N" in text.split():
130 elif "JET_N_BTAG" in text.split():
132 elif "PH_N" in text.split():
134 elif "TAU_N" in text.split():
136 elif "LJET_N_GHOST" in text.split():
138 elif "LJET_N" in text.split():
140 elif "OBJ_N" in text.split():
142 elif "MET" in text.split():
144 elif "MWT" in text.split():
146 elif "MET+MWT" in text.split():
148 elif "MLL" in text.split():
150 elif "MLLWINDOW" in text.split():
152 elif "OS" in text.split():
154 elif "SS" in text.split():
156 elif "MLL_OSSF" in text.split():
158 elif "LJETMASS_N" in text.split():
160 elif "LJETMASSWINDOW_N" in text.split():
162 elif "SAVE" in text.split():
164 elif "IMPORT" in text.split():
166 elif "EVENTFLAG" in text.split():
168 elif "GLOBALTRIGMATCH" in text.split():
170 elif "RUN_NUMBER" in text.split():
173 raise ValueError (f
"[EventSelectionConfig] The following selection cut is not recognised! --> {text}")
176 raise ValueError (f
"[EventSelectionConfig] Misconfiguration! Check {keyword} in: {text}")
179 raise ValueError (f
"[EventSelectionConfig] Misconfiguration! Missing input collection for {collection}")
184 if not requirePositive
or value >= 0:
187 raise ValueError (f
"[EventSelectionConfig] Misconfiguration! Float {test} is not positive!")
189 raise ValueError (f
"[EventSelectionConfig] Misconfiguration! {test} should be a float, not {type(test)}!")
194 if value == float(test):
195 if not requirePositive
or value >= 0:
198 raise ValueError (f
"[EventSelectionConfig] Misconfiguration! Int {test} us not positive!")
200 raise ValueError (f
"[EventSelectionConfig] Misconfiguration! {test} should be an int, not a float!")
202 raise ValueError (f
"[EventSelectionConfig] Misconfiguration! {test} should be an int, not {type(test)}")
205 if not isinstance(test, str):
206 raise ValueError (f
"[EventSelectionConfig] Misconfiguration! {test} should be a string, not a number!")
221 raise KeyError (f
"[EventSelectionConfig] Misconfiguration! {test} should be one of {list(mapping.keys())}")
224 test = test.split(
":")
226 raise ValueError (f
"[EventSelectionConfig] Misconfiguration! {test} should be provided as 'btagger:btagWP'")
232 values = test.split(
"!")
234 "B":
"GhostBHadronsFinalCount",
235 "C":
"GhostCHadronsFinalCount",
236 "T":
"GhostTQuarksFinalCount",
237 "W":
"GhostWBosonsCount",
238 "Z":
"GhostZBosonsCount",
239 "H":
"GhostHBosonsCount",
240 "TAU":
"GhostTausFinalCount"
242 return [ghost_map.get(value.upper(), value)
for value
in values]
248 self.
cutflow.append( decoration )
249 if algorithm
is not None:
250 algorithm.decorationName = f
'{decoration},as_char'
253 config.addOutputVar(
'EventInfo', decoration, decoration.split(
"_%SYS%")[0])
259 config.addSelection(
'EventInfo',
'', decoration)
265 decoration = decoration.split(
"&&")
266 decoration = [sub +
',as_char' if ',as_char' not in sub
else sub
for sub
in decoration]
267 return '&&'.join(decoration)
271 return oldSelection +
"&&" + config.getFullSelection(container, newSelection)
273 return config.getFullSelection(container, newSelection)
278 if items[0] !=
"IMPORT":
286 self.
currentDecoration = f
'{self.currentDecoration},as_char&&pass_{region}_%SYS%'
288 imported_cuts = [cut
for cut
in config.getSelectionCutFlow(
'EventInfo',
'')
if cut.startswith(region)]
294 if items[0] !=
"EL_N":
296 if len(items) != 4
and len(items) != 5:
300 thisalg = f
'{self.name}_NEL_{self.step}'
301 alg = config.createAlgorithm(
'CP::NObjectPtSelectorAlg', thisalg)
302 alg.particles, alg.objectSelection = config.readNameAndSelection(self.
electrons)
304 alg.useDressedProperties = self.useDressedProperties
310 elif len(items) == 5:
321 if items[0] !=
"MU_N":
323 if len(items) != 4
and len(items) != 5:
327 thisalg = f
'{self.name}_NMU_{self.step}'
328 alg = config.createAlgorithm(
'CP::NObjectPtSelectorAlg', thisalg)
329 alg.particles, alg.objectSelection = config.readNameAndSelection(self.
muons)
330 if "Truth" in self.
muons:
331 alg.useDressedProperties = self.useDressedProperties
337 elif len(items) == 5:
348 if items[0] !=
"SUM_EL_N_MU_N":
350 if len(items) != 4
and len(items) != 5
and len(items) != 7:
354 thisalg = f
'{self.name}_SUMNELNMU_{self.step}'
355 alg = config.createAlgorithm(
'CP::SumNLeptonPtSelectorAlg', thisalg)
356 alg.electrons, alg.electronSelection = config.readNameAndSelection(self.
electrons)
357 alg.muons, alg.muonSelection = config.readNameAndSelection(self.
muons)
359 alg.useDressedProperties = self.useDressedProperties
366 elif len(items) == 5:
371 elif len(items) == 7:
385 if items[0] !=
"SUM_EL_N_MU_N_TAU_N":
387 if len(items) != 4
and len(items) != 6
and len(items) != 9:
391 thisalg = f
'{self.name}_SUMNLEPTONS_{self.step}'
392 alg = config.createAlgorithm(
'CP::SumNLeptonPtSelectorAlg', thisalg)
393 alg.electrons, alg.electronSelection = config.readNameAndSelection(self.
electrons)
394 alg.muons, alg.muonSelection = config.readNameAndSelection(self.
muons)
395 alg.taus, alg.tauSelection = config.readNameAndSelection(self.
taus)
397 alg.useDressedProperties = self.useDressedProperties
405 elif len(items) == 6:
411 elif len(items) == 9:
428 if items[0] !=
"JET_N":
430 if len(items) != 4
and len(items) != 5:
434 thisalg = f
'{self.name}_NJET_{self.step}'
435 alg = config.createAlgorithm(
'CP::NObjectPtSelectorAlg', thisalg)
436 alg.particles, alg.objectSelection = config.readNameAndSelection(self.
jets)
442 elif len(items) == 5:
453 if items[0] !=
"JET_N_BTAG":
455 if len(items) != 3
and len(items) != 4
and len(items) != 5:
459 thisalg = f
'{self.name}_NBJET_{self.step}'
460 alg = config.createAlgorithm(
'CP::NObjectPtSelectorAlg', thisalg)
461 particles, selection = config.readNameAndSelection(self.
jets)
462 alg.particles = particles
463 alg.objectSelection = f
'{selection}&&{self.btagDecoration},as_char' if selection
else f
'{self.btagDecoration},as_char'
468 elif len(items) == 4:
471 customBtag = f
'ftag_select_{btagger}_{btagWP}'
472 alg.objectSelection = f
'{selection}&&{customBtag},as_char' if selection
else f
'{customBtag},as_char'
478 elif len(items) == 5:
481 customBtag = f
'ftag_select_{btagger}_{btagWP}'
482 alg.objectSelection = f
'{selection}&&{customBtag},as_char' if selection
else f
'{customBtag},as_char'
491 if items[0] !=
"PH_N":
493 if len(items) != 4
and len(items) != 5:
497 thisalg = f
'{self.name}_NPH_{self.step}'
498 alg = config.createAlgorithm(
'CP::NObjectPtSelectorAlg', thisalg)
499 alg.particles, alg.objectSelection = config.readNameAndSelection(self.
photons)
505 elif len(items) == 5:
516 if items[0] !=
"TAU_N":
518 if len(items) != 4
and len(items) != 5:
522 thisalg = f
'{self.name}_NTAU_{self.step}'
523 alg = config.createAlgorithm(
'CP::NObjectPtSelectorAlg', thisalg)
524 alg.particles, alg.objectSelection = config.readNameAndSelection(self.
taus)
530 elif len(items) == 5:
541 if items[0] !=
"LJET_N":
543 if len(items) != 4
and len(items) != 5:
545 thisalg = f
'{self.name}_NLJET_{self.step}'
546 alg = config.createAlgorithm(
'CP::NObjectPtSelectorAlg', thisalg)
547 alg.particles, alg.objectSelection = config.readNameAndSelection(self.largeRjets)
553 elif len(items) == 5:
564 if items[0] !=
"LJETMASS_N":
566 if len(items) != 4
and len(items) != 5:
568 thisalg = f
'{self.name}_NLJETMASS_{self.step}'
569 alg = config.createAlgorithm(
'CP::NObjectMassSelectorAlg', thisalg)
570 alg.particles, alg.objectSelection = config.readNameAndSelection(self.largeRjets)
576 elif len(items) == 5:
587 if items[0] !=
"LJETMASSWINDOW_N":
589 if len(items) != 5
and len(items) != 6
and len(items) != 7:
591 thisalg = f
'{self.name}_NLJETMASSWINDOW_{self.step}'
592 alg = config.createAlgorithm(
'CP::NLargeRJetMassWindowSelectorAlg', thisalg)
593 alg.ljets, alg.ljetSelection = config.readNameAndSelection(self.largeRjets)
594 vetoMode = items[-1] ==
'veto' or items[-1] ==
'VETO'
595 if len(items) == 5
or (len(items) == 6
and vetoMode):
600 alg.vetoMode = vetoMode
601 elif (len(items) == 6
and not vetoMode)
or len(items) == 7:
608 alg.vetoMode = vetoMode
615 if items[0] !=
"JET_N_GHOST":
617 if len(items) != 4
and len(items) != 5:
619 thisalg = f
'{self.name}_NJETGHOST_{self.step}'
620 alg = config.createAlgorithm(
'CP::JetNGhostSelectorAlg', thisalg)
621 alg.jets, alg.jetSelection = config.readNameAndSelection(self.
jets)
623 alg.ghost = ghosts[0]
629 elif len(items) == 5:
639 if items[0] !=
"LJET_N_GHOST":
641 if len(items) != 4
and len(items) != 5:
643 thisalg = f
'{self.name}_NLJETGHOST_{self.step}'
644 alg = config.createAlgorithm(
'CP::JetNGhostSelectorAlg', thisalg)
645 alg.jets, alg.jetSelection = config.readNameAndSelection(self.largeRjets)
647 alg.ghost = ghosts[0]
653 elif len(items) == 5:
663 if items[0] !=
"OBJ_N":
667 thisalg = f
'{self.name}_NOBJ_{self.step}'
668 alg = config.createAlgorithm(
'CP::NObjectPtSelectorAlg', thisalg)
669 alg.particles, alg.objectSelection = config.readNameAndSelection(self.
check_string(items[1]))
679 if items[0] !=
"MET":
685 thisalg = f
'{self.name}_MET_{self.step}'
686 alg = config.createAlgorithm(
'CP::MissingETSelectorAlg', thisalg)
687 alg.met = config.readName(self.
met)
688 alg.metTerm = self.metTerm
697 if items[0] !=
"MWT":
703 thisalg = f
'{self.name}_MWT_{self.step}'
704 alg = config.createAlgorithm(
'CP::TransverseMassSelectorAlg', thisalg)
705 alg.met = config.readName(self.
met)
706 alg.metTerm = self.metTerm
707 alg.electrons, alg.electronSelection = config.readNameAndSelection(self.
electrons)
708 alg.muons, alg.muonSelection = config.readNameAndSelection(self.
muons)
710 alg.useDressedProperties = self.useDressedProperties
719 if items[0] !=
"MET+MWT":
727 thisalg = f
'{self.name}_METMWT_{self.step}'
728 alg = config.createAlgorithm(
'CP::MissingETPlusTransverseMassSelectorAlg', thisalg)
729 alg.met = config.readName(self.
met)
730 alg.metTerm = self.metTerm
731 alg.electrons, alg.electronSelection = config.readNameAndSelection(self.
electrons)
732 alg.muons, alg.muonSelection = config.readNameAndSelection(self.
muons)
734 alg.useDressedProperties = self.useDressedProperties
743 if items[0] !=
"MLL":
749 thisalg = f
'{self.name}_MLL_{self.step}'
750 alg = config.createAlgorithm(
'CP::DileptonInvariantMassSelectorAlg', thisalg)
752 alg.electrons, alg.electronSelection = config.readNameAndSelection(self.
electrons)
754 alg.muons, alg.muonSelection = config.readNameAndSelection(self.
muons)
756 alg.useDressedProperties = self.useDressedProperties
765 if items[0] !=
"MLLWINDOW":
767 if len(items) != 3
and len(items) != 4:
771 thisalg = f
'{self.name}_MLLWINDOW_{self.step}'
772 alg = config.createAlgorithm(
'CP::DileptonInvariantMassWindowSelectorAlg', thisalg)
774 alg.electrons, alg.electronSelection = config.readNameAndSelection(self.
electrons)
776 alg.muons, alg.muonSelection = config.readNameAndSelection(self.
muons)
778 alg.useDressedProperties = self.useDressedProperties
781 alg.vetoMode = (len(items) == 4
and self.
check_string(items[3]).lower() ==
"veto")
788 if not items
or len(items) > 4:
792 thisalg = f
'{self.name}_OS_{self.step}'
793 alg = config.createAlgorithm(
'CP::ChargeSelectorAlg', thisalg)
794 if self.
electrons and (len(items) == 1
or "el" in items):
796 alg.truthElectrons, alg.truthElectronSelection = config.readNameAndSelection(self.
electrons)
798 alg.electrons, alg.electronSelection = config.readNameAndSelection(self.
electrons)
799 if self.
muons and (len(items) == 1
or "mu" in items):
800 if "Particle" in self.
muons or "Truth" in self.
muons:
801 alg.truthMuons, alg.truthMuonSelection = config.readNameAndSelection(self.
muons)
803 alg.muons, alg.muonSelection = config.readNameAndSelection(self.
muons)
804 if self.
taus and (len(items) == 1
or "tau" in items):
805 if "Particle" in self.
taus or "Truth" in self.
taus:
806 alg.truthTaus, alg.truthTauSelection = config.readNameAndSelection(self.
taus)
808 alg.taus, alg.tauSelection = config.readNameAndSelection(self.
taus)
816 if not items
or len(items) > 4:
820 thisalg = f
'{self.name}_SS_{self.step}'
821 alg = config.createAlgorithm(
'CP::ChargeSelectorAlg', thisalg)
822 if self.
electrons and (len(items) == 1
or "el" in items):
824 alg.truthElectrons, alg.truthElectronSelection = config.readNameAndSelection(self.
electrons)
826 alg.electrons, alg.electronSelection = config.readNameAndSelection(self.
electrons)
827 if self.
muons and (len(items) == 1
or "mu" in items):
828 if "Particle" in self.
muons or "Truth" in self.
muons:
829 alg.truthMuons, alg.truthMuonSelection = config.readNameAndSelection(self.
muons)
831 alg.muons, alg.muonSelection = config.readNameAndSelection(self.
muons)
832 if self.
taus and (len(items) == 1
or "tau" in items):
833 if "Particle" in self.
taus or "Truth" in self.
taus:
834 alg.truthTaus, alg.truthTauSelection = config.readNameAndSelection(self.
taus)
836 alg.taus, alg.tauSelection = config.readNameAndSelection(self.
taus)
844 if items[0] !=
"MLL_OSSF":
846 if len(items) != 3
and len(items) != 4:
850 thisalg = f
'{self.name}_MLL_OSSF_{self.step}'
851 alg = config.createAlgorithm(
'CP::DileptonOSSFInvariantMassWindowSelectorAlg', thisalg)
854 alg.truthElectrons, alg.truthElectronSelection = config.readNameAndSelection(self.
electrons)
856 alg.electrons, alg.electronSelection = config.readNameAndSelection(self.
electrons)
858 if "Particle" in self.
muons or "Truth" in self.
muons:
859 alg.truthMuons, alg.truthMuonSelection = config.readNameAndSelection(self.
muons)
861 alg.muons, alg.muonSelection = config.readNameAndSelection(self.
muons)
863 alg.useDressedProperties = self.useDressedProperties
866 alg.vetoMode = (len(items) == 4
and self.
check_string(items[3]).lower() ==
"veto")
873 if items[0] !=
"EVENTFLAG":
883 if items[0] !=
"GLOBALTRIGMATCH":
885 if len(items) != 1
and len(items) != 2 :
891 self.
setDecorationName(
None, config, f
"globalTriggerMatch{postfix}_%SYS%,as_char")
896 if items[0] !=
"RUN_NUMBER":
900 thisalg = f
'{self.name}_RUN_NUMBER_{self.step}'
901 alg = config.createAlgorithm(
'CP::RunNumberSelectorAlg', thisalg)
904 alg.useRandomRunNumber = config.dataType()
is not DataType.Data
911 if items[0] !=
"SAVE":
915 thisalg = f
'{self.name}_SAVE'
916 alg = config.createAlgorithm(
'CP::SaveFilterAlg', thisalg)
917 alg.FilterDescription = f
'events passing < {self.name} >'
918 alg.eventDecisionOutputDecoration = f
'ignore_{self.name}_%SYS%'
920 alg.noFilter = self.noFilter
921 alg.selectionName = f
'pass_{self.name}_%SYS%,as_char'
922 alg.decorationName = f
'ntuplepass_{self.name}_%SYS%'
923 config.addOutputVar(
'EventInfo', f
'ntuplepass_{self.name}_%SYS%', f
'pass_{self.name}')
928 electrons=None, muons=None, jets=None,
930 photons=None, taus=None, met=None, metTerm=None,
931 btagDecoration=None, preselection=None,
932 selectionCuts=None, noFilter=None,
933 debugMode=None, cutFlowHistograms=None):
934 """Create an event selection config block
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
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)
972 if cutFlowHistograms:
973 makeEventCutFlowConfig(seq,
'EventInfo', selectionName=
'', postfix=name,
974 customSelections=name)
977 electrons=None, muons=None, jets=None,
979 photons=None, taus=None, met=None, metTerm=None,
980 btagDecoration=None, preselection=None,
981 selectionCutsDict=None, noFilter=None,
982 debugMode=None, cutFlowHistograms=None):
983 """Create multiple event selection config blocks
986 electrons -- the electron container and selection
987 muons -- the muon container and selection
988 jets -- the jet container and selection
989 largeRjets -- the large-R jet container and selection
990 photons -- the photon container and selection
991 taus -- the tau-jet container and selection
992 met -- the MET container
993 metTerm -- the MET term to use (e.g. 'Final', 'NonInt')
994 btagDecoration -- the b-tagging decoration to use when defining b-jets
995 preselection -- optional event-wise selection flag to start from
996 selectionCutsDict -- a dictionary with key the name of the selection and value a string listing one selection cut per line
997 noFilter -- whether to disable the event filter
998 debugMode -- enables saving all intermediate decorations
999 cutFlowHistograms -- whether to toggle event cutflow histograms per region and per systematic
1004 for name, selectionCuts
in selectionCutsDict.items():
1005 makeEventSelectionConfig(seq, name, electrons, muons, jets, largeRjets, photons, taus, met, metTerm, btagDecoration, preselection, selectionCuts, noFilter=
True, debugMode=debugMode, cutFlowHistograms=cutFlowHistograms)
1010 config.setOptionValue (
'selections', [f
'pass_{name}_%SYS%' for name
in selectionCutsDict.keys()
if not name.startswith(
"SUB")])
1011 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)