ConfiguredLArVolumeBuilder.py 1.68 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration

######################################################
# ConfiguredLArVolumeBuilder module
#
# it inherits from LArVolumeBuilder and performs 
# standard configuration
#
######################################################

# import the Extrapolator configurable
from LArTrackingGeometry.LArTrackingGeometryConf import LAr__LArVolumeBuilder

# define the class
class ConfiguredLArVolumeBuilder( LAr__LArVolumeBuilder ):
    # constructor
    def __init__(self,name = 'LArVolumeBuilder'):
        
        from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags

        # import the ToolSvc if necessary
        from AthenaCommon.AppMgr import ToolSvc
        if 'ToolSvc' not in dir():
          ToolSvc = ToolSvc()
        
        # The volume helper
        from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__TrackingVolumeHelper
        LArTrackingVolumeHelper = Trk__TrackingVolumeHelper(name='TrackingVolumeHelper')
        ToolSvc += LArTrackingVolumeHelper 
          
        LAr__LArVolumeBuilder.__init__(self,
                                       name,
                                       UseCaloSurfBuilder = TrkDetFlags.LArUseCaloSurfBuilder(),
                                       TrackingVolumeHelper = LArTrackingVolumeHelper,
                                       BarrelEnvelopeCover  = TrkDetFlags.LArBarrelEnvelopeCover(),
                                       EndcapEnvelopeCover  = TrkDetFlags.LArEndcapEnvelopeCover(),
                                       OutputLevel = TrkDetFlags.LArBuildingOutputLevel(),
                                       MagneticFieldMode = TrkDetFlags.MagneticFieldMode())