Ejemplo n.º 1
0
    print 'NSWGeoSetup: no need to override tag on the MuonSpectrometer Node with ATLAS tag ', DetDescrVersion 
    print 'Be aware that the job is running with NSW TDR setup!'
else:
    GeoModelSvc.MuonVersionOverride="MuonSpectrometer-R.07.00-NSW"
print GeoModelSvc

#***************************************************** HERE setup MuonDetectorManager
from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool
MuonDetectorTool = MuonDetectorTool()
MuonDetectorTool.StationSelection  = 2
MuonDetectorTool.SelectedStations  = [ "EIL1" ]
MuonDetectorTool.SelectedStations  += [ "EIL2" ]
MuonDetectorTool.SelectedStations  += [ "EIS*" ]
MuonDetectorTool.SelectedStations  += [ "EIL10" ]
MuonDetectorTool.SelectedStations  += [ "EIL11" ]
MuonDetectorTool.SelectedStations  += [ "CSS*" ]
MuonDetectorTool.SelectedStations  += [ "CSL*" ]
MuonDetectorTool.SelectedStations  += [ "T4E*" ]
MuonDetectorTool.SelectedStations  += [ "T4F*" ]

from AGDD2GeoSvc.AGDD2GeoSvcConf import AGDDtoGeoSvc
Agdd2GeoSvc = AGDDtoGeoSvc()

if not "NSWAGDDTool/NewSmallWheel" in Agdd2GeoSvc.Builders:
    from AthenaCommon import CfgGetter
    ToolSvc += CfgGetter.getPublicTool("NewSmallWheel", checkType=True)
    Agdd2GeoSvc.Builders += ["NSWAGDDTool/NewSmallWheel"]

theApp.CreateSvc += ["AGDDtoGeoSvc"]
ServiceMgr += Agdd2GeoSvc
Ejemplo n.º 2
0
            MuonDetectorTool.SelectedStations += ["EIL2"]
            MuonDetectorTool.SelectedStations += ["EIL6"]
            MuonDetectorTool.SelectedStations += ["EIL7"]
            MuonDetectorTool.SelectedStations += ["EIS*"]
            MuonDetectorTool.SelectedStations += ["EIL10"]
            MuonDetectorTool.SelectedStations += ["EIL11"]
            MuonDetectorTool.SelectedStations += ["EIL12"]
            MuonDetectorTool.SelectedStations += ["EIL17"]
            MuonDetectorTool.SelectedStations += ["CSS*"]
            MuonDetectorTool.SelectedStations += ["CSL*"]
            MuonDetectorTool.SelectedStations += ["T4E*"]
            MuonDetectorTool.SelectedStations += ["T4F*"]

    ## Additional material in the muon system
    from AGDD2GeoSvc.AGDD2GeoSvcConf import AGDDtoGeoSvc
    AGDD2Geo = AGDDtoGeoSvc()
    from AthenaCommon import CfgGetter
    if not "MuonAGDDTool/MuonSpectrometer" in AGDD2Geo.Builders:
        ToolSvc += CfgGetter.getPublicTool("MuonSpectrometer", checkType=True)
        AGDD2Geo.Builders += ["MuonAGDDTool/MuonSpectrometer"]
    if hasattr(simFlags, 'SimulateNewSmallWheel'):
        if simFlags.SimulateNewSmallWheel():
            if not "NSWAGDDTool/NewSmallWheel" in AGDD2Geo.Builders:
                ToolSvc += CfgGetter.getPublicTool("NewSmallWheel",
                                                   checkType=True)
                AGDD2Geo.Builders += ["NSWAGDDTool/NewSmallWheel"]
    theApp.CreateSvc += ["AGDDtoGeoSvc"]
    ServiceMgr += AGDD2Geo

