Commit 0d0a2f72 authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'fixionhypo' into 'master'

fix selections for ion chains

See merge request atlas/athena!48391
parents 369a9fd0 6c801c77
......@@ -118,7 +118,7 @@ class TrigEgammaFastCaloHypoToolConfig:
self.__name = name
self.__cand = cpart['trigType']
self.__threshold = float(cpart['threshold'])
self.__sel = cpart['addInfo'][0] if cpart['addInfo'] else cpart['IDinfo']
self.__sel = 'ion' if 'ion' in cpart['extra'] else (cpart['addInfo'][0] if cpart['addInfo'] else cpart['IDinfo'])
self.__gsfinfo = cpart['gsfInfo'] if cpart['trigType']=='e' and cpart['gsfInfo'] else ''
self.__idperfinfo = cpart['idperfInfo'] if cpart['trigType']=='e' and cpart['idperfInfo'] else ''
self.__noringerinfo = cpart['L2IDAlg'] if cpart['trigType']=='e' else ''
......@@ -235,7 +235,7 @@ class TrigEgammaFastCaloHypoToolConfig:
#
def compile(self):
if 'etcut' == self.pidname() or 'ion' in self.pidname():
if self.pidname() in ('etcut', 'ion'):
self.etcut()
elif self.pidname() in self.__operation_points and 'noringer' in self.noringerinfo() and self.isElectron():
......
......@@ -24,7 +24,7 @@ class TrigEgammaFastPhotonHypoToolConfig:
self.__log = logging.getLogger('TrigEgammaFastPhotonHypoTool')
self.__name = name
self.__threshold = float(cpart['threshold'])
self.__sel = cpart['addInfo'][0] if cpart['addInfo'] else cpart['IDinfo']
self.__sel = 'ion' if 'ion' in cpart['extra'] else (cpart['addInfo'][0] if cpart['addInfo'] else cpart['IDinfo'])
self.__monGroups = monGroups
if not tool:
......@@ -87,7 +87,7 @@ class TrigEgammaFastPhotonHypoToolConfig:
# Compile the chain
#
def compile(self):
if 'etcut' == self.pidname() or 'ion' in self.pidname():
if self.pidname() in ('etcut', 'ion'):
self.etcut()
elif 'noalg' == self.pidname():
self.nocut()
......
......@@ -45,11 +45,12 @@ def _IncTool(name, monGroups, threshold, sel, tool=None):
tool.dETACLUSTERthr = 9999.
tool.dPHICLUSTERthr = 9999.
elif sel == "etcut" or 'ion' in sel:
elif sel in ('etcut', 'ion'):
tool.ETthr = same( ( float( threshold ) - 3 )*GeV )
# No other cuts applied
tool.dETACLUSTERthr = 9999.
tool.dPHICLUSTERthr = 9999.
return tool
......@@ -62,7 +63,7 @@ def TrigEgammaPrecisionCaloHypoToolFromDict( d, tool=None ):
return cpart['threshold']
def __sel(cpart):
return cpart['addInfo'][0] if cpart['addInfo'] else cpart['IDinfo'] + cpart['extra']
return 'ion' if 'ion' in cpart['extra'] else (cpart['addInfo'][0] if cpart['addInfo'] else cpart['IDinfo'])
name = d['chainName']
monGroups = d['monGroups']
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment