def LArNoisyROSummaryCfg(configFlags): result = ComponentAccumulator() result.merge(LArKnownBadFebCfg(configFlags)) result.merge(LArKnownMNBFebCfg(configFlags)) # now configure the algorithm try: LArNoisyROAlg, LArNoisyROTool = CompFactory.getComps( "LArNoisyROAlg", "LArNoisyROTool") except Exception: import traceback print(traceback.format_exc()) return result theLArNoisyROTool = LArNoisyROTool( CellQualityCut=larNoisyROFlags.CellQualityCut(), BadChanPerFEB=larNoisyROFlags.BadChanPerFEB(), BadFEBCut=larNoisyROFlags.BadFEBCut(), MNBLooseCut=larNoisyROFlags.MNBLooseCut(), MNBTightCut=larNoisyROFlags.MNBTightCut(), MNBTight_PsVetoCut=larNoisyROFlags.MNBTight_PsVetoCut()) result.setPrivateTools(theLArNoisyROTool) theLArNoisyROAlg = LArNoisyROAlg() theLArNoisyROAlg.Tool = result.popPrivateTools() result.addEventAlgo(theLArNoisyROAlg) return result
def LArNoisyROMonConfigOld(inputFlags, inKey="", NoisyFEBDefStr="", MNBTightFEBDefStr="", MNBTight_PsVetoFEBDefStr="", MNBLooseFEBDefStr=""): from LArCellRec.LArNoisyROFlags import larNoisyROFlags NoisyFEBDefStr = '(>'+str(larNoisyROFlags.BadChanPerFEB())+' chan with Q>'+str(larNoisyROFlags.CellQualityCut())+')' MNBTightFEBDefStr = '(>'+str(larNoisyROFlags.MNBTightCut())+' chan with Q>'+str(larNoisyROFlags.CellQualityCut())+')' MNBTight_PsVetoFEBDefStr = '(>'+str(larNoisyROFlags.MNBTight_PsVetoCut()[0])+' chan with Q>'+str(larNoisyROFlags.CellQualityCut())+') + PS veto (<'+str(larNoisyROFlags.MNBTight_PsVetoCut()[1])+' channels)' MNBLooseFEBDefStr = '(>'+str(larNoisyROFlags.MNBLooseCut())+' chan with Q>'+str(larNoisyROFlags.CellQualityCut())+')' from AthenaMonitoring import AthMonitorCfgHelperOld from LArMonitoring.LArMonitoringConf import LArNoisyROMonAlg helper = AthMonitorCfgHelperOld(inputFlags,'LArNoisyROMonAlgOldCfg') LArNoisyROMonConfigCore(helper,LArNoisyROMonAlg, inputFlags, inKey, NoisyFEBDefStr, MNBTightFEBDefStr, MNBTight_PsVetoFEBDefStr, MNBLooseFEBDefStr) return helper.result()
def configure(self): from AthenaCommon.Logging import logging mlog = logging.getLogger( 'LArNoisyROSummaryGetter::configure:' ) mlog.info ('entering') # get handle to upstream CaloCell object import traceback try: from CaloRec.CaloCellGetter import CaloCellGetter theCaloCellGetter = CaloCellGetter() except: mlog.error("could not get handle to CaloCell Quit") traceback.print_exc() return False if not theCaloCellGetter.usable(): if not self.ignoreConfigError(): mlog.error("CaloCellGetter unusable. Quit.") return False else: mlog.error("CaloCellGetter unusable. Continue nevertheless") LArOnOffIdMapping() # Set up cabling cond algo # now configure the algorithm # cannot have same name try: from LArCellRec.LArCellRecConf import LArNoisyROAlg,LArNoisyROTool except: mlog.error("could not import LArNoisyROAlg or LArNoisyROTool") traceback.print_exc() return False theLArNoisyROTool=LArNoisyROTool(CellQualityCut=larNoisyROFlags.CellQualityCut(), BadChanPerFEB=larNoisyROFlags.BadChanPerFEB(), BadFEBCut=larNoisyROFlags.BadFEBCut(), MNBLooseCut=larNoisyROFlags.MNBLooseCut(), MNBTightCut=larNoisyROFlags.MNBTightCut(), MNBTight_PsVetoCut=larNoisyROFlags.MNBTight_PsVetoCut() ) theLArNoisyROAlg=LArNoisyROAlg() theLArNoisyROAlg.Tool=theLArNoisyROTool self._LArNoisyROMakerHandle = theLArNoisyROAlg theLArNoisyROAlg.OutputKey=self.outputKey() if globalflags.DataSource()=='geant4': theLArNoisyROAlg.isMC = True # register output in objKeyStore from RecExConfig.ObjKeyStore import objKeyStore objKeyStore.addStreamESD(self.outputType(),self.outputKey()) objKeyStore.addTransient(self.outputType(),self.outputKey()) # now add algorithm to topSequence # this should always come at the end from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() topSequence += theLArNoisyROAlg return True
def configure(self): from AthenaCommon.Logging import logging mlog = logging.getLogger('LArNoisyROSummaryGetter::configure:') mlog.info('entering') # get handle to upstream CaloCell object import traceback try: from CaloRec.CaloCellGetter import CaloCellGetter theCaloCellGetter = CaloCellGetter() except: mlog.error("could not get handle to CaloCell Quit") print traceback.format_exc() return False if not theCaloCellGetter.usable(): if not self.ignoreConfigError(): mlog.error("CaloCellGetter unusable. Quit.") return False else: mlog.error("CaloCellGetter unusable. Continue nevertheless") # now configure the algorithm # cannot have same name try: from LArCellRec.LArCellRecConf import LArNoisyROAlg, LArNoisyROTool except: mlog.error("could not import LArNoisyROAlg or LArNoisyROTool") print traceback.format_exc() return False from AthenaCommon.AppMgr import ToolSvc # Noise and MNB Febs from COOL only for data from AthenaCommon.GlobalFlags import globalflags from IOVDbSvc.CondDB import conddb if globalflags.DataSource.get_Value() != 'geant4' and ( 'COMP200' not in conddb.GetInstance()): from LArBadChannelTool.LArBadChannelToolConf import LArBadChanTool theBadFebTool = LArBadChanTool("KnownBADFEBsTool") theBadFebTool.CoolMissingFEBsFolder = "/LAR/BadChannels/KnownBADFEBs" ToolSvc += theBadFebTool theMNBFebTool = LArBadChanTool("KnownMNBFEBsTool") theMNBFebTool.CoolMissingFEBsFolder = "/LAR/BadChannels/KnownMNBFEBs" ToolSvc += theMNBFebTool theLArNoisyROTool = LArNoisyROTool( PrintSummary=True, CellQualityCut=larNoisyROFlags.CellQualityCut(), BadChanPerFEB=larNoisyROFlags.BadChanPerFEB(), BadFEBCut=larNoisyROFlags.BadFEBCut(), MNBLooseCut=larNoisyROFlags.MNBLooseCut(), MNBTightCut=larNoisyROFlags.MNBTightCut(), MNBTight_PsVetoCut=larNoisyROFlags.MNBTight_PsVetoCut(), KnownBADFEBsTool=theBadFebTool, KnownMNBFEBsTool=theMNBFebTool) else: theLArNoisyROTool = LArNoisyROTool( PrintSummary=True, CellQualityCut=larNoisyROFlags.CellQualityCut(), BadChanPerFEB=larNoisyROFlags.BadChanPerFEB(), BadFEBCut=larNoisyROFlags.BadFEBCut(), ) pass theLArNoisyROAlg = LArNoisyROAlg() theLArNoisyROAlg.Tool = theLArNoisyROTool self._LArNoisyROMakerHandle = theLArNoisyROAlg theLArNoisyROAlg.OutputKey = self.outputKey() # register output in objKeyStore from RecExConfig.ObjKeyStore import objKeyStore objKeyStore.addStreamESD(self.outputType(), self.outputKey()) # now add algorithm to topSequence # this should always come at the end from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() topSequence += theLArNoisyROAlg return True
OnlineMode = athenaCommonFlags.isOnline() # variable for testing on ESD try: LArNoisyROMonForceTrigger except NameError: LArNoisyROMonForceTrigger = False from LArCellRec.LArNoisyROFlags import larNoisyROFlags theLArNoisyROMon = LArNoisyROMon(name="LArNoisyROMon") theLArNoisyROMon.IsOnline = OnlineMode theLArNoisyROMon.ProcessNEvents = EventBlockSize theLArNoisyROMon.NoisyFEBDefStr = '(>' + str( larNoisyROFlags.BadChanPerFEB()) + ' chan with Q>' + str( larNoisyROFlags.CellQualityCut()) + ')' theLArNoisyROMon.MNBLooseFEBDefStr = '(>' + str( larNoisyROFlags.MNBLooseCut()) + ' chan with Q>' + str( larNoisyROFlags.CellQualityCut()) + ')' theLArNoisyROMon.MNBTightFEBDefStr = '(>' + str( larNoisyROFlags.MNBTightCut()) + ' chan with Q>' + str( larNoisyROFlags.CellQualityCut()) + ')' theLArNoisyROMon.MNBTight_PsVetoFEBDefStr = '(>' + str( larNoisyROFlags.MNBTight_PsVetoCut()[0]) + ' chan with Q>' + str( larNoisyROFlags.CellQualityCut()) + ') + PS veto (<' + str( larNoisyROFlags.MNBTight_PsVetoCut()[1]) + ' channels)' theLArNoisyROMon.KnownMNBFEBs = larNoisyROFlags.KnownMNBFEBs() theLArNoisyROMon.BadFEBCut = larNoisyROFlags.BadFEBCut() from RecExConfig.RecFlags import rec
from LArMonTools.LArMonToolsConf import LArNoisyROMon from LArMonTools.LArMonFlags import LArMonFlags # variable for testing on ESD try: LArNoisyROMonForceTrigger except NameError: LArNoisyROMonForceTrigger = False from LArCellRec.LArNoisyROFlags import larNoisyROFlags theLArNoisyROMon = LArNoisyROMon(name="LArNoisyROMon") theLArNoisyROMon.IsOnline = False theLArNoisyROMon.inputKey = "LArNoisyROSummary" theLArNoisyROMon.ProcessNEvents= LArMonFlags.EventBlockSize() theLArNoisyROMon.NoisyFEBDefStr = '(>'+str(larNoisyROFlags.BadChanPerFEB())+' chan with Q>'+str(larNoisyROFlags.CellQualityCut())+')' #LArNoisyROCutHelper('BadChanPerFEB') theLArNoisyROMon.BadFEBCut = larNoisyROFlags.BadFEBCut() #LArNoisyROFEBCutHelper() theLArNoisyROMon.doTrigger = False theLArNoisyROMon.doHisto = False theLArNoisyROMon.OutputLevel = DEBUG ToolSvc += theLArNoisyROMon from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager larRawMon=False larESDMon=True from AthenaMonitoring.DQMonFlags import DQMonFlags LArMonFlags.doLArDigitMon = False LArMonFlags.EventBlockSize = 0 LArMon = AthenaMonManager(name="LArMonManager", FileKey = "LArMon",