diff --git a/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileCalibRec.py b/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileCalibRec.py index eb01ad1c38c5f76756e3c50e869c7833ae17c07e..1fdf48a9284d6a2e5dc84a8c4a104a6d72e79680 100644 --- a/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileCalibRec.py +++ b/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileCalibRec.py @@ -206,8 +206,10 @@ else: Year = 2017 elif RunNumber < 367980: Year = 2018 - else: + elif RunNumber < 374260: Year = 2019 + else: + Year = 2020 if 'RunStream' in dir(): @@ -615,6 +617,13 @@ if not 'doCaloCell' in dir(): if not 'TileD3PDSavePosition' in dir(): TileD3PDSavePosition = False +if not 'TileFragIDsToIgnoreDMUErrors' in dir(): + # List of Tile module frag IDs for which ignore DMU errors + if RunNumber > 370000: + TileFragIDsToIgnoreDMUErrors = [0x10D] # Tile Demonstrator + else: + TileFragIDsToIgnoreDMUErrors = [] + #--------------- # end of options #--------------- @@ -716,8 +725,8 @@ else: # Set Global tag for IOVDbSvc if not 'CondDbTag' in dir(): if RUN2: - if 'UPD4' in dir() and UPD4: CondDbTag = 'CONDBR2-BLKPA-2018-03' - else: CondDbTag = 'CONDBR2-ES1PA-2018-02' + if 'UPD4' in dir() and UPD4: CondDbTag = 'CONDBR2-BLKPA-2018-13' + else: CondDbTag = 'CONDBR2-ES1PA-2018-05' else: if 'UPD4' in dir() and UPD4 and RunNumber > 141066: CondDbTag = 'COMCOND-BLKPA-RUN1-06' else: CondDbTag = 'COMCOND-ES1PA-006-05' @@ -831,11 +840,6 @@ if not 'newRDO' in dir() or newRDO is None: else: newRDO = True -if ReadPool and newRDO: - topSequence += CfgMgr.xAODMaker__EventInfoNonConstCnvAlg() -else: - from xAODEventInfoCnv.xAODEventInfoCreator import xAODMaker__EventInfoCnvAlg - topSequence+=xAODMaker__EventInfoCnvAlg() #============================================================ #=== configure BunchCrossingTool @@ -847,6 +851,9 @@ ToolSvc += BunchCrossingTool("LHC" if globalflags.DataSource() == "data" else "M #=== read ByteStream and reconstruct data #============================================================= tileRawChannelBuilderFitFilter = None +tileRawChannelBuilderFitFilterCool = None +tileRawChannelBuilderMF = None +tileRawChannelBuilderOF1 = None tileRawChannelBuilderOpt2Filter = None tileRawChannelBuilderOptATLAS = None tileRawChannelBuilderWienerFilter = None @@ -871,6 +878,9 @@ else: from TileRecUtils.TileRawChannelGetter import * theTileRawChannelGetter=TileRawChannelGetter() tileRawChannelBuilderFitFilter = theTileRawChannelGetter.TileRawChannelBuilderFitFilter() + tileRawChannelBuilderFitFilterCool = theTileRawChannelGetter.TileRawChannelBuilderFitFilterCool() + tileRawChannelBuilderMF = theTileRawChannelGetter.TileRawChannelBuilderMF() + tileRawChannelBuilderOF1 = theTileRawChannelGetter.TileRawChannelBuilderOF1() tileRawChannelBuilderOpt2Filter = theTileRawChannelGetter.TileRawChannelBuilderOpt2Filter() tileRawChannelBuilderOptATLAS = theTileRawChannelGetter.TileRawChannelBuilderOptATLAS() tileRawChannelBuilderWienerFilter = theTileRawChannelGetter.TileRawChannelBuilderWienerFilter() @@ -889,11 +899,11 @@ if doTileFit and tileRawChannelBuilderFitFilter: printfunc (tileRawChannelBuilderFitFilter) -if doTileFitCool: - ToolSvc.TileRawChannelBuilderFitFilterCool.MaxTimeFromPeak = 250.0; # recover behaviour of rel 13.0.30 - ToolSvc.TileRawChannelBuilderFitFilterCool.UseDSPCorrection = not TileBiGainRun +if doTileFitCool and tileRawChannelBuilderFitFilterCool: + tileRawChannelBuilderFitFilterCool.MaxTimeFromPeak = 250.0; # recover behaviour of rel 13.0.30 + tileRawChannelBuilderFitFilterCool.UseDSPCorrection = not TileBiGainRun - printfunc (ToolSvc.TileRawChannelBuilderFitFilterCool) + printfunc (tileRawChannelBuilderFitFilterCool) if doTileOpt2: @@ -920,35 +930,28 @@ if doTileOptATLAS and tileRawChannelBuilderOptATLAS: printfunc (tileRawChannelBuilderOptATLAS) -if doTileMF: +if doTileMF and tileRawChannelBuilderMF: if PhaseFromCOOL: - ToolSvc.TileRawChannelBuilderMF.correctTime = False; # do not need to correct time with best phase - - ToolSvc.TileRawChannelBuilderMF.BestPhase = PhaseFromCOOL; # Phase from COOL or assume phase=0 - ToolSvc.TileRawChannelBuilderMF.UseDSPCorrection = not TileBiGainRun - - if OfcFromCOOL and not doTileFitCool: - TilePulseTypes = {0 : 'PHY', 1 : 'PHY', 2 : 'LAS', 4 : 'PHY', 8 : 'CIS'} - TilePulse = TilePulseTypes[jobproperties.TileRecFlags.TileRunType()] + tileRawChannelBuilderMF.correctTime = False; # do not need to correct time with best phase - tileInfoConfigurator.setupCOOLPULSE(type = TilePulse) - tileInfoConfigurator.setupCOOLAutoCr() + tileRawChannelBuilderMF.BestPhase = PhaseFromCOOL; # Phase from COOL or assume phase=0 + tileRawChannelBuilderMF.UseDSPCorrection = not TileBiGainRun - printfunc (ToolSvc.TileRawChannelBuilderMF ) + printfunc (tileRawChannelBuilderMF ) -if doTileOF1: - ToolSvc.TileRawChannelBuilderOF1.PedestalMode = TileOF1Ped +if doTileOF1 and tileRawChannelBuilderOF1: + tileRawChannelBuilderOF1.PedestalMode = TileOF1Ped if PhaseFromCOOL: - ToolSvc.TileRawChannelBuilderOF1.correctTime = False # do not need to correct time with best phase + tileRawChannelBuilderOF1.correctTime = False # do not need to correct time with best phase - ToolSvc.TileRawChannelBuilderOF1.BestPhase = PhaseFromCOOL # Phase from COOL or assume phase=0 + tileRawChannelBuilderOF1.BestPhase = PhaseFromCOOL # Phase from COOL or assume phase=0 if TileCompareMode or TileEmulateDSP: - ToolSvc.TileRawChannelBuilderOF1.EmulateDSP = True # use dsp emulation - ToolSvc.TileRawChannelBuilderOF1.UseDSPCorrection = not TileBiGainRun + tileRawChannelBuilderOF1.EmulateDSP = True # use dsp emulation + tileRawChannelBuilderOF1.UseDSPCorrection = not TileBiGainRun - printfunc (ToolSvc.TileRawChannelBuilderOF1 ) + printfunc (tileRawChannelBuilderOF1) if doTileWiener and tileRawChannelBuilderWienerFilter: if PhaseFromCOOL: @@ -1282,8 +1285,9 @@ if doTileMon: histoPathBase = "/Tile/Digits", book2D = b2d, runType = runType, + FragIDsToIgnoreDMUErrors = TileFragIDsToIgnoreDMUErrors, FillPedestalDifference = True) - #ToolSvc += theTileDigitsMon + TileMon.AthenaMonTools += [ theTileDigitsMon ] printfunc (theTileDigitsMon) @@ -1293,8 +1297,9 @@ if doTileMon: histoPathBase = "/Tile/RawChannel", book2D = b2d, PlotDSP = useRODReco, + FragIDsToIgnoreDMUErrors = TileFragIDsToIgnoreDMUErrors, runType = runType ) - #ToolSvc += theTileRawChannelMon + TileMon.AthenaMonTools += [ theTileRawChannelMon ] theTileRawChannelMon.TileRawChannelContainer = "TileRawChannelCnt"; # default for simulation @@ -1359,7 +1364,6 @@ if doTileMon: if useRODReco: theTileDQFragMon.TileRawChannelContainerDSP = "TileRawChannelCnt" - #ToolSvc += theTileDQFragMon; TileMon.AthenaMonTools += [ theTileDQFragMon ]; printfunc (theTileDQFragMon) @@ -1372,7 +1376,7 @@ if doTileMon: negEnergyThreshold = -2000, energyThreshold = 300, histoPathBase = "/Tile/Cell"); - #ToolSvc += theTileCellMonHG; + TileMon.AthenaMonTools += [ theTileCellMonHG ]; printfunc (theTileCellMonHG) @@ -1388,7 +1392,6 @@ if doTileMon: #theTileCellMon.energyThreshold = 300. #theTileCellMon.energyThresholdForTime = 150. #theTileCellMon.FillTimeHistograms = True - #ToolSvc += theTileCellMon; TileMon.AthenaMonTools += [ theTileCellMon ]; printfunc (theTileCellMon) @@ -1397,10 +1400,11 @@ if doTileMon: OutputLevel = OutputLevel, TileDigitsContainer = "TileDigitsCnt", CheckDCS = TileUseDCS, + FragIDsToIgnoreDMUErrors = TileFragIDsToIgnoreDMUErrors, histoPathBase = "/Tile/DigiNoise" ); if not TileBiGainRun: TileDigiNoiseMon.TriggerTypes = [ 0x82 ] - #ToolSvc += TileDigiNoiseMon; + TileMon.AthenaMonTools += [ TileDigiNoiseMon ]; printfunc (TileDigiNoiseMon) @@ -1412,7 +1416,6 @@ if doTileMon: histoPathBase = "/Tile/CellNoise/LG"); TileCellNoiseMonLG.Xmin = -2000.; TileCellNoiseMonLG.Xmax = 2000.; - #ToolSvc += TileCellNoiseMonLG; TileMon.AthenaMonTools += [ TileCellNoiseMonLG ]; printfunc (TileCellNoiseMonLG) @@ -1424,7 +1427,6 @@ if doTileMon: histoPathBase = "/Tile/CellNoise/HG"); TileCellNoiseMonHG.Xmin = -300.; TileCellNoiseMonHG.Xmax = 300.; - #ToolSvc += TileCellNoiseMonHG; TileMon.AthenaMonTools += [ TileCellNoiseMonHG ]; printfunc (TileCellNoiseMonHG) @@ -1436,7 +1438,6 @@ if doTileMon: histoPathBase = "/Tile/CellNoise"); TileCellNoiseMon.Xmin = -2000.; TileCellNoiseMon.Xmax = 2000.; - #ToolSvc += TileCellNoiseMon; TileMon.AthenaMonTools += [ TileCellNoiseMon ]; printfunc (TileCellNoiseMon) @@ -1451,7 +1452,6 @@ if doTileMon: CheckDCS = TileUseDCS, TileRawChannelContainer = "TileRawChannelFit") - #ToolSvc += TileRawChannelTimeMon TileMon.AthenaMonTools += [ TileRawChannelTimeMon ]; printfunc (TileRawChannelTimeMon) @@ -1472,7 +1472,6 @@ if doTileMon: CheckDCS = TileUseDCS, SummaryUpdateFrequency = 0 ); - #ToolSvc += TileRawChannelNoiseMonLG; TileMon.AthenaMonTools += [ TileRawChannelNoiseMonLG ]; printfunc (TileRawChannelNoiseMonLG) @@ -1488,8 +1487,6 @@ if doTileMon: # doFit = True, SummaryUpdateFrequency = 0 ); - - #ToolSvc += TileRawChannelNoiseMonHG; TileMon.AthenaMonTools += [ TileRawChannelNoiseMonHG ]; printfunc (TileRawChannelNoiseMonHG) @@ -1509,7 +1506,6 @@ if doTileMon: # if not defined here, then by default all triggers will be considered TileRawChannelNoiseMon.TriggerTypes = [ 0x82 ]; - #ToolSvc += TileRawChannelNoiseMon; TileMon.AthenaMonTools += [ TileRawChannelNoiseMon ]; printfunc (TileRawChannelNoiseMon) diff --git a/TileCalorimeter/TileRecUtils/python/TileRawChannelGetter.py b/TileCalorimeter/TileRecUtils/python/TileRawChannelGetter.py index 1696fda34746b624f47beef0e5a261326cc3baa7..e158a11c86d5c729d237cdf34dba569e3aaa4bf4 100644 --- a/TileCalorimeter/TileRecUtils/python/TileRawChannelGetter.py +++ b/TileCalorimeter/TileRecUtils/python/TileRawChannelGetter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Author: J. Poveda (Ximo.Poveda@cern.ch) # TileRawChannel creation from TileDigits @@ -28,8 +28,12 @@ class TileRawChannelGetter ( Configured) : mlog.info ("entering") self._TileRawChannelBuilderFitFilter = None + self._TileRawChannelBuilderFitFilterCool = None + self._TileRawChannelBuilderMF = None + self._TileRawChannelBuilderOF1 = None self._TileRawChannelBuilderOpt2Filter = None self._TileRawChannelBuilderOptATLAS = None + self._TileRawChannelBuilderWienerFilter = None # Instantiation of the C++ algorithm try: @@ -315,6 +319,7 @@ class TileRawChannelGetter ( Configured) : mlog.info(" adding now TileRawChannelBuilderFitFilterCool to the algorithm: %s", theTileRawChannelMaker.name()) theTileRawChannelMaker.TileRawChannelBuilder += [theTileRawChannelBuilderFitFilterCool] + self._TileRawChannelBuilderFitFilterCool = theTileRawChannelBuilderFitFilterCool # matched filter if jobproperties.TileRecFlags.doTileMF(): @@ -354,6 +359,7 @@ class TileRawChannelGetter ( Configured) : mlog.info(" adding now TileRawChannelBuilderMF to the algorithm: %s", theTileRawChannelMaker.name()) theTileRawChannelMaker.TileRawChannelBuilder += [theTileRawChannelBuilderMF] + self._TileRawChannelBuilderMF = theTileRawChannelBuilderMF if jobproperties.TileRecFlags.doTileOF1(): try: @@ -396,10 +402,11 @@ class TileRawChannelGetter ( Configured) : theTileRawChannelBuilderOF1.TimeMinForAmpCorrection = jobproperties.TileRecFlags.TimeMinForAmpCorrection() theTileRawChannelBuilderOF1.TimeMaxForAmpCorrection = jobproperties.TileRecFlags.TimeMaxForAmpCorrection() - theTileRawChannelBuilderOF1 = TileRawChannelContainerDSP + theTileRawChannelBuilderOF1.DSPContainer = TileRawChannelContainerDSP mlog.info(" adding now TileRawChannelBuilderOF1 to the algorithm: %s", theTileRawChannelMaker.name()) theTileRawChannelMaker.TileRawChannelBuilder += [theTileRawChannelBuilderOF1] + self._TileRawChannelBuilderOF1 = theTileRawChannelBuilderOF1 if jobproperties.TileRecFlags.doTileOpt2(): try: @@ -514,6 +521,7 @@ class TileRawChannelGetter ( Configured) : mlog.info(" adding now TileRawChannelBuilderWienerFilter to the algorithm: %s", theTileRawChannelMaker.name()) theTileRawChannelMaker.TileRawChannelBuilder += [theTileRawChannelBuilderWienerFilter] + self._TileRawChannelBuilderWienerFilter = theTileRawChannelBuilderWienerFilter # now add algorithm to topSequence @@ -561,13 +569,25 @@ class TileRawChannelGetter ( Configured) : def TileRawChannelBuilderFitFilter(self): return self._TileRawChannelBuilderFitFilter - + + def TileRawChannelBuilderFitFilterCool(self): + return self._TileRawChannelBuilderFitFilterCool + + def TileRawChannelBuilderMF(self): + return self._TileRawChannelBuilderMF + + def TileRawChannelBuilderOF1(self): + return self._TileRawChannelBuilderOF1 + def TileRawChannelBuilderOpt2Filter(self): return self._TileRawChannelBuilderOpt2Filter def TileRawChannelBuilderOptATLAS(self): return self._TileRawChannelBuilderOptATLAS - + + def TileRawChannelBuilderWienerFilter(self): + return self._TileRawChannelBuilderWienerFilter + ## # would work only if one output object type ## def outputKey(self): ## return self._output[self._outputType]