def PixelDigitizationTool(name="PixelDigitizationTool", **kwargs): kwargs.setdefault("HardScatterSplittingMode", 0) from IOVDbSvc.CondDB import conddb if conddb.dbmc == "OFLP200" and not conddb.folderRequested("/PIXEL/HitDiscCnfg"): conddb.addFolderSplitMC("PIXEL","/PIXEL/HitDiscCnfg","/PIXEL/HitDiscCnfg") if not conddb.folderRequested('PIXEL/PixReco'): conddb.addFolder('PIXEL_OFL','/PIXEL/PixReco') return BasicPixelDigitizationTool(name, **kwargs)
def PixelDigitizationTool(name="PixelDigitizationTool", **kwargs): kwargs.setdefault("HardScatterSplittingMode", 0) from IOVDbSvc.CondDB import conddb if conddb.dbmc == "OFLP200" and not conddb.folderRequested("/PIXEL/HitDiscCnfg"): conddb.addFolderSplitMC("PIXEL", "/PIXEL/HitDiscCnfg", "/PIXEL/HitDiscCnfg") if not conddb.folderRequested("PIXEL/PixReco"): conddb.addFolder("PIXEL_OFL", "/PIXEL/PixReco") return BasicPixelDigitizationTool(name, **kwargs)
def getTileCondProxy(technology, type, source, name, **kwargs): tool = None #============================================================= #=== FILE #============================================================= if technology == 'FILE': if type == 'Flt': tool = TileCondProxyFileFlt(name, Source=source) elif type == 'Bch': tool = TileCondProxyFileBch(name, Source=source) #============================================================= #=== COOL #============================================================= elif technology == 'COOL': from TileConditions.TileCoolMgr import tileCoolMgr folder = tileCoolMgr.getFolder(source) folder2 = tileCoolMgr.getFolderTwo(source) tag = tileCoolMgr.getTag(source) conn = tileCoolMgr.getDbConn(source) key = tileCoolMgr.getKey(source) folderstr = "" folderstr2 = "" if (len(tag)): folderstr = folder + " <tag>" + tag + "</tag> <key>" + key + "</key>" folderstr2 = folder2 + " <tag>" + tag + "</tag> <key>" + key + "</key>" else: folderstr = folder + " <key>" + folder + "</key>" folderstr2 = folder2 + " <key>" + folder2 + "</key>" #=== add folders according to their COOL schema split type if tileCoolMgr.isSplitMC(source): conddb.addFolderSplitMC(conn, folderstr, folderstr2) if tileCoolMgr.isOfflineOnly(source): conddb.addFolder(conn, folderstr) if tileCoolMgr.isSplitOnline(source): conddb.addFolderSplitOnline(conn, folderstr, folderstr2) if tileCoolMgr.isSqlite(source): conddb.addFolder(conn, folderstr) #=== create the proxies if type == 'Flt': tool = TileCondProxyCoolFlt(name, Source=key) elif type == 'Bch': tool = TileCondProxyCoolBch(name, Source=key) elif type == 'Ofc': tool = TileCondProxyCoolOfc(name, Source=key) return tool
def setFolders(self): from IOVDbSvc.CondDB import conddb if not conddb.folderRequested(self.noiseFolder): conddb.addFolderSplitMC("SCT", self.noiseFolder, self.noiseFolder, className="CondAttrListCollection") if not conddb.folderRequested(self.gainFolder): conddb.addFolderSplitMC("SCT", self.gainFolder, self.gainFolder, className="CondAttrListCollection")
def CalibSvc(name="CalibSvc", **kwargs): kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) kwargs.setdefault("RndmEngine", "PixelDigitization") from AthenaCommon.BeamFlags import jobproperties from AthenaCommon.Resilience import protectedInclude protectedInclude("PixelConditionsServices/PixelCalibSvc_jobOptions.py") from IOVDbSvc.CondDB import conddb conddb.addFolderSplitMC("PIXEL", "/PIXEL/ReadoutSpeed", "/PIXEL/ReadoutSpeed") if jobproperties.Beam.beamType == "cosmics": kwargs.setdefault("UsePixMapCondDB", True) return CfgMgr.CalibSvc(name, **kwargs)
def BasicPixelDigitizationTool(name="PixelDigitizationTool", **kwargs): from AthenaCommon import CfgGetter kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) streamName = kwargs.setdefault("RndmEngine", "PixelDigitization") if not digitizationFlags.rndmSeedList.checkForExistingSeed(streamName): digitizationFlags.rndmSeedList.addSeed(streamName, 10513239, 492615104 ) from AthenaCommon.BeamFlags import jobproperties from AthenaCommon.Resilience import protectedInclude from AthenaCommon.Include import include from AthenaCommon.AppMgr import ServiceMgr from AthenaCommon.CfgGetter import getService protectedInclude( "PixelConditionsServices/SpecialPixelMapSvc_jobOptions.py" ) include.block( "PixelConditionsServices/SpecialPixelMapSvc_jobOptions.py" ) protectedInclude( "PixelConditionsServices/PixelDCSSvc_jobOptions.py" ) include.block( "PixelConditionsServices/PixelDCSSvc_jobOptions.py" ) protectedInclude("PixelConditionsServices/PixelCalibSvc_jobOptions.py") from IOVDbSvc.CondDB import conddb conddb.addFolderSplitMC("PIXEL","/PIXEL/ReadoutSpeed","/PIXEL/ReadoutSpeed") PixelCablingSvc = getService("PixelCablingSvc") ServiceMgr += PixelCablingSvc print PixelCablingSvc if not hasattr(ServiceMgr, "PixelSiPropertiesSvc"): from SiLorentzAngleSvc.LorentzAngleSvcSetup import lorentzAngleSvc from SiPropertiesSvc.SiPropertiesSvcConf import SiPropertiesSvc pixelSiPropertiesSvc = SiPropertiesSvc(name = "PixelSiPropertiesSvc",DetectorName="Pixel",SiConditionsServices = lorentzAngleSvc.pixelSiliconConditionsSvc) ServiceMgr += pixelSiPropertiesSvc kwargs.setdefault("InputObjectName", "PixelHits") procTools = [] chargeTools = [] #Tools in array for flexibility feSimTools = [] if GeometryFlags.isSLHC(): procTools += ['PixelRadDamDiodeCrossTalkGenerator'] chargeTools += ['RadDamSensorSimPlanarTool'] feSimTools += ['RadDamRD53SimTool'] else: procTools += ['PixelRadDamDiodeCrossTalkGenerator'] procTools += ['PixelRadDamChargeSmearer'] procTools += ['PixelRadDamNoisyCellGenerator'] procTools += ['PixelRadDamRandomDisabledCellGenerator'] chargeTools += ['RadDamSensorSimPlanarTool'] chargeTools += ['RadDamSensorSim3DTool'] feSimTools += ['RadDamFEI4SimTool'] feSimTools += ['RadDamFEI3SimTool'] kwargs.setdefault("PixelProcessorTools", procTools) kwargs.setdefault("ChargeTools", chargeTools) kwargs.setdefault("FrontEndSimTools", feSimTools) kwargs.setdefault("EnergyDepositionTool", "RadDamEnergyDepositionTool") if digitizationFlags.doXingByXingPileUp(): # PileUpTool approach kwargs.setdefault("FirstXing", Pixel_FirstXing() ) kwargs.setdefault("LastXing", Pixel_LastXing() ) return CfgMgr.RadDam__PixelDigitizationTool(name, **kwargs)
def initialiseCoolDataBaseFolder(): if TrkDetFlags.ConfigurationOutputLevel() < 3 : print ('[ Configuration : start ] *** FatrasTrackingGeometry ********************************') print ('[ TrackingGeometrySvc ]') # check whether the material retrieval is ment to be from COOL if TrkDetFlags.MaterialSource() == 'COOL' : # the tag names CoolDataBaseFolder = TrkDetFlags.MaterialStoreGateKey() AtlasMaterialTag = TrkDetFlags.MaterialTagBase()+str(TrkDetFlags.MaterialVersion())+'_' if TrkDetFlags.ConfigurationOutputLevel() < 3 : print ('[ TrackingGeometrySvc ] Associating DB folder : ',CoolDataBaseFolder) print ('[ TrackingGeometrySvc ] base material tag : ',AtlasMaterialTag) # we need the conditions interface from IOVDbSvc.CondDB import conddb # use a local database if TrkDetFlags.MaterialDatabaseLocal(): # specify the local database DataBasePath = TrkDetFlags.MaterialDatabaseLocalPath() DataBaseName = TrkDetFlags.MaterialDatabaseLocalName() MagicTag = TrkDetFlags.MaterialMagicTag() DataBaseConnection = '<dbConnection>sqlite://X;schema='+DataBasePath+DataBaseName+';dbname=OFLP200</dbConnection>' conddb.blockFolder('/GLOBAL/TrackingGeo/LayerMaterial') conddb.addFolderWithTag('',DataBaseConnection+CoolDataBaseFolder,AtlasMaterialTag+MagicTag,force=True) if TrkDetFlags.ConfigurationOutputLevel() < 3 : print ('[ TrackingGeometrySvc ] Using Local Database: '+DataBaseConnection) # make sure that the pool files are in the catalog #from PoolSvc.PoolSvcConf import PoolSvc #PoolSvc.ReadCatalog += [ DataBasePath+'PoolFileCatalog.xml' ] elif TrkDetFlags.SLHC_Geometry() : # set the folder to the SLHC location CoolDataBaseFolder = '/GLOBAL/TrackingGeo/SLHC_LayerMaterial' ctag = AtlasMaterialTag+TrkDetFlags.MaterialMagicTag() cfoldertag = CoolDataBaseFolder+' <tag>'+ctag+'</tag>' conddb.addFolderSplitMC('GLOBAL',cfoldertag,cfoldertag) else : # load the right folders (preparation for calo inclusion) cfolder = CoolDataBaseFolder +'<tag>TagInfoMajor/'+AtlasMaterialTag+'/GeoAtlas</tag>' conddb.addFolderSplitMC('GLOBAL',cfolder,cfolder) #HACK: CoolDataBaseFolder may not be set at this point! Is this right? -KG return CoolDataBaseFolder
def setFolders(self): from IOVDbSvc.CondDB import conddb if not conddb.folderRequested(self.channelFolder): if self.channelFolderDb is None: conddb.addFolderSplitMC(self.dbInstance, self.channelFolder, self.channelFolder, className="CondAttrListVec") else: conddb.addFolder(self.dbInstance, self.channelFolderDb, className="CondAttrListVec") if not conddb.folderRequested(self.moduleFolder): if self.moduleFolderDb is None: conddb.addFolderSplitMC(self.dbInstance, self.moduleFolder, self.moduleFolder, className="CondAttrListVec") else: conddb.addFolder(self.dbInstance, self.moduleFolderDb, className="CondAttrListVec") if not conddb.folderRequested(self.murFolder): if self.murFolderDb is None: conddb.addFolderSplitMC(self.dbInstance, self.murFolder, self.murFolder, className="CondAttrListVec") else: conddb.addFolder(self.dbInstance, self.murFolderDb, className="CondAttrListVec")
def setSCT_CablingDataBase(): from IOVDbSvc.CondDB import conddb from InDetRecExample.InDetJobProperties import InDetFlags SCTConfigurationFolderPath='/SCT/DAQ/Config/' #if its COMP200, use old folders... if (conddb.dbdata == "COMP200"): SCTConfigurationFolderPath='/SCT/DAQ/Configuration/' #...but now check if we want to override that decision with explicit flag (if there is one) try: if InDetFlags.ForceCoraCool(): SCTConfigurationFolderPath='/SCT/DAQ/Configuration/' except Exception: pass try: if InDetFlags.ForceCoolVectorPayload(): SCTConfigurationFolderPath='/SCT/DAQ/Config/' except Exception: pass try: if (InDetFlags.ForceCoolVectorPayload() and InDetFlags.ForceCoraCool()): # Setup logger from AthenaCommon.Logging import logging msg = logging.getLogger("SCT_CablingConfig") msg.setLevel(logging.INFO) msg.warning("*** SCT DB CONFIGURATION FLAG CONFLICT: Both CVP and CoraCool selected****") SCTConfigurationFolderPath='' except Exception: pass SCTRodConfigPath=SCTConfigurationFolderPath+'ROD' SCTMurConfigPath=SCTConfigurationFolderPath+'MUR' SCTRodMurConfigPath=SCTConfigurationFolderPath+'RODMUR' SCTGeogConfigPath=SCTConfigurationFolderPath+'Geog' if not conddb.folderRequested(SCTRodConfigPath): conddb.addFolderSplitMC("SCT",SCTRodConfigPath,SCTRodConfigPath, className="CondAttrListVec") if not conddb.folderRequested(SCTMurConfigPath): conddb.addFolderSplitMC("SCT", SCTMurConfigPath, SCTMurConfigPath, className="CondAttrListVec") if not conddb.folderRequested(SCTRodMurConfigPath): conddb.addFolderSplitMC("SCT",SCTRodMurConfigPath,SCTRodMurConfigPath, className="CondAttrListVec") if not conddb.folderRequested(SCTGeogConfigPath): conddb.addFolderSplitMC("SCT",SCTGeogConfigPath,SCTGeogConfigPath, className="CondAttrListVec") return SCTConfigurationFolderPath
theApp.EvtMax = 20 #For real data, earliest timestamp is 0 #ServiceMgr.EventSelector.InitialTimeStamp = 1228950000 ServiceMgr.EventSelector.InitialTimeStamp = 1476741326 # LB 18 of run 310809, 10/17/2016 @ 9:55pm (UTC) ServiceMgr.EventSelector.RunNumber = 310809 #-------------------------------------------------------------- # Set output lvl (VERBOSE, DEBUG, INFO, WARNING, ERROR, FATAL) #-------------------------------------------------------------- ServiceMgr.MessageSvc.OutputLevel = INFO ServiceMgr.MessageSvc.Format = "% F%50W%S%7W%R%T %0W%M" SCT_ReadCalibDataTool.OutputLevel = INFO topSequence.SCT_ReadCalibDataTestAlg.OutputLevel = INFO conddb.addFolderSplitMC("SCT", "/SCT/DAQ/Config/MUR", "/SCT/DAQ/Config/MUR") conddb.addFolderSplitMC("SCT", "/SCT/DAQ/Config/Geog", "/SCT/DAQ/Config/Geog") conddb.addFolderSplitMC("SCT", "/SCT/DAQ/Config/RODMUR", "/SCT/DAQ/Config/RODMUR") conddb.addFolderSplitMC("SCT", "/SCT/DAQ/Config/ROD", "/SCT/DAQ/Config/ROD") #-------------------------------------------------------------- # Set the correct flags #-------------------------------------------------------------- # Test return ConditionsSummary? if DoTestmyConditionsSummary: SCT_ReadCalibDataTestAlg.DoTestmyConditionsSummary = True else: SCT_ReadCalibDataTestAlg.DoTestmyConditionsSummary = False # Test my isGood method
def BasicPixelDigitizationTool(name="PixelDigitizationTool", **kwargs): from AthenaCommon.AppMgr import ServiceMgr from AthenaCommon.AppMgr import ToolSvc from IOVDbSvc.CondDB import conddb from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags as commonGeoFlags from AtlasGeoModel.InDetGMJobProperties import InDetGeometryFlags as geoFlags from AthenaCommon.GlobalFlags import globalflags ############################################################################################ # Set up Pixel Module data (2018 condition) ############################################################################################ from AthenaCommon.AlgSequence import AthSequencer condSeq = AthSequencer("AthCondSeq") ################# # Module status # ################# useNewDeadmapFormat = False useNewChargeFormat = False if not useNewDeadmapFormat: if not (conddb.folderRequested("/PIXEL/PixMapOverlay") or conddb.folderRequested("/PIXEL/Onl/PixMapOverlay")): conddb.addFolderSplitOnline("PIXEL", "/PIXEL/Onl/PixMapOverlay", "/PIXEL/PixMapOverlay", className='CondAttrListCollection') if not hasattr(condSeq, 'PixelConfigCondAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelConfigCondAlg PixelConfigCondAlg.UseCalibConditions = True PixelConfigCondAlg.UseDeadmapConditions = True PixelConfigCondAlg.UseDCSStateConditions = False PixelConfigCondAlg.UseDCSStatusConditions = False PixelConfigCondAlg.UseDCSHVConditions = True PixelConfigCondAlg.UseDCSTemperatureConditions = True PixelConfigCondAlg.UseTDAQConditions = False PixelConfigCondAlg.UseCablingConditions = False from AthenaCommon.BeamFlags import jobproperties if jobproperties.Beam.beamType == "cosmics": PixelConfigCondAlg.UseComTime = True PixelConfigCondAlg.BarrelTimeJitter = [25.0, 25.0, 25.0, 25.0] PixelConfigCondAlg.EndcapTimeJitter = [25.0, 25.0, 25.0] PixelConfigCondAlg.DBMTimeJitter = [25.0, 25.0, 25.0] PixelConfigCondAlg.BarrelNumberOfBCID = [8, 8, 8, 8] PixelConfigCondAlg.EndcapNumberOfBCID = [8, 8, 8] PixelConfigCondAlg.DBMNumberOfBCID = [8, 8, 8] PixelConfigCondAlg.BarrelTimeOffset = [100.0, 100.0, 100.0, 100.0] PixelConfigCondAlg.EndcapTimeOffset = [100.0, 100.0, 100.0] PixelConfigCondAlg.DBMTimeOffset = [100.0, 100.0, 100.0] else: PixelConfigCondAlg.UseComTime = False PixelConfigCondAlg.BarrelTimeJitter = [0.0, 0.0, 0.0, 0.0] PixelConfigCondAlg.EndcapTimeJitter = [0.0, 0.0, 0.0] PixelConfigCondAlg.DBMTimeJitter = [0.0, 0.0, 0.0] PixelConfigCondAlg.BarrelNumberOfBCID = [1, 1, 1, 1] PixelConfigCondAlg.EndcapNumberOfBCID = [1, 1, 1] PixelConfigCondAlg.DBMNumberOfBCID = [1, 1, 1] PixelConfigCondAlg.BarrelTimeOffset = [5.0, 5.0, 5.0, 5.0] PixelConfigCondAlg.EndcapTimeOffset = [5.0, 5.0, 5.0] PixelConfigCondAlg.DBMTimeOffset = [5.0, 5.0, 5.0] PixelConfigCondAlg.BunchSpace = 25.0 PixelConfigCondAlg.FEI4BarrelHitDiscConfig = [2] #==================================================================================== # Run-dependent SIMULATION(digitization) parameters: #==================================================================================== # RUN2 2015/2016 PixelConfigCondAlg.BarrelToTThreshold2016 = [-1, 5, 5, 5] PixelConfigCondAlg.FEI3BarrelLatency2016 = [0, 151, 256, 256] PixelConfigCondAlg.FEI3BarrelHitDuplication2016 = [ False, False, False, False ] PixelConfigCondAlg.FEI3BarrelSmallHitToT2016 = [-1, -1, -1, -1] PixelConfigCondAlg.FEI3BarrelTimingSimTune2016 = [-1, 2015, 2015, 2015] PixelConfigCondAlg.BarrelCrossTalk2016 = [0.30, 0.06, 0.06, 0.06] PixelConfigCondAlg.BarrelNoiseOccupancy2016 = [5e-8, 5e-8, 5e-8, 5e-8] PixelConfigCondAlg.BarrelDisableProbability2016 = [ 9e-3, 9e-3, 9e-3, 9e-3 ] PixelConfigCondAlg.EndcapToTThreshold2016 = [5, 5, 5] PixelConfigCondAlg.FEI3EndcapLatency2016 = [256, 256, 256] PixelConfigCondAlg.FEI3EndcapHitDuplication2016 = [False, False, False] PixelConfigCondAlg.FEI3EndcapSmallHitToT2016 = [-1, -1, -1] PixelConfigCondAlg.FEI3EndcapTimingSimTune2016 = [2015, 2015, 2015] PixelConfigCondAlg.EndcapCrossTalk2016 = [0.06, 0.06, 0.06] PixelConfigCondAlg.EndcapNoiseOccupancy2016 = [5e-8, 5e-8, 5e-8] PixelConfigCondAlg.EndcapDisableProbability2016 = [9e-3, 9e-3, 9e-3] PixelConfigCondAlg.DBMToTThreshold2016 = [-1, -1, -1] PixelConfigCondAlg.DBMCrossTalk2016 = [0.06, 0.06, 0.06] PixelConfigCondAlg.DBMNoiseOccupancy2016 = [5e-8, 5e-8, 5e-8] PixelConfigCondAlg.DBMDisableProbability2016 = [9e-3, 9e-3, 9e-3] PixelConfigCondAlg.IBLNoiseShape2016 = [ 0.0, 0.0330, 0.0, 0.3026, 0.5019, 0.6760, 0.8412, 0.9918, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] PixelConfigCondAlg.BLayerNoiseShape2016 = [ 0.0, 0.0, 0.0, 0.0, 0.2204, 0.5311, 0.7493, 0.8954, 0.9980, 1.0 ] PixelConfigCondAlg.PixelNoiseShape2016 = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2418, 0.4397, 0.5858, 0.6949, 0.7737, 0.8414, 0.8959, 0.9414, 0.9828, 1.0 ] # Layer-2 noise shape [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2129, 0.4016, 0.5477, 0.6599, 0.7435, 0.8160, 0.8779, 0.9340, 0.9798, 1.0] # So far, Gaudi::Property does not support 2D vector. #PixelConfigCondAlg.EndcapNoiseShape=[[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1748, 0.3409, 0.4760, 0.5850, 0.6754, 0.7538, 0.8264, 0.8962, 0.9655, 1.0], # [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1852, 0.3528, 0.4881, 0.5961, 0.6855, 0.7640, 0.8374, 0.9068, 0.9749, 1.0], # [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1735, 0.3380, 0.4733, 0.5829, 0.6730, 0.7516, 0.8234, 0.8916, 0.9595, 1.0]] #==================================================================================== # RUN2 2017 PixelConfigCondAlg.BarrelToTThreshold2017 = [-1, 5, 5, 5] PixelConfigCondAlg.FEI3BarrelLatency2017 = [0, 151, 256, 256] PixelConfigCondAlg.FEI3BarrelHitDuplication2017 = [ False, False, False, False ] PixelConfigCondAlg.FEI3BarrelSmallHitToT2017 = [-1, -1, -1, -1] PixelConfigCondAlg.FEI3BarrelTimingSimTune2017 = [-1, 2018, 2018, 2018] PixelConfigCondAlg.BarrelCrossTalk2017 = [0.30, 0.06, 0.06, 0.06] PixelConfigCondAlg.BarrelNoiseOccupancy2017 = [5e-8, 5e-8, 5e-8, 5e-8] PixelConfigCondAlg.BarrelDisableProbability2017 = [ 9e-3, 9e-3, 9e-3, 9e-3 ] PixelConfigCondAlg.EndcapToTThreshold2017 = [5, 5, 5] PixelConfigCondAlg.FEI3EndcapLatency2017 = [256, 256, 256] PixelConfigCondAlg.FEI3EndcapHitDuplication2017 = [False, False, False] PixelConfigCondAlg.FEI3EndcapSmallHitToT2017 = [-1, -1, -1] PixelConfigCondAlg.FEI3EndcapTimingSimTune2017 = [2018, 2018, 2018] PixelConfigCondAlg.EndcapCrossTalk2017 = [0.06, 0.06, 0.06] PixelConfigCondAlg.EndcapNoiseOccupancy2017 = [5e-8, 5e-8, 5e-8] PixelConfigCondAlg.EndcapDisableProbability2017 = [9e-3, 9e-3, 9e-3] PixelConfigCondAlg.DBMToTThreshold2017 = [-1, -1, -1] PixelConfigCondAlg.DBMCrossTalk2017 = [0.06, 0.06, 0.06] PixelConfigCondAlg.DBMNoiseOccupancy2017 = [5e-8, 5e-8, 5e-8] PixelConfigCondAlg.DBMDisableProbability2017 = [9e-3, 9e-3, 9e-3] PixelConfigCondAlg.IBLNoiseShape2017 = [ 0.0, 0.0330, 0.0, 0.3026, 0.5019, 0.6760, 0.8412, 0.9918, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] PixelConfigCondAlg.BLayerNoiseShape2017 = [ 0.0, 0.0, 0.0, 0.0, 0.2204, 0.5311, 0.7493, 0.8954, 0.9980, 1.0 ] PixelConfigCondAlg.PixelNoiseShape2017 = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2418, 0.4397, 0.5858, 0.6949, 0.7737, 0.8414, 0.8959, 0.9414, 0.9828, 1.0 ] #==================================================================================== # RUN2 2018 PixelConfigCondAlg.BarrelToTThreshold2018 = [-1, 3, 5, 5] PixelConfigCondAlg.FEI3BarrelLatency2018 = [0, 151, 256, 256] PixelConfigCondAlg.FEI3BarrelHitDuplication2018 = [ False, False, False, False ] PixelConfigCondAlg.FEI3BarrelSmallHitToT2018 = [-1, -1, -1, -1] PixelConfigCondAlg.FEI3BarrelTimingSimTune2018 = [-1, 2018, 2018, 2018] PixelConfigCondAlg.BarrelCrossTalk2018 = [0.30, 0.06, 0.06, 0.06] PixelConfigCondAlg.BarrelNoiseOccupancy2018 = [5e-8, 5e-8, 5e-8, 5e-8] PixelConfigCondAlg.BarrelDisableProbability2018 = [ 9e-3, 9e-3, 9e-3, 9e-3 ] PixelConfigCondAlg.EndcapToTThreshold2018 = [5, 5, 5] PixelConfigCondAlg.FEI3EndcapLatency2018 = [256, 256, 256] PixelConfigCondAlg.FEI3EndcapHitDuplication2018 = [False, False, False] PixelConfigCondAlg.FEI3EndcapSmallHitToT2018 = [-1, -1, -1] PixelConfigCondAlg.FEI3EndcapTimingSimTune2018 = [2018, 2018, 2018] PixelConfigCondAlg.EndcapCrossTalk2018 = [0.06, 0.06, 0.06] PixelConfigCondAlg.EndcapNoiseOccupancy2018 = [5e-8, 5e-8, 5e-8] PixelConfigCondAlg.EndcapDisableProbability2018 = [9e-3, 9e-3, 9e-3] PixelConfigCondAlg.DBMToTThreshold2018 = [-1, -1, -1] PixelConfigCondAlg.DBMCrossTalk2018 = [0.06, 0.06, 0.06] PixelConfigCondAlg.DBMNoiseOccupancy2018 = [5e-8, 5e-8, 5e-8] PixelConfigCondAlg.DBMDisableProbability2018 = [9e-3, 9e-3, 9e-3] PixelConfigCondAlg.IBLNoiseShape2018 = [ 0.0, 0.0330, 0.0, 0.3026, 0.5019, 0.6760, 0.8412, 0.9918, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] PixelConfigCondAlg.BLayerNoiseShape2018 = [ 0.0, 0.0, 0.0, 0.0, 0.2204, 0.5311, 0.7493, 0.8954, 0.9980, 1.0 ] PixelConfigCondAlg.PixelNoiseShape2018 = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2418, 0.4397, 0.5858, 0.6949, 0.7737, 0.8414, 0.8959, 0.9414, 0.9828, 1.0 ] #==================================================================================== # RUN1 PixelConfigCondAlg.BarrelToTThresholdRUN1 = [3, 3, 3] PixelConfigCondAlg.FEI3BarrelLatencyRUN1 = [256, 256, 256] PixelConfigCondAlg.FEI3BarrelHitDuplicationRUN1 = [True, True, True] PixelConfigCondAlg.FEI3BarrelSmallHitToTRUN1 = [7, 7, 7] PixelConfigCondAlg.FEI3BarrelTimingSimTuneRUN1 = [2009, 2009, 2009] PixelConfigCondAlg.BarrelCrossTalkRUN1 = [0.06, 0.06, 0.06] PixelConfigCondAlg.BarrelNoiseOccupancyRUN1 = [5e-8, 5e-8, 5e-8] PixelConfigCondAlg.BarrelDisableProbabilityRUN1 = [9e-3, 9e-3, 9e-3] PixelConfigCondAlg.EndcapToTThresholdRUN1 = [3, 3, 3] PixelConfigCondAlg.FEI3EndcapLatencyRUN1 = [256, 256, 256] PixelConfigCondAlg.FEI3EndcapHitDuplicationRUN1 = [True, True, True] PixelConfigCondAlg.FEI3EndcapSmallHitToTRUN1 = [7, 7, 7] PixelConfigCondAlg.FEI3EndcapTimingSimTuneRUN1 = [2009, 2009, 2009] PixelConfigCondAlg.EndcapCrossTalkRUN1 = [0.06, 0.06, 0.06] PixelConfigCondAlg.EndcapNoiseOccupancyRUN1 = [5e-8, 5e-8, 5e-8] PixelConfigCondAlg.EndcapDisableProbabilityRUN1 = [9e-3, 9e-3, 9e-3] PixelConfigCondAlg.BLayerNoiseShapeRUN1 = [ 0.0, 0.0, 0.0, 0.0, 0.2204, 0.5311, 0.7493, 0.8954, 0.9980, 1.0 ] PixelConfigCondAlg.PixelNoiseShapeRUN1 = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2418, 0.4397, 0.5858, 0.6949, 0.7737, 0.8414, 0.8959, 0.9414, 0.9828, 1.0 ] #==================================================================================== # ITK PixelConfigCondAlg.BarrelToTThresholdITK = [3, 3, 3, 3, 3] PixelConfigCondAlg.BarrelCrossTalkITK = [0.06, 0.06, 0.06, 0.06, 0.06] PixelConfigCondAlg.BarrelNoiseOccupancyITK = [ 5e-8, 5e-8, 5e-8, 5e-8, 5e-8 ] PixelConfigCondAlg.BarrelDisableProbabilityITK = [ 9e-3, 9e-3, 9e-3, 9e-3, 9e-3 ] PixelConfigCondAlg.EndcapToTThresholdITK = [ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 ] PixelConfigCondAlg.EndcapCrossTalkITK = [ 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06 ] PixelConfigCondAlg.EndcapNoiseOccupancyITK = [ 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8 ] PixelConfigCondAlg.EndcapDisableProbabilityITK = [ 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3 ] PixelConfigCondAlg.InnermostNoiseShapeITK = [0.0, 1.0] PixelConfigCondAlg.NextInnermostNoiseShapeITK = [0.0, 1.0] PixelConfigCondAlg.PixelNoiseShapeITK = [0.0, 1.0] IdMappingDat = "PixelCabling/Pixels_Atlas_IdMapping_2016.dat" # ITk: if geoFlags.isSLHC(): IdMappingDat = "ITk_Atlas_IdMapping.dat" if "BrlIncl4.0_ref" == commonGeoFlags.GeoType(): IdMappingDat = "ITk_Atlas_IdMapping_InclBrl4.dat" elif "IBrlExt4.0ref" == commonGeoFlags.GeoType(): IdMappingDat = "ITk_Atlas_IdMapping_IExtBrl4.dat" elif "BrlExt4.0_ref" == commonGeoFlags.GeoType(): IdMappingDat = "ITk_Atlas_IdMapping_ExtBrl4.dat" elif "BrlExt3.2_ref" == commonGeoFlags.GeoType(): IdMappingDat = "ITk_Atlas_IdMapping_ExtBrl32.dat" elif not geoFlags.isIBL(): IdMappingDat = "PixelCabling/Pixels_Atlas_IdMapping.dat" else: # Planar IBL if (geoFlags.IBLLayout() == "planar"): if geoFlags.isDBM(): IdMappingDat = "PixelCabling/Pixels_Atlas_IdMapping_inclIBL_DBM.dat" else: IdMappingDat = "PixelCabling/Pixels_Atlas_IdMapping_inclIBL.dat" # Hybrid IBL plus DBM elif (geoFlags.IBLLayout() == "3D"): IdMappingDat = "PixelCabling/Pixels_Atlas_IdMapping_Run2.dat" PixelConfigCondAlg.CablingMapFileName = IdMappingDat condSeq += PixelConfigCondAlg(name="PixelConfigCondAlg") ############################################################################################ # Set up Conditions DB ############################################################################################ if useNewDeadmapFormat: if not conddb.folderRequested("/PIXEL/PixelModuleFeMask"): conddb.addFolder("PIXEL_OFL", "/PIXEL/PixelModuleFeMask", className="CondAttrListCollection") if not hasattr(condSeq, "PixelDeadMapCondAlg"): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDeadMapCondAlg condSeq += PixelDeadMapCondAlg(name="PixelDeadMapCondAlg") if not hasattr(condSeq, "PixelDCSCondStateAlg"): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDCSCondStateAlg condSeq += PixelDCSCondStateAlg(name="PixelDCSCondStateAlg", ReadKeyState='') if not hasattr(condSeq, "PixelDCSCondStatusAlg"): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDCSCondStatusAlg condSeq += PixelDCSCondStatusAlg(name="PixelDCSCondStatusAlg", ReadKeyStatus='') if not conddb.folderRequested("/PIXEL/DCS/HV"): conddb.addFolder("DCS_OFL", "/PIXEL/DCS/HV", className="CondAttrListCollection") if not hasattr(condSeq, "PixelDCSCondHVAlg"): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDCSCondHVAlg condSeq += PixelDCSCondHVAlg(name="PixelDCSCondHVAlg") if not conddb.folderRequested("/PIXEL/DCS/TEMPERATURE"): conddb.addFolder("DCS_OFL", "/PIXEL/DCS/TEMPERATURE", className="CondAttrListCollection") if not hasattr(condSeq, "PixelDCSCondTempAlg"): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDCSCondTempAlg condSeq += PixelDCSCondTempAlg(name="PixelDCSCondTempAlg") ##################### # Calibration Setup # ##################### if not useNewChargeFormat: if not conddb.folderRequested("/PIXEL/PixCalib"): conddb.addFolderSplitOnline("PIXEL", "/PIXEL/Onl/PixCalib", "/PIXEL/PixCalib", className="CondAttrListCollection") if not hasattr(condSeq, 'PixelChargeCalibCondAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelChargeCalibCondAlg condSeq += PixelChargeCalibCondAlg(name="PixelChargeCalibCondAlg", ReadKey="/PIXEL/PixCalib") else: if not conddb.folderRequested("/PIXEL/ChargeCalibration"): conddb.addFolder("PIXEL_OFL", "/PIXEL/ChargeCalibration", className="CondAttrListCollection") if not hasattr(condSeq, 'PixelChargeLUTCalibCondAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelChargeLUTCalibCondAlg condSeq += PixelChargeLUTCalibCondAlg( name="PixelChargeLUTCalibCondAlg", ReadKey="/PIXEL/ChargeCalibration") ##################### # Cabling map Setup # ##################### if geoFlags.isIBL() and not conddb.folderRequested("/PIXEL/HitDiscCnfg"): conddb.addFolderSplitMC("PIXEL", "/PIXEL/HitDiscCnfg", "/PIXEL/HitDiscCnfg", className="AthenaAttributeList") if geoFlags.isIBL() and not hasattr(condSeq, 'PixelHitDiscCnfgAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelHitDiscCnfgAlg condSeq += PixelHitDiscCnfgAlg(name="PixelHitDiscCnfgAlg") if not conddb.folderRequested("/PIXEL/ReadoutSpeed"): conddb.addFolderSplitMC("PIXEL", "/PIXEL/ReadoutSpeed", "/PIXEL/ReadoutSpeed", className="AthenaAttributeList") if not hasattr(condSeq, 'PixelReadoutSpeedAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelReadoutSpeedAlg condSeq += PixelReadoutSpeedAlg(name="PixelReadoutSpeedAlg") pixelReadKey = '' if (globalflags.DataSource == 'data' and conddb.dbdata == 'CONDBR2'): # for data overlay if not conddb.folderRequested("/PIXEL/CablingMap"): conddb.addFolderSplitOnline("PIXEL", "/PIXEL/Onl/CablingMap", "/PIXEL/CablingMap", className="AthenaAttributeList") if not hasattr(condSeq, 'PixelCablingCondAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelCablingCondAlg condSeq += PixelCablingCondAlg( name="PixelCablingCondAlg", ReadKey=pixelReadKey, MappingFile=IdMappingDat, RodIDForSingleLink40=0, RecordInInitialize=not globalflags.isOverlay()) if not conddb.folderRequested("/PIXEL/PixReco"): conddb.addFolder("PIXEL_OFL", "/PIXEL/PixReco", className="DetCondCFloat") if not hasattr(condSeq, 'PixelOfflineCalibCondAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelOfflineCalibCondAlg condSeq += PixelOfflineCalibCondAlg(name="PixelOfflineCalibCondAlg", ReadKey="/PIXEL/PixReco") PixelOfflineCalibCondAlg.InputSource = 2 if not conddb.folderRequested("/Indet/PixelDist"): conddb.addFolder("INDET", "/Indet/PixelDist", className="DetCondCFloat") if not hasattr(condSeq, 'PixelDistortionAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDistortionAlg condSeq += PixelDistortionAlg(name="PixelDistortionAlg", ReadKey="/Indet/PixelDist") ####################### # Setup Lorentz angle # ####################### if not hasattr(condSeq, "PixelSiPropertiesCondAlg"): from SiPropertiesTool.SiPropertiesToolConf import PixelSiPropertiesCondAlg condSeq += PixelSiPropertiesCondAlg(name="PixelSiPropertiesCondAlg") if not hasattr(ToolSvc, "PixelSiPropertiesTool"): from SiPropertiesTool.SiPropertiesToolConf import SiPropertiesTool ToolSvc += SiPropertiesTool(name="PixelSiPropertiesTool", DetectorName="Pixel", ReadKey="PixelSiliconPropertiesVector") if not hasattr(condSeq, "PixelSiLorentzAngleCondAlg"): from SiLorentzAngleTool.SiLorentzAngleToolConf import PixelSiLorentzAngleCondAlg condSeq += PixelSiLorentzAngleCondAlg( name="PixelSiLorentzAngleCondAlg", SiPropertiesTool=ToolSvc.PixelSiPropertiesTool, UseMagFieldCache=True, UseMagFieldDcs=True) if not hasattr(ToolSvc, "PixelLorentzAngleTool"): from SiLorentzAngleTool.SiLorentzAngleToolConf import SiLorentzAngleTool ToolSvc += SiLorentzAngleTool( name="PixelLorentzAngleTool", DetectorName="Pixel", UseMagFieldCache=True, SiLorentzAngleCondData="PixelSiLorentzAngleCondData") ############################################################################################ # Set up Tool/Service ############################################################################################ ##################### # Setup Cabling Svc # ##################### from PixelCabling.PixelCablingConf import PixelCablingSvc PixelCablingSvc = PixelCablingSvc() ServiceMgr += PixelCablingSvc print(PixelCablingSvc) kwargs.setdefault("InputObjectName", "PixelHits") chargeTools = [] feSimTools = [] if geoFlags.isSLHC(): chargeTools += ['SensorSimPlanarTool'] feSimTools += ['BarrelRD53SimTool'] feSimTools += ['EndcapRD53SimTool'] else: chargeTools += ['SensorSimPlanarTool'] chargeTools += ['SensorSim3DTool'] feSimTools += ['BarrelFEI4SimTool'] feSimTools += ['DBMFEI4SimTool'] feSimTools += ['BarrelFEI3SimTool'] feSimTools += ['EndcapFEI3SimTool'] kwargs.setdefault("ChargeTools", chargeTools) kwargs.setdefault("FrontEndSimTools", feSimTools) kwargs.setdefault("EnergyDepositionTool", "EnergyDepositionTool") if digitizationFlags.doXingByXingPileUp(): # PileUpTool approach kwargs.setdefault("FirstXing", Pixel_FirstXing()) kwargs.setdefault("LastXing", Pixel_LastXing()) return CfgMgr.PixelDigitizationTool(name, **kwargs)
"/PIXEL/ChargeCalibration", className="CondAttrListCollection") if not hasattr(condSeq, 'PixelChargeLUTCalibCondAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelChargeLUTCalibCondAlg condSeq += PixelChargeLUTCalibCondAlg( name="PixelChargeLUTCalibCondAlg", ReadKey="/PIXEL/ChargeCalibration") ##################### # Cabling map Setup # ##################### if (conddb.dbdata == "CONDBR2" or (conddb.dbmc == "OFLP200" and geoFlags.isIBL() == True)) and not conddb.folderRequested("/PIXEL/HitDiscCnfg"): conddb.addFolderSplitMC("PIXEL", "/PIXEL/HitDiscCnfg", "/PIXEL/HitDiscCnfg", className="AthenaAttributeList") if not hasattr(condSeq, 'PixelHitDiscCnfgAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelHitDiscCnfgAlg condSeq += PixelHitDiscCnfgAlg(name="PixelHitDiscCnfgAlg") if not conddb.folderRequested("/PIXEL/ReadoutSpeed"): if not (globalflags.DataSource() == 'geant4'): conddb.addFolder("PIXEL", "/PIXEL/ReadoutSpeed", className="AthenaAttributeList") else: conddb.addFolderSplitMC("PIXEL", "/PIXEL/ReadoutSpeed", "/PIXEL/ReadoutSpeed",
def __init__(self, name='AtlasTrackingGeometrySvc'): if TrkDetFlags.ConfigurationOutputLevel() < 3: print('[ Configuration : start ] *** ' + name + ' ********************************') print('[ TrackingGeometrySvc ]') from AthenaCommon.AppMgr import ToolSvc ################################################################################# # The Geometry Builder ################################################################################# # the name to register the Geometry AtlasTrackingGeometryName = 'AtlasTrackingGeometry' # the geometry builder alg tool from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__GeometryBuilder AtlasGeometryBuilder = Trk__GeometryBuilder( name='AtlasGeometryBuilder') # switch the building outputlevel on AtlasGeometryBuilder.OutputLevel = TrkDetFlags.ConfigurationOutputLevel( ) # the envelope definition service from AthenaCommon.CfgGetter import getPrivateTool,getPrivateToolClone,getPublicTool,getPublicToolClone,\ getService,getServiceClone,getAlgorithm,getAlgorithmClone AtlasEnvelopeSvc = getService('AtlasGeometry_EnvelopeDefSvc') # (ID) if DetFlags.ID_on(): # get hand on the ID Tracking Geometry Builder if TrkDetFlags.ISF_FatrasCustomGeometry(): if hasattr(ToolSvc, TrkDetFlags.ISF_FatrasCustomGeometryBuilderName()): InDetTrackingGeometryBuilder = getattr( ToolSvc, TrkDetFlags.ISF_FatrasCustomGeometryBuilderName()) elif TrkDetFlags.XMLFastCustomGeometry(): if hasattr(ToolSvc, TrkDetFlags.InDetTrackingGeometryBuilderName()): InDetTrackingGeometryBuilder = getattr( ToolSvc, TrkDetFlags.InDetTrackingGeometryBuilderName()) else: if not TrkDetFlags.SLHC_Geometry( ) and not TrkDetFlags.InDetStagedGeometryBuilder(): from InDetTrackingGeometry.ConfiguredInDetTrackingGeometryBuilder import ConfiguredInDetTrackingGeometryBuilder as IDGeometryBuilder elif not TrkDetFlags.SLHC_Geometry(): from InDetTrackingGeometry.ConfiguredStagedTrackingGeometryBuilder import ConfiguredStagedTrackingGeometryBuilder as IDGeometryBuilder else: from InDetTrackingGeometry.ConfiguredSLHC_InDetTrackingGeometryBuilder import ConfiguredSLHC_InDetTrackingGeometryBuilder as IDGeometryBuilder InDetTrackingGeometryBuilder = IDGeometryBuilder( name='InDetTrackingGeometryBuilder') InDetTrackingGeometryBuilder.EnvelopeDefinitionSvc = AtlasEnvelopeSvc InDetTrackingGeometryBuilder.OutputLevel = TrkDetFlags.InDetBuildingOutputLevel( ) # and give it to the Geometry Builder AtlasGeometryBuilder.InDetTrackingGeometryBuilder = InDetTrackingGeometryBuilder # # (Calo) if DetFlags.Calo_on(): from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__CylinderVolumeCreator CaloVolumeCreator = Trk__CylinderVolumeCreator("CaloVolumeCreator") CaloVolumeCreator.OutputLevel = TrkDetFlags.CaloBuildingOutputLevel( ) ToolSvc += CaloVolumeCreator from CaloTrackingGeometry.ConfiguredCaloTrackingGeometryBuilder import ConfiguredCaloTrackingGeometryBuilder as ConfiguredCaloGeo CaloTrackingGeometryBuilder = ConfiguredCaloGeo( name='CaloTrackingGeometryBuilder') CaloTrackingGeometryBuilder.TrackingVolumeCreator = CaloVolumeCreator CaloTrackingGeometryBuilder.EnvelopeDefinitionSvc = AtlasEnvelopeSvc CaloTrackingGeometryBuilder.OutputLevel = TrkDetFlags.CaloBuildingOutputLevel( ) CaloTrackingGeometryBuilder.GeometryName = 'Calo' # and give it to the Geometry Builder AtlasGeometryBuilder.CaloTrackingGeometryBuilder = CaloTrackingGeometryBuilder # (Muon) if DetFlags.Muon_on(): from MuonTrackingGeometry.ConfiguredMuonTrackingGeometry import MuonTrackingGeometryBuilder MuonTrackingGeometryBuilder.EnvelopeDefinitionSvc = AtlasEnvelopeSvc # and give it to the Geometry Builder AtlasGeometryBuilder.MuonTrackingGeometryBuilder = MuonTrackingGeometryBuilder # processors AtlasGeometryProcessors = [] # check whether the material retrieval is ment to be from COOL if TrkDetFlags.MaterialSource() is 'COOL': # the material provider from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__LayerMaterialProvider as LayerMaterialProvider AtlasMaterialProvider = LayerMaterialProvider( 'AtlasMaterialProvider') AtlasMaterialProvider.OutputLevel = TrkDetFlags.ConfigurationOutputLevel( ) AtlasMaterialProvider.LayerMaterialMapName = TrkDetFlags.MaterialStoreGateKey( ) AtlasGeometryProcessors += [AtlasMaterialProvider] # the tag names CoolDataBaseFolder = TrkDetFlags.MaterialStoreGateKey() AtlasMaterialTag = TrkDetFlags.MaterialTagBase() + str( TrkDetFlags.MaterialVersion( )) + TrkDetFlags.MaterialSubVersion() + '_' if TrkDetFlags.ConfigurationOutputLevel() < 3: print('[ TrackingGeometrySvc ] Associating DB folder : ', CoolDataBaseFolder) # we need the conditions interface from IOVDbSvc.CondDB import conddb # use a local database if TrkDetFlags.MaterialDatabaseLocal(): # specify the local database DataBasePath = TrkDetFlags.MaterialDatabaseLocalPath() DataBaseName = TrkDetFlags.MaterialDatabaseLocalName() MagicTag = TrkDetFlags.MaterialMagicTag() DataBaseConnection = '<dbConnection>sqlite://X;schema=' + DataBasePath + DataBaseName + ';dbname=OFLP200</dbConnection>' conddb.blockFolder('/GLOBAL/TrackingGeo/LayerMaterialV2') conddb.addFolderWithTag('', DataBaseConnection + CoolDataBaseFolder, AtlasMaterialTag + MagicTag, force=True) if TrkDetFlags.ConfigurationOutputLevel() < 3: print('[ TrackingGeometrySvc ] Using Local Database: ' + DataBaseConnection) # make sure that the pool files are in the catalog elif TrkDetFlags.SLHC_Geometry(): # set the folder to the SLHC location CoolDataBaseFolder = '/GLOBAL/TrackingGeo/LayerMaterialITK' ctag = AtlasMaterialTag + TrkDetFlags.MaterialMagicTag() cfoldertag = CoolDataBaseFolder + ' <tag>' + ctag + '</tag>' conddb.addFolderSplitMC('GLOBAL', cfoldertag, cfoldertag) else: print('[ TrackingGeometrySvc ] base material tag : ', AtlasMaterialTag) cfolder = CoolDataBaseFolder + '<tag>TagInfoMajor/' + AtlasMaterialTag + '/GeoAtlas</tag>' print('[ TrackingGeometrySvc ] translated to COOL: ', cfolder) # load the right folders (preparation for calo inclusion) conddb.addFolderSplitMC('GLOBAL', cfolder, cfolder) elif TrkDetFlags.MaterialSource() is 'Input': # the material provider from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__InputLayerMaterialProvider AtlasMaterialProvider = Trk__InputLayerMaterialProvider( 'AtlasMaterialProvider') AtlasMaterialProvider.OutputLevel = TrkDetFlags.ConfigurationOutputLevel( ) AtlasGeometryProcessors += [AtlasMaterialProvider] # material validation if TrkDetFlags.MaterialValidation(): # load the material inspector from TrkDetDescrTestTools.TrkDetDescrTestToolsConf import Trk__LayerMaterialInspector AtlasLayerMaterialInspector = Trk__LayerMaterialInspector( 'AtlasLayerMaterialInspector') AtlasLayerMaterialInspector.OutputLevel = TrkDetFlags.ConfigurationOutputLevel( ) AtlasGeometryProcessors += [AtlasLayerMaterialInspector] # call the base class constructor : sets the tools Trk__TrackingGeometrySvc.__init__(self,name,\ GeometryBuilder = AtlasGeometryBuilder,\ TrackingGeometryName = AtlasTrackingGeometryName,\ GeometryProcessors = AtlasGeometryProcessors, \ BuildGeometryFromTagInfo = True,\ OutputLevel = TrkDetFlags.ConfigurationOutputLevel()) # screen output of the configuration if TrkDetFlags.ConfigurationOutputLevel() < 3: print(self) print('* [ GeometryBuilder ]') print(AtlasGeometryBuilder) print('* [ Configuration : end ] ***' + name + '********************************')
except: pass try: if (InDetFlags.ForceCoolVectorPayload() and InDetFlags.ForceCoraCool()): print '*** SCT DB CONFIGURATION FLAG CONFLICT: Both CVP and CoraCool selected****' SCTConfigurationFolderPath = '' except: pass # Load folders that have to exist for both MC and Data SCTChipConfigurationPath = SCTConfigurationFolderPath + 'Chip' SCTModuleConfigurationPath = SCTConfigurationFolderPath + 'Module' SCTMurConfigurationPath = SCTConfigurationFolderPath + 'MUR' if not conddb.folderRequested(SCTChipConfigurationPath): conddb.addFolderSplitMC("SCT", SCTChipConfigurationPath, SCTChipConfigurationPath) if not conddb.folderRequested(SCTModuleConfigurationPath): conddb.addFolderSplitMC("SCT", SCTModuleConfigurationPath, SCTModuleConfigurationPath) if not conddb.folderRequested(SCTMurConfigurationPath): conddb.addFolderSplitMC("SCT", SCTMurConfigurationPath, SCTMurConfigurationPath) if not conddb.folderRequested('/SCT/DAQ/Calibration/NPtGainDefects'): conddb.addFolderSplitMC("SCT", "/SCT/DAQ/Calibration/NPtGainDefects", "/SCT/DAQ/Calibration/NPtGainDefects") if not conddb.folderRequested( '/SCT/DAQ/Calibration/NoiseOccupancyDefects'): conddb.addFolderSplitMC("SCT", "/SCT/DAQ/Calibration/NoiseOccupancyDefects",
"/LAR/LArCellPositionShift", "LArCellPositionShift-ideal", force=True, forceMC=True) conddb.addOverride("/LAR/ElecCalibOfl/Shape/RTM/4samples1phase", "LARElecCalibOflShapeRTM4samples1phase-RUN2-UPD4-00") conddb.addOverride("/LAR/ElecCalibOfl/OFC/PhysWave/RTM/4samples1phase", "LARElecCalibOflOFCPhysWaveRTM4samples1phase-RUN2-UPD4-00") svcMgr.PoolSvc.ReadCatalog += [ "xmlcatalog_file:" + "/cvmfs/atlas-condb.cern.ch/repo/conditions/poolcond/PoolFileCatalog.xml" ] conddb.blockFolder("/PIXEL/ReadoutSpeed") conddb.addFolderSplitMC("PIXEL", "/PIXEL/ReadoutSpeed", "/PIXEL/ReadoutSpeed", force=True) conddb.blockFolder("/TRT/Cond/DigVers") conddb.addFolderWithTag("TRT_OFL", "/TRT/Cond/DigVers", "TRTCondDigVers-Collisions-01", force=True, forceMC=True) ################################################### printfunc("RT OVERRIDE, for OFLCOND-MC16-SDR-26 ") #See https://atlas-tagservices.cern.ch/tagservices/RunBrowser/runBrowserReport/rBR_CB_Report.php?CBAction=GlobalTagReport&cbgt=OFLCOND-MC16-SDR-26 # https://atlas-tagservices.cern.ch/tagservices/RunBrowser/runBrowserReport/rBR_CB_Report.php?CBAction=GlobalTagReport&cbgt=CONDBR2-BLKPA-2018-12 conddb.blockFolder("/LAR/BadChannels/BadChannels")
def BasicPixelDigitizationTool(name="PixelDigitizationTool", **kwargs): from AthenaCommon import CfgGetter kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) streamName = kwargs.setdefault("RndmEngine", "PixelDigitization") if not digitizationFlags.rndmSeedList.checkForExistingSeed(streamName): digitizationFlags.rndmSeedList.addSeed(streamName, 10513239, 492615104 ) from AthenaCommon.BeamFlags import jobproperties from AthenaCommon.Resilience import protectedInclude from AthenaCommon.Include import include from AthenaCommon.AppMgr import ServiceMgr protectedInclude( "PixelConditionsServices/SpecialPixelMapSvc_jobOptions.py" ) include.block( "PixelConditionsServices/SpecialPixelMapSvc_jobOptions.py" ) protectedInclude( "PixelConditionsServices/PixelDCSSvc_jobOptions.py" ) include.block( "PixelConditionsServices/PixelDCSSvc_jobOptions.py" ) protectedInclude("PixelConditionsServices/PixelCalibSvc_jobOptions.py") from IOVDbSvc.CondDB import conddb conddb.addFolderSplitMC("PIXEL","/PIXEL/ReadoutSpeed","/PIXEL/ReadoutSpeed") kwargs.setdefault("PixelCablingSvc","PixelCablingSvc") if not hasattr(ServiceMgr, "PixelSiPropertiesSvc"): from SiLorentzAngleSvc.LorentzAngleSvcSetup import lorentzAngleSvc from SiPropertiesSvc.SiPropertiesSvcConf import SiPropertiesSvc pixelSiPropertiesSvc = SiPropertiesSvc(name = "PixelSiPropertiesSvc",DetectorName="Pixel",SiConditionsServices = lorentzAngleSvc.pixelSiliconConditionsSvc) ServiceMgr += pixelSiPropertiesSvc kwargs.setdefault("InputObjectName", "PixelHits") pixTools = [] pixTools += ['PixelDiodeCrossTalkGenerator'] pixTools += ['PixelChargeSmearer'] if digitizationFlags.doInDetNoise.get_Value(): pixTools += ['PixelNoisyCellGenerator'] pixTools += ['PixelGangedMerger'] pixTools += ['SpecialPixelGenerator'] pixTools += ['PixelRandomDisabledCellGenerator'] pixTools += ['PixelCellDiscriminator'] kwargs.setdefault("PixelTools", pixTools) # Start of special cosmics tuning: if jobproperties.Beam.beamType == "cosmics" : kwargs.setdefault("UseComTime", True) if GeometryFlags.isSLHC(): LVL1Latency = [255, 255, 255, 255, 255, 16, 255] ToTMinCut = [0, 0, 0, 0, 0, 0, 0] ApplyDupli = [False, False, False, False, False, False, False] LowTOTduplication = [0, 0, 0, 0, 0, 0, 0] kwargs.setdefault("LVL1Latency", LVL1Latency) kwargs.setdefault("ToTMinCut", ToTMinCut) kwargs.setdefault("ApplyDupli", ApplyDupli) kwargs.setdefault("LowTOTduplication", LowTOTduplication) else: # For LVL1Latency, ToTMinCut, ApplyDupli and LowTOTduplication, first component [0] is always for IBL, even for run 1 production. # The order is IBL, BL, L1, L2, EC, DBM # For IBL and DBM, values of LVL1Latency and LowToTDupli are superseded by values driven by HitDiscCnfg settings, in PixelDigitizationTool.cxx LVL1Latency = [16, 150, 255, 255, 255, 16] ToTMinCut = [0, 6, 6, 6, 6, 0] ApplyDupli = [True, False, False, False, False, False] LowTOTduplication = [0, 7, 7, 7, 7, 0] kwargs.setdefault("LVL1Latency", LVL1Latency) kwargs.setdefault("ToTMinCut", ToTMinCut) kwargs.setdefault("ApplyDupli", ApplyDupli) kwargs.setdefault("LowTOTduplication", LowTOTduplication) if digitizationFlags.doXingByXingPileUp(): # PileUpTool approach kwargs.setdefault("FirstXing", Pixel_FirstXing() ) kwargs.setdefault("LastXing", Pixel_LastXing() ) return CfgMgr.PixelDigitizationTool(name, **kwargs)
# ServiceMgr.MuonRPC_CablingSvc.OutputLevel = 3 ServiceMgr.MuonRPC_CablingSvc.RPCTriggerRoadsfromCool=True from IOVDbSvc.CondDB import conddb # # Cabling maps folders from DB # examples to connect to development db INTR # notice this requires special authentication.xml file # conddb.addFolder("","<db>oracle://INTR;schema=ATLAS_COOL_RPCDQ;dbname=RPC_DQA;user=ATLAS_COOL_RPCDQ_R</db> /RPC/CABLING/MAP_SCHEMA_NEW <tag>ver42</tag>") # conddb.addFolder("","<db>oracle://INTR;schema=ATLAS_COOL_RPCDQ;dbname=RPC_DQA;user=ATLAS_COOL_RPCDQ_R</db> /RPC/CABLING/MAP_SCHEMA_CORR_2 <tag>ver10</tag>") # # for production DB when tags are not yet associated to global tags # conddb.addFolder("RPC","/RPC/CABLING/MAP_SCHEMA <tag>RPCCablingMapSchema_version42</tag>") # conddb.addFolder("RPC","/RPC/CABLING/MAP_SCHEMA_CORR <tag>RPCCablingMapSchemaCorr_version10</tag>") # # for production DB conddb.addFolderSplitMC("RPC","/RPC/CABLING/MAP_SCHEMA" , "/RPC/CABLING/MAP_SCHEMA") conddb.addFolderSplitMC("RPC","/RPC/CABLING/MAP_SCHEMA_CORR", "/RPC/CABLING/MAP_SCHEMA_CORR") # Trigger Roads folders from DB # for production DB when tags are not yet associated to global tags # conddb.addFolder("","<db>oracle://ATLAS_COOLPROD;schema=ATLAS_COOLOFL_RPC;dbname=OFLP200</db>/RPC/TRIGGER/CM_THR_ETA<tag>EtaTrigRoads_MC_April2010</tag>") # conddb.addFolder("","<db>oracle://ATLAS_COOLPROD;schema=ATLAS_COOLOFL_RPC;dbname=OFLP200</db>/RPC/TRIGGER/CM_THR_PHI<tag>PhiTrigRoads_MC_April2010</tag>") # # for production DB conddb.addFolderSplitMC("RPC","/RPC/TRIGGER/CM_THR_ETA", "/RPC/TRIGGER/CM_THR_ETA") conddb.addFolderSplitMC("RPC","/RPC/TRIGGER/CM_THR_PHI", "/RPC/TRIGGER/CM_THR_PHI") from RPC_CondCabling.RPC_CondCablingConf import RPCCablingDbTool RPCCablingDbTool = RPCCablingDbTool() RPCCablingDbTool.MapConfigurationFolder = "/RPC/CABLING/MAP_SCHEMA" RPCCablingDbTool.MapCorrectionFolder = "/RPC/CABLING/MAP_SCHEMA_CORR" ToolSvc+=RPCCablingDbTool
IOVDbSvc.GlobalTag = "CONDBR2-BLKPA-2017-06" msg.info("conddb.dbdata", conddb.dbdata) IOVDbSvc.OutputLevel = 3 from SCT_ConditionsTools.SCT_TdaqEnabledToolSetup import SCT_TdaqEnabledToolSetup sct_TdaqEnabledToolSetup = SCT_TdaqEnabledToolSetup() sct_TdaqEnabledToolSetup.setup() from SCT_ConditionsTools.SCT_ConfigurationConditionsToolSetup import SCT_ConfigurationConditionsToolSetup sct_ConfigurationConditionsToolSetup = SCT_ConfigurationConditionsToolSetup() sct_ConfigurationConditionsToolSetup.setup() conddb.addFolderSplitMC("SCT", "/SCT/DAQ/Config/Geog", "/SCT/DAQ/Config/Geog") # Needed for cabling conddb.addFolderSplitMC("SCT", "/SCT/DAQ/Config/RODMUR", "/SCT/DAQ/Config/RODMUR") # Needed for cabling conddb.addFolderSplitMC("SCT", "/SCT/DAQ/Config/ROD", "/SCT/DAQ/Config/ROD") # Needed for cabling from SCT_ConditionsTools.SCT_ModuleVetoToolSetup import SCT_ModuleVetoToolSetup sct_ModuleVetoToolSetup = SCT_ModuleVetoToolSetup() sct_ModuleVetoToolSetup.setUseDB(False) sct_ModuleVetoToolSetup.setup() SCT_ModuleVetoTool = sct_ModuleVetoToolSetup.getTool() SCT_ModuleVetoTool.BadModuleIdentifiers = ["1", "2"] from SCT_ConditionsTools.SCT_ConditionsSummaryToolSetup import SCT_ConditionsSummaryToolSetup
pass #to read SCT cabling from db from SCT_Cabling.SCT_CablingConf import SCT_CablingSvc SCT_CablingSvc = SCT_CablingSvc(DataSource = "CORACOOL") ServiceMgr += SCT_CablingSvc if (InDetFlags.doPrintConfigurables()): print SCT_CablingSvc SCTRodConfigPath=SCTConfigurationFolderPath+'ROD' SCTMurConfigPath=SCTConfigurationFolderPath+'MUR' SCTRodMurConfigPath=SCTConfigurationFolderPath+'RODMUR' SCTGeogConfigPath=SCTConfigurationFolderPath+'Geog' # if not conddb.folderRequested(SCTRodConfigPath): conddb.addFolderSplitMC("SCT",SCTRodConfigPath,SCTRodConfigPath) if not conddb.folderRequested(SCTMurConfigPath): conddb.addFolderSplitMC("SCT",SCTMurConfigPath,SCTMurConfigPath) if not conddb.folderRequested(SCTRodMurConfigPath): conddb.addFolderSplitMC("SCT",SCTRodMurConfigPath,SCTRodMurConfigPath) if not conddb.folderRequested(SCTGeogConfigPath): conddb.addFolderSplitMC("SCT",SCTGeogConfigPath,SCTGeogConfigPath) # # --- TRT cabling # if DetFlags.detdescr.TRT_on() and not 'TRT_Cabling' in dir(): # if bytestream comes from real data from TRT_Cabling.TRT_CablingConf import TRT_FillCablingData_DC3 TRT_Cabling = TRT_FillCablingData_DC3() if not (globalflags.DataSource() == 'geant4'):
def __init__(self): from AthenaCommon.Include import include from AthenaCommon.AppMgr import ToolSvc ################################################################################## # The FatrasTrackingGeometry Svc fragment # # usage: # include('TrkDetDescrSvc/FatrasTrackingGeometrySvc.py') # # + for the navigator, set the TrackingGeometryName to: # FatrasTrackingGeometrySvc.trackingGeometryName() # ################################################################################## # import the DetFlags for the setting from AthenaCommon.DetFlags import DetFlags ################################################################################# # Material for the Geometry # # if only ID is switched on different COOLDB Folders # and different Tag is used # ################################################################################# from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags if TrkDetFlags.ConfigurationOutputLevel() < 3 : print '[ Configuration : start ] *** FatrasTrackingGeometry ********************************' print '[ TrackingGeometrySvc ]' # check whether the material retrieval is ment to be from COOL if TrkDetFlags.MaterialFromCool() : # the tag names CoolDataBaseFolder = TrkDetFlags.MaterialStoreGateKey() AtlasMaterialTag = TrkDetFlags.MaterialTagBase()+str(TrkDetFlags.MaterialVersion())+'_' if TrkDetFlags.ConfigurationOutputLevel() < 3 : print '[ TrackingGeometrySvc ] Associating DB folder : ',CoolDataBaseFolder print '[ TrackingGeometrySvc ] base material tag : ',AtlasMaterialTag # we need the conditions interface from IOVDbSvc.CondDB import conddb # use a local database if TrkDetFlags.MaterialDatabaseLocal(): # specify the local database DataBasePath = TrkDetFlags.MaterialDatabaseLocalPath() DataBaseName = TrkDetFlags.MaterialDatabaseLocalName() MagicTag = TrkDetFlags.MaterialMagicTag() DataBaseConnection = '<dbConnection>sqlite://X;schema='+DataBasePath+DataBaseName+';dbname=OFLP200</dbConnection>' conddb.blockFolder('/GLOBAL/TrackingGeo/LayerMaterial') conddb.addFolderWithTag('',DataBaseConnection+CoolDataBaseFolder,AtlasMaterialTag+MagicTag,force=True) if TrkDetFlags.ConfigurationOutputLevel() < 3 : print '[ TrackingGeometrySvc ] Using Local Database: '+DataBaseConnection # make sure that the pool files are in the catalog #from PoolSvc.PoolSvcConf import PoolSvc #PoolSvc.ReadCatalog += [ DataBasePath+'PoolFileCatalog.xml' ] elif TrkDetFlags.SLHC_Geometry() : # set the folder to the SLHC location CoolDataBaseFolder = '/GLOBAL/TrackingGeo/SLHC_LayerMaterial' ctag = AtlasMaterialTag+TrkDetFlags.MaterialMagicTag() cfoldertag = CoolDataBaseFolder+' <tag>'+ctag+'</tag>' conddb.addFolderSplitMC('GLOBAL',cfoldertag,cfoldertag) else : # load the right folders (preparation for calo inclusion) cfolder = CoolDataBaseFolder +'<tag>TagInfoMajor/'+AtlasMaterialTag+'/GeoAtlas</tag>' conddb.addFolderSplitMC('GLOBAL',cfolder,cfolder) ################################################################################# # The Geometry Builder ################################################################################# # the name to register the Geometry FatrasTrackingGeometryName = 'FatrasTrackingGeometry' # the geometry builder alg tool from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__GeometryBuilder FatrasGeometryBuilder = Trk__GeometryBuilder(name = 'FatrasGeometryBuilder') # switch on the Detectors FatrasGeometryBuilder.InDetTrackingGeometry = DetFlags.ID_on() FatrasGeometryBuilder.CaloTrackingGeometry = DetFlags.Calo_on() FatrasGeometryBuilder.MuonTrackingGeometry = DetFlags.Muon_on() # avoid double building of MTG # register it to tool svc ToolSvc += FatrasGeometryBuilder # (ID) if DetFlags.ID_on() : # get hand on the ID Tracking Geometry Builder if not TrkDetFlags.SLHC_Geometry() : from InDetTrackingGeometry.ConfiguredInDetTrackingGeometryBuilder import ConfiguredInDetTrackingGeometryBuilder as IDGeometryBuilder else : from InDetTrackingGeometry.ConfiguredSLHC_InDetTrackingGeometryBuilder import ConfiguredSLHC_InDetTrackingGeometryBuilder as IDGeometryBuilder if not TrkDetFlags.SLHC_Geometry() : self.__InDetTrackingGeometryBuilder__ = IDGeometryBuilder(name ='InDetTrackingGeometryBuilder', namePrefix = 'Fatras', setLayerAssociation = False, buildTrtStrawLayers = True) self.__InDetTrackingGeometryBuilder__.VolumeEnclosureOuterR = 1148. else : self.__InDetTrackingGeometryBuilder__ = IDGeometryBuilder(name ='InDetTrackingGeometryBuilder', namePrefix = 'Fatras', setLayerAssociation = False) self.__InDetTrackingGeometryBuilder__.VolumeEnclosureOuterR = 1148. # make a public tool out of it ToolSvc += self.__InDetTrackingGeometryBuilder__ # and give it to the Geometry Builder FatrasGeometryBuilder.InDetTrackingGeometryBuilder = self.__InDetTrackingGeometryBuilder__ # # (Calo) if DetFlags.Calo_on(): from CaloTrackingGeometry.ConfiguredCaloTrackingGeometryBuilder import ConfiguredCaloTrackingGeometryBuilder as ConfiguredCaloGeo CaloTrackingGeometryBuilder = ConfiguredCaloGeo(name = 'FatrasCaloTrackingGeometryBuilder') CaloTrackingGeometryBuilder.RecordLayerIndexCaloSampleMap = True # make a publid tool ToolSvc += CaloTrackingGeometryBuilder # and give it to the Geometry Builder FatrasGeometryBuilder.CaloTrackingGeometryBuilder = CaloTrackingGeometryBuilder # (Muon) if DetFlags.Muon_on(): from MuonTrackingGeometry.ConfiguredMuonTrackingGeometry import MuonTrackingGeometryBuilder FatrasMuonTrackingGeometryBuilder = MuonTrackingGeometryBuilder(name = 'FatrasMuonTrackingGeometryBuilder') FatrasMuonTrackingGeometryBuilder.BarrelZ = 6783. FatrasMuonTrackingGeometryBuilder.InnerBarrelRadius = 4255. ToolSvc += FatrasMuonTrackingGeometryBuilder # and give it to the Geometry Builder FatrasGeometryBuilder.MuonTrackingGeometryBuilder = FatrasMuonTrackingGeometryBuilder # then get the tuning parameters from FatrasExample.FatrasTuning import FatrasTuningFlags if FatrasTuningFlags.MaterialDistortionsX0.statusOn and \ FatrasTuningFlags.MaterialDistortionsRho.statusOn : from TrkDetDescrSvc.TrkDetDescrSvcConf import CalibrationTrackingGeometrySvc as GeometrySvc else : from TrkDetDescrSvc.TrkDetDescrSvcConf import TrackingGeometrySvc as GeometrySvc FatrasTrackingGeometrySvc = GeometrySvc(name = 'FatrasTrackingGeometrySvc') # register the Builder FatrasTrackingGeometrySvc.GeometryBuilder = FatrasGeometryBuilder # and register the name under which the geometry is registered FatrasTrackingGeometrySvc.TrackingGeometryName = FatrasTrackingGeometryName # global scaling of the material if necessary FatrasTrackingGeometrySvc.GlobalScaleFactor = FatrasTuningFlags.MaterialScalor() # some flags - only works when ID is on FatrasTrackingGeometrySvc.AssignMaterialFromCOOL = True FatrasTrackingGeometrySvc.BuildGeometryFromTagInfo = True # Material scaling & distortion if FatrasTuningFlags.MaterialDistortionsX0.statusOn and \ FatrasTuningFlags.MaterialDistortionsRho.statusOn : FatrasTrackingGeometrySvc.RandomDistortions = True FatrasTrackingGeometrySvc.DistortionsRadiationLength = FatrasTuningFlags.MaterialDistortionsX0() FatrasTrackingGeometrySvc.DistortionsDensity = FatrasTuningFlags.MaterialDistortionsRho() from FatrasExample.FatrasValidation import FatrasValidationFlags FatrasTrackingGeometrySvc.RecordDistortions = FatrasValidationFlags.MaterialDistortions() FatrasTrackingGeometrySvc.DistortionOutputFolder = '/'+FatrasValidationFlags.ValidationStream()+'/MaterialDistortions' # switch to the rigth CoolDB folder FatrasTrackingGeometrySvc.InputLayerMaterialSetName = CoolDataBaseFolder from AthenaCommon.AppMgr import ServiceMgr as svcMgr svcMgr += FatrasTrackingGeometrySvc print '* [ Configuration : start ] *** FatrasTrackingGeometry ********************************' print '* [ FatrasTrackingGeometrySvc ]' print FatrasTrackingGeometrySvc print '* [ GeometryBuilder ]' print FatrasGeometryBuilder print '* [ Configuration : end ] *** FatrasTrackingGeometry ********************************' ################################################################################## self.__geoSvc__ = FatrasTrackingGeometrySvc
def getSCT_FrontEnd(name="SCT_FrontEnd", **kwargs): from Digitization.DigitizationFlags import digitizationFlags #Setup noise treament in SCT_FrontEnd # To set the mean noise values for the different module types # Default values set at 0 degrees, plus/minus ~5 enc per plus/minus degree kwargs.setdefault("NoiseBarrel", 1500.0) kwargs.setdefault("NoiseBarrel3", 1541.0) kwargs.setdefault("NoiseInners", 1090.0) kwargs.setdefault("NoiseMiddles", 1557.0) kwargs.setdefault("NoiseShortMiddles", 940.0) kwargs.setdefault("NoiseOuters", 1618.0) kwargs.setdefault("NOBarrel", 1.5e-5) kwargs.setdefault("NOBarrel3", 2.1e-5) kwargs.setdefault("NOInners", 5.0e-9) kwargs.setdefault("NOMiddles", 2.7e-5) kwargs.setdefault("NOShortMiddles", 2.0e-9) kwargs.setdefault("NOOuters", 3.5e-5) # If noise is turned off: if not digitizationFlags.doInDetNoise.get_Value(): ###kwargs.setdefault("OnlyHitElements", True) print 'SCT_Digitization:::: Turned off Noise in SCT_FrontEnd' kwargs.setdefault("NoiseOn", False) kwargs.setdefault("AnalogueNoiseOn", False) else: kwargs.setdefault("NoiseOn", True) kwargs.setdefault("AnalogueNoiseOn", True) # In overlay MC, only analogue noise is on. Noise hits are not added. from AthenaCommon.GlobalFlags import globalflags if globalflags.isOverlay() and globalflags.DataSource == 'geant4': kwargs["NoiseOn"] = False kwargs["AnalogueNoiseOn"] = True # Use Calibration data from Conditions DB, still for testing purposes only kwargs.setdefault("UseCalibData", True) # Setup the ReadCalibChip folders and Svc from IOVDbSvc.CondDB import conddb if not conddb.folderRequested('/SCT/DAQ/Calibration/ChipGain'): conddb.addFolderSplitMC("SCT", "/SCT/DAQ/Calibration/ChipGain", "/SCT/DAQ/Calibration/ChipGain") if not conddb.folderRequested('/SCT/DAQ/Calibration/ChipNoise'): conddb.addFolderSplitMC("SCT", "/SCT/DAQ/Calibration/ChipNoise", "/SCT/DAQ/Calibration/ChipNoise") from AthenaCommon.AppMgr import ServiceMgr if not hasattr(ServiceMgr, "InDetSCT_ReadCalibChipDataSvc"): from SCT_ConditionsServices.SCT_ConditionsServicesConf import SCT_ReadCalibChipDataSvc InDetSCT_ReadCalibChipDataSvc = SCT_ReadCalibChipDataSvc( name="InDetSCT_ReadCalibChipDataSvc") ServiceMgr += InDetSCT_ReadCalibChipDataSvc # DataCompressionMode: 1 is level mode x1x (default), 2 is edge mode 01x, 3 is expanded any hit xxx from AthenaCommon.BeamFlags import jobproperties if digitizationFlags.PileUpPremixing: kwargs.setdefault("DataCompressionMode", 3) elif globalflags.isOverlay() and globalflags.DataSource == 'geant4': kwargs.setdefault("DataCompressionMode", 2) elif (jobproperties.Beam.bunchSpacing() <= 50): kwargs.setdefault("DataCompressionMode", 1) else: kwargs.setdefault("DataCompressionMode", 3) # DataReadOutMode: 0 is condensed mode and 1 is expanded mode if globalflags.isOverlay() and globalflags.DataSource == 'geant4': kwargs.setdefault("DataReadOutMode", 0) else: kwargs.setdefault("DataReadOutMode", 1) from SCT_Digitization.SCT_DigitizationConf import SCT_FrontEnd return SCT_FrontEnd(name, **kwargs)
# OutputSvc from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamEventStorageOutputSvc svcMgr += ByteStreamEventStorageOutputSvc() # Properties ByteStreamCnvSvc = svcMgr.ByteStreamCnvSvc ByteStreamCnvSvc.IsSimulation = True ByteStreamCnvSvc.ByteStreamOutputSvc ="ByteStreamEventStorageOutputSvc" # SCT cabling from SCT_Cabling.SCT_CablingConf import SCT_CablingSvc ServiceMgr+=SCT_CablingSvc() IOVDbSvc = Service("IOVDbSvc") from IOVDbSvc.CondDB import conddb conddb.addFolderSplitMC("SCT","/SCT/DAQ/Configuration/ROD","/SCT/DAQ/Configuration/ROD") conddb.addFolderSplitMC("SCT","/SCT/DAQ/Configuration/MUR","/SCT/DAQ/Configuration/MUR") conddb.addFolderSplitMC("SCT","/SCT/DAQ/Configuration/RODMUR","/SCT/DAQ/Configuration/RODMUR") conddb.addFolderSplitMC("SCT","/SCT/DAQ/Configuration/Geog","/SCT/DAQ/Configuration/Geog") ServiceMgr.SCT_CablingSvc.DataSource = "CORACOOL" # hack to force MC calbing loading for FDR2 #if svcMgr.ByteStreamCnvSvc.IsSimulation: # ServiceMgr.SCT_CablingSvc.DataSource = "SCT_MC_FullCabling_svc.dat" if DetFlags.haveRIO.pixel_on(): ByteStreamCnvSvc.InitCnvs += ["PixelRDO_Container"] if DetFlags.haveRIO.SCT_on(): ByteStreamCnvSvc.InitCnvs += ["SCT_RDO_Container"] if DetFlags.haveRIO.TRT_on(): ByteStreamCnvSvc.InitCnvs += ["TRT_RDO_Container"] if DetFlags.haveRIO.BCM_on():
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # MagFieldServices #-------------------------------------------------------------- from AthenaCommon.Logging import logging logging.getLogger().info("Importing %s", __name__) from AthenaCommon.AthenaCommonFlags import athenaCommonFlags # initialise required conditions DB folders from IOVDbSvc.CondDB import conddb conddb.addFolderSplitMC('GLOBAL', '/GLOBAL/BField/Maps <noover/>', '/GLOBAL/BField/Maps <noover/>', className="CondAttrListCollection") if not athenaCommonFlags.isOnline(): conddb.addFolder('DCS_OFL', '/EXT/DCS/MAGNETS/SENSORDATA', className="CondAttrListCollection") # import the field service and conditions algs (service is 'to be removed') # (it is MagFieldServices.MagFieldServicesConfig which takes care of configuration) from AthenaCommon.CfgGetter import getService, getAlgorithm getService('AtlasFieldSvc') from AthenaCommon.AlgSequence import AthSequencer condSequence = AthSequencer("AthCondSeq") condSequence += getAlgorithm("AtlasFieldMapCondAlg") condSequence += getAlgorithm("AtlasFieldCacheCondAlg")
def FastClusterMakerTool(name="FastClusterMakerTool", **kwargs): from Digitization.DigitizationFlags import digitizationFlags ################################# # Config pixel conditions setup # ################################# from IOVDbSvc.CondDB import conddb from AthenaCommon.AlgSequence import AthSequencer condSeq = AthSequencer("AthCondSeq") ################# # Module status # ################# useNewChargeFormat = False if not hasattr(condSeq, "PixelConfigCondAlg"): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelConfigCondAlg IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping_2016.dat" rodIDForSingleLink40=0 # ITk: if geoFlags.isSLHC(): IdMappingDat = "ITk_Atlas_IdMapping.dat" if "BrlIncl4.0_ref" == commonGeoFlags.GeoType(): IdMappingDat = "ITk_Atlas_IdMapping_InclBrl4.dat" elif "IBrlExt4.0ref" == commonGeoFlags.GeoType(): IdMappingDat = "ITk_Atlas_IdMapping_IExtBrl4.dat" elif "BrlExt4.0_ref" == commonGeoFlags.GeoType(): IdMappingDat = "ITk_Atlas_IdMapping_ExtBrl4.dat" elif "BrlExt3.2_ref" == commonGeoFlags.GeoType(): IdMappingDat = "ITk_Atlas_IdMapping_ExtBrl32.dat" elif (geoFlags.isIBL() == False): IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping.dat" else: # Planar IBL if (geoFlags.IBLLayout() == "planar"): if (geoFlags.isDBM() == True): IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping_inclIBL_DBM.dat" else: IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping_inclIBL.dat" # Hybrid IBL plus DBM elif (geoFlags.IBLLayout() == "3D"): IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping_Run2.dat" condSeq += PixelConfigCondAlg(name="PixelConfigCondAlg", UseDeadmapConditions=False, UseDCSStateConditions=False, UseDCSStatusConditions=False, UseTDAQConditions=False, UseCalibConditions=True, UseCablingConditions=False, CablingMapFileName=IdMappingDat) #FIXME: at some point we should move away from being dependent on the experimentalDigi flags. if 'doFastSCT_Digi' in digitizationFlags.experimentalDigi() and not 'doFastPixelDigi' in digitizationFlags.experimentalDigi(): PixelConfigCondAlg.UseCalibConditions=False else: ##################### # Calibration Setup # ##################### if not useNewChargeFormat: if not conddb.folderRequested("/PIXEL/PixCalib"): conddb.addFolderSplitOnline("PIXEL", "/PIXEL/Onl/PixCalib", "/PIXEL/PixCalib", className="CondAttrListCollection") if not hasattr(condSeq, 'PixelChargeCalibCondAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelChargeCalibCondAlg condSeq += PixelChargeCalibCondAlg(name="PixelChargeCalibCondAlg", ReadKey="/PIXEL/PixCalib") else: if not conddb.folderRequested("/PIXEL/ChargeCalibration"): conddb.addFolder("PIXEL_OFL", "/PIXEL/ChargeCalibration", className="CondAttrListCollection") if not hasattr(condSeq, 'PixelChargeLUTCalibCondAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelChargeLUTCalibCondAlg condSeq += PixelChargeLUTCalibCondAlg(name="PixelChargeLUTCalibCondAlg", ReadKey="/PIXEL/ChargeCalibration") ##################### # Cabling map Setup # ##################### if (conddb.dbmc=="OFLP200" and geoFlags.isIBL()==True) and not conddb.folderRequested("/PIXEL/HitDiscCnfg"): conddb.addFolderSplitMC("PIXEL","/PIXEL/HitDiscCnfg","/PIXEL/HitDiscCnfg", className="AthenaAttributeList") if not hasattr(condSeq, 'PixelHitDiscCnfgAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelHitDiscCnfgAlg condSeq += PixelHitDiscCnfgAlg(name="PixelHitDiscCnfgAlg") if not conddb.folderRequested("/PIXEL/ReadoutSpeed"): conddb.addFolderSplitMC("PIXEL","/PIXEL/ReadoutSpeed","/PIXEL/ReadoutSpeed", className="AthenaAttributeList") if not hasattr(condSeq, 'PixelReadoutSpeedAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelReadoutSpeedAlg condSeq += PixelReadoutSpeedAlg(name="PixelReadoutSpeedAlg") if not hasattr(condSeq, 'PixelCablingCondAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelCablingCondAlg condSeq += PixelCablingCondAlg(name="PixelCablingCondAlg", MappingFile=IdMappingDat, RodIDForSingleLink40=rodIDForSingleLink40) if not conddb.folderRequested('/PIXEL/PixdEdx'): conddb.addFolder("PIXEL_OFL", "/PIXEL/PixdEdx", className="AthenaAttributeList") if not conddb.folderRequested("/PIXEL/PixReco"): conddb.addFolder("PIXEL_OFL", "/PIXEL/PixReco", className="DetCondCFloat") if not conddb.folderRequested("/Indet/PixelDist"): conddb.addFolder("INDET", "/Indet/PixelDist", className="DetCondCFloat") if not hasattr(condSeq, 'PixelOfflineCalibCondAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelOfflineCalibCondAlg condSeq += PixelOfflineCalibCondAlg(name="PixelOfflineCalibCondAlg", ReadKey="/PIXEL/PixReco") PixelOfflineCalibCondAlg.InputSource = 2 if not hasattr(ToolSvc, "PixelLorentzAngleTool"): from SiLorentzAngleTool.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup pixelLorentzAngleToolSetup = PixelLorentzAngleToolSetup() if not hasattr(condSeq, 'PixelDistortionAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDistortionAlg condSeq += PixelDistortionAlg(name="PixelDistortionAlg") if not hasattr(condSeq, 'PixeldEdxAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixeldEdxAlg condSeq += PixeldEdxAlg(name="PixeldEdxAlg") PixeldEdxAlg.ReadFromCOOL = True from AthenaCommon.AppMgr import ToolSvc if not hasattr(ToolSvc, "PixelRecoDbTool"): from PixelConditionsTools.PixelConditionsToolsConf import PixelRecoDbTool ToolSvc += PixelRecoDbTool() ToolSvc.PixelRecoDbTool.InputSource = 1 from AthenaCommon import CfgMgr return CfgMgr.InDet__ClusterMakerTool(name,**kwargs)
from TrigMuonCoinHierarchy.TrigMuonCoinHierarchyConf import Trigger__TgcCoinHierarchyFindTool TgcCoinHierarchyFindTool = Trigger__TgcCoinHierarchyFindTool( "Trigger::TgcCoinHierarchyFindTool") ToolSvc += TgcCoinHierarchyFindTool # TGC cabling service setting (MuonTGC_Cabling will be used with this setting) from MuonCablingServers.MuonCablingServersConf import TGCcablingServerSvc ServiceMgr += TGCcablingServerSvc() theApp.CreateSvc += ["TGCcablingServerSvc"] ServiceMgr.TGCcablingServerSvc.Atlas = True ServiceMgr.TGCcablingServerSvc.forcedUse = True ServiceMgr.TGCcablingServerSvc.useMuonTGC_CablingSvc = True from TGC_CondCabling.TGC_CondCablingConf import TGCCablingDbTool ToolSvc += TGCCablingDbTool() from IOVDbSvc.CondDB import conddb conddb.addFolderSplitMC('TGC', '/TGC/CABLING/MAP_SCHEMA', '/TGC/CABLING/MAP_SCHEMA') print ServiceMgr ### Algorithms from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() # Trigger::TgcCoinHierarchyValidation from TrigMuonCoinHierarchy.TrigMuonCoinHierarchyConf import Trigger__TgcCoinHierarchyValidation TgcCoinHierarchyValidation = Trigger__TgcCoinHierarchyValidation( "Trigger::TgcCoinHierarchyValidation") TgcCoinHierarchyValidation.OutputLevel = INFO TgcCoinHierarchyValidation.doCoin = False TgcCoinHierarchyValidation.doHit = True TgcCoinHierarchyValidation.timing = "NEXT" TgcCoinHierarchyValidation.logName = "vlog_next_new.log"
ServiceMgr.MuonRPC_CablingSvc.RPCTriggerRoadsfromCool = True from IOVDbSvc.CondDB import conddb # # Cabling maps folders from DB # examples to connect to development db INTR # notice this requires special authentication.xml file # conddb.addFolder("","<db>oracle://INTR;schema=ATLAS_COOL_RPCDQ;dbname=RPC_DQA;user=ATLAS_COOL_RPCDQ_R</db> /RPC/CABLING/MAP_SCHEMA_NEW <tag>ver42</tag>") # conddb.addFolder("","<db>oracle://INTR;schema=ATLAS_COOL_RPCDQ;dbname=RPC_DQA;user=ATLAS_COOL_RPCDQ_R</db> /RPC/CABLING/MAP_SCHEMA_CORR_2 <tag>ver10</tag>") # # for production DB when tags are not yet associated to global tags # conddb.addFolder("RPC","/RPC/CABLING/MAP_SCHEMA <tag>RPCCablingMapSchema_version42</tag>") # conddb.addFolder("RPC","/RPC/CABLING/MAP_SCHEMA_CORR <tag>RPCCablingMapSchemaCorr_version10</tag>") # # for production DB conddb.addFolderSplitMC("RPC", "/RPC/CABLING/MAP_SCHEMA", "/RPC/CABLING/MAP_SCHEMA", className='CondAttrListCollection') conddb.addFolderSplitMC("RPC", "/RPC/CABLING/MAP_SCHEMA_CORR", "/RPC/CABLING/MAP_SCHEMA_CORR", className='CondAttrListCollection') # Trigger Roads folders from DB # for production DB when tags are not yet associated to global tags # conddb.addFolder("","<db>oracle://ATLAS_COOLPROD;schema=ATLAS_COOLOFL_RPC;dbname=OFLP200</db>/RPC/TRIGGER/CM_THR_ETA<tag>EtaTrigRoads_MC_April2010</tag>") # conddb.addFolder("","<db>oracle://ATLAS_COOLPROD;schema=ATLAS_COOLOFL_RPC;dbname=OFLP200</db>/RPC/TRIGGER/CM_THR_PHI<tag>PhiTrigRoads_MC_April2010</tag>") # # for production DB conddb.addFolderSplitMC("RPC", "/RPC/TRIGGER/CM_THR_ETA", "/RPC/TRIGGER/CM_THR_ETA",
conddb.blockFolder("/PIXEL/HLT/DCS/HV") conddb.addFolderWithTag("PIXEL_ONL", "/PIXEL/HLT/DCS/HV", "PixDCSHV-UPD1-00", force=True, forceData=True) conddb.blockFolder("/PIXEL/HLT/DCS/TEMPERATURE") conddb.addFolderWithTag("PIXEL_ONL", "/PIXEL/HLT/DCS/TEMPERATURE", "PixDCSTemp-UPD1-00", force=True, forceData=True) conddb.blockFolder("/PIXEL/ReadoutSpeed") conddb.addFolderSplitMC("PIXEL", "/PIXEL/ReadoutSpeed", "/PIXEL/ReadoutSpeed", force=True) conddb.blockFolder("/TRT/Cond/DigVers") conddb.addFolderWithTag("TRT_OFL", "/TRT/Cond/DigVers", "TRTCondDigVers-Collisions-01", force=True, forceMC=True) ################################################### print "Haas: RT OVERRIDE, old conditions (from Rt_override.py)" #See https://twiki.cern.ch/twiki/pub/AtlasComputing/ConditionsTagComCondBlkpa00611/checkDB_COMCOND-BLKPA-006-11-17.2.10.6.txt #use data TRT T0 constants conddb.blockFolder("/TRT/Calib/T0")
def createTool(self): from AthenaCommon.AppMgr import ToolSvc ############################# # Setup Pixel Configuration # ############################# from AthenaCommon.AlgSequence import AthSequencer condSeq = AthSequencer("AthCondSeq") from IOVDbSvc.CondDB import conddb from AthenaCommon.GlobalFlags import globalflags from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags as commonGeoFlags from AtlasGeoModel.InDetGMJobProperties import InDetGeometryFlags as geoFlags useNewDeadmapFormat = False useNewChargeFormat = False if not useNewDeadmapFormat: if not (conddb.folderRequested("/PIXEL/PixMapOverlay") or conddb.folderRequested("/PIXEL/Onl/PixMapOverlay")): conddb.addFolderSplitOnline("PIXEL", "/PIXEL/Onl/PixMapOverlay", "/PIXEL/PixMapOverlay", className='CondAttrListCollection') if not hasattr(condSeq, 'PixelConfigCondAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelConfigCondAlg useCablingConditions = False IdMappingDat = "PixelCabling/Pixels_Atlas_IdMapping_2016.dat" rodIDForSingleLink40 = 0 if (globalflags.DataSource() == 'geant4'): # ITk: if geoFlags.isSLHC(): IdMappingDat = "ITk_Atlas_IdMapping.dat" if "BrlIncl4.0_ref" == commonGeoFlags.GeoType(): IdMappingDat = "ITk_Atlas_IdMapping_InclBrl4.dat" elif "IBrlExt4.0ref" == commonGeoFlags.GeoType(): IdMappingDat = "ITk_Atlas_IdMapping_IExtBrl4.dat" elif "BrlExt4.0_ref" == commonGeoFlags.GeoType(): IdMappingDat = "ITk_Atlas_IdMapping_ExtBrl4.dat" elif "BrlExt3.2_ref" == commonGeoFlags.GeoType(): IdMappingDat = "ITk_Atlas_IdMapping_ExtBrl32.dat" elif (geoFlags.isIBL() == False): IdMappingDat = "PixelCabling/Pixels_Atlas_IdMapping.dat" else: # Planar IBL if (geoFlags.IBLLayout() == "planar"): if (geoFlags.isDBM() == True): IdMappingDat = "PixelCabling/Pixels_Atlas_IdMapping_inclIBL_DBM.dat" else: IdMappingDat = "PixelCabling/Pixels_Atlas_IdMapping_inclIBL.dat" # Hybrid IBL plus DBM elif (geoFlags.IBLLayout() == "3D"): IdMappingDat = "PixelCabling/Pixels_Atlas_IdMapping_Run2.dat" elif (globalflags.DataSource == 'data'): from RecExConfig.AutoConfiguration import GetRunNumber runNum = GetRunNumber() if (runNum < 222222): useCablingConditions = False IdMappingDat = "PixelCabling/Pixels_Atlas_IdMapping_May08.dat" rodIDForSingleLink40 = 1300000 else: useCablingConditions = True rodIDForSingleLink40 = 1300000 # Even though we are reading from COOL, set the correct fallback map. if (runNum >= 344494): IdMappingDat = "PixelCabling/Pixels_Atlas_IdMapping_344494.dat" elif (runNum >= 314940 and runNum < 344494): IdMappingDat = "PixelCabling/Pixels_Atlas_IdMapping_314940.dat" elif (runNum >= 289350 and runNum < 314940): # 2016 IdMappingDat = "PixelCabling/Pixels_Atlas_IdMapping_2016.dat" elif (runNum >= 222222 and runNum < 289350): # 2015 IdMappingDat = "PixelCabling/Pixels_Atlas_IdMapping_Run2.dat" else: IdMappingDat = "PixelCabling/Pixels_Atlas_IdMapping_344494.dat" condSeq += PixelConfigCondAlg( name="PixelConfigCondAlg", UseDeadmapConditions=self.usePixMap, UseDCSStateConditions=self.useDCS, UseDCSStatusConditions=self.useDCS, UseTDAQConditions=self. useTDAQ, # should be false. This is only valid in RUN-1. UseCalibConditions=True, UseCablingConditions=useCablingConditions, CablingMapFileName=IdMappingDat) ######################### # Deadmap Setup (RUN-3) # ######################### if useNewDeadmapFormat: if not conddb.folderRequested("/PIXEL/PixelModuleFeMask"): conddb.addFolder("PIXEL_OFL", "/PIXEL/PixelModuleFeMask", className="CondAttrListCollection") if not hasattr(condSeq, "PixelDeadMapCondAlg"): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDeadMapCondAlg condSeq += PixelDeadMapCondAlg(name="PixelDeadMapCondAlg") ######################## # DCS Conditions Setup # ######################## PixelHVFolder = "/PIXEL/DCS/HV" PixelTempFolder = "/PIXEL/DCS/TEMPERATURE" PixelDBInstance = "DCS_OFL" from AthenaCommon.AthenaCommonFlags import athenaCommonFlags if athenaCommonFlags.isOnline(): PixelHVFolder = "/PIXEL/HLT/DCS/HV" PixelTempFolder = "/PIXEL/HLT/DCS/TEMPERATURE" PixelDBInstance = "PIXEL_ONL" if not conddb.folderRequested(PixelHVFolder): conddb.addFolder(PixelDBInstance, PixelHVFolder, className="CondAttrListCollection") if not conddb.folderRequested(PixelTempFolder): conddb.addFolder(PixelDBInstance, PixelTempFolder, className="CondAttrListCollection") if not self.onlineMode: #this is only for testing in offline like setup if not conddb.folderRequested("/PIXEL/DCS/FSMSTATE"): conddb.addFolder("DCS_OFL", "/PIXEL/DCS/FSMSTATE", className="CondAttrListCollection") if not conddb.folderRequested("/PIXEL/DCS/FSMSTATUS"): conddb.addFolder("DCS_OFL", "/PIXEL/DCS/FSMSTATUS", className="CondAttrListCollection") if not hasattr(condSeq, 'PixelDCSCondStateAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDCSCondStateAlg condSeq += PixelDCSCondStateAlg(name="PixelDCSCondStateAlg") if not hasattr(condSeq, 'PixelDCSCondStatusAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDCSCondStatusAlg condSeq += PixelDCSCondStatusAlg(name="PixelDCSCondStatusAlg") if not hasattr(condSeq, 'PixelDCSCondHVAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDCSCondHVAlg condSeq += PixelDCSCondHVAlg(name="PixelDCSCondHVAlg", ReadKey=PixelHVFolder) if not hasattr(condSeq, 'PixelDCSCondTempAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDCSCondTempAlg condSeq += PixelDCSCondTempAlg(name="PixelDCSCondTempAlg", ReadKey=PixelTempFolder) ######################### # TDAQ Conditions Setup # ######################### if self.useTDAQ: PixelTDAQFolder = "/TDAQ/Resources/ATLAS/PIXEL/Modules" PixelTDAQInstance = "TDAQ_ONL" if not conddb.folderRequested(PixelTDAQFolder): conddb.addFolder(PixelTDAQInstance, PixelTDAQFolder, className="CondAttrListCollection") if not hasattr(condSeq, "PixelTDAQCondAlg"): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelTDAQCondAlg condSeq += PixelTDAQCondAlg(name="PixelTDAQCondAlg", ReadKey=PixelTDAQFolder) ############################ # Conditions Summary Setup # ############################ # This is future replacement of the PixelConditionsSummaryTool... from PixelConditionsTools.PixelConditionsToolsConf import PixelConditionsSummaryTool TrigPixelConditionsSummaryTool = PixelConditionsSummaryTool( name=self.instanceName('PixelConditionsSummaryTool'), UseByteStream=self.useBS) if self.useDCS and not self.onlineMode: TrigPixelConditionsSummaryTool.IsActiveStates = ['READY', 'ON'] TrigPixelConditionsSummaryTool.IsActiveStatus = ['OK', 'WARNING'] self.summaryTool = TrigPixelConditionsSummaryTool if self._print: print(TrigPixelConditionsSummaryTool) ##################### # Calibration Setup # ##################### if not useNewChargeFormat: if not conddb.folderRequested("/PIXEL/PixCalib"): conddb.addFolderSplitOnline("PIXEL", "/PIXEL/Onl/PixCalib", "/PIXEL/PixCalib", className="CondAttrListCollection") if not hasattr(condSeq, 'PixelChargeCalibCondAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelChargeCalibCondAlg condSeq += PixelChargeCalibCondAlg( name="PixelChargeCalibCondAlg", ReadKey="/PIXEL/PixCalib") else: if not conddb.folderRequested("/PIXEL/ChargeCalibration"): conddb.addFolder("PIXEL_OFL", "/PIXEL/ChargeCalibration", className="CondAttrListCollection") if not hasattr(condSeq, 'PixelChargeLUTCalibCondAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelChargeLUTCalibCondAlg condSeq += PixelChargeLUTCalibCondAlg( name="PixelChargeLUTCalibCondAlg", ReadKey="/PIXEL/ChargeCalibration") ##################### # Cabling map Setup # ##################### if (conddb.dbdata == "CONDBR2" or (conddb.dbmc == "OFLP200" and geoFlags.isIBL() == True)) and not conddb.folderRequested("/PIXEL/HitDiscCnfg"): conddb.addFolderSplitMC("PIXEL", "/PIXEL/HitDiscCnfg", "/PIXEL/HitDiscCnfg", className="AthenaAttributeList") if not hasattr(condSeq, 'PixelHitDiscCnfgAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelHitDiscCnfgAlg condSeq += PixelHitDiscCnfgAlg(name="PixelHitDiscCnfgAlg") if not conddb.folderRequested("/PIXEL/ReadoutSpeed"): if not (globalflags.DataSource() == 'geant4'): conddb.addFolder("PIXEL", "/PIXEL/ReadoutSpeed", className="AthenaAttributeList") else: conddb.addFolderSplitMC("PIXEL", "/PIXEL/ReadoutSpeed", "/PIXEL/ReadoutSpeed", className="AthenaAttributeList") if not hasattr(condSeq, 'PixelReadoutSpeedAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelReadoutSpeedAlg condSeq += PixelReadoutSpeedAlg(name="PixelReadoutSpeedAlg") if (globalflags.DataSource == 'data'): if not conddb.folderRequested("/PIXEL/CablingMap"): conddb.addFolderSplitOnline("PIXEL", "/PIXEL/Onl/CablingMap", "/PIXEL/CablingMap", className="AthenaAttributeList") if not hasattr(condSeq, 'PixelCablingCondAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelCablingCondAlg condSeq += PixelCablingCondAlg( name="PixelCablingCondAlg", MappingFile=IdMappingDat, RodIDForSingleLink40=rodIDForSingleLink40) ############################# # Offline calibration Setup # ############################# if not conddb.folderRequested("/PIXEL/PixReco"): conddb.addFolderSplitOnline("PIXEL", "/PIXEL/Onl/PixReco", "/PIXEL/PixReco", className="DetCondCFloat") if not hasattr(condSeq, 'PixelOfflineCalibCondAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelOfflineCalibCondAlg condSeq += PixelOfflineCalibCondAlg( name="PixelOfflineCalibCondAlg", ReadKey="/PIXEL/PixReco") PixelOfflineCalibCondAlg.InputSource = 2 if not conddb.folderRequested("/Indet/PixelDist"): conddb.addFolderSplitOnline("INDET", "/Indet/Onl/PixelDist", "/Indet/PixelDist", className="DetCondCFloat") if not hasattr(condSeq, 'PixelDistortionAlg'): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDistortionAlg condSeq += PixelDistortionAlg(name="PixelDistortionAlg", ReadKey="/Indet/PixelDist") ### configure the special pixel map service if not (conddb.folderRequested("/PIXEL/PixMapShort") or conddb.folderRequested("/PIXEL/Onl/PixMapShort")): conddb.addFolderSplitOnline("PIXEL", "/PIXEL/Onl/PixMapShort", "/PIXEL/PixMapShort", className='CondAttrListCollection') if not (conddb.folderRequested("/PIXEL/PixMapLong") or conddb.folderRequested("/PIXEL/Onl/PixMapLong")): conddb.addFolderSplitOnline("PIXEL", "/PIXEL/Onl/PixMapLong", "/PIXEL/PixMapLong", className='CondAttrListCollection') if not (conddb.folderRequested("/PIXEL/NoiseMapShort") or conddb.folderRequested("/PIXEL/Onl/NoiseMapShort")): conddb.addFolderSplitOnline("PIXEL", "/PIXEL/Onl/NoiseMapShort", "/PIXEL/NoiseMapShort", className='CondAttrListCollection') if not (conddb.folderRequested("/PIXEL/NoiseMapLong") or conddb.folderRequested("/PIXEL/Onl/NoiseMapLong")): conddb.addFolderSplitOnline("PIXEL", "/PIXEL/Onl/NoiseMapLong", "/PIXEL/NoiseMapLong", className='CondAttrListCollection') if not (conddb.folderRequested("/PIXEL/PixMapOverlay") or conddb.folderRequested("/PIXEL/Onl/PixMapOverlay")): conddb.addFolderSplitOnline("PIXEL", "/PIXEL/Onl/PixMapOverlay", "/PIXEL/PixMapOverlay", className='CondAttrListCollection') ####################### # Lorentz Angle Setup # ####################### if not hasattr(condSeq, 'PixelSiPropertiesCondAlg'): from SiPropertiesTool.SiPropertiesToolConf import PixelSiPropertiesCondAlg condSeq += PixelSiPropertiesCondAlg( name="PixelSiPropertiesCondAlg") from SiPropertiesTool.SiPropertiesToolConf import SiPropertiesTool TrigSiPropertiesTool = SiPropertiesTool( name="PixelSiPropertiesTool", DetectorName="Pixel", ReadKey="PixelSiliconPropertiesVector") ToolSvc += TrigSiPropertiesTool if not hasattr(condSeq, 'PixelSiLorentzAngleCondAlg'): from SiLorentzAngleTool.SiLorentzAngleToolConf import PixelSiLorentzAngleCondAlg condSeq += PixelSiLorentzAngleCondAlg( name="PixelSiLorentzAngleCondAlg", SiPropertiesTool=TrigSiPropertiesTool, UseMagFieldCache=True, UseMagFieldDcs=(not athenaCommonFlags.isOnline())) from SiLorentzAngleTool.SiLorentzAngleToolConf import SiLorentzAngleTool TrigPixelLorentzAngleTool = SiLorentzAngleTool( name=self.instanceName('PixelLorentzAngleTool'), DetectorName="Pixel", SiLorentzAngleCondData="PixelSiLorentzAngleCondData") ToolSvc += TrigPixelLorentzAngleTool
pass #to read SCT cabling from db from SCT_Cabling.SCT_CablingConf import SCT_CablingSvc SCT_CablingSvc = SCT_CablingSvc(DataSource="CORACOOL") ServiceMgr += SCT_CablingSvc if (InDetFlags.doPrintConfigurables()): print SCT_CablingSvc SCTRodConfigPath = SCTConfigurationFolderPath + 'ROD' SCTMurConfigPath = SCTConfigurationFolderPath + 'MUR' SCTRodMurConfigPath = SCTConfigurationFolderPath + 'RODMUR' SCTGeogConfigPath = SCTConfigurationFolderPath + 'Geog' # if not conddb.folderRequested(SCTRodConfigPath): conddb.addFolderSplitMC("SCT", SCTRodConfigPath, SCTRodConfigPath) if not conddb.folderRequested(SCTMurConfigPath): conddb.addFolderSplitMC("SCT", SCTMurConfigPath, SCTMurConfigPath) if not conddb.folderRequested(SCTRodMurConfigPath): conddb.addFolderSplitMC("SCT", SCTRodMurConfigPath, SCTRodMurConfigPath) if not conddb.folderRequested(SCTGeogConfigPath): conddb.addFolderSplitMC("SCT", SCTGeogConfigPath, SCTGeogConfigPath) # # --- TRT cabling # if DetFlags.detdescr.TRT_on() and not 'TRT_Cabling' in dir(): # if bytestream comes from real data from TRT_Cabling.TRT_CablingConf import TRT_FillCablingData_DC3 TRT_Cabling = TRT_FillCablingData_DC3()
SCTConfigurationFolderPath='/SCT/DAQ/Configuration/' #if its CONDBR2, use new folders... if (conddb.dbdata == "CONDBR2"): SCTConfigurationFolderPath='/SCT/DAQ/Config/' #...but now check if we want to override that decision with explicit flag (if there is one) try: if InDetFlags.ForceCoraCool(): SCTConfigurationFolderPath='/SCT/DAQ/Configuration/' except: pass # Load folders that have to exist for both MC and Data SCTChipConfigurationPath=SCTConfigurationFolderPath+'Chip' SCTModuleConfigurationPath=SCTConfigurationFolderPath+'Module' SCTMurConfigurationPath=SCTConfigurationFolderPath+'MUR' if not conddb.folderRequested(SCTChipConfigurationPath): conddb.addFolderSplitMC("SCT",SCTChipConfigurationPath,SCTChipConfigurationPath) if not conddb.folderRequested(SCTModuleConfigurationPath): conddb.addFolderSplitMC("SCT",SCTModuleConfigurationPath,SCTModuleConfigurationPath) if not conddb.folderRequested(SCTMurConfigurationPath): conddb.addFolderSplitMC("SCT",SCTMurConfigurationPath,SCTMurConfigurationPath) if not conddb.folderRequested('/SCT/DAQ/Calibration/NPtGainDefects'): conddb.addFolderSplitMC("SCT","/SCT/DAQ/Calibration/NPtGainDefects","/SCT/DAQ/Calibration/NPtGainDefects") if not conddb.folderRequested('/SCT/DAQ/Calibration/NoiseOccupancyDefects'): conddb.addFolderSplitMC("SCT","/SCT/DAQ/Calibration/NoiseOccupancyDefects","/SCT/DAQ/Calibration/NoiseOccupancyDefects") if not athenaCommonFlags.isOnline(): if not conddb.folderRequested('/SCT/Derived/Monitoring'): conddb.addFolder("SCT_OFL","/SCT/Derived/Monitoring")