Esempio n. 1
0
def _GetPath( cand, sel, basepath = 'RingerSelectorTools/TrigL2_20180903_v9' ):
    
    logger = logging.getLogger("TrigMultiVarHypo.GetPath")
    from TriggerMenu.egamma.EgammaSliceFlags import EgammaSliceFlags
    if EgammaSliceFlags.ringerVersion():
       basepath = EgammaSliceFlags.ringerVersion()
    logger.info('TrigMultiVarHypo version: %s', basepath)
    if not sel in _possibleSel.keys():
       raise RuntimeError( "Bad selection name: %s" % sel )
    if 'e' in cand:
       constant = basepath+'/'+ 'TrigL2CaloRingerElectron{SEL}Constants.root'.format(SEL=_possibleSel[sel])
       threshold = basepath+'/'+ 'TrigL2CaloRingerElectron{SEL}Thresholds.root'.format(SEL=_possibleSel[sel])
    elif 'g' in cand:
       constant = basepath+'/'+ 'TrigL2CaloRingerPhoton{SEL}Constants.root'.format(SEL=_possibleSel[sel])
       threshold = basepath+'/'+ 'TrigL2CaloRingerPhoton{SEL}Thresholds.root'.format(SEL=_possibleSel[sel])
    else:
       raise RuntimeError( "Bad signature %s" % cand )
    return constant, threshold
Esempio n. 2
0
  def __init__(self):
    
    from AthenaCommon.Logging import logging
    self._logger = logging.getLogger("TrigMultiVarHypo.TrigL2CaloRingerPidConfs")

    #TODO: Use this to configurate the calib path from triggerMenu flags
    from TriggerMenu.egamma.EgammaSliceFlags import EgammaSliceFlags
    if EgammaSliceFlags.ringerVersion():
      self._basePath = EgammaSliceFlags.ringerVersion()
      self._logger.info('TrigMultiVarHypo version: %s',self._basePath)
    else:
      self._basePath = self._default_basepath
      self._logger.info('TrigMultiVarHypo version: %s (default)',self._basePath)

    # Electron files
    self._electronConstants = {
        'vloose' : 'TrigL2CaloRingerElectronVeryLooseConstants.root',
        'loose'  : 'TrigL2CaloRingerElectronLooseConstants.root',
        'medium' : 'TrigL2CaloRingerElectronMediumConstants.root',
        'tight'  : 'TrigL2CaloRingerElectronTightConstants.root',
        }
    self._electronCutDefs = {
        'vloose' : 'TrigL2CaloRingerElectronVeryLooseThresholds.root',
        'loose'  : 'TrigL2CaloRingerElectronLooseThresholds.root',
        'medium' : 'TrigL2CaloRingerElectronMediumThresholds.root',
        'tight'  : 'TrigL2CaloRingerElectronTightThresholds.root',
        }

    #TODO: photon paths for future
    self._photonConstants = {
        'vloose' : 'TrigL2CaloRingerPhotonVeryLooseConstants.root',
        'loose'  : 'TrigL2CaloRingerPhotonLooseConstants.root',
        'medium' : 'TrigL2CaloRingerPhotonMediumConstants.root',
        'tight'  : 'TrigL2CaloRingerPhotonTightConstants.root',
        }
    self._photonCutDefs = {
        'vloose' : 'TrigL2CaloRingerPhotonVeryLooseThresholds.root',
        'loose'  : 'TrigL2CaloRingerPhotonLooseThresholds.root',
        'medium' : 'TrigL2CaloRingerPhotonMediumThresholds.root',
        'tight'  : 'TrigL2CaloRingerPhotonTightThresholds.root',
        }