diff --git a/TileCalorimeter/TileExample/TileSimEx/scripts/myjob_dig.py b/TileCalorimeter/TileExample/TileSimEx/scripts/myjob_dig.py deleted file mode 100644 index effee346f9ce37375f6d54f1f69d32668eda0a2d..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileExample/TileSimEx/scripts/myjob_dig.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -#============================================================== -# -# Configuration of Job options file for Digitization -# -# The original copy of this job option is ../share/jobOptions_TileTB_Dig.py, -# This skeleton is modified to loop over particle types, beam energies, -# and physics lists in sub_jobs.sha to setup the output file names. -# -# This job option will call ../share/jobOptions_Tile_Dig.py, -#============================================================== - -TileTB=True -doCBNT=True - -if not 'doHitNtuple' in dir(): - doHitNtuple = True - -if not 'doTileNtuple' in dir(): - doTileNtuple = True - -if not 'doRDO' in dir(): - doRDO = False - -# Setup FileSuffix for the outpu files -# EBEAMENERGY, PARTICLENAME, PHYSICSLIST will be replaced in sub_jobs.sh. -if not 'FileSuffix' in dir(): - FileSuffix='90-EBEAMENERGY-PARTICLENAME_PHYSICSLIST' - -# TileCal standalone setup with 2 barrels and 2 ext.barrels on top is the default setup in this simulation. -if not 'Geo' in dir(): - Geo = '2B2EB' -# Call Job options file for Digitization -include("TileSimEx/jobOptions_Tile_Dig.py") - diff --git a/TileCalorimeter/TileExample/TileSimEx/share/jobOptions_NoiseMC.py b/TileCalorimeter/TileExample/TileSimEx/share/jobOptions_NoiseMC.py deleted file mode 100644 index 7faee525c9f5d53428f4a43d2fb6bafbde3bf249..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileExample/TileSimEx/share/jobOptions_NoiseMC.py +++ /dev/null @@ -1,264 +0,0 @@ -#============================================================== -# -# Job options file to produce ROOT file with electronic noise -# -# Full ATLAS setup, TileCal only digitization -# -#============================================================== - -from AthenaCommon.AppMgr import theApp -svcMgr = theApp.serviceMgr() - -from AthenaCommon.Logging import logging -logDigitization_flags = logging.getLogger( 'Tile_Digitization' ) - -#--- Output printout level ----------------------------------- -#output threshold (1=VERBOSE, 2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL) -if not 'OutputLevel' in dir(): - OutputLevel = 4 -svcMgr.MessageSvc.OutputLevel = OutputLevel -svcMgr.MessageSvc.defaultLimit = 1000000 -svcMgr.MessageSvc.Format = "% F%60W%S%7W%R%T %0W%M" -svcMgr.MessageSvc.useColors = False - -# get a handle on topalg -from AthenaCommon.AlgSequence import AlgSequence -topSequence = AlgSequence() - -#-------------------------------------------------------------- -# configuration flags -#-------------------------------------------------------------- - -# - Number of events to be processed -if not 'EvtMax' in dir(): - EvtMax = 100000 - -# location of sqlite files, input pool files and output root files -SqliteDirectoryCesium="." -SqliteDirectoryNoise="." -SqliteDirectoryBch="." -InputDirectory="." -OutputDirectory="." - -# name of sqlite files with new sample noise and new bad channel list -if not 'DBFileBch' in dir(): - DBFileBch="" -if not 'DBFileNoise' in dir(): - DBFileNoise="" -if not 'DBFileCesium' in dir(): - DBFileCesium="" -if not 'BchTag' in dir(): - BchTag="" -if not 'NoiseTag' in dir(): - NoiseTag="" -if not 'CesiumTag' in dir(): - CesiumTag="" -if not 'RunNumber' in dir(): - RunNumber = 410000 - -# Version number which is appended to output file name -if not 'Version' in dir(): - Version = 0 -Suffix=("%d" % Version ) - -# - input file with hits -if not 'PoolHitsInput' in dir(): - PoolHitsInput = 'HITS.pool.root' - -# - output file with digits -if not 'PoolRDOOutput' in dir(): - PoolRDOOutput = 'DIGITS.pool_%s.root' % Suffix - -if not 'ConddbTag' in dir(): - ConddbTag = 'OFLCOND-MC23-SDR-RUN3-01' - -if not 'DetDescrVersion' in dir(): - DetDescrVersion = 'ATLAS-R3S-2021-03-00-00' - -# adding directory names to all input/output files -if not "/" in DBFileBch and DBFileBch!="" and SqliteDirectoryBch!=".": DBFileBch=SqliteDirectoryBch+"/"+DBFileBch -if not "/" in DBFileNoise and DBFileNoise!="" and SqliteDirectoryNoise!=".": DBFileNoise=SqliteDirectoryNoise+"/"+DBFileNoise -if not "/" in DBFileCesium and DBFileCesium!="" and SqliteDirectoryCesium!=".": DBFileCesium=SqliteDirectoryCesium+"/"+DBFileCesium -if not "/" in PoolHitsInput and InputDirectory!="." : PoolHitsInput=InputDirectory+"/"+PoolHitsInput -if not "/" in PoolRDOOutput and OutputDirectory!="." : PoolRDOOutput=OutputDirectory+"/"+PoolRDOOutput - -from AthenaCommon.GlobalFlags import globalflags -globalflags.DetGeo.set_Value_and_Lock('atlas') -globalflags.Luminosity.set_Value_and_Lock('zero') -globalflags.DataSource.set_Value_and_Lock('geant4') -globalflags.InputFormat.set_Value_and_Lock('pool') -#globalflags.DatabaseInstance="OFLP200" - -from TileConditions.TileCoolMgr import tileCoolMgr -if BchTag!="": - tileCoolMgr.isOfflineOnly('oflStatAdc') - tileCoolMgr.setFolder('oflStatAdc','/TILE/OFL02/STATUS/ADC') - tileCoolMgr.setTag( "oflStatAdc",BchTag) - if DBFileBch!="": - tileCoolMgr.setDbConn("oflStatAdc", DBFileBch) - -if NoiseTag!="": - tileCoolMgr.setFolder("onlNoiseAdc","/TILE/OFL02/NOISE/SAMPLE") - tileCoolMgr.setTag("onlNoiseAdc",NoiseTag) - tileCoolMgr.setFolder("oflNoiseAdc","/TILE/OFL02/NOISE/SAMPLE") - tileCoolMgr.setTag("oflNoiseAdc",NoiseTag) - if DBFileNoise!="": - tileCoolMgr.setDbConn("onlNoiseAdc", DBFileNoise) - tileCoolMgr.setDbConn("oflNoiseAdc", DBFileNoise) - -if CesiumTag!="": - tileCoolMgr.setFolder("onlCes","/TILE/OFL02/CALIB/CES") - tileCoolMgr.setTag("onlCes",CesiumTag) - tileCoolMgr.setFolder("oflCes","/TILE/OFL02/CALIB/CES") - tileCoolMgr.setTag("oflCes",CesiumTag) - if DBFileCesium!="": - tileCoolMgr.setDbConn("onlCes", DBFileCesium) - tileCoolMgr.setDbConn("oflCes", DBFileCesium) - - - -#-------------------------------------------------------------- -# AthenaCommon configuration -#-------------------------------------------------------------- -from AthenaCommon.AthenaCommonFlags import jobproperties -#jobproperties.AthenaCommonFlags.AllowIgnoreConfigError=False #This job will stop if an include fails. - -jobproperties.AthenaCommonFlags.EvtMax = EvtMax -# Set input file -jobproperties.AthenaCommonFlags.PoolHitsInput=[] -for i in range (0,100): # one file contains few events only, use it 100 times - jobproperties.AthenaCommonFlags.PoolHitsInput+=[PoolHitsInput] -jobproperties.AthenaCommonFlags.PoolRDOOutput=PoolRDOOutput - -#-------------------------------------------------------------------- -# DetFlags. Use to turn on/off individual subdetector or LVL1 trigger -#-------------------------------------------------------------------- -from AthenaCommon.DetFlags import DetFlags - -DetFlags.ID_setOff() -DetFlags.Calo_setOff() -DetFlags.Muon_setOff() -DetFlags.LVL1_setOff() -#DetFlags.sTGCMicromegas_setOff() - -DetFlags.Truth_setOn() - -DetFlags.Tile_setOn() - -# - switch off tasks -DetFlags.pileup.all_setOff() -DetFlags.simulate.all_setOff() -DetFlags.makeRIO.all_setOff() -DetFlags.writeBS.all_setOff() -DetFlags.readRDOBS.all_setOff() -DetFlags.readRIOBS.all_setOff() -DetFlags.readRDOPool.all_setOff() -DetFlags.writeRDOPool.all_setOff() -DetFlags.readRIOPool.all_setOff() -DetFlags.writeRIOPool.all_setOff() -DetFlags.simulateLVL1.all_setOff() - -# - print flags -DetFlags.Print() - - -#-------------------------------------------------------------- -# Global flags. Like eg the DD version: -#-------------------------------------------------------------- -from AthenaCommon.BeamFlags import jobproperties -jobproperties.Beam.beamType.set_Value_and_Lock('collisions') - -#from IOVDbSvc.CondDB import conddb -#conddb.setGlobalTag(ConddbTag); -#log.info( "ConddbTag = %s" % (ConddbTag) ) - -from AthenaCommon.GlobalFlags import jobproperties -jobproperties.Global.DetDescrVersion = DetDescrVersion -log.info( "DetDescrVersion = %s" % (jobproperties.Global.DetDescrVersion()) ) - -from AtlasGeoModel import SetGeometryVersion -from AtlasGeoModel import GeoModelInit -from GeoModelSvc.GeoModelSvcConf import GeoModelSvc -GeoModelSvc = GeoModelSvc() -GeoModelSvc.IgnoreTagDifference = True -log.info( "GeoModelSvc.AtlasVersion = %s" % (GeoModelSvc.AtlasVersion) ) -#GeoModelSvc.TileVersionOverride = "TileCal-GEO-13" -#log.info( "GeoModelSvc.TileVersionOverride = %s" % (GeoModelSvc.TileVersionOverride) ) - -#-------------------------------------------------------------- -# Digitiziation and Pileup configuration -#-------------------------------------------------------------- -from Digitization.DigitizationFlags import jobproperties -# jobproperties.Digitization.doInDetNoise=True -jobproperties.Digitization.doCaloNoise = True -# This tag must be specified for dowstream jobs -jobproperties.Digitization.IOVDbGlobalTag = ConddbTag -jobproperties.Digitization.simRunNumber = RunNumber -jobproperties.Digitization.dataRunNumber = RunNumber -# jobproperties.Digitization.doMuonNoise=True -# jobproperties.Digitization.doMinimumBias=True -# jobproperties.Digitization.numberOfCollisions=2.3 -# jobproperties.Digitization.minBiasInputCols=["", "", "" ] -# jobproperties.Digitization.doCavern=True -# jobproperties.Digitization.numberOfCavern=2 -# jobproperties.Digitization.cavernInputCols=["", ""] -# jobproperties.Digitization.doBeamGas=True -# jobproperties.Digitization.numberOfBeamGas=0.5 -# jobproperties.Digitization.beamGasInputCols=["", ""] - -include.block ( "TileL2Algs/TileL2Algs_jobOptions.py" ) - -from TileRecUtils.TileRecFlags import jobproperties -jobproperties.TileRecFlags.doTileOptATLAS = True - -include( "Digitization/Digitization.py" ) - -# don't need any hits at input -topSequence.StandardPileUpToolsAlg.PileUpTools[0].TileHitVectors=[] - -# Set this to False for monogain -# True => Bigain, use this to derive constants -# False => Monogain, use this to digitize a simulation containing signal -topSequence.TileDigitsMaker.CalibrationRun=True -#topSequence.TileDigitsMaker.OutputLevel=VERBOSE - -# don't need any L1 or L2 algorithms -del topSequence.TileHitToTTL1 -del topSequence.TileRawChannelToL2 - -# add Noise Calib Tool -from TileCalibAlgs.TileCalibAlgsConf import TileRawChNoiseCalibAlg - -theTileRawChNoiseCalibAlg = TileRawChNoiseCalibAlg( "theTileRawChNoiseCalibAlg" ) -theTileRawChNoiseCalibAlg.doFixed = True -theTileRawChNoiseCalibAlg.doFit = False -theTileRawChNoiseCalibAlg.doOpt = False -theTileRawChNoiseCalibAlg.doDsp = False -theTileRawChNoiseCalibAlg.doOF1 = False -theTileRawChNoiseCalibAlg.doMF = False -theTileRawChNoiseCalibAlg.UseforCells = 1 -theTileRawChNoiseCalibAlg.TileRawChannelContainerFixed = "TileRawChannelCnt" -theTileRawChNoiseCalibAlg.RunNumber = RunNumber -theTileRawChNoiseCalibAlg.MaskBadChannels = True -Prefix = '%(Dir)s/RawCh_NoiseCalib_%(Version)s' % {'Dir': OutputDirectory, 'Version': Suffix } -theTileRawChNoiseCalibAlg.FileNamePrefix = Prefix - -topSequence += theTileRawChNoiseCalibAlg - -if not 'OutputLevel' in dir(): - OutputLevel = 4 -svcMgr.MessageSvc.OutputLevel = OutputLevel -svcMgr.MessageSvc.defaultLimit = 1000000 -svcMgr.MessageSvc.Format = "% F%60W%S%7W%R%T %0W%M" -svcMgr.MessageSvc.useColors = False - -from AthenaServices.AthenaServicesConf import AthenaEventLoopMgr -svcMgr += AthenaEventLoopMgr() -svcMgr.AthenaEventLoopMgr.EventPrintoutInterval = 100 - -from AthenaCommon.AlgSequence import AthSequencer -condSequence = AthSequencer("AthCondSeq") -if hasattr(condSequence, 'TileSamplingFractionCondAlg'): - condSequence.TileSamplingFractionCondAlg.G4Version = -1 - -print (topSequence) diff --git a/TileCalorimeter/TileExample/TileSimEx/share/jobOptions_TileTB_Dig.py b/TileCalorimeter/TileExample/TileSimEx/share/jobOptions_TileTB_Dig.py deleted file mode 100755 index a1ba2a124a631eb8bb33acc93275dc366eaf94e6..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileExample/TileSimEx/share/jobOptions_TileTB_Dig.py +++ /dev/null @@ -1,29 +0,0 @@ -TileTB=True - -if not 'Geo' in dir(): - # TileCal standalone setup with 2 barrels and 1 ext.barrel on top - #Geo = '2B1EB' - # TileCal standalone setup with 2 barrels and 2 ext.barrels on top - #Geo = '2B2EB' - # TileCal standalone setup with 3 barrels - #Geo = '3B' - # TileCal standalone setup with 5 barrels - use for sampling fraction calculation - Geo = '5B' - -if not 'doHitNtuple' in dir(): - doHitNtuple = True - -if not 'doTileNtuple' in dir(): - doTileNtuple = True - -if not 'doD3PD' in dir(): - doD3PD = False - -if not 'doRDO' in dir(): - doRDO = False - -if not 'TileUseCOOL' in dir(): - TileUseCOOL=False - -include("TileSimEx/jobOptions_Tile_Dig.py") - diff --git a/TileCalorimeter/TileExample/TileSimEx/share/jobOptions_Tile_Dig.py b/TileCalorimeter/TileExample/TileSimEx/share/jobOptions_Tile_Dig.py deleted file mode 100755 index 1aacdf3f12d27f904e06689cd48d434c4c9170d4..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileExample/TileSimEx/share/jobOptions_Tile_Dig.py +++ /dev/null @@ -1,439 +0,0 @@ -#============================================================== -# -# Job options file for Digitization -# -# Full ATLAS or TileCal Testbeam setup, TileCal only digitization -# -#============================================================== - -from AthenaCommon.AppMgr import theApp -svcMgr = theApp.serviceMgr() - -from AthenaCommon import CfgMgr - -from AthenaCommon.Logging import logging -logTileDig = logging.getLogger( 'jobOptions_Tile_Dig.py' ) - -#--- Output printout level ----------------------------------- -#output threshold (1=VERBOSE, 2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL) -if not 'OutputLevel' in dir(): - OutputLevel = 3 -svcMgr.MessageSvc.OutputLevel = OutputLevel -svcMgr.MessageSvc.defaultLimit = 1000000 -svcMgr.MessageSvc.Format = '% F%60W%S%7W%R%T %0W%M' -svcMgr.MessageSvc.useColors = False - -# get a handle on topalg -from AthenaCommon.AlgSequence import AlgSequence -topSequence = AlgSequence() - -#-------------------------------------------------------------- -# configuration flags -#-------------------------------------------------------------- - -# - Number of events to be processed -if not 'EvtMax' in dir(): - EvtMax = -1 - -if not 'RunNumber' in dir(): - RunNumber = 410000 - -if not 'FileSuffix' in dir(): - FileSuffix = '' - -if not 'TileTB' in dir(): - Geo0 = Geo.split('-')[0] if 'Geo' in dir() else '' - TileTB = (Geo0=='5B' or Geo0=='3B' or Geo0=='2B2EB' or Geo0=='2B1EB') - -if TileTB: - ConddbTag = 'OFLCOND-MC12-SDR-27' - DetGeo = 'ctbh8' - DetDescrVersion = 'ATLAS-CTB-01' - if not 'Geo' in dir(): - Geo = '5B' - if Geo.count('-')>0: - TileVersionOverride = 'TileTB-%s' % Geo - else: - TileVersionOverride = 'TileTB-%s-00' % Geo - if not 'doHitNtuple' in dir(): - doHitNtuple = True - - if not 'doD3PD' in dir(): - doD3PD = True - doD3PDHit = False - doD3PDHitInfo = False - doD3PDCellInfo = False - - if not 'PoolHitsInput' in dir(): - PoolHitsInput = 'tiletb%s.HITS.pool.root' % FileSuffix - - if not 'PoolRDOOutput' in dir(): - PoolRDOOutput = 'tiletb%s.DIGITS.pool.root' % FileSuffix - - FileSuffix = 'tb'+FileSuffix - - if not 'TruthSGKey' in dir(): - TruthSGKey = 'TruthEvent' - -# - input file with hits -if not 'PoolHitsInput' in dir(): - PoolHitsInput = 'HITS%s.pool.root' % FileSuffix - -# - output file with digits -if not 'PoolRDOOutput' in dir(): - PoolRDOOutput = 'DIGITS%s.pool.root' % FileSuffix - -if not 'NTUPOutput' in dir(): - NTUPOutput = 'tile%s.ntup.root' % FileSuffix - -if not 'AANTOutput' in dir(): - AANTOutput = 'tile%s.aant.root' % FileSuffix - -if not 'D3PDOutput' in dir(): - D3PDOutput = 'tile%s.d3pd.root' % FileSuffix - -if not 'ConddbTag' in dir(): - ConddbTag = 'OFLCOND-MC23-SDR-RUN3-01' - -if not 'DetGeo' in dir(): - DetGeo = 'atlas' - -if not 'DetDescrVersion' in dir(): - DetDescrVersion = 'ATLAS-R3S-2021-03-00-00' - -# commented out - do not set any override by default -#if not 'TileVersionOverride' in dir(): -# TileVersionOverride = 'TileCal-GEO-13' - -if not 'doD3PD' in dir(): - doD3PD = False - -if not 'doD3PDHit' in dir(): - doD3PDHit = False - -if not 'doD3PDHitInfo' in dir(): - doD3PDHitInfo = False - -if not 'doD3PDDigit' in dir(): - doD3PDDigit = False - -if not 'doD3PDRawChannel' in dir(): - doD3PDRawChannel = False - -if not 'doD3PDCell' in dir(): - doD3PDCell = False - -if not 'doD3PDCellInfo' in dir(): - doD3PDCellInfo = doD3PD - -if not 'doD3PDMBTS' in dir(): - doD3PDMBTS = False - -if not 'doHitNtuple' in dir(): - doHitNtuple = False - -if not 'doDigitsNtuple' in dir(): - doDigitsNtuple = False - -if not 'doRawChannelNtuple' in dir(): - doRawChannelNtuple = False - -if not 'doTileNtuple' in dir(): - doTileNtuple = False - -if not 'doRDO' in dir(): - doRDO = False - -if not 'doCaloNoise' in dir(): - doCaloNoise = True - -#-------------------------------------------------------------- -# AthenaCommon configuration -#-------------------------------------------------------------- -from AthenaCommon.AthenaCommonFlags import jobproperties -#jobproperties.AthenaCommonFlags.AllowIgnoreConfigError=False #This job will stop if an include fails. - -theApp.EvtMax = EvtMax -jobproperties.AthenaCommonFlags.EvtMax = EvtMax -jobproperties.AthenaCommonFlags.PoolHitsInput=[ PoolHitsInput ] -jobproperties.AthenaCommonFlags.PoolRDOOutput=PoolRDOOutput - -#-------------------------------------------------------------------- -# DetFlags. Use to turn on/off individual subdetector or LVL1 trigger -#-------------------------------------------------------------------- -from AthenaCommon.DetFlags import DetFlags - -DetFlags.ID_setOff() -DetFlags.Calo_setOff() -DetFlags.Muon_setOff() -DetFlags.LVL1_setOff() - -DetFlags.Truth_setOn() - -DetFlags.Tile_setOn() - -# - switch off tasks -DetFlags.pileup.all_setOff() -DetFlags.simulate.all_setOff() -DetFlags.makeRIO.all_setOff() -DetFlags.writeBS.all_setOff() -DetFlags.readRDOBS.all_setOff() -DetFlags.readRIOBS.all_setOff() -DetFlags.readRDOPool.all_setOff() -#DetFlags.writeRDOPool.all_setOn() -DetFlags.readRIOPool.all_setOff() -DetFlags.writeRIOPool.all_setOff() -DetFlags.simulateLVL1.all_setOff() - -if doRDO: - DetFlags.writeRDOPool.Truth_setOn() - DetFlags.writeRDOPool.Tile_setOn() -else: - DetFlags.writeRDOPool.all_setOff() - -# - print flags -DetFlags.Print() - - -#-------------------------------------------------------------- -# Global flags. Like eg the DD version: -#-------------------------------------------------------------- -from AthenaCommon.GlobalFlags import globalflags -globalflags.Luminosity.set_Value_and_Lock('zero') -globalflags.DataSource.set_Value_and_Lock('geant4') -globalflags.InputFormat.set_Value_and_Lock('pool') - -from AthenaCommon.BeamFlags import jobproperties -jobproperties.Beam.beamType.set_Value_and_Lock('collisions') - -from IOVDbSvc.CondDB import conddb -conddb.setGlobalTag(ConddbTag); -logTileDig.info( 'ConddbTag = %s' % (ConddbTag) ) - -from AthenaCommon.GlobalFlags import jobproperties -jobproperties.Global.DetDescrVersion = DetDescrVersion -logTileDig.info( 'DetDescrVersion = %s' % (jobproperties.Global.DetDescrVersion()) ) - -from AtlasGeoModel import SetGeometryVersion -jobproperties.Global.DetGeo = DetGeo -from AtlasGeoModel import GeoModelInit -from GeoModelSvc.GeoModelSvcConf import GeoModelSvc -GeoModelSvc = GeoModelSvc() -GeoModelSvc.IgnoreTagDifference = True -logTileDig.info( 'GeoModelSvc.AtlasVersion = %s' % (GeoModelSvc.AtlasVersion) ) -if 'TileVersionOverride' in dir(): - GeoModelSvc.TileVersionOverride = TileVersionOverride - logTileDig.info( 'GeoModelSvc.TileVersionOverride = %s' % (GeoModelSvc.TileVersionOverride) ) - -#-------------------------------------------------------------- -# Digitiziation and Pileup configuration -#-------------------------------------------------------------- -from Digitization.DigitizationFlags import jobproperties -# jobproperties.Digitization.doInDetNoise=True -jobproperties.Digitization.doCaloNoise = doCaloNoise -# This tag must be specified for dowstream jobs -jobproperties.Digitization.IOVDbGlobalTag = ConddbTag -if not TileTB: - jobproperties.Digitization.simRunNumber = RunNumber - jobproperties.Digitization.dataRunNumber = RunNumber -# jobproperties.Digitization.doMuonNoise=True -# jobproperties.Digitization.doMinimumBias=True -# jobproperties.Digitization.numberOfCollisions=2.3 -# jobproperties.Digitization.minBiasInputCols=['', '', '' ] -# jobproperties.Digitization.doCavern=True -# jobproperties.Digitization.numberOfCavern=2 -# jobproperties.Digitization.cavernInputCols=['', ''] -# jobproperties.Digitization.doBeamGas=True -# jobproperties.Digitization.numberOfBeamGas=0.5 -# jobproperties.Digitization.beamGasInputCols=['', ''] - -if TileTB: - topSequence += CfgMgr.xAODMaker__EventInfoCnvAlg() - -if doD3PDHit or doD3PDDigit or doD3PDRawChannel or doD3PDCell or doD3PDCellInfo or doD3PDMBTS or doDigitsNtuple or doRawChannelNtuple or doTileNtuple or doRDO: - - include.block ( 'TileL2Algs/TileL2Algs_jobOptions.py' ) - - if TileTB: - # special settings for TileConditions, to make sure that COOL is not used - if not 'TileUseCOOL' in dir(): - TileUseCOOL=False - if TileUseCOOL: - jobproperties.Digitization.simRunNumber = RunNumber - jobproperties.Digitization.dataRunNumber = RunNumber - else: - from TileConditions.TileCondToolConf import getTileCondToolEmscale, getTileCondToolNoiseSample - getTileCondToolEmscale('FILE') - getTileCondToolNoiseSample('FILE') - - # setting Fit and Opt2 method only - from TileRecUtils.TileRecFlags import jobproperties - jobproperties.TileRecFlags.doTileFit = True - jobproperties.TileRecFlags.doTileOpt2 = True - - include( 'Digitization/Digitization.py' ) - - if TileTB: - jobproperties.TileRecFlags.TileRawChannelContainer = "TileRawChannelFit" - # avoid MBTS hits - topSequence.StandardPileUpToolsAlg.PileUpTools['TileHitVecToCntTool'].TileHitVectors=['TileHitVec'] - # change threshold in fit method - topSequence.TileRChMaker.TileRawChannelBuilder['TileRawChannelBuilderFitFilter'].NoiseThresholdRMS = 3. - else: - if not doD3PDMBTS: - topSequence.StandardPileUpToolsAlg.PileUpTools['TileHitVecToCntTool'].TileHitVectors=['TileHitVec'] - -else: - include( "TileConditions/TileConditions_jobOptions.py" ) - include( "AthenaPoolCnvSvc/ReadAthenaPool_jobOptions.py" ) - svcMgr.EventSelector.InputCollections = [ PoolHitsInput ] - -if doD3PDCell or doD3PDCellInfo or doD3PDMBTS : - # create TileCell from TileRawChannel and store it in CaloCellContainer - include( 'TileRec/TileCellMaker_jobOptions.py' ) - topSequence.CaloCellMaker.CaloCellMakerToolNames["TileCellBuilder"].maskBadChannels = False - -# write all digits -#if DetFlags.writeRDOPool.Tile_on(): -# streamRDO.ItemList+=['TileDigitsContainer#TileDigitsCnt'] - -svcMgr.MessageSvc.OutputLevel = OutputLevel -svcMgr.AthenaPoolCnvSvc.MaxFileSizes=['16000000000'] - - -#-------------------------------------------------------------- -# Creating ntuples -#-------------------------------------------------------------- - -theApp.HistogramPersistency = 'ROOT' - -if doD3PD: - - from OutputStreamAthenaPool.MultipleStreamManager import MSMgr - alg = MSMgr.NewRootStream( 'D3PD', D3PDOutput, 'truth' ) - - - if 'TruthSGKey' in dir(): - from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags - D3PDMakerFlags.TruthSGKey = TruthSGKey - - from TruthD3PDMaker.TruthD3PDMakerKeys import TruthD3PDKeys - from TruthD3PDMaker.TruthD3PDMakerFlags import TruthD3PDFlags - - from TruthD3PDAnalysis.GenObjectsFilterTool import * - - from TruthD3PDMaker.GenVertexD3PDObject import GenVertexD3PDObject - alg += GenVertexD3PDObject( 10, filter = AllTrackFilterTool() ) - - from TruthD3PDMaker.GenParticleD3PDObject import GenParticleD3PDObject - alg += GenParticleD3PDObject( 10, filter = AllTrackFilterTool() ) - - if doD3PDHitInfo: - from CaloD3PDMaker.TileHitInfoD3PDObject import TileHitInfoD3PDObject - alg += TileHitInfoD3PDObject ( 0, sgkey='TileHitVec', prefix='Tile_') - - if doD3PDHit: - from CaloD3PDMaker.TileHitD3PDObject import TileHitD3PDObject - alg += TileHitD3PDObject ( 0,prefix='TileHit_' ) - - if doD3PDDigit: - from CaloD3PDMaker.TileDigitD3PDObject import TileDigitD3PDObject - alg += TileDigitD3PDObject ( 2, prefix='tiledigit_',sgkey='TileDigitsCnt') - - if doD3PDRawChannel: - from CaloD3PDMaker.TileRawChannelD3PDObject import TileRawChannelD3PDObject - alg += TileRawChannelD3PDObject ( 2, prefix='tileraw_',sgkey='TileRawChannelCnt') - - if doD3PDCellInfo: - from CaloD3PDMaker.CaloInfoD3PDObject import CaloInfoD3PDObject - alg += CaloInfoD3PDObject ( 0, sgkey='AllCalo', prefix='calo_') - - if doD3PDCell: - from CaloD3PDMaker.TileDetailsD3PDObject import TileDetailsD3PDObject - alg += TileDetailsD3PDObject ( 1, sgkey='AllCalo', prefix='tile_', Kinematics_WriteEtaPhi=True) - - if doD3PDMBTS: - from CaloD3PDMaker.MBTSD3PDObject import MBTSD3PDObject - alg += MBTSD3PDObject ( 1, prefix='mbts_', sgkey='MBTSContainer') - - -if doTileNtuple: - - if not hasattr(svcMgr, 'THistSvc'): - from GaudiSvc.GaudiSvcConf import THistSvc - svcMgr += THistSvc() - svcMgr.THistSvc.Output += [ "AANT DATAFILE='"+AANTOutput+"' OPT='RECREATE' " ] - #svcMgr.THistSvc.MaxFileSize = 32768 - - -if (doHitNtuple or doDigitsNtuple or doRawChannelNtuple): - - if not hasattr(svcMgr, 'NtupleSvc'): - from GaudiSvc.GaudiSvcConf import NTupleSvc - svcMgr += NTupleSvc() - NTupleSvc = svcMgr.NTupleSvc - NTupleSvc.Output = [ "NTUP DATAFILE='"+NTUPOutput+"' OPT='NEW' " ] - - -if doHitNtuple: - #--- Create TileCal h32 ntuple with all G4 hits --------- - from TileRec.TileRecConf import TileHitVecToNtuple - theTileHitToNtuple = TileHitVecToNtuple() - topSequence += theTileHitToNtuple - theTileHitToNtuple.MaxLength=99999 - theTileHitToNtuple.TileHitVector = 'TileHitVec' - theTileHitToNtuple.NTupleLoc = '/NTUP' - - -if doDigitsNtuple: - #--- Create TileCal h40 ntuple with all digits --------- - from TileRec.TileRecConf import TileDigitsToNtuple - theTileDigitsToNtuple = TileDigitsToNtuple() - topSequence += theTileDigitsToNtuple - theTileDigitsToNtuple.TileDigitsContainer = 'TileDigitsCnt' - theTileDigitsToNtuple.NTupleLoc = '/NTUP' - - -if doRawChannelNtuple: - #--- Create TileCal h70 ntuple with all raw channels --------- - from TileRec.TileRecConf import TileRawChannelToNtuple - theTileRawChannelToNtuple = TileRawChannelToNtuple() - topSequence += theTileRawChannelToNtuple - theTileRawChannelToNtuple.TileRawChannelContainer = 'TileRawChannelFit' - theTileRawChannelToNtuple.NTupleLoc = '/NTUP' - - -from TileRecUtils.TileDQstatusAlgDefault import TileDQstatusAlgDefault -dqStatus = TileDQstatusAlgDefault() - -if doTileNtuple: - doSim = True - if TileTB: - #--- Create TileCal h1000 ntuple with RawChannels --------- - topSequence += CfgMgr.TileTBAANtuple( TBperiod = 2003, NSamples = 7, BSInput = False, - CompleteNtuple = False, UnpackAdder = False, - TileRawChannelContainerFlat = "", - TileRawChannelContainerOpt = "TileRawChannelCnt", - TileRawChannelContainerFit = "TileRawChannelFit", - TileBeamElemContainer = "", - TileLaserObject = "", - beamFragList = [ ] ) - dqStatus.TileBeamElemContainer = '' - dqStatus.TileDigitsContainer = 'TileDigitsCnt' - else: - #--- Create TileCal h2000 ntuple with RawChannels --------- - include( 'TileRec/TileDefaults_jobOptions.py' ) - include( 'TileRec/TileNtuple_jobOptions.py' ) - TileNtuple.TileRawChannelContainer = 'TileRawChannelCnt' - TileNtuple.TileBeamElemContainer = '' - TileNtuple.TileDigitsContainer = 'TileDigitsCnt' - TileNtuple.TileDigitsContainerFlt = '' - TileNtuple.StreamName = 'AANT' - -# from TileSimAlgs.TileSimAlgsConf import * -# theTilePulseForTileMuonReceiver=TilePulseForTileMuonReceiver() -# topSequence += theTilePulseForTileMuonReceiver - -if TileTB: - # sampling fraction for Geant4 10.6 for all run numbers - conddb.addOverride("/TILE/OFL02/CALIB/SFR","TileOfl02CalibSfr-SIM-07") diff --git a/TileCalorimeter/TileL2Algs/CMakeLists.txt b/TileCalorimeter/TileL2Algs/CMakeLists.txt index bf35dacbe7d6f76734cfbdf4eddac7bd75ed8d30..a2c1a73db2e410b39cb2890323a3387cc210a185 100644 --- a/TileCalorimeter/TileL2Algs/CMakeLists.txt +++ b/TileCalorimeter/TileL2Algs/CMakeLists.txt @@ -16,7 +16,6 @@ atlas_add_component( TileL2Algs # Install files from the package: atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) -atlas_install_joboptions( share/*.py ) # Tests: atlas_add_test( TileL2Config_test diff --git a/TileCalorimeter/TileL2Algs/python/TileL2FromRawChGetter.py b/TileCalorimeter/TileL2Algs/python/TileL2FromRawChGetter.py deleted file mode 100755 index 922b4614562543ca4210e62eee05920c5c8a8394..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileL2Algs/python/TileL2FromRawChGetter.py +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration - -# Author: J. Poveda (Ximo.Poveda@cern.ch) -# TileL2 creation from TileRawChannel -# with TileRawChannelToL2 algorithm - -__author__ = 'J. Poveda' - -from AthenaCommon.Logging import logging -from RecExConfig.Configured import Configured -import traceback - -class TileL2FromRawChGetter ( Configured ) : - - """This getter module creates an instance of the TileRawChannelToL2 algorithm to obtain TileL2 objects from the TileRawChannels stored in a TileRawChannelContainer""" - - _outputType = "TileL2Container" - _output = { _outputType : "TileL2Cnt" } - - - def configure(self): - mlog = logging.getLogger( 'TileL2FromRawChGetter::configure:' ) - mlog.info ('entering') - - # get handle to upstream object - try: - from TileL2Algs.TileL2FromRawChGetter import TileL2FromRawChGetter - theTileL2FromRawChGetter=TileL2FromRawChGetter() - except Exception: - mlog.error("could not get handle to TileL2FromRawChGetter Quit") - traceback.print_exc() - return False - - if not theTileL2FromRawChGetter.usable(): - if not self.ignoreConfigError(): - mlog.error("TileL2FromRawChGetter unusable. Quit.") - return False - else: - mlog.error("TileL2FromRawChGetter unusable. Continue nevertheless") - - # Instantiation of the C++ algorithm - try: - from TileL2Algs.TileL2AlgsConf import TileRawChannelToL2 - except Exception: - mlog.error("could not import TileL2Algs.TileRawChannelToL2") - traceback.print_exc() - return False - - theTileRawChannelToL2=TileRawChannelToL2() - self._TileRawChannelToL2Handle = theTileRawChannelToL2 - - # sets output key - from Digitization.DigitizationFlags import digitizationFlags - if digitizationFlags.PileUpPresampling and 'LegacyOverlay' not in digitizationFlags.experimentalDigi(): - from OverlayCommonAlgs.OverlayFlags import overlayFlags - theTileRawChannelToL2.TileL2Container = overlayFlags.bkgPrefix() + self.outputKey() - else: - theTileRawChannelToL2.TileL2Container = 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 - - mlog.info(" now adding to topSequence") - from AthenaCommon.AlgSequence import AlgSequence - topSequence = AlgSequence() - topSequence += theTileRawChannelToL2 - - return True - - def TileRawChannelToL2Handle(self): - return self._TileRawChannelToL2Handle - - # would work only if one output object type - def outputKey(self): - return self._output[self._outputType] - - def outputType(self): - return self._outputType - - - diff --git a/TileCalorimeter/TileL2Algs/share/TileL2Algs_jobOptions.py b/TileCalorimeter/TileL2Algs/share/TileL2Algs_jobOptions.py deleted file mode 100644 index ab905f05d5a14b69eb17ad908a05b1501e9dc2af..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileL2Algs/share/TileL2Algs_jobOptions.py +++ /dev/null @@ -1,8 +0,0 @@ -#---------------------------------------------- -# TileL2Algs_jobOptions -#---------------------------------------------- - -include.block( "TileL2Algs/TileL2Algs_jobOptions.py" ) - -from TileL2Algs.TileL2FromRawChGetter import * -theTileL2FromRawChGetter=TileL2FromRawChGetter() diff --git a/TileCalorimeter/TileSimAlgs/CMakeLists.txt b/TileCalorimeter/TileSimAlgs/CMakeLists.txt index a4821538ce42c8d8e93613661a27769d0c0e1358..679cc77a8e913f898bff9804bde0d0aa4b565bef 100644 --- a/TileCalorimeter/TileSimAlgs/CMakeLists.txt +++ b/TileCalorimeter/TileSimAlgs/CMakeLists.txt @@ -16,7 +16,6 @@ atlas_add_component( TileSimAlgs # Install files from the package: atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) -atlas_install_joboptions( share/*.py ) # Tests: atlas_add_test( TileMuonReceiverConfig_test diff --git a/TileCalorimeter/TileSimAlgs/python/TileBeamElemGetter.py b/TileCalorimeter/TileSimAlgs/python/TileBeamElemGetter.py deleted file mode 100644 index 5d6ab48888239811e392537a9aa94fdd632bbe52..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileSimAlgs/python/TileBeamElemGetter.py +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -# Author: J. Poveda (Ximo.Poveda@cern.ch) -# TileBeamElem creation from TileHitVector -# with TileTBHitToBeamElem algorithm - -from AthenaCommon.Logging import logging -from RecExConfig.Configured import Configured -import traceback - - -class TileBeamElemGetter ( Configured ) : - """ This getter module creates an instance of the TileTBHitToBeamElem - algorithm to obtain TileBeamElements from the TileTBHits stored - in a TileTBHitContainer""" - - _outputType = "TileBeamElemContainer" - _output = { _outputType : "TileBeamElemCnt" } - - - def configure(self): - mlog = logging.getLogger( 'TileBeamElemGetter::configure:' ) - mlog.info ('entering') - - # get handle to upstream object - try: - from TileSimAlgs.TileBeamElemGetter import TileBeamElemGetter - theTileBeamElemGetter=TileBeamElemGetter() - except Exception: - mlog.error("could not get handle to TileBeamElemGetter Quit") - traceback.print_exc() - return False - - if not theTileBeamElemGetter.usable(): - if not self.ignoreConfigError(): - mlog.error("TileBeamElemGetter unusable. Quit.") - return False - else: - mlog.error("TileBeamElemGetter unusable. Continue nevertheless") - - # Instantiation of the C++ algorithm - try: - from TileSimAlgs.TileSimAlgsConf import TileTBHitToBeamElem - except Exception: - mlog.error("could not import TileSimAlgs.TileTBHitToBeamElem") - traceback.print_exc() - return False - - theTileTBHitToBeamElem=TileTBHitToBeamElem() - self._TileTBHitToBeamElemHandle = theTileTBHitToBeamElem - - # Configure TileTBHitToBeamElem here - # Check TileTBDigitization_jobOptions.py for full configurability - theTileTBHitToBeamElem.TileTBHitVector="TileTBHits" - theTileTBHitToBeamElem.TileInfoName="TileInfo" - - # sets output key - theTileTBHitToBeamElem.TileBeamElemContainer=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 - - mlog.info(" now adding to topSequence") - # get a handle on topalg - from AthenaCommon.AlgSequence import AlgSequence - topSequence = AlgSequence() - topSequence += theTileTBHitToBeamElem - - return True - - def TileTBHitToBeamElemHandle(self): - return self._TileTBHitToBeamElemHandle - - # would work only if one output object type - def outputKey(self): - return self._output[self._outputType] - - def outputType(self): - return self._outputType - - - diff --git a/TileCalorimeter/TileSimAlgs/python/TileDigitsGetter.py b/TileCalorimeter/TileSimAlgs/python/TileDigitsGetter.py deleted file mode 100644 index 97cc1ffb56f3c2c6995cc57a6eb1b79e4fa0949b..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileSimAlgs/python/TileDigitsGetter.py +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration - -# Author: J. Poveda (Ximo.Poveda@cern.ch) -# TileDigits creation from TileHit -# with TileDigitsMaker algorithm - -from AthenaCommon.Logging import logging -from RecExConfig.Configured import Configured -import traceback - -class TileDigitsGetter ( Configured ) : - """ This getter module creates an instance of the TileDigitsMaker - algorithm to obtain TileDigits from the TileHits stored - in a TileHitContainer""" - - _outputType = "TileDigitsContainer" - _output = { _outputType : "TileDigitsCnt" } - - - def configure(self): - mlog = logging.getLogger( 'TileDigitsGetter::configure:' ) - mlog.info ('entering') - - - # get handle to upstream object - try: - from TileSimAlgs.TileDigitsGetter import TileDigitsGetter - theTileDigitsGetter=TileDigitsGetter() - except Exception: - mlog.error("could not get handle to TileDigitsGetter Quit") - traceback.print_exc() - return False - - if not theTileDigitsGetter.usable(): - if not self.ignoreConfigError(): - mlog.error("TileDigitsGetter unusable. Quit.") - return False - else: - mlog.error("TileDigitsGetter unusable. Continue nevertheless") - - from TileConditions.TileInfoConfigurator import TileInfoConfigurator - tileInfoConfigurator = TileInfoConfigurator() - tileInfoConfigurator.setupCOOLPHYPULSE() - - # Instantiation of the C++ algorithm - try: - from TileSimAlgs.TileSimAlgsConf import TileDigitsMaker - except Exception: - mlog.error("could not import TileSimAlgs.TileDigitsMaker") - traceback.print_exc() - return False - - theTileDigitsMaker=TileDigitsMaker() - self._TileDigitsMakerHandle = theTileDigitsMaker - - from Digitization.DigitizationFlags import digitizationFlags - theTileDigitsMaker.DoHSTruthReconstruction = digitizationFlags.doDigiTruth() - # Configure TileDigitsMaker here - # Check TileDigitization_jobOptions.py for full configurability - theTileDigitsMaker.TileHitContainer="TileHitCnt" - theTileDigitsMaker.TileHitContainer_DigiHSTruth="TileHitCnt_DigiHSTruth" - theTileDigitsMaker.TileInfoName="TileInfo" - - theTileDigitsMaker.CalibrationRun=False - - # Save integer numbers in digits vector if pile-up presampling not enabled - theTileDigitsMaker.IntegerDigits = not digitizationFlags.PileUpPresampling() - - # sets output key - if digitizationFlags.PileUpPresampling and 'LegacyOverlay' not in digitizationFlags.experimentalDigi(): - from OverlayCommonAlgs.OverlayFlags import overlayFlags - theTileDigitsMaker.TileDigitsContainer = overlayFlags.bkgPrefix() + self.outputKey() - else: - theTileDigitsMaker.TileDigitsContainer = 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 - - mlog.info(" now adding to topSequence") - # get a handle on topalg - from AthenaCommon.AlgSequence import AlgSequence - topSequence = AlgSequence() - topSequence += theTileDigitsMaker - - return True - - def TileDigitsMakerHandle(self): - return self._TileDigitsMakerHandle - - # would work only if one output object type - def outputKey(self): - return self._output[self._outputType] - - def outputType(self): - return self._outputType - - - diff --git a/TileCalorimeter/TileSimAlgs/python/TileHitGetter.py b/TileCalorimeter/TileSimAlgs/python/TileHitGetter.py deleted file mode 100644 index 7e9aba75060a5130c4694150664f856c13fa749e..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileSimAlgs/python/TileHitGetter.py +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -# Author: J. Poveda (Ximo.Poveda@cern.ch) -# TileHitContainer filling from TileHitVector -# with TileHitVectToCnt algorithm - -from AthenaCommon.Logging import logging -from RecExConfig.Configured import Configured -import traceback - -class TileHitGetter ( Configured ) : - """ This getter module creates an instance of the TileHitVectToCnt - algorithm to fill a TileHitContainer with the TileHits in a list - of TileHitVectors""" - - _outputType = "TileHitContainer" - _output = { _outputType : "TileHitCnt" } - - - def configure(self): - mlog = logging.getLogger( 'TileHitGetter::configure:' ) - mlog.info ('entering') - - # get handle to upstream object - try: - from TileSimAlgs.TileHitGetter import TileHitGetter - theTileHitGetter=TileHitGetter() - except Exception: - mlog.error("could not get handle to TileHitGetter Quit") - traceback.print_exc() - return False - - if not theTileHitGetter.usable(): - if not self.ignoreConfigError(): - mlog.error("TileHitGetter unusable. Quit.") - return False - else: - mlog.error("TileHitGetter unusable. Continue nevertheless") - - # Instantiation of the C++ algorithm - try: - from TileSimAlgs.TileSimAlgsConf import TileHitVecToCnt - except Exception: - mlog.error("could not import TileSimAlgs.TileHitVecToCnt") - traceback.print_exc() - return False - - theTileHitVecToCnt=TileHitVecToCnt() - self._TileHitVecToCntHandle = theTileHitVecToCnt - - # Configure TileHitVecToCnt here - # Check TileDigitizationCosmics_jobOptions.py, - # TileDigitization_jobOptions.py, TileSimAlgs_jobOptions.py and - # TileTBDigitization_jobOptions.py for full configurability - theTileHitVecToCnt.TileHitVectors=["TileHitVec" , "MBTSHits" ] - theTileHitVecToCnt.TileInfoName="TileInfo" - - # sets output key - theTileHitVecToCnt.TileHitContainer=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 - - mlog.info(" now adding to topSequence") - # get a handle on topalg - from AthenaCommon.AlgSequence import AlgSequence - topSequence = AlgSequence() - topSequence += theTileHitVecToCnt - - return True - - def TileHitVecToCntHandle(self): - return self._TileHitVecToCntHandle - - # would work only if one output object type - def outputKey(self): - return self._output[self._outputType] - - def outputType(self): - return self._outputType - - - diff --git a/TileCalorimeter/TileSimAlgs/python/TileHitGetterTool.py b/TileCalorimeter/TileSimAlgs/python/TileHitGetterTool.py deleted file mode 100644 index 23e53bab2811f5eec74c3afa5c0b0a1a60828879..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileSimAlgs/python/TileHitGetterTool.py +++ /dev/null @@ -1,95 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -# Author: J. Poveda (Ximo.Poveda@cern.ch) -# TileHitContainer filling from TileHitVector -# with TileHitVectToCnt algorithm - -from AthenaCommon.Logging import logging -from RecExConfig.Configured import Configured -import traceback - -class TileHitGetterTool ( Configured ) : - """ This getter module creates an instance of the TileHitVectToCnt - algorithm to fill a TileHitContainer with the TileHits in a list - of TileHitVectors""" - - _outputType = "TileHitContainer" - _output = { _outputType : "TileHitCnt" } - - - def configure(self): - mlog = logging.getLogger( 'TileHitGetterTool::configure:' ) - mlog.info ('entering') - - # get handle to upstream object - try: - from TileSimAlgs.TileHitGetterTool import TileHitGetterTool - theTileHitGetterTool=TileHitGetterTool() - except Exception: - mlog.error("could not get handle to TileHitGetterTool Quit") - traceback.print_exc() - return False - - if not theTileHitGetterTool.usable(): - if not self.ignoreConfigError(): - mlog.error("TileHitGetterTool unusable. Quit.") - return False - else: - mlog.error("TileHitGetterTool unusable. Continue nevertheless") - - # Instantiation of the C++ algorithm - try: - from TileSimAlgs.TileSimAlgsConf import TileHitVecToCntTool - except Exception: - mlog.error("could not import TileSimAlgs.TileHitVecToCntTool") - traceback.print_exc() - return False - - theTileHitVecToCntTool=TileHitVecToCntTool() - self._TileHitVecToCntToolHandle = theTileHitVecToCntTool - - # Configure TileHitVecToCntTool here - # Check TileDigitizationCosmics_jobOptions.py, - # TileDigitization_jobOptions.py, TileSimAlgs_jobOptions.py and - # TileTBDigitization_jobOptions.py for full configurability - theTileHitVecToCntTool.TileHitVectors=["TileHitVec" , "MBTSHits" ] - theTileHitVecToCntTool.TileInfoName="TileInfo" - - # sets output key - theTileHitVecToCntTool.TileHitContainer=self.outputKey() - - # set the range of bunch crossing times that - # TileHitVectToCntTool is interested in - theTileHitVecToCntTool.FirstXing = -200 - theTileHitVecToCntTool.LastXing = 150 - - - # 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 - - mlog.info(" now adding to topSequence") - # get a handle on topalg - from AthenaCommon.AlgSequence import AlgSequence - topSequence = AlgSequence() - topSequence.PileUpToolsAlg.PileUpTools += [theTileHitVecToCntTool] - return True - - def TileHitVecToCntToolHandle(self): - return self._TileHitVecToCntToolHandle - - # would work only if one output object type - def outputKey(self): - return self._output[self._outputType] - - def outputType(self): - return self._outputType - - - diff --git a/TileCalorimeter/TileSimAlgs/python/TileRawChannelFromHitsGetter.py b/TileCalorimeter/TileSimAlgs/python/TileRawChannelFromHitsGetter.py deleted file mode 100644 index 281d64ce183481e8dd60dab6d23fdf4879f4725b..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileSimAlgs/python/TileRawChannelFromHitsGetter.py +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration - -# Author: J. Poveda (Ximo.Poveda@cern.ch) -# TileRawChannel creation from TileHit -# with TileHitToRawChannel algorithm - -from AthenaCommon.Logging import logging -from RecExConfig.Configured import Configured -import traceback - -class TileRawChannelFromHitsGetter ( Configured ) : - """ This getter module creates an instance of the TileHitToRawChannel - algorithm to obtain TileRawChannels from the TileHits stored - in a TileHitContainer""" - - _outputType = "TileRawChannelContainer" - _output = { _outputType : "TileRawChannelCnt" } - - - def configure(self): - mlog = logging.getLogger( 'TileRawChannelFromHitsGetter::configure:' ) - mlog.info ('entering') - - # get handle to upstream object - try: - from TileSimAlgs.TileRawChannelFromHitsGetter import TileRawChannelFromHitsGetter - theTileRawChannelFromHitsGetter=TileRawChannelFromHitsGetter() - except Exception: - mlog.error("could not get handle to TileRawChannelFromHitsGetter Quit") - traceback.print_exc() - return False - - if not theTileRawChannelFromHitsGetter.usable(): - if not self.ignoreConfigError(): - mlog.error("TileRawChannelFromHitsGetter unusable. Quit.") - return False - else: - mlog.error("TileRawChannelFromHitsGetter unusable. Continue nevertheless") - - # Instantiation of the C++ algorithm - try: - from TileSimAlgs.TileSimAlgsConf import TileHitToRawChannel - except Exception: - mlog.error("could not import TileSimAlgs.TileHitToRawChannel") - traceback.print_exc() - return False - - theTileHitToRawChannel=TileHitToRawChannel() - self._TileHitToRawChannelHandle = theTileHitToRawChannel - - # Configure TileHitToRawChannel here - # Check TileRawChannel_jobOptions.py for full configurability - theTileHitToRawChannel.TileHitContainer="TileHitCnt" - theTileHitToRawChannel.TileInfoName="TileInfo" - theTileHitToRawChannel.DeltaT=-1 - - # sets output key - theTileHitToRawChannel.TileRawChannelContainer=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 - - mlog.info(" now adding to topSequence") - # get a handle on topalg - from AthenaCommon.AlgSequence import AlgSequence - topSequence = AlgSequence() - topSequence += theTileHitToRawChannel - - return True - - def TileHitToRawChannelHandle(self): - return self._TileHitToRawChannelHandle - - # would work only if one output object type - def outputKey(self): - return self._output[self._outputType] - - def outputType(self): - return self._outputType - - - diff --git a/TileCalorimeter/TileSimAlgs/python/TileTTL1FromHitsGetter.py b/TileCalorimeter/TileSimAlgs/python/TileTTL1FromHitsGetter.py deleted file mode 100644 index a18b7aba4018e89053c645e81b2864a6b42f4e25..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileSimAlgs/python/TileTTL1FromHitsGetter.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration - -# Author: J. Poveda (Ximo.Poveda@cern.ch) -# TileTTL1 creation from TileHit -# with TileHitToTTL1 algorithm - -from AthenaCommon.Logging import logging -from RecExConfig.Configured import Configured -import traceback - -class TileTTL1FromHitsGetter ( Configured ) : - """ This getter module creates an instance of the TileHitToTTL1 - algorithm to obtain TileTTL1 objects from the TileHits stored - in a TileHitContainer""" - - _outputType = "TileTTL1Container" - _output = { _outputType : "TileTTL1Cnt" } - - - def configure(self): - mlog = logging.getLogger( 'TileTTL1FromHitsGetter::configure:' ) - mlog.info ('entering') - - # get handle to upstream object - try: - from TileSimAlgs.TileTTL1FromHitsGetter import TileTTL1FromHitsGetter - theTileTTL1FromHitsGetter=TileTTL1FromHitsGetter() - except Exception: - mlog.error("could not get handle to TileTTL1FromHitsGetter Quit") - traceback.print_exc() - return False - - if not theTileTTL1FromHitsGetter.usable(): - if not self.ignoreConfigError(): - mlog.error("TileTTL1FromHitsGetter unusable. Quit.") - return False - else: - mlog.error("TileTTL1FromHitsGetter unusable. Continue nevertheless") - - # Instantiation of the C++ algorithm - try: - from TileSimAlgs.TileSimAlgsConf import TileHitToTTL1 - except Exception: - mlog.error("could not import TileSimAlgs.TileHitToTTL1") - traceback.print_exc() - return False - - theTileHitToTTL1=TileHitToTTL1() - self._TileHitToTTL1 = theTileHitToTTL1 - - # Configure TileHitToTTL1 here - # Check TileTTL1_jobOptions.py for full configurability - theTileHitToTTL1.TileHitContainer="TileHitCnt" - theTileHitToTTL1.TileInfoName="TileInfo" - - # sets output key - from Digitization.DigitizationFlags import digitizationFlags - if digitizationFlags.PileUpPresampling and 'LegacyOverlay' not in digitizationFlags.experimentalDigi(): - from OverlayCommonAlgs.OverlayFlags import overlayFlags - theTileHitToTTL1.TileTTL1Container = overlayFlags.bkgPrefix() + self.outputKey() - theTileHitToTTL1.TileMBTSTTL1Container = overlayFlags.bkgPrefix() + "TileTTL1MBTS" - else: - theTileHitToTTL1.TileTTL1Container = self.outputKey() - theTileHitToTTL1.TileMBTSTTL1Container = "TileTTL1MBTS" - - - # 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 - - mlog.info(" now adding to topSequence") - # get a handle on topalg - from AthenaCommon.AlgSequence import AlgSequence - topSequence = AlgSequence() - topSequence += theTileHitToTTL1 - - return True - - def TileHitToTTL1(self): - return self._TileHitToTTL1 - - # would work only if one output object type - def outputKey(self): - return self._output[self._outputType] - - def outputType(self): - return self._outputType - - - diff --git a/TileCalorimeter/TileSimAlgs/share/TileDigiCommon_jobOptions.py b/TileCalorimeter/TileSimAlgs/share/TileDigiCommon_jobOptions.py deleted file mode 100644 index 358f7b9a3b2fd9915b68f6be0cc9151cb33a88c4..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileSimAlgs/share/TileDigiCommon_jobOptions.py +++ /dev/null @@ -1,239 +0,0 @@ -# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration - -include.block("TileSimAlgs/TileDigiCommon_jobOptions.py") -############################################################### -# -# Job options file : TileDigiCommon_jobOptions.py -# read G4 hits and create TileRawChannels -# -#============================================================== -from AthenaCommon.BeamFlags import jobproperties - -# Create digits and do Opt.filtering by default -if not 'doTileHitToDigit' in dir(): - doTileHitToDigit = True -if not 'doTileDigitToRawChannel' in dir(): - doTileDigitToRawChannel = True -if not 'doTileHitToRawChannelDirect' in dir(): - doTileHitToRawChannelDirect = False -if not 'doTileDigitsFromPulse' in dir(): - doTileDigitsFromPulse = False - -try: - from __main__ import ALLOWIGNOREEXISTINGDATAOBJECT - from __main__ import ALLOWIGNORECONFIGERROR - from __main__ import ALLOWDISABLE - from __main__ import ALLOWBACKNAV -except: # default values if not done - ALLOWIGNOREEXISTINGDATAOBJECT=False - ALLOWIGNORECONFIGERROR=False - ALLOWDISABLE=False - ALLOWBACKNAV=False - from __main__ import ALLOWIGNOREEXISTINGDATAOBJECT - from __main__ import ALLOWIGNORECONFIGERROR - from __main__ import ALLOWDISABLE - from __main__ import ALLOWBACKNAV - -from AthenaCommon.Logging import logging -mlog = logging.getLogger( 'TileDigitiization' ) - -if doTileHitToRawChannelDirect: - - from TileSimAlgs.TileRawChannelFromHitsGetter import * - theTileRawChannelFromHitsGetter=TileRawChannelFromHitsGetter() - - -if doTileHitToDigit: - # Change default parameters for TileDQstatusAlg. - from AthenaCommon.GlobalFlags import globalflags - if globalflags.isOverlay(): - from TileRecUtils.TileDQstatusAlgDefault import TileDQstatusAlgDefault - dqstatus = TileDQstatusAlgDefault() - dqstatus.TileBeamElemContainer=""; # disable reading of trigger type from BeamElem container - - from OverlayCommonAlgs.OverlayFlags import overlayFlags - if overlayFlags.isDataOverlay(): - if overlayFlags.isOverlayMT(): - dqstatus.TileDigitsContainer = overlayFlags.bkgPrefix() + "TileDigitsCnt" - dqstatus.TileRawChannelContainer = overlayFlags.bkgPrefix() + "TileRawChannelCnt" - else: - dqstatus.TileDigitsContainer = overlayFlags.dataStore() + "+TileDigitsCnt" - dqstatus.TileRawChannelContainer = overlayFlags.dataStore() + "+TileRawChannelCnt" - else: - dqstatus.TileDigitsContainer=""; # disable checking of Digits container size for bi-gain mode - dqstatus.TileRawChannelContainer=""; # disable checking of DQstatus for simulated data - - from TileSimAlgs.TileDigitsGetter import * - theTileDigitsGetter=TileDigitsGetter() - - from TileSimAlgs.TileSimAlgsConf import * - theTileDigitsMaker=TileDigitsMaker() - theTileDigitsMaker.UseCoolPulseShapes=True - theTileDigitsMaker.MaskBadChannels=False - theTileDigitsMaker.RndmEvtOverlay=False - from Digitization.DigitizationFlags import digitizationFlags - theTileDigitsMaker.DoHSTruthReconstruction = digitizationFlags.doDigiTruth() - if globalflags.isOverlay(): - theTileDigitsMaker.TileDQstatus = 'TileDQstatus' - -if doTileDigitsFromPulse: - - import traceback - - try: - from TileSimAlgs.TileSimAlgsConf import TileDigitsFromPulse - theTileDigitsFromPulse=TileDigitsFromPulse() - mlog.info("Adding TileDigitsFromPulse to topSequence") - ## get a handle on the top sequence of algorithms - from AthenaCommon.AlgSequence import AlgSequence - topSequence = AlgSequence() - topSequence += theTileDigitsFromPulse; - - except: - mlog.error("could not import TileSimAlgs.TileDigitsFromPulse") - traceback.print_exc() - - -if doTileDigitToRawChannel: - - #from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags as commonGeoFlags - #from AtlasGeoModel.InDetGMJobProperties import InDetGeometryFlags as geoFlags - #RUN1=(commonGeoFlags.Run() == "RUN1" or (commonGeoFlags.Run() == "UNDEFINED" and geoFlags.isIBL() == False)) - OF2asDefault=True - - # Reconstruction method: COF or OF2-NI for collisions, OF2-I for cosmics - from TileRecUtils.TileRecFlags import jobproperties - if not (jobproperties.TileRecFlags.doTileFlat \ - or jobproperties.TileRecFlags.doTileFit \ - or jobproperties.TileRecFlags.doTileFitCool \ - or jobproperties.TileRecFlags.doTileOF1 \ - or jobproperties.TileRecFlags.doTileOpt2 \ - or (hasattr(jobproperties.TileRecFlags, 'doTileQIE') \ - and jobproperties.TileRecFlags.doTileQIE) \ - or jobproperties.TileRecFlags.doTileOptATLAS \ - or jobproperties.TileRecFlags.doTileMF): - if jobproperties.Beam.beamType == 'collisions': - if OF2asDefault: - jobproperties.TileRecFlags.doTileOptATLAS = True - else: - jobproperties.TileRecFlags.doTileMF = True - else: - jobproperties.TileRecFlags.doTileOpt2 = True - - if jobproperties.Beam.beamType == 'collisions': - if jobproperties.Beam.bunchSpacing.get_Value()<75: - from Digitization.DigitizationFlags import digitizationFlags - halfBS=float(digitizationFlags.bunchSpacing.get_Value()) - if halfBS>0.0: - if digitizationFlags.BeamIntensityPattern.statusOn: - pat=digitizationFlags.BeamIntensityPattern.get_Value() - if len(pat)>1: - filled=0 - for p in range(len(pat)): - if float(pat[p]) > 0.0: - if filled > 0: - halfBS/=2. - break - else: - filled=1 - else: - filled=0 - if halfBS>25.0: halfBS=25.0 - else: - halfBS/=2. - else: - halfBS/=2. - mlog.info("Setting max/min time for parabolic correction to +/- %4.1f ns" % halfBS) - jobproperties.TileRecFlags.TimeMinForAmpCorrection = -halfBS - jobproperties.TileRecFlags.TimeMaxForAmpCorrection = halfBS - - from TileRecUtils.TileRawChannelGetter import * - theTileRawChannelGetter=TileRawChannelGetter() - - jobproperties.TileRecFlags.TileRawChannelContainer = "TileRawChannelCnt" - from Digitization.DigitizationFlags import digitizationFlags - if digitizationFlags.doDigiTruth(): - from TileRecUtils.TileRawChannelGetter_DigiHSTruth import * - theTileRawChannelGetter_DigiHSTruth=TileRawChannelGetter_DigiHSTruth() - theTileRawChannelGetter_DigiHSTruth.TileDigitsContainer = "TileDigitsCnt_DigiHSTruth" - theTileRawChannelGetter_DigiHSTruth.TileRawChannelContainer = "TileRawChannelCnt_DigiHSTruth" - - TileRChMaker = theTileRawChannelGetter.TileRChMaker() - - if digitizationFlags.PileUpPresampling and 'LegacyOverlay' not in digitizationFlags.experimentalDigi(): - TileRChMaker.TileDigitsContainer = overlayFlags.bkgPrefix() + 'TileDigitsCnt' - - TileRawChannelBuilderOptATLAS = None - if jobproperties.TileRecFlags.doTileOptATLAS(): - TileRawChannelBuilderOptATLAS = TileRChMaker.TileRawChannelBuilder['TileRawChannelBuilderOptATLAS'] - - TileRawChannelBuilderOpt2Filter = None - if jobproperties.TileRecFlags.doTileOpt2(): - TileRawChannelBuilderOpt2Filter = TileRChMaker.TileRawChannelBuilder['TileRawChannelBuilderOpt2Filter'] - - TileRawChannelBuilderMF = None - if jobproperties.TileRecFlags.doTileMF(): - TileRawChannelBuilderMF = TileRChMaker.TileRawChannelBuilder['TileRawChannelBuilderMF'] - - # make sure that only one output container has default name "TileRawChannelCnt" - if jobproperties.Beam.beamType == 'collisions': - if OF2asDefault: - if jobproperties.TileRecFlags.doTileOptATLAS(): - TileRawChannelBuilderOptATLAS.TileRawChannelContainer = jobproperties.TileRecFlags.TileRawChannelContainer() - if jobproperties.TileRecFlags.doTileMF(): - TileRawChannelBuilderMF.TileRawChannelContainer = "TileRawChannelMF" - if jobproperties.TileRecFlags.doTileOpt2(): - TileRawChannelBuilderOpt2Filter.TileRawChannelContainer = "TileRawChannelOpt2" - elif jobproperties.TileRecFlags.doTileMF(): - TileRawChannelBuilderMF.TileRawChannelContainer = jobproperties.TileRecFlags.TileRawChannelContainer() - elif jobproperties.TileRecFlags.doTileOpt2(): - TileRawChannelBuilderOpt2Filter.TileRawChannelContainer = jobproperties.TileRecFlags.TileRawChannelContainer() - else: - if jobproperties.TileRecFlags.doTileMF(): - TileRawChannelBuilderMF.TileRawChannelContainer = jobproperties.TileRecFlags.TileRawChannelContainer() - if jobproperties.TileRecFlags.doTileOptATLAS(): - TileRawChannelBuilderOptATLAS.TileRawChannelContainer = "TileRawChannelFixed" - if jobproperties.TileRecFlags.doTileOpt2(): - TileRawChannelBuilderOpt2Filter.TileRawChannelContainer = "TileRawChannelOpt2" - elif jobproperties.TileRecFlags.doTileOptATLAS(): - TileRawChannelBuilderOptATLAS.TileRawChannelContainer = jobproperties.TileRecFlags.TileRawChannelContainer() - elif jobproperties.TileRecFlags.doTileOpt2(): - TileRawChannelBuilderOpt2Filter.TileRawChannelContainer = jobproperties.TileRecFlags.TileRawChannelContainer() - else: - if jobproperties.TileRecFlags.doTileOpt2(): - TileRawChannelBuilderOpt2Filter.TileRawChannelContainer = jobproperties.TileRecFlags.TileRawChannelContainer() - if jobproperties.TileRecFlags.doTileMF(): - TileRawChannelBuilderMF.TileRawChannelContainer = "TileRawChannelMF" - if jobproperties.TileRecFlags.doTileOptATLAS(): - TileRawChannelBuilderOptATLAS.TileRawChannelContainer = "TileRawChannelFixed" - elif jobproperties.TileRecFlags.doTileOptATLAS(): - TileRawChannelBuilderOptATLAS.TileRawChannelContainer = jobproperties.TileRecFlags.TileRawChannelContainer() - elif jobproperties.TileRecFlags.doTileMF(): - TileRawChannelBuilderMF.TileRawChannelContainer = jobproperties.TileRecFlags.TileRawChannelContainer() - - if TileRawChannelBuilderOpt2Filter: - TileRawChannelBuilderOpt2Filter.DSPContainer = '' - if TileRawChannelBuilderOptATLAS: - TileRawChannelBuilderOptATLAS.DSPContainer = '' - if TileRawChannelBuilderMF: - TileRawChannelBuilderMF.DSPContainer = '' - -from AthenaCommon.GlobalFlags import globalflags -if not globalflags.isOverlay(): - # Change default parameters for TileDQstatusAlg. - from TileRecUtils.TileDQstatusAlgDefault import TileDQstatusAlgDefault - dqstatus = TileDQstatusAlgDefault() - dqstatus.TileBeamElemContainer=""; # disable reading of trigger type from BeamElem container - dqstatus.TileDigitsContainer=""; # disable checking of Digits container size for bi-gain mode - dqstatus.TileRawChannelContainer=""; # disable checking of DQstatus for simulated data - - -# -include( "TileSimAlgs/TileSamplingFraction_jobOptions.py" ) - -if jobproperties.TileRecFlags.doTileMF(): - mlog.info (TileRawChannelBuilderMF) -if jobproperties.TileRecFlags.doTileOptATLAS(): - mlog.info (TileRawChannelBuilderOptATLAS) -if jobproperties.TileRecFlags.doTileOpt2(): - mlog.info (TileRawChannelBuilderOpt2Filter) diff --git a/TileCalorimeter/TileSimAlgs/share/TileDigiTool_jobOptions.py b/TileCalorimeter/TileSimAlgs/share/TileDigiTool_jobOptions.py deleted file mode 100644 index 8ea3a1d17f2b57f4a981d6d88793954b9957d6a1..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileSimAlgs/share/TileDigiTool_jobOptions.py +++ /dev/null @@ -1,27 +0,0 @@ -include.block("TileSimAlgs/TileDigiTool_jobOptions.py") -############################################################### -# -# Job options file : TileDigiTool_jobOptions.py -# read G4 hits and create TileRawChannels -# -#============================================================== -# Create digits and do Opt.filtering by default -if not 'doTileHitToDigit' in dir(): - doTileHitToDigit = True -if not 'doTileHitToRawChannelDirect' in dir(): - doTileHitToRawChannelDirect = False - -#---------------- -# Add Algorithms -#---------------- - -## get a handle on the top sequence of algorithms -from AthenaCommon.AlgSequence import AlgSequence -topSequence = AlgSequence() - - -if doTileHitToDigit or doTileHitToRawChannelDirect: - from AthenaCommon import CfgGetter - topSequence.PileUpToolsAlg.PileUpTools += [ CfgGetter.getPrivateTool("TileHitVecToCntTool", checkType=True) ] - -include( "TileSimAlgs/TileDigiCommon_jobOptions.py" ) diff --git a/TileCalorimeter/TileSimAlgs/share/TileDigitizationCosmics_jobOptions.py b/TileCalorimeter/TileSimAlgs/share/TileDigitizationCosmics_jobOptions.py deleted file mode 100644 index 9beee9686975dc1cf995d6c9f9f9dd1a39097c24..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileSimAlgs/share/TileDigitizationCosmics_jobOptions.py +++ /dev/null @@ -1 +0,0 @@ -include( "TileSimAlgs/TileDigitizations_jobOptions.py" ) diff --git a/TileCalorimeter/TileSimAlgs/share/TileDigitization_jobOptions.py b/TileCalorimeter/TileSimAlgs/share/TileDigitization_jobOptions.py deleted file mode 100644 index ec7d2d749c21ffee9a9a0684b665e2ac1adcbbef..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileSimAlgs/share/TileDigitization_jobOptions.py +++ /dev/null @@ -1,27 +0,0 @@ -include.block("TileSimAlgs/TileDigitization_jobOptions.py") -############################################################### -# -# Job options file : TileDigitization_jobOptions.py -# read G4 hits and create TileRawChannels -# -#============================================================== -# Create digits and do Opt.filtering by default -if not 'doTileHitToDigit' in dir(): - doTileHitToDigit = True -if not 'doTileHitToRawChannelDirect' in dir(): - doTileHitToRawChannelDirect = False - -#---------------- -# Add Algorithms -#---------------- - -## get a handle on the top sequence of algorithms -from AthenaCommon.AlgSequence import AlgSequence -topSequence = AlgSequence() - - -if doTileHitToDigit or doTileHitToRawChannelDirect: - from AthenaCommon import CfgGetter - topSequence += CfgGetter.getAlgorithm("TileHitVecToCnt/TileHitVecToCnt", tryDefaultConfigurable=True) - -include( "TileSimAlgs/TileDigiCommon_jobOptions.py" ) diff --git a/TileCalorimeter/TileSimAlgs/share/TileFitDigitization_jobOptions.py b/TileCalorimeter/TileSimAlgs/share/TileFitDigitization_jobOptions.py deleted file mode 100644 index a974d8c067254e4735df91cdb914d9551f65c8f5..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileSimAlgs/share/TileFitDigitization_jobOptions.py +++ /dev/null @@ -1,112 +0,0 @@ -include.block("TileSimAlgs/TileDigitization_jobOptions.py") -include.block("TileSimAlgs/TileFitDigitization_jobOptions.py") -############################################################### -# -# Job options file : TileFitDigitization -# read G4 hits and create TileRawChannels using Fit method -# -#============================================================== -from AthenaCommon.BeamFlags import jobproperties -from AthenaCommon import CfgGetter - -# Create digits and run FitFilter for G4 data by default -if not 'doTileHitToDigit' in dir(): - doTileHitToDigit = True -if not 'doTileDigitToRawChannel' in dir(): - doTileDigitToRawChannel = True -if not 'doTileHitToRawChannelDirect' in dir(): - doTileHitToRawChannelDirect = False - - -try: - from __main__ import ALLOWIGNOREEXISTINGDATAOBJECT - from __main__ import ALLOWIGNORECONFIGERROR - from __main__ import ALLOWDISABLE - from __main__ import ALLOWBACKNAV -except: # default values if not done - ALLOWIGNOREEXISTINGDATAOBJECT=False - ALLOWIGNORECONFIGERROR=False - ALLOWDISABLE=False - ALLOWBACKNAV=False - from __main__ import ALLOWIGNOREEXISTINGDATAOBJECT - from __main__ import ALLOWIGNORECONFIGERROR - from __main__ import ALLOWDISABLE - from __main__ import ALLOWBACKNAV - -#------------------- -# Adjust conditions -#------------------- - -TileFrameLength = 9; # correct frame length for all testbeams -from TileConditions.TileInfoConfigurator import TileInfoConfigurator -tileInfoConfigurator = TileInfoConfigurator() -tileInfoConfigurator.NSamples = TileFrameLength -tileInfoConfigurator.TrigSample = (TileFrameLength-1)/2 -tileInfoConfigurator.NoiseScaleIndex = 3; # Noise for Fit method -from AthenaCommon.AppMgr import ToolSvc -from TileConditions.TileCondProxyConf import getTileCondProxy -ToolSvc.TileCondToolNoiseSample.ProxyNoiseSample = getTileCondProxy('FILE','Flt','Tile2003.ped','TileCondProxyFile_NoiseSample') -ToolSvc.TileBadChanTool.ProxyOflBch = getTileCondProxy('FILE','Bch','TileNoBad.oflBch','TileCondProxyFile_OflBch') - -#---------------- -# Add Algorithms -#---------------- - -## get a handle on the top sequence of algorithms -from AthenaCommon.AlgSequence import AlgSequence -topSequence = AlgSequence() - - -if doTileHitToDigit or doTileHitToRawChannelDirect: - - topSequence += CfgGetter.getAlgorithm("TileHitVecToCnt/TileHitVecToCnt", tryDefaultConfigurable=True) - theTileHitVecToCnt = topSequence.TileHitVecToCnt.DigitizationTool - - -if doTileHitToRawChannelDirect: - - from TileSimAlgs.TileRawChannelFromHitsGetter import * - theTileRawChannelFromHitsGetter=TileRawChannelFromHitsGetter() - - -if doTileHitToDigit: - - from TileSimAlgs.TileDigitsGetter import * - theTileDigitsGetter=TileDigitsGetter() - - from TileSimAlgs.TileSimAlgsConf import * - theTileDigitsMaker=TileDigitsMaker() - theTileDigitsMaker.UseCoolPulseShapes=False - theTileDigitsMaker.MaskBadChannels=False - theTileDigitsMaker.RndmEvtOverlay=False - - -if doTileDigitToRawChannel: - - # Reconstruction method: Fit Method (default for testbeam reco) - from TileRecUtils.TileRecFlags import jobproperties - jobproperties.TileRecFlags.doTileFit = True - jobproperties.TileRecFlags.doTileManyAmps = False - jobproperties.TileRecFlags.doTileOptATLAS = False - jobproperties.TileRecFlags.doTileOpt2 = False - - from TileRecUtils.TileRawChannelGetter import * - theTileRawChannelGetter=TileRawChannelGetter() - - jobproperties.TileRecFlags.TileRawChannelContainer = "TileRawChannelCnt" - ToolSvc.TileRawChannelBuilderFitFilter.TileRawChannelContainer = "TileRawChannelCnt" - ToolSvc.TileRawChannelBuilderFitFilter.calibrateEnergy = True; # apply CIS calibration to get pCb - ToolSvc.TileRawChannelBuilderFitFilter.RunType = 1; # physics - ToolSvc.TileRawChannelBuilderFitFilter.FrameLength = TileFrameLength; # 9 samples always - #ToolSvc.TileRawChannelBuilderFitFilter.MaxTimeSampleOffset = 0; # do not go outside frame - ToolSvc.TileRawChannelBuilderFitFilter.MaxIterate = 9; # iterate 9 times and choose best chi2 - ToolSvc.TileRawChannelBuilderFitFilter.RMSChannelNoise = 3; # use noise values from database - ToolSvc.TileRawChannelBuilderFitFilter.NoiseThresholdRMS = 3; # 2-param fit forced for pedestal-like events - ToolSvc.TileRawChannelBuilderFitFilter.SaturatedSampleError = 6; # error (in terms of RMS) assigned to sat.sample - - -from TileRecUtils.TileDQstatusAlgDefault import TileDQstatusAlgDefault -dqstatus = TileDQstatusAlgDefault() - -# -include( "TileSimAlgs/TileSamplingFraction_jobOptions.py" ) diff --git a/TileCalorimeter/TileSimAlgs/share/TileMuonReceiver_jobOptions.py b/TileCalorimeter/TileSimAlgs/share/TileMuonReceiver_jobOptions.py deleted file mode 100644 index 959708bc6939368d962f5bab2dd19274349d1c3d..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileSimAlgs/share/TileMuonReceiver_jobOptions.py +++ /dev/null @@ -1,77 +0,0 @@ -# -# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration -# - -# **************************************************************************** -# jobOptions file for setting up TilePulseForTileMuonReceiver algorithm -# ============================================================================ - -# The same pedestal and noise sigma values for all channels -# in simulation of TileMuonReceiver board will be used. -TileMuRcvNoiseSigma = 2.0 -TileMuRcvPedestal = 11.73 # Should be the same in TileInfo and TileRawChannelBuilderMF - -from AthenaCommon.AppMgr import ServiceMgr as svcMgr -svcMgr.TileInfoLoader.MuRcvNoiseSigma = TileMuRcvNoiseSigma -svcMgr.TileInfoLoader.MuRcvPed = TileMuRcvPedestal -# Uncomment for a local run BUT *COMMENT* this line prior to an upload to SVN -# svcMgr.TileCablingSvc.CablingType = 4 - -from AthenaCommon import CfgMgr - -# Set up TileCondToolPulseShape to be used in -# TilePulseForTileMuonReceiver and TileCondToolOfc -from TileConditions.TileCondToolConf import getTileCondToolMuRcvPulseShape -TileCondToolMuRcvPulseShape = getTileCondToolMuRcvPulseShape('FILE', 'TileCondToolMuRcvPulseShape') - -# Set up TileCondToolOfc to be used in TileRawChannelBuilderMFi -TileCondToolMuRcvOfc = CfgMgr.TileCondToolOfc('TileCondToolMuRcvOfc' - , OptFilterDeltaCorrelation = True - , TileCondToolPulseShape = TileCondToolMuRcvPulseShape) - -# Set up TileRawChannelBuilderMF to be used in TilePulseForTileMuonReceiver -TileMuRcvRawChannelBuilderMF = CfgMgr.TileRawChannelBuilderMF('TileMuRcvRawChannelBuilderMF' - , MF = 1 - , PedestalMode = 0 - , DefaultPedestal = TileMuRcvPedestal - , calibrateEnergy = jobproperties.TileRecFlags.calibrateEnergy() - , TileCondToolOfc = TileCondToolMuRcvOfc - , TileCondToolOfcOnFly = TileCondToolMuRcvOfc - , TimeMinForAmpCorrection = jobproperties.TileRecFlags.TimeMinForAmpCorrection() - , TimeMaxForAmpCorrection = jobproperties.TileRecFlags.TimeMaxForAmpCorrection()) - -# Random number engine in TilePulseForTileMuonReceiver -from Digitization.DigitizationFlags import jobproperties - -from AthenaCommon.AlgSequence import AlgSequence -topSequence = AlgSequence() - -# Set up TilePulseForTileMuonReceiver -topSequence += CfgMgr.TilePulseForTileMuonReceiver('TilePulseForTileMuonReceiver' - , IntegerDigits = not jobproperties.Digitization.PileUpPresampling() - , UseCoolPedestal = False - , UseCoolPulseShapes = True - , TileRawChannelBuilderMF = TileMuRcvRawChannelBuilderMF) -if jobproperties.Digitization.PileUpPresampling and 'LegacyOverlay' not in jobproperties.Digitization.experimentalDigi(): - from OverlayCommonAlgs.OverlayFlags import overlayFlags - topSequence.TilePulseForTileMuonReceiver.MuonReceiverDigitsContainer = overlayFlags.bkgPrefix() + "MuRcvDigitsCnt" - -# -# Thresholds -# - -topSequence += CfgMgr.TileMuonReceiverDecision('TileMuonReceiverDecision' -# run 2 thresholds - , MuonReceiverEneThreshCellD6Low = 500 - , MuonReceiverEneThreshCellD6andD5Low = 500 - , MuonReceiverEneThreshCellD6High = 600 - , MuonReceiverEneThreshCellD6andD5High = 600 -# run 3 thresholds - , MuonReceiverEneThreshCellD5 = 500 - , MuonReceiverEneThreshCellD6 = 500 - , MuonReceiverEneThreshCellD5andD6 = 500) - - -if jobproperties.Digitization.PileUpPresampling and 'LegacyOverlay' not in jobproperties.Digitization.experimentalDigi(): - from OverlayCommonAlgs.OverlayFlags import overlayFlags - topSequence.TileMuonReceiverDecision.TileMuonReceiverContainer = overlayFlags.bkgPrefix() + "TileMuRcvCnt" diff --git a/TileCalorimeter/TileSimAlgs/share/TileSamplingFraction_jobOptions.py b/TileCalorimeter/TileSimAlgs/share/TileSamplingFraction_jobOptions.py deleted file mode 100644 index ac1f766215114a2825502acd91055b0dfcd67096..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileSimAlgs/share/TileSamplingFraction_jobOptions.py +++ /dev/null @@ -1,28 +0,0 @@ -############################################################### -# -# Job options file : TileSamplingFraction -# Choose sampling fraction according to physics list -# -#============================================================== - -from AthenaCommon.Logging import logging -msg = logging.getLogger( 'TileSamplingFraction_jobOptions.py' ) - -from TileConditions.TileInfoConfigurator import TileInfoConfigurator -tileInfoConfigurator = TileInfoConfigurator() -tileInfoConfigurator.setupCOOLSFR() - -try: - from Digitization.DigitizationFlags import jobproperties - - tileInfoConfigurator.TileNoise = jobproperties.Digitization.doCaloNoise() - if tileInfoConfigurator.TileNoise: - msg.info("Switching ON noise in Tile Digitization" ) - else: - msg.info("Switching OFF noise in Tile Digitization" ) - - mlog.info (tileInfoConfigurator) - -except: - msg.info("Physics list not found, using default sampling fraction value") - msg.info("doCaloNoise flag not found, keeping previous value for TileNoise") diff --git a/TileCalorimeter/TileSimAlgs/share/TileTBDigitization_jobOptions.py b/TileCalorimeter/TileSimAlgs/share/TileTBDigitization_jobOptions.py deleted file mode 100644 index 15f3d3871f4f4191c4c1a0eaa74e9fba8a843892..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileSimAlgs/share/TileTBDigitization_jobOptions.py +++ /dev/null @@ -1,124 +0,0 @@ -############################################################### -# -# Job options file : TileTBDigitization -# create TileRawChannels from Hits stored in TileHitVector -# and TileBeamElem from hits in ancillary detectors -# Attention! noise is controlled by doCaloNoise variable -# (see TileConditions/TileConditions_jobOptions.py for details) -# -#============================================================== -from AthenaCommon import CfgGetter - -# Create digits and run FitFilter for G4 data by default -if not 'doTileHitToDigit' in dir(): - doTileHitToDigit = True -if not 'doTileDigitToRawChannel' in dir(): - doTileDigitToRawChannel = True -if not 'doTileHitToRawChannelDirect' in dir(): - doTileHitToRawChannelDirect = False -if not 'doTileTBHitToBeamElem' in dir(): - doTileTBHitToBeamElem = True -if not 'doTileHitToRawChannelCoherNoise' in dir(): - doTileHitToRawChannelCoherNoise=False - - -include( "TileConditions/TileTBConditions_jobOptions.py" ) - -# Add coherent noise -if doTileHitToRawChannelCoherNoise: - tileInfoConfigurator.TileCoherNoise=True -else: - tileInfoConfigurator.TileCoherNoise=False - - -#---------------- -# Add Algorithms -#---------------- - -## get a handle on the top sequence of algorithms -from AthenaCommon.AlgSequence import AlgSequence -topSequence = AlgSequence() - - -if doTileHitToDigit or doTileHitToRawChannelDirect: - - topSequence += CfgGetter.getAlgorithm("TileHitVecToCnt/TileHitVecToCnt", tryDefaultConfigurable=True) - theTileHitVecToCnt = topSequence.TileHitVecToCnt.DigitizationTool - theTileHitVecToCnt.TileHitVectors=["TileHitVec"] - if doTileHitToRawChannelDirect: - theTileHitVecToCnt.HitTimeFlag=1; # reset hit time to zero, no pulse shape - else: - theTileHitVecToCnt.HitTimeFlag=2; # shift time of all hits so that - theTileHitVecToCnt.TriggerTime = -25.0; # time of the earliest hit in event is random in interval [-25,0] ns - - -if doTileHitToRawChannelDirect: - - from TileSimAlgs.TileRawChannelFromHitsGetter import * - theTileRawChannelFromHitsGetter=TileRawChannelFromHitsGetter() - - -if doTileHitToDigit: - - from TileSimAlgs.TileDigitsGetter import * - theTileDigitsGetter=TileDigitsGetter() - - from TileSimAlgs.TileSimAlgsConf import * - theTileDigitsMaker=TileDigitsMaker() - theTileDigitsMaker.UseCoolPulseShapes=False - theTileDigitsMaker.MaskBadChannels=False - theTileDigitsMaker.RndmEvtOverlay=False - if doTileHitToRawChannelDirect: - theTileDigitsMaker.IntegerDigits=False; # do not round - else: - theTileDigitsMaker.IntegerDigits=True; # save integer numbers in digits vecto - - -if doTileDigitToRawChannel: - - # Reconstruction method: Fit Method (default for testbeam reco) - from TileRecUtils.TileRecFlags import jobproperties - jobproperties.TileRecFlags.doTileFit = True - jobproperties.TileRecFlags.doTileManyAmps = False - jobproperties.TileRecFlags.doTileOptATLAS = False - jobproperties.TileRecFlags.doTileOpt2 = False - - from TileRecUtils.TileRawChannelGetter import * - theTileRawChannelGetter=TileRawChannelGetter() - - jobproperties.TileRecFlags.TileRawChannelContainer = "TileRawChannelFit" - ToolSvc.TileRawChannelBuilderFitFilter.TileRawChannelContainer = "TileRawChannelFit" - ToolSvc.TileRawChannelBuilderFitFilter.calibrateEnergy = True; # apply CIS calibration to get pCb - ToolSvc.TileRawChannelBuilderFitFilter.RunType = 1; # physics - ToolSvc.TileRawChannelBuilderFitFilter.FrameLength = 9; # 9 samples always - #ToolSvc.TileRawChannelBuilderFitFilter.MaxTimeSampleOffset = 0; # do not go outside frame - ToolSvc.TileRawChannelBuilderFitFilter.MaxIterate = 9; # iterate 9 times and choose best chi2 - ToolSvc.TileRawChannelBuilderFitFilter.RMSChannelNoise = 3; # use noise values from database - ToolSvc.TileRawChannelBuilderFitFilter.NoiseThresholdRMS = 3; # 2-param fit forced for pedestal-like events - ToolSvc.TileRawChannelBuilderFitFilter.SaturatedSampleError = 6; # error (in terms of RMS) assigned to sat.sample - - -if doTileHitToDigit and doTileDigitToRawChannel and doTileHitToRawChannelDirect: - - from TileRecUtils.TileRecUtilsConf import * - theTTileRawChannelVerify = TileRawChannelVerify(TileRawChannelContainer1="TileRawChannelCnt", - TileRawChannelContainer2="TileRawChannelFit", - Precision=0.001, - DumpRawChannels=False, - SortFlag=False - ) - - topSequence += theTTileRawChannelVerify - - -if doTileTBHitToBeamElem: - - from TileSimAlgs.TileBeamElemGetter import * - theTileBeamElemGetter = TileBeamElemGetter() - - -from TileRecUtils.TileDQstatusAlgDefault import TileDQstatusAlgDefault -dqstatus = TileDQstatusAlgDefault() - -# -include( "TileSimAlgs/TileSamplingFraction_jobOptions.py" ) diff --git a/TileCalorimeter/TileSimAlgs/share/TileTTL1_jobOptions.py b/TileCalorimeter/TileSimAlgs/share/TileTTL1_jobOptions.py deleted file mode 100644 index 41f01c71eac43e94b2a68108d678b2abe997270f..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileSimAlgs/share/TileTTL1_jobOptions.py +++ /dev/null @@ -1,18 +0,0 @@ -from AthenaCommon.AlgSequence import AlgSequence -topSequence = AlgSequence() - -from TileSimAlgs.TileTTL1FromHitsGetter import TileTTL1FromHitsGetter -theTileTTL1FromHitsGetter = TileTTL1FromHitsGetter() - -from Digitization.DigitizationFlags import jobproperties - -from AthenaCommon.BeamFlags import jobproperties -if jobproperties.Beam.beamType == 'cosmics': - - theTileTTL1Cosmics=TileHitToTTL1("TileHitToTTL1_Cosmics", - TileTTL1Type = "Cosmics", - TileHitContainer = "TileHitCnt", - TileTTL1Container = "TileTTL1CosmicsCnt", - TileMBTSTTL1Container = "TileMBTSTTL1CosmicsContainer" - ) - topSequence += theTileTTL1Cosmics diff --git a/TileCalorimeter/TileSimAlgs/share/jobOptions_PulseSim.py b/TileCalorimeter/TileSimAlgs/share/jobOptions_PulseSim.py deleted file mode 100644 index 6bde897bf48d7b637618f563c3ab8383fbe9a50c..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileSimAlgs/share/jobOptions_PulseSim.py +++ /dev/null @@ -1,189 +0,0 @@ -# jobOptions_NoiseMC.py -# Configuration file to digitize a HITS file for noise calibration purposes -# and to produce root files with resulting noise - -#--- Output printout level ----------------------------------- -#output threshold (1=VERBOSE, 2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL) -if not 'OutputLevel' in dir(): - OutputLevel = 4 -svcMgr.MessageSvc.OutputLevel = OutputLevel -#svcMgr.MessageSvc.defaultLimit = 1000000 -svcMgr.MessageSvc.defaultLimit = 10 -svcMgr.MessageSvc.Format = "% F%60W%S%7W%R%T %0W%M" -svcMgr.MessageSvc.useColors = False - -# number of events to process -if not 'EvtMax' in dir(): - EvtMax = 1000 -from AthenaCommon.AthenaCommonFlags import jobproperties -jobproperties.AthenaCommonFlags.EvtMax=EvtMax - -from AthenaCommon import CfgMgr - -# location of input pool files and output root files -#InputDirectory="/afs/cern.ch/user/t/tilecomm/w0/noise/run1" -InputDirectory="." -OutputDirectory="." - -if not 'RunNumber' in dir(): - RunNumber = 0 -if not 'Version' in dir(): - Version = 0 -Suffix=("%d" % Version ) - -# name of input and output pool files -InFile=("%s/PedestalSimulation.HITS.GEO-18.root" % InputDirectory) -OutFile=("%s/PedestalSimulation.DIGITS.%s.dummy.root" % (OutputDirectory, Suffix)) - -# Set input file -jobproperties.AthenaCommonFlags.PoolHitsInput=[] -#for i in range (0,100): # one file contains few events only, use it 100 times -for i in range (0,100): # one file contains few events only, use it 100 times - jobproperties.AthenaCommonFlags.PoolHitsInput+=[InFile] - -# Set output file -jobproperties.AthenaCommonFlags.PoolRDOOutput=OutFile - -#-------------------------------------------------------------- -# Digitiziation and Pileup configuration -#-------------------------------------------------------------- -from Digitization.DigitizationFlags import jobproperties -jobproperties.Digitization.doCaloNoise=True -jobproperties.Digitization.IOVDbGlobalTag = 'OFLCOND-MC16-SDR-28' - -#-------------------------------------------------------------- -# Global flags. Like eg the DD version: -#-------------------------------------------------------------- -from AthenaCommon.GlobalFlags import jobproperties -jobproperties.Global.DetDescrVersion='ATLAS-GEO-18-01-00' - -#-------------------------------------------------------------------- -# DetFlags. Use to turn on/off individual subdetector or LVL1 trigger -#-------------------------------------------------------------------- -from AthenaCommon.DetFlags import DetFlags -DetFlags.ID_setOff() -DetFlags.Calo_setOff() -DetFlags.Muon_setOff() -DetFlags.LVL1_setOff() - -DetFlags.Truth_setOff() - -DetFlags.Tile_setOn() - -doTileHitToDigit = False -doTileDigitsFromPulse = True -doTileDigitToRawChannel = True - -PhaseII=False -TileFrameLength=7 -TriggerSample= (TileFrameLength-1)//2# Floor division -ForceOFCOnFly = False - -from TileRecUtils.TileRecFlags import jobproperties -jobproperties.TileRecFlags.calibrateEnergy = False #Set false to use ADC counts, true to use MeV. -jobproperties.TileRecFlags.doTileOptATLAS = True #Non-iterative method -jobproperties.TileRecFlags.doTileOpt2 = True #Iterative method - -if(TileFrameLength != 7 or ForceOFCOnFly is True): - jobproperties.TileRecFlags.OfcFromCOOL = False - -include( "Digitization/Digitization.py" ) - -from TileConditions.TileInfoConfigurator import TileInfoConfigurator -tileInfoConfigurator = TileInfoConfigurator() -tileInfoConfigurator.NSamples = TileFrameLength -tileInfoConfigurator.TrigSample = TriggerSample -tileInfoConfigurator.setupAdcRange(12) if(PhaseII) else tileInfoConfigurator.setupAdcRange(10) # 12 if Phase II - -#Stream1.ItemList+=["TileDigitsContainer#TileDigitsCnt"] -#Stream1.ItemList=[]; # empty list - don't need to create output file -streamRDO.ItemList=[]; # empty list - don't need to create output file - -svcMgr.AthenaPoolCnvSvc.MaxFileSizes=["16000000000"] - -# get a handle on topalg -from AthenaCommon.AlgSequence import AlgSequence -topSequence = AlgSequence() - -# don't need any hits at input -del topSequence.TileHitVecToCnt - -# don't need any L1 or L2 algorithms -del topSequence.TileHitToTTL1 -del topSequence.TileRawChannelToL2 - -# don't need TileMuonReceiver -del topSequence.TilePulseForTileMuonReceiver -del topSequence.TileMuonReceiverDecision - -# parameters for pulse simulation - -#General configuration -topSequence.TileDigitsFromPulse.OutputLevel=DEBUG -topSequence.TileDigitsFromPulse.NSamples=TileFrameLength #Select number of samples to be saved in each pulse -topSequence.TileDigitsFromPulse.Bigain=False #Save the two gain modes -topSequence.TileDigitsFromPulse.InTimeAmp=1000 -topSequence.TileDigitsFromPulse.ImperfectionMean=1 -topSequence.TileDigitsFromPulse.ImperfectionRms=0 -topSequence.TileDigitsFromPulse.UseInTimeAmpDist=False -topSequence.TileDigitsFromPulse.GaussianC2CPhaseVariation=0. - -#PhaseII parameters -if(PhaseII): - topSequence.TileDigitsFromPulse.TilePhaseII=True - -#Pedestal -if(PhaseII): - topSequence.TileDigitsFromPulse.ChannelSpecificPedestal=False - topSequence.TileDigitsFromPulse.PedestalValueHG=100 - topSequence.TileDigitsFromPulse.PedestalValueLG=100 -else: - topSequence.TileDigitsFromPulse.ChannelSpecificPedestal=True - -#Noise -if(PhaseII): - topSequence.TileDigitsFromPulse.UseGaussNoise=True -else: - topSequence.TileDigitsFromPulse.ChannelSpecificNoise=True - -#Pile up -topSequence.TileDigitsFromPulse.UseOutOfTimeAmpDist=False -topSequence.TileDigitsFromPulse.PileUpFraction=0 -topSequence.TileDigitsFromPulse.nPulses=21 -topSequence.TileDigitsFromPulse.AmpDistLowerLimit=0 -topSequence.TileDigitsFromPulse.SimulatePileUpWithPoiss=False -topSequence.TileDigitsFromPulse.AvgMuForPileUpSimulation=80 - -print(topSequence.TileDigitsFromPulse) - -#--- Create TileCal h2000 ntuple with RawChannels --------- -if not hasattr(ServiceMgr,"THistSvc"): - from GaudiSvc.GaudiSvcConf import THistSvc - ServiceMgr+=THistSvc() -ServiceMgr.THistSvc.Output += ["AANT DATAFILE='%s/tile_h2000.root' OPT='RECREATE'" % OutputDirectory] - -doSim = True -ReadRch = True -jobproperties.TileRecFlags.readDigits=True -include( "TileRec/TileNtuple_jobOptions.py" ) - -TileNtuple.CalibMode = True -TileNtuple.CalibrateEnergy = False -TileNtuple.OfflineUnits = 0 -TileNtuple.TileRawChannelContainer = "TileRawChannelCnt" -TileNtuple.TileRawChannelContainerOpt = "TileRawChannelOpt2" -#TileNtuple.TileRawChannelContainerFit = "TrueAmp" -TileNtuple.NSamples = TileFrameLength - -if not 'OutputLevel' in dir(): - OutputLevel = 4 -svcMgr.MessageSvc.OutputLevel = OutputLevel -svcMgr.MessageSvc.defaultLimit = 1000000 -svcMgr.MessageSvc.Format = "% F%60W%S%7W%R%T %0W%M" -svcMgr.MessageSvc.useColors = False - -from AthenaServices.AthenaServicesConf import AthenaEventLoopMgr -svcMgr += AthenaEventLoopMgr() -svcMgr.AthenaEventLoopMgr.EventPrintoutInterval = 100 - - diff --git a/TileCalorimeter/TileTBRec/share/TileTBG4ToRC_jobOptions.py b/TileCalorimeter/TileTBRec/share/TileTBG4ToRC_jobOptions.py deleted file mode 100755 index cae38c7bf16d9fcb7c6c955ce8beef7d442418e4..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileTBRec/share/TileTBG4ToRC_jobOptions.py +++ /dev/null @@ -1,3 +0,0 @@ -# obsolete jobOptions -# use new one instead: -include ("TileSimAlgs/TileTBDigitization_jobOptions.py") diff --git a/TileCalorimeter/TileTBRec/share/jobOptions_TileOldTB.py b/TileCalorimeter/TileTBRec/share/jobOptions_TileOldTB.py deleted file mode 100644 index 5a304e6784eae00e485d840dc73d55948c9304f6..0000000000000000000000000000000000000000 --- a/TileCalorimeter/TileTBRec/share/jobOptions_TileOldTB.py +++ /dev/null @@ -1,201 +0,0 @@ -#============================================================== -# -# Job options file to recreate TB 2000-2003 ntuple -# -#============================================================== - -#use McEventSelector -## basic job configuration (for generator) -import AthenaCommon.AtlasUnixGeneratorJob - -## get a handle to the default top-level algorithm sequence -from AthenaCommon.AlgSequence import AlgSequence -topSequence = AlgSequence() - -## get a handle to the ServiceManager -from AthenaCommon.AppMgr import ServiceMgr as svcMgr - -## get a handle to the ApplicationManager, ToolSvc -from AthenaCommon.AppMgr import theApp, ToolSvc - -#--- Auditor options ------------------------------------------- -# write out a summary of the time spent -#from GaudiAud import * -#svcMgr.AuditorSvc += ChronoAuditor() -#svcMgr.AuditorSvc += MemStatAuditor() - -if not 'EvtMax' in dir(): - EvtMax = 5000000 - -theApp.EvtMax=EvtMax - -if not 'RunNumber' in dir(): - RunNumber = 210319 - -svcMgr.EventSelector.RunNumber = RunNumber -svcMgr.EventSelector.EventsPerRun = 500000 -svcMgr.EventSelector.FirstEvent = 1 - -if not 'OutputLevel' in dir(): - OutputLevel = 3 - -if not hasattr(svcMgr, 'MessageSvc'): - from GaudiCoreSvc.GaudiCoreSvcConf import MessageSvc - svcMgr += MessageSvc() -svcMgr.MessageSvc.defaultLimit = 1000000 -svcMgr.MessageSvc.Format = "% F%50W%S%7W%R%T %0W%M" -svcMgr.MessageSvc.OutputLevel = OutputLevel - -if not hasattr(svcMgr, 'HistorySvc'): - from GaudiMonitor.GaudiMonitorConf import HistorySvc - svcMgr += HistorySvc() -svcMgr.HistorySvc.OutputLevel = 4 - -#--- Detector flags ------------------------------------------- -from AthenaCommon.GlobalFlags import GlobalFlags -from AthenaCommon.DetFlags import DetFlags - -# - Select detectors -DetFlags.ID_setOff() -DetFlags.Calo_setOn() -DetFlags.em_setOff() -DetFlags.FCal_setOff() -DetFlags.HEC_setOff() -DetFlags.Tile_setOn() -DetFlags.Muon_setOff() -DetFlags.Truth_setOn() - -# - switch off tasks -DetFlags.pileup.all_setOff() -DetFlags.simulate.all_setOff() -DetFlags.makeRIO.all_setOff() -DetFlags.writeBS.all_setOff() -DetFlags.readRDOBS.all_setOff() -DetFlags.readRIOBS.all_setOff() -DetFlags.readRIOPool.all_setOff() -DetFlags.writeRIOPool.all_setOff() -DetFlags.simulateLVL1.all_setOff() -# - print flags -DetFlags.Print() - -#--- GeoModel stuff ------------------------------------------- -from AthenaCommon.GlobalFlags import GlobalFlags -GlobalFlags.DataSource.set_geant4() -GlobalFlags.DetGeo.set_ctbh8() - -from AtlasGeoModel import SetGeometryVersion -from AtlasGeoModel import GeoModelInit -from GeoModelSvc.GeoModelSvcConf import GeoModelSvc -GeoModelSvc = GeoModelSvc() -GeoModelSvc.TileVersionOverride = "TileTB-3B-00" - - -if not 'TileBarrelOnly' in dir(): - TileBarrelOnly = False - -if not 'TileCisRun' in dir(): - TileCisRun = False - -if not 'TileAdderFit' in dir(): - TileAdderFit = True - -if TileCisRun: - # set all parameters for standard CIS run - TileBiGain = True - TileRunType = 8 - - if not 'TileFrameLength' in dir(): - TileFrameLength = 9; # still expect 9 samples even in CIS runs in old testbeams - - TileCalibrateEnergy = False; # keep ADC counts - - if not 'TilePmtOrder' in dir(): - TilePmtOrder = True -else: - # set all parameters for standard Phys run - TileBiGain = False - if not 'TileRunType' in dir(): - TileRunType = 0; # if run type is set to non-zero values, it overrides event trig type - - if not 'TileFrameLength' in dir(): - TileFrameLength = 9; # the value we expect in single gain run - - if not 'TileCalibrateEnergy' in dir(): - TileCalibrateEnergy = True; # convert ADC counts to pCb for normal runs and also apply Cesium - - if not 'TilePmtOrder' in dir(): - TilePmtOrder = True - -if not 'InputDirectory' in dir(): - InputDirectory = "." - -if not 'OutputDirectory' in dir(): - OutputDirectory = "." - -if not 'SkipEvents' in dir(): - SkipEvents=0 - -if not 'EventShift' in dir(): - EventShift=0 - - -from TileTBRec.TileTBRecConf import * - -theTileTBOldNtupleRead=TileTBOldNtupleRead() -theTileTBOldNtupleRead.NtupleID = "h1000" -theTileTBOldNtupleRead.NtupleDir = InputDirectory -theTileTBOldNtupleRead.RunNumber = RunNumber -theTileTBOldNtupleRead.BiGain = TileBiGain -theTileTBOldNtupleRead.PmtOrder = TilePmtOrder -theTileTBOldNtupleRead.BarrelOnly = TileBarrelOnly -theTileTBOldNtupleRead.AdderFit = TileAdderFit -theTileTBOldNtupleRead.SkipEvents = SkipEvents -theTileTBOldNtupleRead.EventShift = [ EventShift, EventShift, EventShift, EventShift, EventShift, EventShift ] - -topSequence += theTileTBOldNtupleRead; - - -doTileHitToDigit = False -doTileTBHitToBeamElem = False -doTileFlat = False -doTileFit = True -include( "TileTBRec/TileTBDefaults_jobOptions.py" ) -include( "TileSimAlgs/TileTBDigitization_jobOptions.py" ) -include( "TileTBRec/TileTBRec_jobOptions.py" ) - - -theTileTBOldNtupleWrite=TileTBOldNtupleWrite() -theTileTBOldNtupleWrite.NtupleID = "h1000" -theTileTBOldNtupleWrite.NtupleDir = OutputDirectory -theTileTBOldNtupleWrite.PmtOrder = TilePmtOrder -theTileTBOldNtupleWrite.CalibrateEnergy = TileCalibrateEnergy - -topSequence += theTileTBOldNtupleWrite; - -print topSequence - - -#============================================================= -#=== setup TileConditions -#============================================================= -from TileConditions.TileInfoConfigurator import TileInfoConfigurator -tileInfoConfigurator = TileInfoConfigurator() -tileInfoConfigurator.OutputLevel = 3 - -#=== set different CIS and Cesium ASCII file names for different run periods - -run=str(RunNumber/10000) + "0000" -while len(run)<7: - run='0'+run -CisLookup = "Tile2004.lut" -CisLinear = "Tile" + run + ".cis" -CesiumFile = "Tile" + run + ".ces" - -from AthenaCommon.AppMgr import ToolSvc -from TileConditions.TileCondProxyConf import getTileCondProxy -ToolSvc.TileCondToolEmscale.ProxyOflCisLin = getTileCondProxy('FILE','Flt',CisLinear, 'TileCondProxyFile_OflCisLin') -ToolSvc.TileCondToolEmscale.ProxyOflCisNln = getTileCondProxy('FILE','Flt',CisLookup, 'TileCondProxyFile_OflCisNln') -ToolSvc.TileCondToolEmscale.ProxyOflCes = getTileCondProxy('FILE','Flt',CesiumFile,'TileCondProxyFile_OflCes') - -print tileInfoConfigurator -