diff --git a/DetectorDescription/GeoModel/FaserGeoModel/python/SCTGMConfig.py b/DetectorDescription/GeoModel/FaserGeoModel/python/SCTGMConfig.py index bee84266c6e510f3c1e5fd58c2104349ff695332..e4815c75ce07c9a98352390d265f0269d7a8f48b 100644 --- a/DetectorDescription/GeoModel/FaserGeoModel/python/SCTGMConfig.py +++ b/DetectorDescription/GeoModel/FaserGeoModel/python/SCTGMConfig.py @@ -24,7 +24,7 @@ if __name__ == "__main__": Configurable.configurableRun3Behavior = True ConfigFlags.addFlag("GeoModel.FaserVersion", "Faser-00") ConfigFlags.addFlag("Detector.SimulateVeto", True) - ConfigFlags.addFlag("Detector.SimulateSCT", True) + ConfigFlags.addFlag("Detector.SimulateFaserSCT", True) # from AthenaConfiguration.TestDefaults import defaultTestFiles # Provide MC input diff --git a/Simulation/G4Faser/G4FaserApp/test/runG4.py b/Simulation/G4Faser/G4FaserApp/test/runG4.py index 311e0e091d503b628cbfb9470605905a227941fe..3799e2cf24971c842f33b0c894716e7dd50ac2d7 100644 --- a/Simulation/G4Faser/G4FaserApp/test/runG4.py +++ b/Simulation/G4Faser/G4FaserApp/test/runG4.py @@ -65,8 +65,8 @@ if __name__ == "__main__": # ConfigFlags.Detector.SimulateVeto = True ConfigFlags.Detector.GeometryVeto = True - ConfigFlags.Detector.SimulateSCT = True - ConfigFlags.Detector.GeometrySCT = True + ConfigFlags.Detector.SimulateFaserSCT = True + ConfigFlags.Detector.GeometryFaserSCT = True ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.Sim.ReleaseGeoModel = False # diff --git a/Simulation/G4Faser/G4FaserServices/python/G4FaserServicesConfigNew.py b/Simulation/G4Faser/G4FaserServices/python/G4FaserServicesConfigNew.py index 96c702359e5b874d13e96d97cbbda05db3b15a34..b26b6b33dbb94a949ab7274c71d52d2b317faa5c 100644 --- a/Simulation/G4Faser/G4FaserServices/python/G4FaserServicesConfigNew.py +++ b/Simulation/G4Faser/G4FaserServices/python/G4FaserServicesConfigNew.py @@ -8,7 +8,7 @@ from G4AtlasServices.G4AtlasServicesConf import DetectorGeometrySvc, G4AtlasSvc, # # Physics region tools # -from G4FaserTools.G4PhysicsRegionConfigNew import ScintillatorPhysicsRegionToolCfg #, TrackerPhysicsRegionToolCfg, FaserCaloPhysicsRegionToolCfg +from G4FaserTools.G4PhysicsRegionConfigNew import ScintillatorPhysicsRegionToolCfg, TrackerPhysicsRegionToolCfg #, FaserCaloPhysicsRegionToolCfg from G4FaserServices.G4FaserServicesConf import ISF__FaserGeoIDSvc # # Geometry tools @@ -21,7 +21,8 @@ from G4FaserTools.G4FieldConfigNew import FASERFieldManagerToolCfg, VetoFieldMan # # Future field managers (?) # -# from G4FaserTools.G4FieldConfigNew import TriggerFieldManagerToolCfg, PreshowerFieldManagerToolCfg, UpstreamTrackerFieldManagerToolCfg, CentralTrackerFieldManagerToolCfg, DownstreamTrackerFieldManagerToolCfg, UpstreamDipoleFieldManagerToolCfg, CentralDipoleFieldManagerToolCfg, DownstreamDipleFieldManagerToolCfg, FaserCaloFieldManagerToolCfg +# from G4FaserTools.G4FieldConfigNew import TriggerFieldManagerToolCfg, PreshowerFieldManagerToolCfg, UpstreamDipoleFieldManagerToolCfg, CentralDipoleFieldManagerToolCfg, DownstreamDipleFieldManagerToolCfg, FaserCaloFieldManagerToolCfg +from G4FaserTools.G4FieldConfigNew import TrackerFieldManagerToolCfg # # def FaserGeoIDSvcCfg(ConfigFlags, name="ISF_FaserGeoIDSvc", **kwargs): @@ -41,8 +42,8 @@ def getFASER_RegionCreatorList(ConfigFlags): if ConfigFlags.Detector.SimulateScintillator: regionCreatorList += [ScintillatorPhysicsRegionToolCfg(ConfigFlags)] - # if ConfigFlags.Detector.SimulateTracker: - # regionCreatorList += [TrackerPhysicsRegionToolCfg(ConfigFlags)] + if ConfigFlags.Detector.SimulateTracker: + regionCreatorList += [TrackerPhysicsRegionToolCfg(ConfigFlags)] # if ConfigFlags.Detector.SimulateFaserCalo: # regionCreatorList += [FaserCaloPhysicsRegionToolCfg(ConfigFlags)] @@ -82,16 +83,10 @@ def FASER_FieldMgrListCfg(ConfigFlags): # acc = PreshowerFieldManagerToolCfg(ConfigFlags) # tool = result.popToolsAndMerge(acc) # fieldMgrList += [tool] - # if ConfigFlags.Detector.SimulateTracker: - # acc = UpstreamTrackerFieldManagerToolCfg(ConfigFlags) - # tool = result.popToolsAndMerge(acc) - # fieldMgrList += [tool] - # acc = CentralTrackerFieldManagerToolCfg(ConfigFlags) - # tool = result.popToolsAndMerge(acc) - # fieldMgrList += [tool] - # acc = DownstreamTrackerFieldManagerToolCfg(ConfigFlags) - # tool = result.popToolsAndMerge(acc) - # fieldMgrList += [tool] + if ConfigFlags.Detector.SimulateTracker: + acc = TrackerFieldManagerToolCfg(ConfigFlags) + tool = result.popToolsAndMerge(acc) + fieldMgrList += [tool] # if ConfigFlags.Detector.SimulateFaserCalo: # acc = FaserCaloFieldManagerToolCfg(ConfigFlags) # tool = result.popToolsAndMerge(acc) diff --git a/Simulation/G4Faser/G4FaserTools/python/G4FieldConfigNew.py b/Simulation/G4Faser/G4FaserTools/python/G4FieldConfigNew.py index 2b2ede247f2da24f2b2d1b9cfe29665486ab99ce..64ae21259f0012fefe66b293858841607b4e8bf1 100644 --- a/Simulation/G4Faser/G4FaserTools/python/G4FieldConfigNew.py +++ b/Simulation/G4Faser/G4FaserTools/python/G4FieldConfigNew.py @@ -96,6 +96,16 @@ def VetoFieldManagerToolCfg(ConfigFlags, name='VetoFieldManager', **kwargs): kwargs.setdefault('MinimumEpsilonStep', 0.00001) return BasicDetectorConstantFieldManagerToolCfg(ConfigFlags, name, **kwargs) + +def TrackerFieldManagerToolCfg(ConfigFlags, name='TrackerFieldManager', **kwargs): + kwargs.setdefault("LogicalVolumes", ['SCT::Station']) + #kwargs.setdefault('DeltaChord', 0.00001) + kwargs.setdefault('DeltaIntersection', 0.00001) + kwargs.setdefault('DeltaOneStep', 0.0001) + kwargs.setdefault('MaximumEpsilonStep', 0.001) + kwargs.setdefault('MinimumEpsilonStep', 0.00001) + return BasicDetectorConstantFieldManagerToolCfg(ConfigFlags, name, **kwargs) + # def BeamPipeFieldManagerToolCfg(ConfigFlags, name='BeamPipeFieldManager', **kwargs): # kwargs.setdefault("LogicalVolumes", ['BeamPipe::BeamPipe']) # #kwargs.setdefault('DeltaChord', 0.00001) diff --git a/Simulation/G4Faser/G4FaserTools/python/G4GeometryToolConfig.py b/Simulation/G4Faser/G4FaserTools/python/G4GeometryToolConfig.py index b48c9ebe78ad134f8c8df2ade5f83ec7467e1c1b..7cc2a317a8144e1f63a96cab1dea4bc27063b1e1 100644 --- a/Simulation/G4Faser/G4FaserTools/python/G4GeometryToolConfig.py +++ b/Simulation/G4Faser/G4FaserTools/python/G4GeometryToolConfig.py @@ -7,6 +7,7 @@ from G4AtlasTools.G4AtlasToolsConf import CylindricalEnvelope, PolyconicalEnvelo from AthenaCommon.SystemOfUnits import mm, cm, m from VetoGeoModel.VetoGeoModelConfig import VetoGeometryCfg +from FaserSCT_GeoModel.FaserSCT_GeoModelConfig import FaserSCT_GeometryCfg #ToDo - finish migrating this (dnoel) #Todo - just return component accumulator @@ -19,6 +20,12 @@ def VetoGeoDetectorToolCfg(ConfigFlags, name='Veto', **kwargs): kwargs.setdefault("DetectorName", "Veto") return result, GeoDetectorTool(name, **kwargs) +def SCTGeoDetectorToolCfg(ConfigFlags, name='SCT', **kwargs): + #set up geometry + result=FaserSCT_GeometryCfg(ConfigFlags) + kwargs.setdefault("DetectorName", "SCT") + return result, GeoDetectorTool(name, **kwargs) + def generateSubDetectorList(ConfigFlags): result = ComponentAccumulator() SubDetectorList=[] @@ -28,6 +35,11 @@ def generateSubDetectorList(ConfigFlags): SubDetectorList += [ toolVeto ] result.merge(accVeto) + if ConfigFlags.Detector.SimulateFaserSCT: + accSCT, toolSCT = SCTGeoDetectorToolCfg(ConfigFlags) + SubDetectorList += [ toolSCT ] + result.merge(accSCT) + return result, SubDetectorList def FASEREnvelopeCfg(ConfigFlags, name="Faser", **kwargs): diff --git a/Simulation/G4Faser/G4FaserTools/python/G4PhysicsRegionConfigNew.py b/Simulation/G4Faser/G4FaserTools/python/G4PhysicsRegionConfigNew.py index 3dab4476d1c012d3b05d2d297b40ce34c71bb3cd..092950bd0a8cfa7bea901fab22bb4305780a3cfb 100644 --- a/Simulation/G4Faser/G4FaserTools/python/G4PhysicsRegionConfigNew.py +++ b/Simulation/G4Faser/G4FaserTools/python/G4PhysicsRegionConfigNew.py @@ -71,6 +71,14 @@ def ScintillatorPhysicsRegionToolCfg(ConfigFlags, name='ScintillatorPhysicsRegio kwargs.setdefault("GammaCut", 0.05) return RegionCreator(name, **kwargs) +def TrackerPhysicsRegionToolCfg(ConfigFlags, name="TrackerPhysicsRegionTool", **kwargs): + kwargs.setdefault("RegionName", "Tracker") + volumeList = ['SCT::BRLSensor'] + kwargs.setdefault("VolumeList", volumeList) + kwargs.setdefault("ElectronCut", 0.05) + kwargs.setdefault("PositronCut", 0.05) + kwargs.setdefault("GammaCut", 0.05) + return RegionCreator(name, **kwargs) # def SCTPhysicsRegionToolCfg(ConfigFlags, name='SCTPhysicsRegionTool', **kwargs): # kwargs.setdefault("RegionName", 'SCT') diff --git a/Tracker/TrackerDetDescr/FaserSCT_GeoModel/python/FaserSCT_GeoModelConfig.py b/Tracker/TrackerDetDescr/FaserSCT_GeoModel/python/FaserSCT_GeoModelConfig.py index 647e449c21f3f140b203c678455f038884f3b62a..7c8e771ce4ba573bce6ecc35d779cec5584500be 100644 --- a/Tracker/TrackerDetDescr/FaserSCT_GeoModel/python/FaserSCT_GeoModelConfig.py +++ b/Tracker/TrackerDetDescr/FaserSCT_GeoModel/python/FaserSCT_GeoModelConfig.py @@ -38,12 +38,12 @@ def FaserSCT_GeometryCfg( flags ): # 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: + # if (not flags.Detector.SimulateFaserSCT) 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 is not "AthSimulation": # Protection for AthSimulation builds - # if (not flags.Detector.SimulateSCT) or flags.Detector.OverlaySCT: + # if (not flags.Detector.SimulateFaserSCT) or flags.Detector.OverlaySCT: # from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_AlignCondAlg # sctAlignCondAlg = SCT_AlignCondAlg(name = "SCT_AlignCondAlg", # UseDynamicAlignFolders = flags.GeoModel.Align.Dynamic) diff --git a/Tracker/TrackerDetDescr/FaserSCT_GeoModel/test/FaserSCT_GMConfig_test.py b/Tracker/TrackerDetDescr/FaserSCT_GeoModel/test/FaserSCT_GMConfig_test.py index c72b8ad2eeacccbea9b2385ed3703fe64603c1f7..13b78ebe608baec81bfbdc0f57dbbd6cb5783f1e 100755 --- a/Tracker/TrackerDetDescr/FaserSCT_GeoModel/test/FaserSCT_GMConfig_test.py +++ b/Tracker/TrackerDetDescr/FaserSCT_GeoModel/test/FaserSCT_GMConfig_test.py @@ -11,7 +11,7 @@ if __name__ == "__main__": ConfigFlags.Input.Files = defaultTestFiles.HITS ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16" - ConfigFlags.Detector.SimulateSCT = False + ConfigFlags.Detector.SimulateFaserSCT = False ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.lock() diff --git a/Tracker/TrackerDetDescr/TrackerGeoModelUtils/CMakeLists.txt b/Tracker/TrackerDetDescr/TrackerGeoModelUtils/CMakeLists.txt index ba356f000cb5ef240c93ee37f217c41e6d972c41..c1afb08a4b29c743cb308c06e7817749ae292c76 100644 --- a/Tracker/TrackerDetDescr/TrackerGeoModelUtils/CMakeLists.txt +++ b/Tracker/TrackerDetDescr/TrackerGeoModelUtils/CMakeLists.txt @@ -14,6 +14,7 @@ atlas_depends_on_subdirs( PUBLIC Control/StoreGate DetectorDescription/GeoModel/GeoModelInterfaces DetectorDescription/GeoModel/GeoModelUtilities + DetectorDescription/GeoModel/GeoModelFaserUtilities DetectorDescription/GeoPrimitives DetectorDescription/GeometryDBSvc ) @@ -30,5 +31,5 @@ atlas_add_library( TrackerGeoModelUtils INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel GaudiKernel StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES GeoModelUtilities ) + PRIVATE_LINK_LIBRARIES GeoModelUtilities GeoModelFaserUtilities ) diff --git a/Tracker/TrackerDetDescr/TrackerGeoModelUtils/src/DistortedMaterialManager.cxx b/Tracker/TrackerDetDescr/TrackerGeoModelUtils/src/DistortedMaterialManager.cxx index 321fa22cc07756332ee070522ae413e63c83ed7b..329f28e07372a713cd44c50d1aed73a2d7dce3a5 100755 --- a/Tracker/TrackerDetDescr/TrackerGeoModelUtils/src/DistortedMaterialManager.cxx +++ b/Tracker/TrackerDetDescr/TrackerGeoModelUtils/src/DistortedMaterialManager.cxx @@ -5,7 +5,7 @@ #include "TrackerGeoModelUtils/DistortedMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" -#include "GeoModelUtilities/DecodeVersionKey.h" +#include "GeoModelFaserUtilities/DecodeFaserVersionKey.h" #include "AthenaKernel/MsgStreamMember.h" #include "StoreGate/StoreGate.h" #include "RDBAccessSvc/IRDBAccessSvc.h" @@ -29,7 +29,7 @@ namespace TrackerDD { if (sc.isFailure()) log << MSG::FATAL << "Could not locate RDBAccessSvc" << endmsg; // Get version tag and node for Tracker. - DecodeVersionKey versionKey("Tracker"); + DecodeFaserVersionKey versionKey("Tracker"); std::string detectorKey = versionKey.tag(); std::string detectorNode = versionKey.node(); diff --git a/Tracker/TrackerDetDescr/TrackerGeoModelUtils/src/ServiceVolumeMaker.cxx b/Tracker/TrackerDetDescr/TrackerGeoModelUtils/src/ServiceVolumeMaker.cxx index f3e409f4d86b3ef8335aa8ced657b4deb409c724..d930bf90d4fd157c90901798e46fa8629fcebbc5 100755 --- a/Tracker/TrackerDetDescr/TrackerGeoModelUtils/src/ServiceVolumeMaker.cxx +++ b/Tracker/TrackerDetDescr/TrackerGeoModelUtils/src/ServiceVolumeMaker.cxx @@ -6,7 +6,7 @@ #include "TrackerGeoModelUtils/ServiceVolume.h" #include "TrackerGeoModelUtils/TrackerDDAthenaComps.h" -#include "GeoModelUtilities/DecodeVersionKey.h" +#include "GeoModelFaserUtilities/DecodeFaserVersionKey.h" #include "RDBAccessSvc/IRDBRecordset.h" #include "GeometryDBSvc/IGeometryDBSvc.h"