ATLAS Offline Software
Classes | Functions
SubDetectorEnvelopesConfig Namespace Reference

Classes

class  Volume
 

Functions

def EnvelopeDefSvcCfg (flags, name="AtlasGeometry_EnvelopeDefSvc", **kwargs)
 

Function Documentation

◆ EnvelopeDefSvcCfg()

def SubDetectorEnvelopesConfig.EnvelopeDefSvcCfg (   flags,
  name = "AtlasGeometry_EnvelopeDefSvc",
**  kwargs 
)

Definition at line 15 of file SubDetectorEnvelopesConfig.py.

15 def EnvelopeDefSvcCfg(flags, name="AtlasGeometry_EnvelopeDefSvc", **kwargs):
16  result = ComponentAccumulator()
17 
18  kwargs.setdefault("DBBeamPipeNode", 'BeamPipeEnvelope')
19  kwargs.setdefault("DBInDetNode" , 'InDetEnvelope'
20  if flags.Beam.Type is BeamType.TestBeam or flags.GeoModel.Run < LHCPeriod.Run4
21  else 'ITkEnvelope')
22  kwargs.setdefault("DBCaloNode" , 'CaloEnvelope' )
23  kwargs.setdefault("DBMSNode" , 'MuonEnvelope' )
24  kwargs.setdefault("DBCavernNode" , 'CavernEnvelope' )
25 
26  # allow for python-based envelope definitions (see below)
27  # -> TODO: set this to False once the envelope definitions are tagged in the DDDB
28  kwargs.setdefault("EnableFallback" , True )
29 
30  # setup fallback BeamPipeEnvelope
31  BeamPipe = Volume()
32 
33  if flags.Beam.Type is not BeamType.TestBeam and flags.GeoModel.Run >= LHCPeriod.Run4:
34  BeamPipe.addRZ( 28.8, 3545.0 )
35  BeamPipe.addRZ( 120.0, 3545.0 )
36  else:
37  BeamPipe.addRZ( 34.3, 3475.0 )
38  BeamPipe.addRZ( 120.0, 3475.0 )
39  BeamPipe.addRZ( 120.0, 4185.0 )
40  BeamPipe.addRZ( 41.0, 4185.0 )
41  BeamPipe.addRZ( 41.0, 6783.0 )
42  BeamPipe.addRZ( 70.0, 6783.0 )
43  BeamPipe.addRZ( 70.0, 12900.0 )
44  BeamPipe.addRZ( 279.0, 12900.0 )
45  BeamPipe.addRZ( 279.0, 18650.0 )
46  BeamPipe.addRZ( 436.0, 18650.0 )
47  BeamPipe.addRZ( 436.0, 22030.0 )
48  BeamPipe.addRZ( 1050.0, 22030.0 )
49  BeamPipe.addRZ( 1050.0, 26046.0 )
50  BeamPipe.addRZ( 0.0, 26046.0 )
51 
52  kwargs.setdefault("FallbackBeamPipeR" , BeamPipe.getRs() )
53  kwargs.setdefault("FallbackBeamPipeZ" , BeamPipe.getZs() )
54 
55 
56  # setup fallback IDEnvelope
57  InDet = Volume()
58  # InDet should include HGTD when it's turned on
59  if flags.Beam.Type is not BeamType.TestBeam and flags.GeoModel.Run >= LHCPeriod.Run4:
60  InDet.addRZ( 1148., 3545. )
61  InDet.addRZ( 28.8, 3545. )
62  else:
63  InDet.addRZ( 1148., 3475. )
64  InDet.addRZ( 34.3, 3475. )
65  kwargs.setdefault("FallbackInDetR" , InDet.getRs() )
66  kwargs.setdefault("FallbackInDetZ" , InDet.getZs() )
67 
68 
69  # setup fallback CaloEnvelope
70  Calo = Volume()
71 
72  if flags.Beam.Type is not BeamType.TestBeam and flags.GeoModel.Run >= LHCPeriod.Run4:
73  Calo.addRZ( 1148.0, 3545.0 )
74  Calo.addRZ( 120.0, 3545.0 )
75  else:
76  Calo.addRZ( 1148.0, 3475.0 )
77  Calo.addRZ( 120.0, 3475.0 )
78  Calo.addRZ( 120.0, 4185.0 )
79  Calo.addRZ( 41.0, 4185.0 )
80  Calo.addRZ( 41.0, 6783.0 )
81  Calo.addRZ( 420.0, 6783.0 )
82  Calo.addRZ( 420.0, 6736.0 )
83  Calo.addRZ( 3800.0, 6736.0 )
84  Calo.addRZ( 3800.0, 6550.0 )
85  Calo.addRZ( 4255.0, 6550.0 )
86 
87  kwargs.setdefault("FallbackCaloR" , Calo.getRs() )
88  kwargs.setdefault("FallbackCaloZ" , Calo.getZs() )
89 
90 
91  # setup fallback MuonEnvelope
92  Muon = Volume()
93  Muon.addRZ( 4255.0 , 4000.0 )
94  Muon.addRZ( 4255.0 , 6550.0 )
95  Muon.addRZ( 3800.0 , 6550.0 )
96  Muon.addRZ( 3800.0 , 6736.0 )
97  Muon.addRZ( 420.0 , 6736.0 )
98  Muon.addRZ( 420.0 , 6783.0 )
99  Muon.addRZ( 70.0 , 6783.0 )
100  Muon.addRZ( 70.0 , 12900.0 )
101  Muon.addRZ( 279.0 , 12900.0 )
102  Muon.addRZ( 279.0 , 18650.0 )
103  Muon.addRZ( 436.7 , 18650.0 )
104  Muon.addRZ( 436.7 , 22030.0 )
105  Muon.addRZ( 1050.0 , 22030.0 )
106  Muon.addRZ( 1050.0 , 26046.0 )
107  Muon.addRZ( 1500.0 , 26046.0 )
108  Muon.addRZ( 1500.0 , 23001.0 )
109  Muon.addRZ( 2750.0 , 23001.0 )
110  Muon.addRZ( 2750.0 , 22030.0 )
111  Muon.addRZ( 12650.0 , 22030.0 )
112  Muon.addRZ( 12650.0 , 18650.0 )
113  Muon.addRZ( 13400.0 , 18650.0 )
114  Muon.addRZ( 13400.0 , 12900.0 )
115  Muon.addRZ( 14200.0 , 12900.0 )
116  Muon.addRZ( 14200.0 , 4000.0 )
117  Muon.addRZ( 13000.0 , 4000.0 )
118  kwargs.setdefault("FallbackMuonR" , Muon.getRs() )
119  kwargs.setdefault("FallbackMuonZ" , Muon.getZs() )
120 
121 
122  # setup fallback CavernEnvelope
123  Cavern = Volume()
124  Cavern.addRZ( 13000.0 , 4000.0 )
125  Cavern.addRZ( 14200.0 , 4000.0 )
126  Cavern.addRZ( 14200.0 , 12900.0 ) # boundary with MS
127  Cavern.addRZ( 13400.0 , 12900.0 ) # boundary with MS
128  Cavern.addRZ( 13400.0 , 18650.0 ) # boundary with MS
129  Cavern.addRZ( 12650.0 , 18650.0 ) # boundary with MS
130  Cavern.addRZ( 12650.0 , 22030.0 ) # boundary with MS
131  Cavern.addRZ( 2750.0 , 22030.0 ) # boundary with MS
132  Cavern.addRZ( 2750.0 , 23001.0 ) # boundary with MS
133  Cavern.addRZ( 1500.0 , 23001.0 ) # boundary with MS
134  Cavern.addRZ( 1500.0 , 26046.0 ) # boundary with MS
135  Cavern.addRZ( 0.0 , 26046.0 ) #
136 
137  # the outer dimesions differ between collision and cosmics jobs
138  if flags.Beam.Type is not BeamType.Cosmics:
139  # -> for collision jobs the 'cavern' envelope is much smaller
140  Cavern.addRZ( 0.0 , 500000.0 ) # z= +500m
141  Cavern.addRZ( 500000.0 , 500000.0 ) # r= 500m
142  else:
143  # -> for cosmics simulation the 'cavern' envelope spans much further
144  kwargs.setdefault("DBCavernNode" , 'CavernEnvelopeNONE' )
145  kwargs.setdefault("EnableFallback" , True )
146  Cavern.addRZ( 0.0 , 3000000.0 ) # z= +3km
147  Cavern.addRZ( 3000000.0 , 3000000.0 ) # r= 3km
148  kwargs.setdefault("FallbackCavernR" , Cavern.getRs() )
149  kwargs.setdefault("FallbackCavernZ" , Cavern.getZs() )
150 
151  #set the GeoModelSvc
152  from AtlasGeoModel.GeoModelConfig import GeoModelCfg
153  acc = GeoModelCfg(flags)
154  kwargs.setdefault("GeoModelSvc", acc.getService("GeoModelSvc").getFullJobOptName())
155  result.merge(acc)
156 
157  result.addService(CompFactory.DetDescrDBEnvelopeSvc(name, **kwargs),primary=True)
158  return result
159 
160 
161 # class used for more readable definitions of envelope volumes
162 # -> create new volume boundary definitions
163 # -> return the coordinate vectors in R and Z and VolumeID
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
SubDetectorEnvelopesConfig.EnvelopeDefSvcCfg
def EnvelopeDefSvcCfg(flags, name="AtlasGeometry_EnvelopeDefSvc", **kwargs)
Definition: SubDetectorEnvelopesConfig.py:15
python.GeoModelConfig.GeoModelCfg
def GeoModelCfg(flags)
Definition: GeoModelConfig.py:16