## Add configured GeoModelSvc to service manager
ServiceMgr += gms
Ejemplo n.º 3
0
    def _do_external(self):
        """Place to handle the external services: GeoModel, IOVDb,
           frozen showers, etc
        """
        AtlasG4Eng.G4Eng.log.verbose(
            'AtlasSimSkeleton._do_external :: starting')
        from AthenaCommon.AppMgr import ToolSvc, ServiceMgr
        from Geo2G4.Geo2G4Conf import Geo2G4Svc
        geo2G4Svc = Geo2G4Svc()
        theApp.CreateSvc += ["Geo2G4Svc"]
        ServiceMgr += geo2G4Svc
        ## Enable top transforms for the ATLAS geometry
        geo2G4Svc.GetTopTransform = True

        ## Configure access to the BeamCondSvc if necessary.  Assuming
        ## it should be on always as BeamEffectTransformation is
        ## currently always switched on, else something like this will
        ## be required here.
        from G4AtlasApps.SimFlags import simFlags
        include("InDetBeamSpotService/BeamCondSvc.py")

        ## GeoModel stuff
        ## TODO: Tidy imports etc.
        from GeoModelSvc.GeoModelSvcConf import GeoModelSvc
        from AthenaCommon.GlobalFlags import jobproperties
        from AtlasGeoModel import SetGeometryVersion

        ## Forward Region Twiss files - needed before geometry setup!
        if simFlags.ForwardDetectors.statusOn:
            if DetFlags.geometry.FwdRegion_on():
                from AthenaCommon.CfgGetter import getPublicTool
                from AthenaCommon.AppMgr import ToolSvc
                ToolSvc += getPublicTool("ForwardRegionProperties")

        from AtlasGeoModel import GeoModelInit
        from AtlasGeoModel import SimEnvelopes
        from GeoModelSvc.GeoModelSvcConf import GeoModelSvc
        gms = GeoModelSvc()
        ## Cosmics GeoModel tweaks
        if jobproperties.Beam.beamType() == 'cosmics' or \
           (simFlags.CavernBG.statusOn and not 'Signal' in simFlags.CavernBG.get_Value() ):
            from CavernInfraGeoModel.CavernInfraGeoModelConf import CavernInfraDetectorTool
            gms.DetectorTools += [CavernInfraDetectorTool()]
        ## Protects GeoModelSvc in the simulation from the AlignCallbacks
        gms.AlignCallbacks = False
        ## Muon GeoModel tweaks
        if DetFlags.Muon_on():
            ## Turn off caching in the muon system
            from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool
            MuonDetectorTool = MuonDetectorTool()
            MuonDetectorTool.FillCacheInitTime = 0  # default is 1

            ## Additional material in the muon system
            from AGDD2GeoSvc.AGDD2GeoSvcConf import AGDDtoGeoSvc
            AGDD2Geo = AGDDtoGeoSvc()
            from AthenaCommon import CfgGetter
            if not "MuonAGDDTool/MuonSpectrometer" in AGDD2Geo.Builders:
                ToolSvc += CfgGetter.getPublicTool("MuonSpectrometer",
                                                   checkType=True)
                AGDD2Geo.Builders += ["MuonAGDDTool/MuonSpectrometer"]
            from AtlasGeoModel.MuonGMJobProperties import MuonGeometryFlags
            if (MuonGeometryFlags.hasSTGC() and MuonGeometryFlags.hasMM()):
                if not "NSWAGDDTool/NewSmallWheel" in AGDD2Geo.Builders:
                    ToolSvc += CfgGetter.getPublicTool("NewSmallWheel",
                                                       checkType=True)
                    AGDD2Geo.Builders += ["NSWAGDDTool/NewSmallWheel"]
            theApp.CreateSvc += ["AGDDtoGeoSvc"]
            ServiceMgr += AGDD2Geo

        ## Add configured GeoModelSvc to service manager
        ServiceMgr += gms

        ## Run the geometry envelope setup earlier than GeoSD
        self._do_GeoEnv()  #TODO remove
        AtlasG4Eng.G4Eng.log.verbose('AtlasSimSkeleton._do_external :: done')