Skip to content
Snippets Groups Projects
Commit 4c8f1967 authored by Baptiste Ravina's avatar Baptiste Ravina Committed by Tadej Novak
Browse files

CPAlgorithms: more protections in the event selection

CPAlgorithms: more protections in the event selection
parent ec3e74b4
No related branches found
No related tags found
28 merge requests!78241Draft: FPGATrackSim: GenScan code refactor,!78236Draft: Switching Streams https://its.cern.ch/jira/browse/ATR-27417,!78056AFP monitoring: new synchronization and cleaning,!78041AFP monitoring: new synchronization and cleaning,!77990Updating TRT chip masks for L1TRT trigger simulation - ATR-28372,!77733Draft: add new HLT NN JVT, augmented with additional tracking information,!77731Draft: Updates to ZDC reconstruction,!77728Draft: updates to ZDC reconstruction,!77522Draft: sTGC Pad Trigger Emulator,!76725ZdcNtuple: Fix cppcheck warning.,!76611L1CaloFEXByteStream: Fix out-of-bounds array accesses.,!76475Punchthrough AF3 implementation in FastG4,!76474Punchthrough AF3 implementation in FastG4,!75729New implementation of ZDC nonlinear FADC correction.,!75703Draft: Update to HI han config for HLT jets,!75184Draft: Update file heavyions_run.config,!74430Draft: Fixing upper bound for Delayed Jet Triggers,!73963Changing the path of the histograms to "Expert" area,!73875updating ID ART reference plots,!73874AtlasCLHEP_RandomGenerators: Fix cppcheck warnings.,!73449Add muon detectors to DarkJetPEBTLA partial event building,!73343Draft: [TrigEgamma] Add photon ringer chains on bootstrap mechanism,!72336Fixed TRT calibration crash,!72176Draft: Improving L1TopoOnline chain that now gets no-empty plots. Activating it by default,!72012Draft: Separate JiveXMLConfig.py into Config files,!71876Fix MET trigger name in MissingETMonitoring,!71820Draft: Adding new TLA End-Of-Fill (EOF) chains and removing obsolete DIPZ chains,!71447CPAlgorithms: more protections in the event selection
......@@ -237,7 +237,7 @@ class EventSelectionConfig(ConfigBlock):
if not self.currentDecoration:
self.currentDecoration = f'pass_{region}_%SYS%,as_char'
else:
self.currentDecoration = f'{self.currentDecoration}&&pass_{region}_%SYS%'
self.currentDecoration = f'{self.currentDecoration},as_char&&pass_{region}_%SYS%'
# for the cutflow, we need to retrieve all the cuts corresponding to this IMPORT
imported_cuts = [cut for cut in config.getSelectionCutFlow('EventInfo', '') if cut.startswith(region)]
self.cutflow += imported_cuts
......@@ -254,7 +254,7 @@ class EventSelectionConfig(ConfigBlock):
thisalg = f'{self.name}_NEL_{self.step}'
alg = config.createAlgorithm('CP::NObjectPtSelectorAlg', thisalg)
alg.particles, alg.objectSelection = config.readNameAndSelection(self.electrons)
alg.eventPreselection = f'{self.currentDecoration},as_char'
alg.eventPreselection = f'{self.currentDecoration},as_char' if self.currentDecoration else ''
if len(items) == 4:
alg.minPt = self.check_float(items[1])
alg.sign = self.check_sign(items[2])
......@@ -282,7 +282,7 @@ class EventSelectionConfig(ConfigBlock):
thisalg = f'{self.name}_NMU_{self.step}'
alg = config.createAlgorithm('CP::NObjectPtSelectorAlg', thisalg)
alg.particles, alg.objectSelection = config.readNameAndSelection(self.muons)
alg.eventPreselection = f'{self.currentDecoration},as_char'
alg.eventPreselection = f'{self.currentDecoration},as_char' if self.currentDecoration else ''
if len(items) == 4:
alg.minPt = self.check_float(items[1])
alg.sign = self.check_sign(items[2])
......@@ -311,7 +311,7 @@ class EventSelectionConfig(ConfigBlock):
alg = config.createAlgorithm('CP::SumNElNMuPtSelectorAlg', thisalg)
alg.electrons, alg.electronSelection = config.readNameAndSelection(self.electrons)
alg.muons, alg.muonSelection = config.readNameAndSelection(self.muons)
alg.eventPreselection = f'{self.currentDecoration},as_char'
alg.eventPreselection = f'{self.currentDecoration},as_char' if self.currentDecoration else ''
if len(items) == 4:
alg.minPtEl = self.check_float(items[1])
alg.minPtMu = self.check_float(items[1])
......@@ -336,7 +336,7 @@ class EventSelectionConfig(ConfigBlock):
thisalg = f'{self.name}_NJET_{self.step}'
alg = config.createAlgorithm('CP::NObjectPtSelectorAlg', thisalg)
alg.particles, alg.objectSelection = config.readNameAndSelection(self.jets)
alg.eventPreselection = f'{self.currentDecoration},as_char,as_char'
alg.eventPreselection = f'{self.currentDecoration},as_char' if self.currentDecoration else ''
if len(items) == 4:
alg.minPt = self.check_float(items[1])
alg.sign = self.check_sign(items[2])
......@@ -391,7 +391,7 @@ class EventSelectionConfig(ConfigBlock):
thisalg = f'{self.name}_NPH_{self.step}'
alg = config.createAlgorithm('CP::NObjectPtSelectorAlg', thisalg)
alg.particles, alg.objectSelection = config.readNameAndSelection(self.photons)
alg.eventPreselection = f'{self.currentDecoration},as_char'
alg.eventPreselection = f'{self.currentDecoration},as_char' if self.currentDecoration else ''
if len(items) == 4:
alg.minPt = self.check_float(items[1])
alg.sign = self.check_sign(items[2])
......@@ -419,7 +419,7 @@ class EventSelectionConfig(ConfigBlock):
thisalg = f'{self.name}_NTAU_{self.step}'
alg = config.createAlgorithm('CP::NObjectPtSelectorAlg', thisalg)
alg.particles, alg.objectSelection = config.readNameAndSelection(self.taus)
alg.eventPreselection = f'{self.currentDecoration},as_char'
alg.eventPreselection = f'{self.currentDecoration},as_char' if self.currentDecoration else ''
if len(items) == 4:
alg.minPt = self.check_float(items[1])
alg.sign = self.check_sign(items[2])
......@@ -445,7 +445,7 @@ class EventSelectionConfig(ConfigBlock):
thisalg = f'{self.name}_NLJET_{self.step}'
alg = config.createAlgorithm('CP::NObjectPtSelectorAlg', thisalg)
alg.particles, alg.objectSelection = config.readNameAndSelection(self.largeRjets)
alg.eventPreselection = f'{self.currentDecoration},as_char'
alg.eventPreselection = f'{self.currentDecoration},as_char' if self.currentDecoration else ''
if len(items) == 4:
alg.minPt = self.check_float(items[1])
alg.sign = self.check_sign(items[2])
......@@ -471,7 +471,7 @@ class EventSelectionConfig(ConfigBlock):
thisalg = f'{self.name}_NLJETMASS_{self.step}'
alg = config.createAlgorithm('CP::NObjectMassSelectorAlg', thisalg)
alg.particles, alg.objectSelection = config.readNameAndSelection(self.largeRjets)
alg.eventPreselection = f'{self.currentDecoration},as_char'
alg.eventPreselection = f'{self.currentDecoration},as_char' if self.currentDecoration else ''
if len(items) == 4:
alg.minMass = self.check_float(items[1])
alg.sign = self.check_sign(items[2])
......@@ -514,7 +514,7 @@ class EventSelectionConfig(ConfigBlock):
alg.sign = self.check_sign(items[4])
alg.count = self.check_int(items[5])
alg.vetoMode = (len(items) ==7 and self.check_string(items[6]) == "veto")
alg.eventPreselection = f'{self.currentDecoration},as_char'
alg.eventPreselection = f'{self.currentDecoration},as_char' if self.currentDecoration else ''
self.setDecorationName(alg, config, f'{thisalg}_%SYS%')
return
......@@ -532,7 +532,7 @@ class EventSelectionConfig(ConfigBlock):
alg.metTerm = self.metTerm
alg.sign = self.check_sign(items[1])
alg.refMET = self.check_float(items[2])
alg.eventPreselection = f'{self.currentDecoration},as_char'
alg.eventPreselection = f'{self.currentDecoration},as_char' if self.currentDecoration else ''
self.setDecorationName(alg, config, f'{thisalg}_%SYS%')
return
......@@ -552,7 +552,7 @@ class EventSelectionConfig(ConfigBlock):
alg.muons, alg.muonSelection = config.readNameAndSelection(self.muons)
alg.sign = self.check_sign(items[1])
alg.refMWT = self.check_float(items[2])
alg.eventPreselection = f'{self.currentDecoration},as_char'
alg.eventPreselection = f'{self.currentDecoration},as_char' if self.currentDecoration else ''
self.setDecorationName(alg, config, f'{thisalg}_%SYS%')
return
......@@ -574,7 +574,7 @@ class EventSelectionConfig(ConfigBlock):
alg.muons, alg.muonSelection = config.readNameAndSelection(self.muons)
alg.sign = self.check_sign(items[1])
alg.refMETMWT = self.check_float(items[2])
alg.eventPreselection = f'{self.currentDecoration},as_char'
alg.eventPreselection = f'{self.currentDecoration},as_char' if self.currentDecoration else ''
self.setDecorationName(alg, config, f'{thisalg}_%SYS%')
return
......@@ -594,7 +594,7 @@ class EventSelectionConfig(ConfigBlock):
alg.muons, alg.muonSelection = config.readNameAndSelection(self.muons)
alg.sign = self.check_sign(items[1])
alg.refMLL = self.check_float(items[2])
alg.eventPreselection = f'{self.currentDecoration},as_char'
alg.eventPreselection = f'{self.currentDecoration},as_char' if self.currentDecoration else ''
self.setDecorationName(alg, config, f'{thisalg}_%SYS%')
return
......@@ -615,7 +615,7 @@ class EventSelectionConfig(ConfigBlock):
alg.lowMLL = self.check_float(items[1])
alg.highMLL = self.check_float(items[2])
alg.vetoMode = (len(items) == 4 and self.check_string(items[3]) == "veto")
alg.eventPreselection = f'{self.currentDecoration},as_char'
alg.eventPreselection = f'{self.currentDecoration},as_char' if self.currentDecoration else ''
self.setDecorationName(alg, config, f'{thisalg}_%SYS%')
return
......@@ -638,7 +638,7 @@ class EventSelectionConfig(ConfigBlock):
else:
alg.muons, alg.muonSelection = config.readNameAndSelection(self.muons)
alg.OS = True
alg.eventPreselection = f'{self.currentDecoration},as_char'
alg.eventPreselection = f'{self.currentDecoration},as_char' if self.currentDecoration else ''
self.setDecorationName(alg, config, f'{thisalg}_%SYS%')
return
......@@ -661,7 +661,7 @@ class EventSelectionConfig(ConfigBlock):
else:
alg.muons, alg.muonSelection = config.readNameAndSelection(self.muons)
alg.OS = False
alg.eventPreselection = f'{self.currentDecoration},as_char'
alg.eventPreselection = f'{self.currentDecoration},as_char' if self.currentDecoration else ''
self.setDecorationName(alg, config, f'{thisalg}_%SYS%')
return
......@@ -688,7 +688,7 @@ class EventSelectionConfig(ConfigBlock):
alg.lowMll = self.check_float(items[1])
alg.highMll = self.check_float(items[2])
alg.vetoMode = (len(items) == 4 and self.check_string(items[3]) == "veto")
alg.eventPreselection = f'{self.currentDecoration},as_char'
alg.eventPreselection = f'{self.currentDecoration},as_char' if self.currentDecoration else ''
self.setDecorationName(alg, config, f'{thisalg}_%SYS%')
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment