Verified Commit 2b55c400 authored by Tadej Novak's avatar Tadej Novak
Browse files

Cleanup TRT geometry configuration (CA)

parent 0af0f257
......@@ -20,7 +20,7 @@ def createGeoModelConfigFlags():
gcf.addFlag("GeoModel.Align.LegacyConditionsAccess",
lambda prevFlags : prevFlags.Common.Project == "AthSimulation" or prevFlags.Common.ProductionStep == ProductionStep.Simulation)
# Mainly for G4 which still loads alignment on initialize
# Mainly for G4 which still loads alignment on initialize
gcf.addFlag("GeoModel.StripGeoType",
lambda prevFlags : DetDescrInfo(prevFlags.GeoModel.AtlasVersion)['Common']['StripGeoType'])
......
......@@ -61,8 +61,8 @@ def TPCnvTest(infile, keys, useGeoModelSvc=False, useIOVDbSvc=False, doPixel=Fal
from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg
acc.merge(SCT_ReadoutGeometryCfg(ConfigFlags))
if ConfigFlags.Detector.GeometryTRT:
from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
acc.merge(TRT_GeometryCfg(ConfigFlags))
from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg
acc.merge(TRT_ReadoutGeometryCfg(ConfigFlags))
if ConfigFlags.Detector.GeometryITkPixel:
from PixelGeoModelXml.ITkPixelGeoModelConfig import ITkPixelReadoutGeometryCfg
acc.merge(ITkPixelReadoutGeometryCfg(ConfigFlags))
......
......@@ -15,13 +15,15 @@ def AtlasGeometryCfg (flags):
acc.merge(PixelSimulationGeometryCfg(flags))
from SCT_GeoModel.SCT_GeoModelConfig import SCT_SimulationGeometryCfg
acc.merge(SCT_SimulationGeometryCfg(flags))
from TRT_GeoModel.TRT_GeoModelConfig import TRT_SimulationGeometryCfg
acc.merge(TRT_SimulationGeometryCfg(flags))
else:
from PixelGeoModel.PixelGeoModelConfig import PixelReadoutGeometryCfg
acc.merge(PixelReadoutGeometryCfg(flags))
from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg
acc.merge(SCT_ReadoutGeometryCfg(flags))
from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
acc.merge(TRT_GeometryCfg(flags))
from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg
acc.merge(TRT_ReadoutGeometryCfg(flags))
from InDetServMatGeoModel.InDetServMatGeoModelConfig import InDetServiceMaterialCfg
acc.merge(InDetServiceMaterialCfg(flags))
from LArGeoAlgsNV.LArGMConfig import LArGMCfg
......
......@@ -83,8 +83,8 @@ if __name__ == "__main__":
cfg.merge(SCT_ReadoutGeometryCfg(ConfigFlags))
if ConfigFlags.Detector.GeometryTRT:
from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
cfg.merge(TRT_GeometryCfg(ConfigFlags))
from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg
cfg.merge(TRT_ReadoutGeometryCfg(ConfigFlags))
if ConfigFlags.Detector.GeometryITkPixel:
from PixelGeoModelXml.ITkPixelGeoModelConfig import ITkPixelReadoutGeometryCfg
......
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( TRT_ConditionsAlgs )
......@@ -13,3 +13,6 @@ atlas_add_component( TRT_ConditionsAlgs
src/components/*.cxx
INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS}
LINK_LIBRARIES LINK_LIBRARIES ${CORAL_LIBRARIES} ${COOL_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities DetDescrConditions GaudiKernel GeoModelUtilities GeoPrimitives InDetIdentifier StoreGateLib TRT_ConditionsData TRT_ConditionsServicesLib TRT_ReadoutGeometry )
# Install files from the package:
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
def TRTAlignCondAlgCfg(flags, name="TRTAlignCondAlg", **kwargs):
"""Return a ComponentAccumulator for TRTAlignCondAlg algorithm"""
from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeoModelCfg
acc = TRT_GeoModelCfg(flags)
acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Calib/DX", "/TRT/Calib/DX"))
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"))
kwargs.setdefault("ReadKeyDynamicGlobal", "/TRT/AlignL1/TRT")
kwargs.setdefault("ReadKeyDynamicRegular", "/TRT/AlignL2")
else:
acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Align", "/TRT/Align", className="AlignableTransformContainer"))
kwargs.setdefault("UseDynamicFolders", flags.GeoModel.Align.Dynamic)
acc.addCondAlgo(CompFactory.TRTAlignCondAlg(name, **kwargs))
return acc
def TRTStrawCondAlgCfg(flags, name="TRTStrawCondAlg", **kwargs):
"""Return a ComponentAccumulator for TRTStrawCondAlg algorithm"""
acc = TRTAlignCondAlgCfg(flags)
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_StrawStatusSummaryToolCfg
StrawStatusTool = acc.popToolsAndMerge(TRT_StrawStatusSummaryToolCfg(flags))
acc.addPublicTool(StrawStatusTool) # public as it is has many clients to save some memory
acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Cond/Status", "/TRT/Cond/Status", className="TRTCond::StrawStatusMultChanContainer"))
kwargs.setdefault("TRTStrawStatusSummaryTool", StrawStatusTool)
# Alive straws algorithm
acc.addCondAlgo(CompFactory.TRTStrawCondAlg(name, **kwargs))
return acc
def TRTActiveCondAlgCfg(flags, name="TRTActiveCondAlg", **kwargs):
"""Return a ComponentAccumulator for TRTActiveCondAlg algorithm"""
acc = TRTAlignCondAlgCfg(flags)
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_StrawStatusSummaryToolCfg
StrawStatusTool = acc.popToolsAndMerge(TRT_StrawStatusSummaryToolCfg(flags))
acc.addPublicTool(StrawStatusTool) # public as it is has many clients to save some memory
acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Cond/Status", "/TRT/Cond/Status", className="TRTCond::StrawStatusMultChanContainer"))
kwargs.setdefault("TRTStrawStatusSummaryTool", StrawStatusTool)
acc.addCondAlgo(CompFactory.TRTActiveCondAlg(name, **kwargs))
return acc
def TRTPhaseCondCfg(flags, name="TRTPhaseCondAlg", **kwargs):
"""Return a ComponentAccumulator for TRTPhaseCondAlg algorithm"""
acc = ComponentAccumulator()
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_CalDbToolCfg
CalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
acc.addPublicTool(CalDbTool) # public as it is has many clients to save some memory
kwargs.setdefault("TRTCalDbTool", CalDbTool)
# Average T0 CondAlg
acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Calib/T0", "/TRT/Calib/T0",
className='TRTCond::StrawT0MultChanContainer'))
acc.addCondAlgo(CompFactory.TRTPhaseCondAlg(name, **kwargs))
return acc
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#include "TRTStrawCondAlg.h"
......@@ -9,11 +9,8 @@ TRTStrawCondAlg::TRTStrawCondAlg(const std::string& name
, ISvcLocator* pSvcLocator )
: ::AthAlgorithm(name,pSvcLocator),
m_condSvc("CondSvc",name),
m_strawStatus("TRT_StrawStatusSummaryTool",this),
m_trtId(nullptr),
m_isGEANT4(true)
m_strawStatus("TRT_StrawStatusSummaryTool",this)
{ declareProperty("TRTStrawStatusSummaryTool",m_strawStatus);
declareProperty("isGEANT4",m_isGEANT4);
}
TRTStrawCondAlg::~TRTStrawCondAlg(){}
......
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#ifndef TRTSTRAWCONDALG_H
......@@ -38,8 +38,7 @@ class TRTStrawCondAlg : public AthAlgorithm
SG::WriteCondHandleKey<TRTCond::AliveStraws> m_strawWriteKey{this,"StrawWriteKey","AliveStraws","AliveStraws out-key"};
ToolHandle<ITRT_StrawStatusSummaryTool> m_strawStatus;
const TRT_ID *m_trtId;
bool m_isGEANT4;
const TRT_ID *m_trtId{};
};
#endif
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from AthenaCommon import CfgMgr
def getInDetTRTStrawStatusSummaryTool(name='InDetTRTStrawStatusSummaryTool', **kwargs):
return CfgMgr.TRT_StrawStatusSummaryTool(name, **kwargs)
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
def TRT_StrawStatusSummaryToolCfg(flags, name="TRT_StrawStatusSummaryTool", forceLegacyAccess=False, **kwargs):
"""Return a ComponentAccumulator for TRT_StrawStatusSummaryTool"""
acc = ComponentAccumulator()
if flags.GeoModel.Align.LegacyConditionsAccess: # revert to old style CondHandle in case of simulation
# Dead/Noisy Straw Lists not used!
# 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"))
kwargs.setdefault("isGEANT4", flags.GeoModel.Align.LegacyConditionsAccess or forceLegacyAccess)
acc.setPrivateTools(CompFactory.TRT_StrawStatusSummaryTool(name, **kwargs))
return acc
def TRT_CalDbToolCfg(flags, name="TRT_CalDbTool", **kwargs):
"""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'))
acc.setPrivateTools(CompFactory.TRT_CalDbTool(name="TRT_CalDbTool", **kwargs))
return acc
def TRT_MCCalDbToolCfg(flags, name="TRT_CalDbTool2", **kwargs):
"""Return a ComponentAccumulator for TRT_CalDbTool configured for MC in case of data overlay."""
# TODO: conditions (DataOverlay)
kwargs.setdefault("RtFolderName", "/TRT/Calib/MC/RT")
kwargs.setdefault("T0FolderName", "/TRT/Calib/MC/T0")
return TRT_CalDbToolCfg(flags, name, **kwargs)
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
from AthenaCommon.CfgGetter import addService
addService("TRT_ConditionsServices.TRT_ConditionsServicesConfig.getInDetTRTStrawStatusSummaryTool", "InDetTRTStrawStatusSummaryTool")
addService("TRT_ConditionsServices.TRT_ConditionsServicesConfigLegacy.getInDetTRTStrawStatusSummaryTool", "InDetTRTStrawStatusSummaryTool")
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
from AthenaCommon import CfgMgr
def getInDetTRTStrawStatusSummaryTool(name='InDetTRTStrawStatusSummaryTool', **kwargs):
return CfgMgr.TRT_StrawStatusSummaryTool(name, **kwargs)
......@@ -372,8 +372,8 @@ if __name__ == "__main__":
from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg
top_acc.merge(SCT_ReadoutGeometryCfg(flags))
from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
top_acc.merge(TRT_GeometryCfg( flags ))
from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg
top_acc.merge(TRT_ReadoutGeometryCfg( flags ))
from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg, MuonIdHelperSvcCfg
top_acc.merge(MuonGeoModelCfg(flags))
......@@ -405,7 +405,7 @@ if __name__ == "__main__":
top_acc.merge(TC.PixelClusterNnCondAlgCfg(flags))
top_acc.merge(TC.PixelClusterNnWithTrackCondAlgCfg(flags))
##
from InDetConfig.TRTSegmentFindingConfig import TRTActiveCondAlgCfg
from TRT_ConditionsAlgs.TRT_ConditionsAlgsConfig import TRTActiveCondAlgCfg
top_acc.merge(TRTActiveCondAlgCfg(flags))
top_acc.merge(TC.TRT_DetElementsRoadCondAlgCfg(flags))
......
......@@ -17,8 +17,8 @@ def InDetGeometryCfg (flags):
acc.merge(SCT_ReadoutGeometryCfg( flags ))
if flags.Detector.GeometryTRT:
from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
acc.merge(TRT_GeometryCfg( flags ))
from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg
acc.merge(TRT_ReadoutGeometryCfg( flags ))
if flags.Detector.GeometryPixel or flags.Detector.GeometrySCT or flags.Detector.GeometryTRT:
from InDetServMatGeoModel.InDetServMatGeoModelConfig import InDetServiceMaterialCfg
......
......@@ -192,8 +192,8 @@ if __name__ == "__main__":
top_acc.merge(PixelReadoutGeometryCfg(ConfigFlags))
top_acc.merge(SCT_ReadoutGeometryCfg(ConfigFlags))
from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
top_acc.merge(TRT_GeometryCfg( ConfigFlags ))
from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg
top_acc.merge(TRT_ReadoutGeometryCfg( ConfigFlags ))
from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg, MuonIdHelperSvcCfg
top_acc.merge(MuonGeoModelCfg(ConfigFlags))
......@@ -205,8 +205,7 @@ if __name__ == "__main__":
from PixelConditionsAlgorithms.PixelConditionsConfig import PixelDistortionAlgCfg
top_acc.merge(PixelDistortionAlgCfg(ConfigFlags))
from InDetConfig.TRTSegmentFindingConfig import TRTActiveCondAlgCfg
from TRT_ConditionsAlgs.TRT_ConditionsAlgsConfig import TRTActiveCondAlgCfg
top_acc.merge(TRTActiveCondAlgCfg(ConfigFlags))
top_acc.merge(TC.TRT_DetElementsRoadCondAlgCfg())
......
......@@ -3,17 +3,7 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
import InDetConfig.TrackingCommonConfig as TC
def TRTPhaseCondCfg(flags, name = "TRTPhaseCondAlg", **kwargs):
acc = ComponentAccumulator()
from InDetOverlay.TRT_ConditionsConfig import TRT_CalDbToolCfg
InDetTRTCalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
acc.addPublicTool(InDetTRTCalDbTool)
kwargs.setdefault("TRTCalDbTool", InDetTRTCalDbTool)
# Average T0 CondAlg
TRTPhaseCondAlg = CompFactory.TRTPhaseCondAlg(name = name, **kwargs)
acc.addCondAlgo(TRTPhaseCondAlg)
return acc
def InDetCosmicsEventPhaseToolCfg(flags, name='InDetCosmicsEventPhaseTool', **kwargs) :
#
......@@ -27,13 +17,13 @@ def InDetCosmicsEventPhaseToolCfg(flags, name='InDetCosmicsEventPhaseTool', **kw
kwargs.setdefault("GlobalOffset", 0)
else:
kwargs.setdefault("GlobalOffset", -3.125)
# CalDb tool
from InDetOverlay.TRT_ConditionsConfig import TRT_CalDbToolCfg
InDetTRTCalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
acc.addPublicTool(InDetTRTCalDbTool)
# CalDb tool
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_CalDbToolCfg
CalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
acc.addPublicTool(CalDbTool)
kwargs.setdefault("TRTCalDbTool", CalDbTool)
kwargs.setdefault("UseNewEP", True)
kwargs.setdefault("TRTCalDbTool", InDetTRTCalDbTool)
acc.setPrivateTools(CompFactory.InDet.InDetCosmicsEventPhaseTool(name = name, **kwargs))
return acc
......@@ -51,16 +41,16 @@ def InDetFixedWindowTrackTimeToolCfg(flags, name='InDetFixedWindowTrackTimeTool'
else:
kwargs.setdefault("GlobalOffset", -3.125)
# CalDb tool
from InDetOverlay.TRT_ConditionsConfig import TRT_CalDbToolCfg
InDetTRTCalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
acc.addPublicTool(InDetTRTCalDbTool)
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_CalDbToolCfg
CalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
acc.addPublicTool(CalDbTool)
cutWindowCenter = -8.5
cutWindowSize = 7
kwargs.setdefault("UseNewEP" , True)
kwargs.setdefault("WindowCenter" , cutWindowCenter)
kwargs.setdefault("WindowSize" , cutWindowSize)
kwargs.setdefault("TRTCalDbTool" , InDetTRTCalDbTool)
kwargs.setdefault("TRTCalDbTool" , CalDbTool)
acc.setPrivateTools(CompFactory.InDet.InDetFixedWindowTrackTimeTool(name = name, **kwargs))
......@@ -79,16 +69,16 @@ def InDetSlidingWindowTrackTimeToolCfg(flags, name='InDetSlidingWindowTrackTimeT
else:
kwargs.setdefault("GlobalOffset", -3.125)
# CalDb tool
from InDetOverlay.TRT_ConditionsConfig import TRT_CalDbToolCfg
InDetTRTCalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
acc.addPublicTool(InDetTRTCalDbTool)
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_CalDbToolCfg
CalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
acc.addPublicTool(CalDbTool)
numberIterations = 5
cutWindowSize = 7
kwargs.setdefault("UseNewEP" , True)
kwargs.setdefault("NumberIterations" , numberIterations)
kwargs.setdefault("WindowSize" , cutWindowSize)
kwargs.setdefault("TRTCalDbTool" , InDetTRTCalDbTool)
kwargs.setdefault("TRTCalDbTool" , CalDbTool)
acc.setPrivateTools(CompFactory.InDet.InDetSlidingWindowTrackTimeTool(name = name, **kwargs))
return acc
......@@ -112,13 +102,13 @@ def InDetCosmicsEventPhaseCfg(flags, InputTrackCollections, name = 'InDetCosmics
acc.addPublicTool(InDetTrackSummaryTool)
# CalDb tool
from InDetOverlay.TRT_ConditionsConfig import TRT_CalDbToolCfg
InDetTRTCalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
acc.addPublicTool(InDetTRTCalDbTool)
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_CalDbToolCfg
CalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
acc.addPublicTool(CalDbTool)
kwargs.setdefault("InputTracksNames" , InputTrackCollections)
kwargs.setdefault("TrackSummaryTool" , InDetTrackSummaryTool)
kwargs.setdefault("TRTCalDbTool" , InDetTRTCalDbTool)
kwargs.setdefault("TRTCalDbTool" , CalDbTool)
kwargs.setdefault("EventPhaseTool" , InDetSlidingWindowTrackTimeTool)
#kwargs.setdefault("EventPhaseTool" , InDetFixedWindowTrackTimeTool)
......@@ -135,6 +125,7 @@ def InDetCosmicsEventPhaseCfg(flags, InputTrackCollections, name = 'InDetCosmics
def TRTPhaseCfg(flags, self, InputTrackCollections = [], **kwargs):
acc = ComponentAccumulator()
if flags.Detector.EnableTRT and flags.InDet.doPRDFormation:
from TRT_ConditionsAlgs.TRT_ConditionsAlgsConfig import TRTPhaseCondCfg
acc.merge(TRTPhaseCondCfg(flags))
#
# --- calculation of the event phase from all 3 input collections
......@@ -165,8 +156,8 @@ if __name__ == "__main__":
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
top_acc.merge(PoolReadCfg(ConfigFlags))
from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
top_acc.merge(TRT_GeometryCfg( ConfigFlags ))
from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg
top_acc.merge(TRT_ReadoutGeometryCfg( ConfigFlags ))
top_acc.merge(TRTPhaseCfg(ConfigFlags, ['TRTTracks_Phase', 'ExtendedTracksPhase'])) ## read from InDetKeys.TRT_Tracks_Phase, InDetKeys.ExtendedTracksPhase
......
......@@ -45,9 +45,9 @@ def InDetTRT_DriftFunctionToolCfg(flags, useTimeInfo, usePhase, name = "InDetTRT
# --- TRT_DriftFunctionTool
#
# Calibration DB Service
from InDetOverlay.TRT_ConditionsConfig import TRT_CalDbToolCfg
InDetTRTCalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
acc.addPublicTool(InDetTRTCalDbTool)
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_CalDbToolCfg
CalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
acc.addPublicTool(CalDbTool)
# --- overwrite for uncalibrated DC production
if (not useTimeInfo) or flags.InDet.noTRTTiming:
......@@ -65,7 +65,7 @@ def InDetTRT_DriftFunctionToolCfg(flags, useTimeInfo, usePhase, name = "InDetTRT
kwargs.setdefault("AllowDigiVersionOverride", True)
kwargs.setdefault("ForcedDigiVersion", 9)
kwargs.setdefault("TRTCalDbTool", InDetTRTCalDbTool)
kwargs.setdefault("TRTCalDbTool", CalDbTool)
# --- set HT corrections
kwargs.setdefault("HTCorrectionBarrelXe", 1.5205)
kwargs.setdefault("HTCorrectionEndcapXe", 1.2712)
......@@ -80,14 +80,14 @@ def InDetTRT_DriftFunctionToolCfg(flags, useTimeInfo, usePhase, name = "InDetTRT
-0.29828, -0.21344, -0.322892, -0.386718, -0.534751, -0.874178, -1.231799, -1.503689, -1.896464, -2.385958])
kwargs.setdefault("ToTCorrectionsEndcapAr" , [0., 5.514777, 3.342712, 2.056626, 1.08293693, 0.3907979, -0.082819, -0.457485, -0.599706, -0.427493,
-0.328962, -0.403399, -0.663656, -1.029428, -1.46008, -1.919092, -2.151582, -2.285481, -2.036822, -2.15805])
# Second calibration DB Service in case pile-up and physics hits have different calibrations
if flags.Detector.EnableTRT:
from InDetOverlay.TRT_ConditionsConfig import TRT_CalDbToolCfg
InDetTRTCalDbTool2 = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
acc.addPublicTool(InDetTRTCalDbTool2)
kwargs.setdefault("TRTCalDbTool2", InDetTRTCalDbTool2)
# Second calibration DB Service in case pile-up and physics hits have different calibrations for data overlay
if flags.Overlay.DataOverlay:
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_MCCalDbToolCfg
MCCalDbTool = acc.popToolsAndMerge(TRT_MCCalDbToolCfg(flags))
acc.addPublicTool(MCCalDbTool)
kwargs.setdefault("TRTCalDbTool2", MCCalDbTool)
kwargs.setdefault("IsOverlay", True)
kwargs.setdefault("IsMC", False)
acc.setPrivateTools(CompFactory.TRT_DriftFunctionTool(name, **kwargs))
......@@ -138,7 +138,7 @@ def TRT_DriftCircleToolCfg(flags, useTimeInfo, usePhase, prefix, name = "InDetTR
InDetTRT_DriftFunctionTool = acc.popToolsAndMerge(InDetTRT_DriftFunctionToolCfg(flags, useTimeInfo, usePhase, name = prefix + "DriftFunctionTool", **kwargs))
acc.addPublicTool(InDetTRT_DriftFunctionTool)
from InDetOverlay.TRT_ConditionsConfig import TRT_StrawStatusSummaryToolCfg
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_StrawStatusSummaryToolCfg
InDetTRTStrawStatusSummaryTool = acc.popToolsAndMerge(TRT_StrawStatusSummaryToolCfg(flags))
acc.addPublicTool(InDetTRTStrawStatusSummaryTool)
......@@ -177,15 +177,15 @@ def TRT_DriftCircleToolCfg(flags, useTimeInfo, usePhase, prefix, name = "InDetTR
def TRT_LocalOccupancyCfg(flags, name = "InDet_TRT_LocalOccupancy", **kwargs):
acc = ComponentAccumulator()
# Calibration DB Service
from InDetOverlay.TRT_ConditionsConfig import TRT_CalDbToolCfg
InDetTRTCalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
acc.addPublicTool(InDetTRTCalDbTool)
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_CalDbToolCfg
CalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
acc.addPublicTool(CalDbTool)
# Straw status DB Tool
from InDetOverlay.TRT_ConditionsConfig import TRT_StrawStatusSummaryToolCfg
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_StrawStatusSummaryToolCfg
InDetTRTStrawStatusSummaryTool = acc.popToolsAndMerge(TRT_StrawStatusSummaryToolCfg(flags))
acc.addPublicTool(InDetTRTStrawStatusSummaryTool)
kwargs.setdefault("isTrigger", False)
kwargs.setdefault("TRTCalDbTool", InDetTRTCalDbTool)
kwargs.setdefault("TRTCalDbTool", CalDbTool)
kwargs.setdefault("TRTStrawStatusSummaryTool", InDetTRTStrawStatusSummaryTool)
InDetTRT_LocalOccupancy = CompFactory.TRT_LocalOccupancy(name, **kwargs)
......@@ -195,17 +195,17 @@ def TRT_LocalOccupancyCfg(flags, name = "InDet_TRT_LocalOccupancy", **kwargs):
def TRTOccupancyIncludeCfg(flags, name = "InDetTRT_TRTOccupancyInclude", **kwargs):
acc = ComponentAccumulator()
# Calibration DB Service
from InDetOverlay.TRT_ConditionsConfig import TRT_CalDbToolCfg
InDetTRTCalDbTool = acc.popToolsAndMerge( TRT_CalDbToolCfg(flags) )
acc.addPublicTool(InDetTRTCalDbTool)
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_CalDbToolCfg
CalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
acc.addPublicTool(CalDbTool)
# Straw status DB Tool
from InDetOverlay.TRT_ConditionsConfig import TRT_StrawStatusSummaryToolCfg
from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_StrawStatusSummaryToolCfg
InDetTRTStrawStatusSummaryTool = acc.popToolsAndMerge(TRT_StrawStatusSummaryToolCfg(flags))
acc.addPublicTool(InDetTRTStrawStatusSummaryTool)
InDetTRT_LocalOccupancy = acc.popToolsAndMerge(TRT_LocalOccupancyCfg(flags))
acc.addPublicTool(InDetTRT_LocalOccupancy)
kwargs.setdefault("isTrigger", False)
kwargs.setdefault("TRTCalDbTool", InDetTRTCalDbTool)
kwargs.setdefault("TRTCalDbTool", CalDbTool)
kwargs.setdefault("TRTStrawStatusSummaryTool", InDetTRTStrawStatusSummaryTool)
kwargs.setdefault("TRT_LocalOccupancyTool", InDetTRT_LocalOccupancy)
......@@ -344,8 +344,8 @@ if __name__ == "__main__":
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
top_acc.merge(PoolReadCfg(ConfigFlags))
from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
top_acc.merge(TRT_GeometryCfg( ConfigFlags ))
from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg
top_acc.merge(TRT_ReadoutGeometryCfg( ConfigFlags ))
from PixelGeoModel.PixelGeoModelConfig import PixelReadoutGeometryCfg
from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg
......
......@@ -158,18 +158,6 @@ def SegmentDriftCircleAssValidationCfg(flags, name="InDetSegmentDriftCircleAssVa
acc.addEventAlgo(InDetSegmentDriftCircleAssValidation)
return acc
def TRTActiveCondAlgCfg(flags, name="TRTActiveCondAlg", **kwargs):
acc = ComponentAccumulator()
InDetTRTStrawStatusSummaryTool = acc.popToolsAndMerge(TC.InDetTRTStrawStatusSummaryToolCfg(flags))
acc.addPublicTool(InDetTRTStrawStatusSummaryTool)
kwargs.setdefault("TRTStrawStatusSummaryTool", InDetTRTStrawStatusSummaryTool)
TRTActiveCondAlg = CompFactory.TRTActiveCondAlg(name = name, **kwargs)
acc.addCondAlgo(TRTActiveCondAlg)
return acc
def TRTSegmentFindingCfg(flags, extension = "", InputCollections = None, BarrelSegments = None, doPhase = False):
acc = ComponentAccumulator()
......@@ -233,8 +221,8 @@ if __name__ == "__main__":
from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg
top_acc.merge(MagneticFieldSvcCfg(flags))
from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
top_acc.merge(TRT_GeometryCfg( flags ))
from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg
top_acc.merge(TRT_ReadoutGeometryCfg( flags ))
from PixelGeoModel.PixelGeoModelConfig import PixelReadoutGeometryCfg
from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg
......@@ -245,6 +233,7 @@ if __name__ == "__main__":
InputCombinedInDetTracks = []
#############################################################################
from TRT_ConditionsAlgs.TRT_ConditionsAlgsConfig import TRTActiveCondAlgCfg
top_acc.merge(TRTActiveCondAlgCfg(flags))
top_acc.merge(TC.TRT_DetElementsRoadCondAlgCfg(flags))
......
......@@ -223,8 +223,8 @@ if __name__ == "__main__":
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
top_acc.merge(PoolReadCfg(ConfigFlags))
from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
top_acc.merge(TRT_GeometryCfg( ConfigFlags ))
from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg
top_acc.merge(TRT_ReadoutGeometryCfg( ConfigFlags ))
from PixelGeoModel.PixelGeoModelConfig import PixelReadoutGeometryCfg
top_acc.merge( PixelReadoutGeometryCfg(ConfigFlags) )
......@@ -254,14 +254,10 @@ if __name__ == "__main__":
PixeldEdxAlg = CompFactory.PixeldEdxAlg(name="PixeldEdxAlg", ReadFromCOOL = True)