ConfiguredLArVolumeBuilder.py 3.37 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# 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 CaloMaterialEffectsOnTrackProvider.ConfCaloMaterialEffectsOnTrackProvider import ConfCaloMaterialEffectsOnTrackProvider as ConfMEOTP
        
        from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags

        # import the ToolSvc if necessary
        from AthenaCommon.AppMgr import ToolSvc
        if 'ToolSvc' not in dir():
          ToolSvc = ToolSvc()
        
        meotps = []
        #if TrkDetFlags.LArUseMaterialEffectsOnTrackProvider() :

          #from CaloMaterialEffectsOnTrackProvider.ConfCaloMaterialEffectsOnTrackProvider import ConfCaloMaterialEffectsOnTrackProvider as ConfMEOTP
        
          #MEOTP = ConfMEOTP('CaloMaterialEffectsOnTrackProvider')
          #ToolSvc += MEOTP
          #meotps += [ MEOTP ]

        # The volume helper
        from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__TrackingVolumeHelper
        LArTrackingVolumeHelper = Trk__TrackingVolumeHelper(name='TrackingVolumeHelper')
        ToolSvc += LArTrackingVolumeHelper 
          
        LAr__LArVolumeBuilder.__init__(self,
                                       name,
                                       MaterialEffectsOnTrackProviders = meotps,
                                       UseCaloSurfBuilder = TrkDetFlags.LArUseCaloSurfBuilder(),
                                       TrackingVolumeHelper = LArTrackingVolumeHelper,
                                       BarrelEnvelopeCover  = TrkDetFlags.LArBarrelEnvelopeCover(),
                                       EndcapEnvelopeCover  = TrkDetFlags.LArEndcapEnvelopeCover(),
                                       BarrelMaterialBinsRz = TrkDetFlags.LArBarrelLayerMaterialBinsRz(),   
                                       BarrelMaterialBinsPhi = TrkDetFlags.LArBarrelLayerMaterialBinsPhi(),   
                                       EndcapMaterialBinsRz = TrkDetFlags.LArEndcapLayerMaterialBinsRz(),    
                                       EndcapMaterialBinsPhi = TrkDetFlags.LArEndcapLayerMaterialBinsPhi(),   
                                       EndcapHecMaterialBinsRz = TrkDetFlags.LArEndcapHecLayerMaterialBinsRz(), 
                                       EndcapHecMaterialBinsPhi = TrkDetFlags.LArEndcapHecLayerMaterialBinsPhi(),
                                       EndcapFcalMaterialBinsRz = TrkDetFlags.LArEndcapFcalLayerMaterialBinsRz(),
                                       EndcapFcalMaterialBinsPhi = TrkDetFlags.LArEndcapFcalLayerMaterialBinsPhi(),
                                       EndcapGapMaterialBinsRz = TrkDetFlags.LArEndcapGapLayerMaterialBinsRz(), 
                                       EndcapGapMaterialBinsPhi = TrkDetFlags.LArEndcapGapLayerMaterialBinsPhi(),
                                       OutputLevel = TrkDetFlags.LArBuildingOutputLevel(),
                                       MagneticFieldMode = TrkDetFlags.MagneticFieldMode())