def TRT_CalDbToolCfg(flags, name="TRT_CalDbTool"): """Return a ComponentAccumulator for TRT_CalDbTool""" from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline acc = ComponentAccumulator() acc.merge( addFoldersSplitOnline( flags, "TRT", "/TRT/Onl/Calib/RT", "/TRT/Calib/RT", className="TRTCond::RtRelationMultChanContainer")) acc.merge( addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Calib/T0", "/TRT/Calib/T0", className='TRTCond::StrawT0MultChanContainer')) acc.merge( addFoldersSplitOnline( flags, "TRT", "/TRT/Onl/Calib/errors2d", "/TRT/Calib/errors2d", className="TRTCond::RtRelationMultChanContainer")) acc.merge( addFoldersSplitOnline( flags, "TRT", "/TRT/Onl/Calib/slopes", "/TRT/Calib/slopes", className='TRTCond::RtRelationMultChanContainer')) TRT_CalDbTool = CompFactory.TRT_CalDbTool acc.setPrivateTools(TRT_CalDbTool(name="TRT_CalDbTool")) return acc
def SCT_GeometryCfg(flags): from AtlasGeoModel.GeoModelConfig import GeoModelCfg acc = GeoModelCfg(flags) geoModelSvc = acc.getPrimary() GeometryDBSvc = CompFactory.GeometryDBSvc acc.addService(GeometryDBSvc("InDetGeometryDBSvc")) SCT_DetectorTool = CompFactory.SCT_DetectorTool sctDetectorTool = SCT_DetectorTool() sctDetectorTool.useDynamicAlignFolders = flags.GeoModel.Align.Dynamic sctDetectorTool.Alignable = True # make this a flag? sctDetectorTool.DetectorName = "SCT" geoModelSvc.DetectorTools += [sctDetectorTool] if flags.GeoModel.Align.Dynamic: acc.merge( addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/AlignL1/ID", "/Indet/AlignL1/ID", className="CondAttrListCollection")) acc.merge( addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/AlignL2/SCT", "/Indet/AlignL2/SCT", className="CondAttrListCollection")) acc.merge( addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/AlignL3", "/Indet/AlignL3", className="AlignableTransformContainer")) else: if (not flags.Detector.SimulateSCT) or flags.Detector.OverlaySCT: acc.merge( addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/Align", "/Indet/Align", className="AlignableTransformContainer")) else: acc.merge( addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/Align", "/Indet/Align")) if flags.Common.Project != "AthSimulation": # Protection for AthSimulation builds if (not flags.Detector.SimulateSCT) or flags.Detector.OverlaySCT: SCT_AlignCondAlg = CompFactory.SCT_AlignCondAlg sctAlignCondAlg = SCT_AlignCondAlg( name="SCT_AlignCondAlg", UseDynamicAlignFolders=flags.GeoModel.Align.Dynamic) acc.addCondAlgo(sctAlignCondAlg) SCT_DetectorElementCondAlg = CompFactory.SCT_DetectorElementCondAlg sctDetectorElementCondAlg = SCT_DetectorElementCondAlg( name="SCT_DetectorElementCondAlg") acc.addCondAlgo(sctDetectorElementCondAlg) return acc
def SCT_ReadCalibChipDataCfg(flags, name="SCT_ReadCalibChip", **kwargs): """Return configured ComponentAccumulator with SCT_ReadCalibChipDataCfg tool Accepts optional noiseFolder and gainFolder keyword arguments """ acc = ComponentAccumulator() # folders noiseFolder = kwargs.get("noiseFolder", "/SCT/DAQ/Calibration/ChipNoise") gainFolder = kwargs.get("gainFolder", "/SCT/DAQ/Calibration/ChipGain") if flags.Overlay.DataOverlay: forceDb = "OFLP200" noiseTag = "SctDaqCalibrationChipNoise-Apr10-01" gainTag = "SctDaqCalibrationChipGain-Apr10-01" else: forceDb = None noiseTag = None gainTag = None acc.merge( addFoldersSplitOnline(flags, "SCT", noiseFolder, noiseFolder, "CondAttrListCollection", forceDb=forceDb, tag=noiseTag)) acc.merge( addFoldersSplitOnline(flags, "SCT", gainFolder, gainFolder, "CondAttrListCollection", forceDb=forceDb, tag=gainTag)) # Algorithms noiseAlg = SCT_ReadCalibChipNoiseCondAlg(name=name + "NoiseCondAlg", ReadKey=noiseFolder) acc.addCondAlgo(noiseAlg) gainAlg = SCT_ReadCalibChipGainCondAlg(name=name + "GainCondAlg", ReadKey=gainFolder) acc.addCondAlgo(gainAlg) tool = kwargs.get("ReadCalibChipDataTool", SCT_ReadCalibChipDataToolCfg(flags)) acc.setPrivateTools(tool) return acc
def LArTTCellMapCfg(flags): """Return ComponentAccumulator configured for LAr Trigger Tower""" # replaces LArTTCellMap_ATLAS_jobOptions.py folder = "/LAR/Identifier/LArTTCellMapAtlas" + flags.LAr.DBConnection acc = addFoldersSplitOnline(flags, "LAR", folder, folder) # override not migrated #DetDescr = flags.Global.DetDescrVersion #if DetDescr.startswith("ATLAS-CSC-01") or DetDescr.startswith("ATLAS-DC"): # conddb.addOverride("/LAR/Identifier/LArTTCellMapAtlas","LARIdentifierLArTTCellMapAtlas-DC3-02") return acc
def BeamSpotCondAlgCfg(flags, name="BeamSpotCondAlg", **kwargs): """Configure the BeamSpotCondAlg.""" acc = ComponentAccumulator() from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline acc.merge(addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/Beampos", "/Indet/Beampos", className="AthenaAttributeList")) BeamSpotCondAlg = CompFactory.BeamSpotCondAlg acc.addCondAlgo(BeamSpotCondAlg(name, **kwargs)) return acc
def ForDetGeometryCfg(ConfigFlags): from AtlasGeoModel.GeoModelConfig import GeoModelCfg acc = GeoModelCfg(ConfigFlags) geoModelSvc = acc.getPrimary() GeometryDBSvc = CompFactory.GeometryDBSvc acc.addService(GeometryDBSvc("InDetGeometryDBSvc")) # LUCID if ConfigFlags.Detector.GeometryLucid: LUCID_DetectorTool = CompFactory.LUCID_DetectorTool geoModelSvc.DetectorTools += [LUCID_DetectorTool()] # ALFA if ConfigFlags.Detector.GeometryALFA: #from ALFA_GeoModel.ALFA_GeoModelConf import ALFA_DetectorTool ALFA_DetectorTool = CompFactory.ALFA_DetectorTool theALFA_DetectorTool = ALFA_DetectorTool(name="ALFA_DetectorTool") theALFA_DetectorTool.MetrologyType = 3 theALFA_DetectorTool.B7L1U_MDGeometryType = 2 theALFA_DetectorTool.B7L1U_ODGeometryType = 2 theALFA_DetectorTool.B7L1L_MDGeometryType = 2 theALFA_DetectorTool.B7L1L_ODGeometryType = 2 theALFA_DetectorTool.A7L1U_MDGeometryType = 2 theALFA_DetectorTool.A7L1U_ODGeometryType = 2 theALFA_DetectorTool.A7L1L_MDGeometryType = 2 theALFA_DetectorTool.A7L1L_ODGeometryType = 2 theALFA_DetectorTool.A7R1U_MDGeometryType = 2 theALFA_DetectorTool.A7R1U_ODGeometryType = 2 theALFA_DetectorTool.A7R1L_MDGeometryType = 2 theALFA_DetectorTool.A7R1L_ODGeometryType = 2 theALFA_DetectorTool.B7R1U_MDGeometryType = 2 theALFA_DetectorTool.B7R1U_ODGeometryType = 2 theALFA_DetectorTool.B7R1L_MDGeometryType = 2 theALFA_DetectorTool.B7R1L_ODGeometryType = 2 geoModelSvc.DetectorTools += [theALFA_DetectorTool] acc.merge( addFoldersSplitOnline(ConfigFlags, 'FWD', '/FWD/Onl/ALFA/position_calibration', '/FWD/ALFA/position_calibration')) # ForwardRegion if ConfigFlags.Detector.GeometryFwdRegion: ForwardRegionGeoModelTool = CompFactory.ForwardRegionGeoModelTool geoModelSvc.DetectorTools += [ForwardRegionGeoModelTool()] # ZDC if ConfigFlags.Detector.GeometryZDC: ZDC_DetTool = CompFactory.ZDC_DetTool geoModelSvc.DetectorTools += [ZDC_DetTool()] # AFP if ConfigFlags.Detector.GeometryAFP: AFP_GeoModelTool = CompFactory.AFP_GeoModelTool geoModelSvc.DetectorTools += [AFP_GeoModelTool()] acc.addService(geoModelSvc) return acc
def SCT_ReadCalibDataToolCfg(flags, name="SCT_ReadCalibDataTool", cond_kwargs={}, **kwargs): result = ComponentAccumulator() cond_kwargs.setdefault("NoiseFolder", "/SCT/DAQ/Calibration/NoiseOccupancyDefects") cond_kwargs.setdefault("GainFolder", "/SCT/DAQ/Calibration/NPtGainDefects") cond_kwargs.setdefault("ReadCalibDataCondAlgName", "SCT_ReadCalibDataCondAlg") result.merge( addFoldersSplitOnline(flags, detDb="SCT", online_folders=cond_kwargs["NoiseFolder"], offline_folders=cond_kwargs["NoiseFolder"], className='CondAttrListCollection', splitMC=True)) result.merge( addFoldersSplitOnline(flags, detDb="SCT", online_folders=cond_kwargs["GainFolder"], offline_folders=cond_kwargs["GainFolder"], className='CondAttrListCollection', splitMC=True)) result.addCondAlgo( CompFactory.SCT_ReadCalibDataCondAlg( name=cond_kwargs["ReadCalibDataCondAlgName"], ReadKeyGain=cond_kwargs["GainFolder"], ReadKeyNoise=cond_kwargs["NoiseFolder"])) acc = SCT_CablingToolCfg(flags) kwargs.setdefault("SCT_CablingTool", acc.popPrivateTools()) result.merge(acc) result.setPrivateTools(CompFactory.SCT_ReadCalibDataTool(name, **kwargs)) return result
def CaloTTIdMapCfg(flags): """Return ComponentAccumulator configured for Calo Trigger Tower""" # replaces CaloTTIdMap_ATLAS_jobOptions.py acc = ComponentAccumulator() folders = [ "CaloTTOnOffIdMapAtlas", "CaloTTOnAttrIdMapAtlas", "CaloTTPpmRxIdMapAtlas" ] for f in folders: endf = "/Identifier/" + f acc.merge( addFoldersSplitOnline(flags, "CALO", "/CALO" + endf, "/CALO/Ofl" + endf)) return acc
def _setupMdtCondDB(flags): result = ComponentAccumulator() if flags.Muon.Calib.readMDTCalibFromBlob: mdt_folder_name_appendix = "BLOB" else: mdt_folder_name_appendix = "" online_folders = [ '/MDT/Onl/RT' + mdt_folder_name_appendix, '/MDT/Onl/T0' + mdt_folder_name_appendix ] offline_folders = [ '/MDT/RT' + mdt_folder_name_appendix, '/MDT/T0' + mdt_folder_name_appendix ] if flags.Muon.Calib.mdtCalibrationSource == "MDT": result.merge( addFoldersSplitOnline(flags, 'MDT', online_folders, offline_folders, className='CondAttrListCollection')) else: from AthenaCommon.AppMgr import ServiceMgr ServiceMgr.TagInfoMgr.ExtraTagValuePairs.update( {"MDTCalibrationSource": flags.Muon.Calib.mdtCalibrationSource()}) # TODO Check this. result.merge( addFoldersSplitOnline(flags, flags.Muon.Calib.mdtCalibrationSource, online_folders, offline_folders, className='CondAttrListCollection')) return result, mdt_folder_name_appendix
def SCT_ConfigurationCondAlgCfg(flags, name="SCT_ConfigurationCondAlg", **kwargs): result = ComponentAccumulator() config_folder_prefix = getSCTDAQConfigFolder(flags) kwargs.setdefault("ReadKeyChannel", config_folder_prefix + "Chip") kwargs.setdefault("ReadKeyModule", config_folder_prefix + "Module") kwargs.setdefault("ReadKeyMur", config_folder_prefix + "MUR") result.merge( addFoldersSplitOnline(flags, detDb="SCT", online_folders=config_folder_prefix + "Chip", offline_folders=config_folder_prefix + "Chip", className='CondAttrListVec', splitMC=True)) result.merge( addFoldersSplitOnline(flags, detDb="SCT", online_folders=config_folder_prefix + "Module", offline_folders=config_folder_prefix + "Module", className='CondAttrListVec', splitMC=True)) result.merge( addFoldersSplitOnline(flags, detDb="SCT", online_folders=config_folder_prefix + "MUR", offline_folders=config_folder_prefix + "MUR", className='CondAttrListVec', splitMC=True)) acc = SCT_CablingToolCfg(flags) kwargs.setdefault("SCT_CablingTool", acc.popPrivateTools()) result.merge(acc) result.addCondAlgo(CompFactory.SCT_ConfigurationCondAlg(name, **kwargs)) return result
def MuonCombinedInDetDetailedTrackSelectorToolCfg(flags, name="MuonCombinedInDetDetailedTrackSelectorTool",**kwargs): if flags.Beam.Type == 'collisions': kwargs.setdefault("pTMin", 2000 ) kwargs.setdefault("IPd0Max", 50.0 ) kwargs.setdefault("IPz0Max", 9999.0 ) kwargs.setdefault("z0Max", 9999.0 ) kwargs.setdefault("useTrackSummaryInfo", True ) kwargs.setdefault("nHitBLayer", 0 ) kwargs.setdefault("nHitPix", 1 ) kwargs.setdefault("nHitBLayerPlusPix", 0 ) kwargs.setdefault("nHitSct", 3 ) kwargs.setdefault("nHitSi", 4 ) kwargs.setdefault("nHitTrt", 0 ) kwargs.setdefault("useTrackQualityInfo", False ) else: kwargs.setdefault("pTMin", 500 ) kwargs.setdefault("IPd0Max", 19999.0 ) kwargs.setdefault("IPz0Max", 19999.0 ) kwargs.setdefault("z0Max", 19999.0 ) kwargs.setdefault("useTrackSummaryInfo", False ) kwargs.setdefault("useTrackQualityInfo", False ) result = AtlasExtrapolatorCfg(flags) extrapolator = result.getPrimary() kwargs.setdefault("Extrapolator", extrapolator ) # FIXME the configuration of TrackSummaryTool should probably be centralised. acc = MuonCombinedTrackSummaryToolCfg(flags) kwargs.setdefault("TrackSummaryTool", acc.popPrivateTools() ) result.merge(acc) # Has two CondKeys # SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" }; # FIXME - let's put this someplace central? result.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Beampos","/Indet/Beampos", className='AthenaAttributeList')) result.addCondAlgo(CompFactory.BeamSpotCondAlg("BeamSpotCondAlg")) # SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"}; # FIXME - handle this ^ tool = CompFactory.InDet.InDetDetailedTrackSelectorTool(name,**kwargs) result.addPublicTool(tool) result.setPrivateTools(tool) return result
def _setupCondDB(flags, CoolDataBaseFolder, quiet=True): result = ComponentAccumulator() # the tag names materialTagBase = 'AtlasLayerMat_v' version = 21 sub_version = '' AtlasMaterialTag = materialTagBase + str(version) + sub_version + '_' cfolder = CoolDataBaseFolder + '<tag>TagInfoMajor/' + AtlasMaterialTag + '/GeoAtlas</tag>' # if not quiet: # print('[ TrackingGeometrySvc ] base material tag : ' + AtlasMaterialTag) # print('[ TrackingGeometrySvc ] translated to COOL: ' + cfolder) # load the right folders result.merge( addFoldersSplitOnline(flags, 'GLOBAL', [cfolder], [cfolder], splitMC=True)) return result
def PrepareStandAloneBTagCfg(inputFlags): result = ComponentAccumulator() from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg result.merge(PoolReadCfg(inputFlags)) from TrkConfig.AtlasTrackingGeometrySvcConfig import TrackingGeometrySvcCfg acc = TrackingGeometrySvcCfg(inputFlags) result.merge(acc) from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg result.merge(MuonGeoModelCfg(inputFlags)) GeometryDBSvc = CompFactory.GeometryDBSvc result.addService(GeometryDBSvc("InDetGeometryDBSvc")) from PixelGeoModel.PixelGeoModelConfig import PixelGeometryCfg result.merge(PixelGeometryCfg(inputFlags)) # get standard config for magnetic field - map and cache from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg result.merge(MagneticFieldSvcCfg(inputFlags)) from IOVDbSvc.IOVDbSvcConfig import addFolders, addFoldersSplitOnline #load folders needed for Run2 ID alignment result.merge( addFoldersSplitOnline(inputFlags, "INDET", "/Indet/Onl/Align", "/Indet/Align", className="AlignableTransformContainer")) result.merge(addFolders(inputFlags, ['/TRT/Align'], 'TRT_OFL')) #load folders needed for IBL result.merge(addFolders(inputFlags, ['/Indet/IBLDist'], 'INDET_OFL')) return result
def SCT_ConfigurationConditionsToolCfg(flags, name="SCT_ConfigurationConditionsTool", cond_kwargs={}, **kwargs): cond_kwargs.setdefault("ChannelFolder", "/SCT/DAQ/Config/Chip") cond_kwargs.setdefault("ModuleFolder", "/SCT/DAQ/Config/Module") cond_kwargs.setdefault("MurFolder", "/SCT/DAQ/Config/MUR") cond_kwargs.setdefault("dbInstance", "SCT") cond_kwargs.setdefault("SCT_ConfigurationCondAlgName", "SCT_ConfigurationCondAlg") result = ComponentAccumulator() if 'ChannelFolderDB' not in cond_kwargs: result.merge( addFoldersSplitOnline(flags, detDb=cond_kwargs['dbInstance'], online_folders=cond_kwargs["ChannelFolder"], offline_folders=cond_kwargs["ChannelFolder"], className='CondAttrListVec', splitMC=True)) else: result.merge( addFolders(flags, [cond_kwargs["ChannelFolderDB"]], detDb=cond_kwargs['dbInstance'], className='CondAttrListVec')) if 'ModuleFolderDB' not in cond_kwargs: result.merge( addFoldersSplitOnline(flags, detDb=cond_kwargs['dbInstance'], online_folders=cond_kwargs["ModuleFolder"], offline_folders=cond_kwargs["ModuleFolder"], className='CondAttrListVec', splitMC=True)) else: result.merge( addFolders(flags, [cond_kwargs["ModuleFolderDB"]], detDb=cond_kwargs['dbInstance'], className='CondAttrListVec')) if 'MurFolderDB' not in cond_kwargs: result.merge( addFoldersSplitOnline(flags, detDb=cond_kwargs['dbInstance'], online_folders=cond_kwargs["MurFolder"], offline_folders=cond_kwargs["MurFolder"], className='CondAttrListVec', splitMC=True)) else: result.merge( addFolders(flags, [cond_kwargs["MurFolderDB"]], detDb=cond_kwargs['dbInstance'], className='CondAttrListVec')) ConfigCondAlg_kwargs = {} ConfigCondAlg_kwargs["ReadKeyChannel"] = cond_kwargs["ChannelFolder"] ConfigCondAlg_kwargs["ReadKeyModule"] = cond_kwargs["ModuleFolder"] ConfigCondAlg_kwargs["ReadKeyMur"] = cond_kwargs["MurFolder"] result.merge( SCT_ConfigurationCondAlgCfg(flags, name="SCT_ConfigurationCondAlg", **ConfigCondAlg_kwargs)) tool = CompFactory.SCT_ConfigurationConditionsTool(name, **kwargs) result.setPrivateTools(tool) return result
def TRTMonitoringRun3ESD_AlgConfig(inputFlags): '''Function to configures some algorithms in the monitoring system.''' from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator result = ComponentAccumulator() from TrkConfig.TrackCollectionReadConfig import TrackCollectionReadCfg result.merge (TrackCollectionReadCfg (inputFlags, 'CombinedInDetTracks')) result.merge (TrackCollectionReadCfg (inputFlags, 'Tracks')) from AthenaMonitoring import AthMonitorCfgHelper helper = AthMonitorCfgHelper(inputFlags, 'TRTMonitoringCfg') from AthenaConfiguration.ComponentFactory import CompFactory algTRTMonitoringRun3ESD = helper.addAlgorithm(CompFactory.TRTMonitoringRun3ESD_Alg, 'AlgTRTMonitoringRun3') from AtlasGeoModel.AtlasGeoModelConfig import AtlasGeometryCfg result.merge(AtlasGeometryCfg(inputFlags)) from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline result.merge(addFoldersSplitOnline(inputFlags, "TRT","/TRT/Onl/Calib/errors2d","/TRT/Calib/errors2d",className="TRTCond::RtRelationMultChanContainer")) result.merge(addFoldersSplitOnline(inputFlags, "TRT","/TRT/Onl/Calib/slopes","/TRT/Calib/slopes",className="TRTCond::RtRelationMultChanContainer")) result.merge(addFoldersSplitOnline(inputFlags, "TRT","/TRT/Onl/Calib/RT","/TRT/Calib/RT",className="TRTCond::RtRelationMultChanContainer")) result.merge(addFoldersSplitOnline(inputFlags, "TRT","/TRT/Onl/Calib/T0","/TRT/Calib/T0",className="TRTCond::StrawT0MultChanContainer")) ############################## WORKAROUND (START) ########################## from SCT_Monitoring.TrackSummaryToolWorkaround import TrackSummaryToolWorkaround algTRTMonitoringRun3ESD.TrackSummaryTool = result.popToolsAndMerge(TrackSummaryToolWorkaround(inputFlags)) ############################## WORKAROUND (END) ############################ barrelOrEndcap = ('Barrel', 'EndCap') beId = ('B', 'E') sideId = ('A', 'C') strawMax = (1642, 3840) iChipMax = (104, 240) numberOfStacks = (32, 32) distToStraw = 0.4 nPhiBins = 360 minTRTHits = 10 for ibe in range(2): oss_distance = distToStraw distance = str(oss_distance) regionTag = ' (' + barrelOrEndcap[ibe] + ')' for i in range(numberOfStacks[ibe]*2): trackGroup = helper.addGroup(algTRTMonitoringRun3ESD,'TRTTrackHistograms{0}{1}'.format(ibe,i)) nBarrelModules = 0 if ibe == 0: if i < numberOfStacks[ibe]: nBarrelModules = i + 1 oss = 'TRT/Barrel/Stack{0}A'.format(nBarrelModules) elif i >= numberOfStacks[ibe]: nBarrelModules = i + 1 - 32 oss = 'TRT/Barrel/Stack{0}C'.format(nBarrelModules) elif ibe == 1: if i < numberOfStacks[ibe]: nBarrelModules = i + 1 oss = 'TRT/EndcapA/Sector{0}'.format(nBarrelModules) elif i >= numberOfStacks[ibe]: nBarrelModules = i + 1 - 32 oss = 'TRT/EndcapC/Sector{0}'.format(nBarrelModules) trackGroup.defineHistogram('HitTronTMapS_x,HitTronTMapS_y;hHitTronTMapS',type='TProfile',title='Mean Trailing Edge on Track: Straws;Straw Number in Stack;Time (ns)',path=oss,xbins=strawMax[ibe],xmin=0,xmax=strawMax[ibe],duration='run') trackGroup.defineHistogram('HitToTonTMapS_x,HitToTonTMapS_y;hHitToTonTMapS',type='TProfile',title='Mean ToT on Track: Straws;Straw Number in Stack;Time (ns)',path=oss,xbins=strawMax[ibe],xmin=0,xmax=strawMax[ibe],duration='run') trackGroup.defineHistogram('ValidRawDriftTimeonTrkS_x,ValidRawDriftTimeonTrkS_y;hValidRawDriftTimeonTrk',type='TProfile',title='Valid Raw Drift Time on Track: Straws;Straw Number in Stack;Time (ns)',path=oss,xbins=strawMax[ibe],xmin=0,xmax=strawMax[ibe],duration='run') trackGroup.defineHistogram('HitTronTwEPCMapS_x,HitTronTwEPCMapS_y;hHitTronTwEPCMapS',type='TProfile',title='Mean Trailing Edge on Track (with Event Phase Correction): Straws;Straw Number in Stack;Time (ns)',path=oss,xbins=strawMax[ibe],xmin=0,xmax=strawMax[ibe],duration='run') trackGroup.defineHistogram('HitTronTMapC_x,HitTronTMapC_y;hHitTronTMapC',type='TProfile',title='Mean Trailing Edge on Track: Chips;Chip Number in Stack;Time (ns)',path=oss,xbins=iChipMax[ibe],xmin=0,xmax=iChipMax[ibe],duration='run') trackGroup.defineHistogram('HitToTonTMapC_x,HitToTonTMapC_y;hHitToTonTMapC',type='TProfile',title='Chip Number in Stack;Time (ns);Chip Number in Stack;Time (ns)',path=oss,xbins=iChipMax[ibe],xmin=0,xmax=iChipMax[ibe],duration='run') trackGroup.defineHistogram('ValidRawDriftTimeonTrkC_x,ValidRawDriftTimeonTrkC_y;hValidRawDriftTimeonTrkC',type='TProfile',title='Valid Raw Drift Time on Track: Chips;Chip Number in Stack;Time (ns)',path=oss,xbins=iChipMax[ibe],xmin=0,xmax=iChipMax[ibe],duration='run') trackGroup.defineHistogram('HitTronTwEPCMapC_x,HitTronTwEPCMapC_y;hHitTronTwEPCMapC',type='TProfile',title='Mean Trailing Edge on Track (with Event Phase Correction): Chips;Chip Number in Stack;Time (ns)',path=oss,xbins=iChipMax[ibe],xmin=0,xmax=iChipMax[ibe],duration='run') # Arrays for Aging gas = ('in_A', 'in_B', 'out_A', 'out_B') Mod = ('1', '2', '3', 'shortP', 'shortN') for ibe in range(2): shiftTrackGroup = helper.addGroup(algTRTMonitoringRun3ESD,'ShiftTRTTrackHistograms{0}'.format(ibe)) regionTag = ' (' + barrelOrEndcap[ibe] + ')' if ibe == 0: shiftTrackGroup.defineHistogram('EvtPhase;hEvtPhase',type='TH1F',title='Event Phase Correction Factor;Event Phase (ns);Entries',path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-50,xmax=50) shiftTrackGroup.defineHistogram('EvtPhaseVsTrig_x,EvtPhaseVsTrig_y;hEvtPhaseVsTrig',type='TH2F',title='Event Phase vs L1 Trigger Item;Event Phase (ns);L1 Trigger Item',path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=300,xmin=-200,xmax=100,ybins=256,ymin=-0.5,ymax=255.5,duration='run') shiftTrackGroup.defineHistogram('EvtPhaseDetPhi_B_x,EvtPhaseDetPhi_B_y;hEvtPhaseDetPhi',type='TProfile',title='Event Phase vs #phi (2D){0};#phi (deg);Event Phase from Tracks per Event'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=nPhiBins,xmin=0.,xmax=360.,duration='run') shiftTrackGroup.defineHistogram('RtRelation_B_x,RtRelation_B_y;hrtRelation',type='TH2F',title='R(t) Relation for Xenon Straws{0};Measured Leading Edge (ns);Track-to-Wire Distance (mm)'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=30,xmin=-12.5,xmax=81.25,ybins=50,ymin=0.,ymax=2.5,duration='run') shiftTrackGroup.defineHistogram('NumHoTDetPhi_B_x,NumHoTDetPhi_B_y;hNumHoTDetPhi',type='TProfile',title='Number of Hits per Track with {0} mm Cut vs #phi{1};#phi (deg);Hits per Track, TRT Hits >= {2}'.format(distance,regionTag,minTRTHits),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=nPhiBins,xmin=0.,xmax=360.,duration='run') shiftTrackGroup.defineHistogram('TronTDist_B;hTronTDist',type='TH1F',title='Trailing Edge Distribution on Track for Xenon Straws{0};Trailing Edge (ns);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=26,xmin=-0.5,xmax=80.75,duration='run') shiftTrackGroup.defineHistogram('DriftTimeonTrkDist_B;hDriftTimeonTrkDist',type='TH1F',title='Drift Time Distribution on Track for Xenon Straws{0};Drift Time (ns);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=32,xmin=0,xmax=100,duration='run') shiftTrackGroup.defineHistogram('NumTrksDetPhi_B;hNumTrksDetPhi_B',type='TH1F',title='Number of Reconstructed Tracks vs #phi (2D){0};#phi (deg);Number of Tracks'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=60,xmin=0,xmax=360,duration='run') shiftTrackGroup.defineHistogram('DriftTimeonTrkDist_B_Ar;hDriftTimeonTrkDist_Ar',type='TH1F',title='Drift Time Distribution on Track for Argon Straws{0};Drift Time (ns);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=32,xmin=0,xmax=100,duration='run') shiftTrackGroup.defineHistogram('TronTDist_B_Ar;hTronTDist_Ar',type='TH1F',title='Trailing Edge Distribution on Track for Argon Straws{0};Trailing Edge (ns);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=26,xmin=-0.5,xmax=80.75,duration='run') shiftTrackGroup.defineHistogram('RtRelation_B_Ar_x,RtRelation_B_Ar_y;hrtRelation_Ar',type='TH2F',title='R(t) Relation for Argon Straws{0};Measured Leading Edge (ns);Track-to-Wire Distance (mm)'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=30,xmin=-12.5,xmax=81.25,ybins=50,ymin=0,ymax=2.5,duration='run') shiftTrackGroup.defineHistogram('Pull_Biased_Barrel;hPull_Biased_Barrel',type='TH1F',title='Biased Track Pulls for Barrel Hits;Pulls;Entries',path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') shiftTrackGroup.defineHistogram('Residual_B_Ar;hResidual_Ar',type='TH1F',title='Residuals for Argon Straws{0};Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='lowStat') shiftTrackGroup.defineHistogram('Residual_B_Ar;hResidual_Ar',type='TH1F',title='Residuals for Argon Straws{0};Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') shiftTrackGroup.defineHistogram('Residual_B_Ar_20GeV;hResidual_Ar_20GeV',type='TH1F',title='Residuals for Argon Straws{0} (After 20GeV pT cut);Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') shiftTrackGroup.defineHistogram('AvgTroTDetPhi_B_Ar_x,AvgTroTDetPhi_B_Ar_y;hAvgTroTDetPhi_Ar',type='TProfile',title='Avg. Trailing Edge on Track vs #phi (2D) for Argon{0};#phi (deg);Trailing Edge (ns)'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=nPhiBins,xmin=0,xmax=360,duration='run') shiftTrackGroup.defineHistogram('TimeResidual_B_Ar;hTimeResidual_Ar',type='TH1F',title='Time Residuals for Argon Straws{0};Time Residual (ns);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-20,xmax=20,duration='run') shiftTrackGroup.defineHistogram('WireToTrkPosition_B_Ar;hWireToTrkPosition_Ar',type='TH1F',title='Track-to-Wire Distance for Argon{0};Track-to-Wire Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=100,xmin=-5,xmax=5,duration='run') shiftTrackGroup.defineHistogram('Residual_B;hResidual_Xe',type='TH1F',title='Residuals for Xenon Straws{0};Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='lowStat') shiftTrackGroup.defineHistogram('Residual_B;hResidual_Xe',type='TH1F',title='Residuals for Xenon Straws{0};Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') shiftTrackGroup.defineHistogram('Residual_B_20GeV;hResidual_Xe_20GeV',type='TH1F',title='Residuals for Xenon Straws{0} (After 20GeV pT cut);Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') shiftTrackGroup.defineHistogram('TimeResidual_B;hTimeResidual',type='TH1F',title='Time Residuals for Xenon Straws{0};Time Residual (ns);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-20,xmax=20,duration='run') shiftTrackGroup.defineHistogram('WireToTrkPosition_B;hWireToTrkPosition',type='TH1F',title='Track-to-Wire Distance for Xenon{0};Track-to-Wire Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=100,xmin=-5,xmax=5,duration='run') shiftTrackGroup.defineHistogram('AvgTroTDetPhi_B_x,AvgTroTDetPhi_B_y;hAvgTroTDetPhi',type='TProfile',title='Avg. Trailing Edge on Track vs #phi (2D) for Xenon{0};#phi (deg);Trailing Edge (ns)'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=nPhiBins,xmin=0,xmax=360,duration='run') elif ibe == 1: shiftTrackGroup.defineHistogram('Pull_Biased_EndCap;hPull_Biased_EndCap',type='TH1F',title='Biased Track Pulls for EndCap Hits;Pulls;Entries',path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') for iside in range(2): regionTag = ' (' + beId[ibe] + sideId[iside] + ')' shiftTrackEndcapGroup = helper.addGroup(algTRTMonitoringRun3ESD,'ShiftTRTTrackHistograms{0}{1}'.format(ibe,iside)) shiftTrackEndcapGroup.defineHistogram('EvtPhaseDetPhi_E_x,EvtPhaseDetPhi_E_y;hEvtPhaseDetPhi_{0}'.format(sideId[iside]),type='TProfile',title='Event Phase vs #phi (2D){0};#phi (deg);Event Phase from Tracks per Event'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=nPhiBins,xmin=0,xmax=360,duration='run') shiftTrackEndcapGroup.defineHistogram('RtRelation_E_x,RtRelation_E_y;hrtRelation_{0}'.format(sideId[iside]),type='TH2F',title='R(t) Relation for Xenon Straws{0};Measured Leading Edge (ns);Track-to-Wire Distance (mm)'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=30,xmin=-12.5,xmax=81.25,ybins=50,ymin=0,ymax=2.5,duration='run') shiftTrackEndcapGroup.defineHistogram('NumHoTDetPhi_E_x,NumHoTDetPhi_E_y;hNumHoTDetPhi_{0}'.format(sideId[iside]),type='TProfile',title='Number of Hits per Track with {0} mm Cut vs #phi{1};#phi (deg);Hits per Track, TRT Hits> = {2}'.format(distance,regionTag,minTRTHits),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=nPhiBins,xmin=0,xmax=360,duration='run') shiftTrackEndcapGroup.defineHistogram('TronTDist_E;hTronTDist_{0}'.format(sideId[iside]),type='TH1F',title='Trailing Edge Distribution on Track for Xenon Straws{0};Trailing Edge (ns);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=26,xmin=-0.5,xmax=80.75,duration='run') shiftTrackEndcapGroup.defineHistogram('DriftTimeonTrkDist_E;hDriftTimeonTrkDist_{0}'.format(sideId[iside]),type='TH1F',title='Drift Time Distribution on Track for Xenon Straws{0};Drift Time (ns);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=32,xmin=0,xmax=100,duration='run') shiftTrackEndcapGroup.defineHistogram('NumTrksDetPhi_E;hNumTrksDetPhi_{0}'.format(sideId[iside]),type='TH1F',title='Number of Reconstructed Tracks vs #phi (2D){0};#phi (deg);Number of Tracks'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=60,xmin=0,xmax=360,duration='run') shiftTrackEndcapGroup.defineHistogram('Residual_E;hResidual_Xe_{0}'.format(sideId[iside]),type='TH1F',title='Residuals for Xenon Straws{0};Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='lowStat') shiftTrackEndcapGroup.defineHistogram('Residual_E;hResidual_Xe_{0}'.format(sideId[iside]),type='TH1F',title='Residuals for Xenon Straws{0};Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') shiftTrackEndcapGroup.defineHistogram('Residual_E_20GeV;hResidual_Xe_{0}_20GeV'.format(sideId[iside]),type='TH1F',title='Residuals for Xenon Straws{0} (After 20GeV pT cut);Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') shiftTrackEndcapGroup.defineHistogram('TimeResidual_E;hTimeResidual_{0}'.format(sideId[iside]),type='TH1F',title='Time Residuals for Xenon Straws{0};Time Residual (ns);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-20,xmax=20,duration='run') shiftTrackEndcapGroup.defineHistogram('TronTDist_E_Ar;hTronTDist_Ar_{0}'.format(sideId[iside]),type='TH1F',title='Trailing Edge Distribution on Track for Argon Straws{0};Trailing Edge (ns);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=26,xmin=-0.5,xmax=80.75,duration='run') shiftTrackEndcapGroup.defineHistogram('AvgTroTDetPhi_E_Ar_x,AvgTroTDetPhi_E_Ar_y;hAvgTroTDetPhi_Ar_{0}'.format(sideId[iside]),type='TProfile',title='Avg. Trailing Edge on Track vs #phi (2D) for Argon{0};#phi (deg);Trailing Edge (ns)'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=nPhiBins,xmin=0,xmax=360,duration='run') shiftTrackEndcapGroup.defineHistogram('RtRelation_E_Ar_x,RtRelation_E_Ar_y;hrtRelation_Ar_{0}'.format(sideId[iside]),type='TH2F',title='R(t) Relation for Argon Straws{0};Measured Leading Edge (ns);Track-to-Wire Distance (mm)'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=30,xmin=-12.5,xmax=81.25,ybins=50,ymin=0,ymax=2.5,duration='run') shiftTrackEndcapGroup.defineHistogram('DriftTimeonTrkDist_E_Ar;hDriftTimeonTrkDist_Ar_{0}'.format(sideId[iside]),type='TH1F',title='Drift Time Distribution on Track for Argon Straws{0};Drift Time (ns);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=32,xmin=0,xmax=100,duration='run') shiftTrackEndcapGroup.defineHistogram('Residual_E_Ar;hResidual_Ar_{0}'.format(sideId[iside]),type='TH1F',title='Residuals for Argon Straws{0};Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='lowStat') shiftTrackEndcapGroup.defineHistogram('Residual_E_Ar;hResidual_Ar_{0}'.format(sideId[iside]),type='TH1F',title='Residuals for Argon Straws{0};Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') shiftTrackEndcapGroup.defineHistogram('Residual_E_Ar_20GeV;hResidual_Ar_{0}_20GeV'.format(sideId[iside]),type='TH1F',title='Residuals for Argon Straws{0} (After 20GeV pT cut);Hit-to-Track Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-2.5,xmax=2.5,duration='run') shiftTrackEndcapGroup.defineHistogram('TimeResidual_E_Ar;hTimeResidual_Ar_{0}'.format(sideId[iside]),type='TH1F',title='Time Residuals for Argon Straws{0};Time Residual (ns);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=200,xmin=-20,xmax=20,duration='run') shiftTrackEndcapGroup.defineHistogram('WireToTrkPosition_E_Ar;hWireToTrkPosition_Ar_{0}'.format(sideId[iside]),type='TH1F',title='Track-to-Wire Distance for Argon{0};Track-to-Wire Distance (mm);Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=100,xmin=-5,xmax=5,duration='run') shiftTrackEndcapGroup.defineHistogram('WireToTrkPosition_E;hWireToTrkPosition_{0}'.format(sideId[iside]),type='TH1F',title='Track-to-Wire Distance for Xenon{0};Track-to-Wire Distance (mm);Norm. Entries'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=100,xmin=-5,xmax=5,duration='run') shiftTrackEndcapGroup.defineHistogram('AvgTroTDetPhi_E_x,AvgTroTDetPhi_E_y;hAvgTroTDetPhi_{0}'.format(sideId[iside]),type='TProfile',title='Avg. Trailing Edge on Track vs #phi (2D) for Xenon{0};#phi (deg);Trailing Edge (ns)'.format(regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=nPhiBins,xmin=0,xmax=360,duration='run') #Initialize Aging plots for iL in range(5): for iSide in range(2): if ibe == 0: if iL < 3: agingGroup = helper.addGroup(algTRTMonitoringRun3ESD,'TRTAgingHistograms0{0}{1}'.format(iL,iSide)) agingGroup.defineHistogram('Trackz_All;trackz_m{0}_{1}_All'.format(Mod[iL],sideId[iSide]),type='TH1F',title='Number All Hits side {0} Layer {1};z [mm];Number of Hits'.format(sideId[iSide],Mod[iL]),path='TRT/Aging/{0}'.format(barrelOrEndcap[ibe]),xbins=30,xmin=-750.,xmax=750.,duration='run') agingGroup.defineHistogram('Trackz_All;trackz_m{0}_{1}_All'.format(Mod[iL],sideId[iSide]),type='TH1F',title='Number All Hits side {0} Layer {1};z [mm];Number of Hits'.format(sideId[iSide],Mod[iL]),path='TRT/Aging/{0}'.format(barrelOrEndcap[ibe]),xbins=30,xmin=-750.,xmax=750.,duration='lowStat') agingGroup.defineHistogram('Trackz_HT;trackz_m{0}_{1}_HT'.format(Mod[iL],sideId[iSide]),type='TH1F',title='Number HT Hits side {0} Layer {1};z [mm];Number of HT Hits'.format(sideId[iSide],Mod[iL]),path='TRT/Aging/{0}'.format(barrelOrEndcap[ibe]),xbins=30,xmin=-750.,xmax=750.,duration='run') agingGroup.defineHistogram('Trackz_HT;trackz_m{0}_{1}_HT'.format(Mod[iL],sideId[iSide]),type='TH1F',title='Number HT Hits side {0} Layer {1};z [mm];Number of HT Hits'.format(sideId[iSide],Mod[iL]),path='TRT/Aging/{0}'.format(barrelOrEndcap[ibe]),xbins=30,xmin=-750.,xmax=750.,duration='lowStat') if iL == 3: agingGroup = helper.addGroup(algTRTMonitoringRun3ESD,'TRTAgingHistograms03{0}'.format(iSide)) agingGroup.defineHistogram('Trackz_All;trackz_m1_{0}_All_{1}'.format(sideId[iSide],Mod[iL]),type='TH1F',title='Number All Hits side {0} Layer 1 {1};z [mm];Number of Hits'.format(sideId[iSide],Mod[iL]),path='TRT/Aging/{0}'.format(barrelOrEndcap[ibe]),xbins=30,xmin=0.,xmax=725.,duration='run') agingGroup.defineHistogram('Trackz_All;trackz_m1_{0}_All_{1}'.format(sideId[iSide],Mod[iL]),type='TH1F',title='Number All Hits side {0} Layer 1 {1};z [mm];Number of Hits'.format(sideId[iSide],Mod[iL]),path='TRT/Aging/{0}'.format(barrelOrEndcap[ibe]),xbins=30,xmin=0.,xmax=725.,duration='lowStat') agingGroup.defineHistogram('Trackz_HT;trackz_m1_{0}_HT_{1}'.format(sideId[iSide],Mod[iL]),type='TH1F',title='Number HT Hits side {0} Layer 1 {1};z [mm];Number of HT Hits'.format(sideId[iSide],Mod[iL]),path='TRT/Aging/{0}'.format(barrelOrEndcap[ibe]),xbins=30,xmin=0.,xmax=725.,duration='run') agingGroup.defineHistogram('Trackz_HT;trackz_m1_{0}_HT_{1}'.format(sideId[iSide],Mod[iL]),type='TH1F',title='Number HT Hits side {0} Layer 1 {1};z [mm];Number of HT Hits'.format(sideId[iSide],Mod[iL]),path='TRT/Aging/{0}'.format(barrelOrEndcap[ibe]),xbins=30,xmin=0.,xmax=725.,duration='lowStat') if iL == 4: agingGroup = helper.addGroup(algTRTMonitoringRun3ESD,'TRTAgingHistograms04{0}'.format(iSide)) agingGroup.defineHistogram('Trackz_All;trackz_m1_{0}_All_{1}'.format(sideId[iSide],Mod[iL]),type='TH1F',title='Number All Hits side {0} Layer 1 {1};z [mm];Number of Hits'.format(sideId[iSide],Mod[iL]),path='TRT/Aging/{0}'.format(barrelOrEndcap[ibe]),xbins=30,xmin=-725.,xmax=0.,duration='run') agingGroup.defineHistogram('Trackz_All;trackz_m1_{0}_All_{1}'.format(sideId[iSide],Mod[iL]),type='TH1F',title='Number All Hits side {0} Layer 1 {1};z [mm];Number of Hits'.format(sideId[iSide],Mod[iL]),path='TRT/Aging/{0}'.format(barrelOrEndcap[ibe]),xbins=30,xmin=-725.,xmax=0.,duration='lowStat') agingGroup.defineHistogram('Trackz_HT;trackz_m1_{0}_HT_{1}'.format(sideId[iSide],Mod[iL]),type='TH1F',title='Number HT Hits side {0} Layer 1 {1};z [mm];Number of HT Hits'.format(sideId[iSide],Mod[iL]),path='TRT/Aging/{0}'.format(barrelOrEndcap[ibe]),xbins=30,xmin=-725.,xmax=0.,duration='run') agingGroup.defineHistogram('Trackz_HT;trackz_m1_{0}_HT_{1}'.format(sideId[iSide],Mod[iL]),type='TH1F',title='Number HT Hits side {0} Layer 1 {1};z [mm];Number of HT Hits'.format(sideId[iSide],Mod[iL]),path='TRT/Aging/{0}'.format(barrelOrEndcap[ibe]),xbins=30,xmin=-725.,xmax=0.,duration='lowStat') elif ibe == 1: # prevent double booking of histograms here if iL < 4: agingGroup = helper.addGroup(algTRTMonitoringRun3ESD,'TRTAgingHistograms1{0}{1}'.format(iL,iSide)) agingGroup.defineHistogram('Trackr_All;trackr_E{0}_{1}_All'.format(sideId[iSide],gas[iL]),type='TH1F',title='Number All Hits E{0} {1};r [mm];Number of Hits'.format(sideId[iSide],gas[iL]),path='TRT/Aging/{0}'.format(barrelOrEndcap[ibe]),xbins=30,xmin=644.,xmax=1004.,duration='run') agingGroup.defineHistogram('Trackr_All;trackr_E{0}_{1}_All'.format(sideId[iSide],gas[iL]),type='TH1F',title='Number All Hits E{0} {1};r [mm];Number of Hits'.format(sideId[iSide],gas[iL]),path='TRT/Aging/{0}'.format(barrelOrEndcap[ibe]),xbins=30,xmin=644.,xmax=1004.,duration='lowStat') agingGroup.defineHistogram('Trackr_HT;trackr_E{0}_{1}_HT'.format(sideId[iSide],gas[iL]),type='TH1F',title='Number HT Hits E{0} {1};r [mm];Number of HT Hits'.format(sideId[iSide],gas[iL]),path='TRT/Aging/{0}'.format(barrelOrEndcap[ibe]),xbins=30,xmin=644.,xmax=1004.,duration='run') agingGroup.defineHistogram('Trackr_HT;trackr_E{0}_{1}_HT'.format(sideId[iSide],gas[iL]),type='TH1F',title='Number HT Hits E{0} {1};r [mm];Number of HT Hits'.format(sideId[iSide],gas[iL]),path='TRT/Aging/{0}'.format(barrelOrEndcap[ibe]),xbins=30,xmin=644.,xmax=1004.,duration='lowStat') acc = helper.result() result.merge(acc) return result
def TRT_GeometryCfg( flags ): from AtlasGeoModel.GeoModelConfig import GeoModelCfg acc = GeoModelCfg( flags ) geoModelSvc=acc.getPrimary() GeometryDBSvc=CompFactory.GeometryDBSvc acc.addService(GeometryDBSvc("InDetGeometryDBSvc")) TRT_DetectorTool=CompFactory.TRT_DetectorTool trtDetectorTool = TRT_DetectorTool() trtDetectorTool.useDynamicAlignFolders = flags.GeoModel.Align.Dynamic geoModelSvc.DetectorTools += [ trtDetectorTool ] acc.addService(geoModelSvc) # Inner Detector alignment acc.merge(addFoldersSplitOnline(flags,"TRT","/TRT/Onl/Calib/DX","/TRT/Calib/DX")) if flags.Detector.SimulateTRT: # revert to old style CondHandle in case of simulation # Dead/Noisy Straw Lists acc.merge(addFoldersSplitOnline(flags, "TRT","/TRT/Onl/Cond/Status","/TRT/Cond/Status")) acc.merge(addFoldersSplitOnline(flags, "TRT","/TRT/Onl/Cond/StatusPermanent","/TRT/Cond/StatusPermanent")) # Argon straw list acc.merge(addFoldersSplitOnline(flags, "TRT","/TRT/Onl/Cond/StatusHT","/TRT/Cond/StatusHT")) else: # Dead/Noisy Straw Lists acc.merge(addFoldersSplitOnline(flags, "TRT","/TRT/Onl/Cond/Status","/TRT/Cond/Status",className='TRTCond::StrawStatusMultChanContainer')) acc.merge(addFoldersSplitOnline(flags, "TRT","/TRT/Onl/Cond/StatusPermanent","/TRT/Cond/StatusPermanent",className='TRTCond::StrawStatusMultChanContainer')) # Argon straw list acc.merge(addFoldersSplitOnline(flags, "TRT","/TRT/Onl/Cond/StatusHT","/TRT/Cond/StatusHT",className='TRTCond::StrawStatusMultChanContainer')) # TRT Condition Algorithm TRTAlignCondAlg=CompFactory.TRTAlignCondAlg TRTAlignCondAlg = TRTAlignCondAlg(name = "TRTAlignCondAlg", UseDynamicFolders = flags.GeoModel.Align.Dynamic) if flags.GeoModel.Align.Dynamic: acc.merge(addFoldersSplitOnline(flags,"TRT","/TRT/Onl/AlignL1/TRT","/TRT/AlignL1/TRT",className="CondAttrListCollection")) acc.merge(addFoldersSplitOnline(flags,"TRT","/TRT/Onl/AlignL2","/TRT/AlignL2",className="AlignableTransformContainer")) TRTAlignCondAlg.ReadKeyDynamicGlobal = "/TRT/AlignL1/TRT" TRTAlignCondAlg.ReadKeyDynamicRegular = "/TRT/AlignL2" else: if (not flags.Detector.SimulateTRT) or flags.Detector.OverlayTRT: acc.merge(addFoldersSplitOnline(flags,"TRT","/TRT/Onl/Align","/TRT/Align",className="AlignableTransformContainer")) else: acc.merge(addFoldersSplitOnline(flags,"TRT","/TRT/Onl/Align","/TRT/Align")) if flags.Common.Project != "AthSimulation": # Protection for AthSimulation builds if (not flags.Detector.SimulateTRT) or flags.Detector.OverlayTRT: acc.addCondAlgo(TRTAlignCondAlg) return acc