SND@LHC Software
Loading...
Searching...
No Matches
geometry_config.py
Go to the documentation of this file.
1from __future__ import print_function
2import shipunit as u
3import ROOT as r
4from ShipGeoConfig import AttrDict, ConfigRegistry
5# the following params should be passed through 'ConfigRegistry.loadpy' method
6# muShieldDesign = 5 # 1=passive 2=active 5=TP design 6=magnetized hadron absorber 9=optimised with T4 as constraint, 8=requires config file
7# 10=with field map for hadron absorber, 11=9 with field map for muon shield
8# nuTargetPassive = 1 #0 = with active layers, 1 = only passive
9# nuTauTargetDesign = #0 = TP, 1 = NEW with magnet, 2 = NEW without magnet, 3 = 2018 design
10
11# targetOpt = 5 # 0=solid >0 sliced, 5: 5 pieces of tungsten, 4 air slits, 17: molybdenum tungsten interleaved with H20
12# strawOpt = 0 # 0=simplistic tracking stations defined in veto.cxx 1=detailed strawtube design 4=sophisticated straw tube design, horizontal wires (default) 10=2cm straw diameter for 2018 layout
13# preshowerOption = 0 # 1=simple preShower detector for conceptual studies, moves calo and muon stations
14# tankDesign = 5 # 4=TP elliptical tank design, 5 = optimized conical rectangular design, 6=5 without segment-1
15if "muShieldDesign" not in globals():
16 muShieldDesign = 5
17if "muShieldGeo" not in globals():
18 muShieldGeo = None
19if "nuTargetPassive" not in globals():
20 nuTargetPassive = 1
21if "nuTauTargetDesign" not in globals():
22 nuTauTargetDesign = 0
23 if muShieldDesign >= 7:
24 nuTauTargetDesign=1
25if "targetOpt" not in globals():
26 targetOpt = 18
27if "strawDesign" not in globals():
28 strawDesign = 4
29if "tankDesign" not in globals():
30 tankDesign = 6
31if "CaloDesign" not in globals():
32 CaloDesign = 0
33if "Yheight" not in globals():
34 Yheight = 10.
35if "EcalGeoFile" not in globals():
36 if tankDesign > 4:
37 EcalGeoFile = "ecal_rect5x10m2.geo"
38 else:
39 EcalGeoFile = "ecal_ellipse5x10m2.geo"
40if "HcalGeoFile" not in globals():
41 if tankDesign > 4:
42 HcalGeoFile = "hcal_rect.geo"
43 else:
44 HcalGeoFile = "hcal.geo"
45if "muShieldStepGeo" not in globals():
46 muShieldStepGeo = False
47if "muShieldWithCobaltMagnet" not in globals():
48 muShieldWithCobaltMagnet = 0
49
50with ConfigRegistry.register_config("basic") as c:
51 # global muShieldDesign, targetOpt, strawDesign, Yheight
52 c.Yheight = Yheight*u.m
53 # decision by the SP
54 totalLength = 2.5*c.Yheight + 35*u.m
55 extraVesselLength = totalLength - 50*u.m
56 windowBulge = 1*u.m
57 if tankDesign > 5: windowBulge = 25*u.cm
58#
59 magnet_design = 2
60 if tankDesign == 5: magnet_design = 3
61 if tankDesign == 6: magnet_design = 4
62#
63 c.strawDesign = strawDesign
64 c.tankDesign = tankDesign
65 c.magnetDesign = magnet_design
66# cave parameters
67 c.cave = AttrDict(z=0*u.cm)
68 c.cave.floorHeightMuonShield = 5*u.m
69 c.cave.floorHeightTankA = 4.2*u.m
70 if strawDesign == 10:
71 c.cave.floorHeightMuonShield = c.cave.floorHeightTankA # avoid the gap, for 2018 geometry
72 c.cave.floorHeightTankB = 2*u.m
73#
74 #neutrino detector
75 c.nuTauTargetDesign=nuTauTargetDesign
76
77 c.chambers = AttrDict(z=0*u.cm)
78 magnetIncrease = 100.*u.cm
79 # make z coordinates for the decay volume and tracking stations relative to T4z
80 # eventually, the only parameter which needs to be changed when the active shielding lenght changes.
81 z4=2438.*u.cm+magnetIncrease+extraVesselLength
82 if strawDesign != 4 and strawDesign != 10:
83 print("this design ",strawDesign," is not supported, use strawDesign = 4 or 10")
84 1/0
85 else:
86 c.chambers.Length = totalLength
87 c.chambers.Tub1length = 2.5*u.m
88 c.chambers.Tub2length = 17.68*u.m+extraVesselLength/2.
89 c.chambers.Tub3length = 0.8*u.m
90 c.chambers.Tub4length = 2.*u.m+magnetIncrease/2.
91 c.chambers.Tub5length = 0.8*u.m
92 c.chambers.Tub6length = 0.1*u.m+windowBulge/2.
93 c.chambers.Rmin = 245.*u.cm
94 c.chambers.Rmax = 250.*u.cm
95 # positions and lenghts of vacuum tube segments
96 zset=z4-4666.*u.cm-magnetIncrease-extraVesselLength
97 c.Chamber1 = AttrDict(z=zset)
98 zset=z4-2628.*u.cm-magnetIncrease-extraVesselLength/2.
99 c.Chamber2 = AttrDict(z=zset)
100 zset=z4-740.*u.cm-magnetIncrease
101 c.Chamber3 = AttrDict(z=zset)
102 zset=z4-420.*u.cm-magnetIncrease/2.
103 c.Chamber4 = AttrDict(z=zset)
104 zset=z4-100.*u.cm
105 c.Chamber5 = AttrDict(z=zset)
106 zset=z4+30.*u.cm+windowBulge/2.
107 c.Chamber6 = AttrDict(z=zset)
108 c.Veto = AttrDict(z=0*u.cm)
109 c.Veto.innerSupport = 3.*u.cm
110 c.Veto.innerSupportMed = "steel"
111 if tankDesign > 5:
112 c.Veto.outerSupport = 5.*u.mm
113 c.Veto.outerSupportMed = "steel"
114 c.Veto.lidThickness = 16.*u.mm
115 else:
116 c.Veto.outerSupport = 8.*u.mm
117 c.Veto.outerSupportMed = "Aluminum"
118 c.Veto.lidThickness = 80.*u.mm
119 c.Veto.sensitiveThickness = 0.3*u.m
120 c.Veto.sensitiveMed = "Scintillator"
121 c.Veto.decayMed = "vacuums"
122 c.Veto.rib = 3.*u.cm
123 c.Veto.ribMed = "steel"
124 # horizontal width at start and focus point, for conical/rectangular size
125 # envelope (46,1.2) or (46,0.9) end at T4: (100.,2.5) London slides, https://indico.cern.ch/event/508465/contributions/2166894/
126 c.zFocusX = +10*u.m # Decision taken 15/12/2016, Physics and Detector meeting
127 c.zFocusY = -5*u.m # for the moment, identical to X
128 c.xMax = +2.5*u.m # max horizontal width at T4
129 #
130 c.TrackStation4 = AttrDict(z=z4)
131 zset=z4-200.*u.cm
132 c.TrackStation3 = AttrDict(z=zset)
133 zset=z4-640.*u.cm-magnetIncrease
134 c.TrackStation2 = AttrDict(z=zset)
135 zset=z4-840.*u.cm-magnetIncrease
136 c.TrackStation1 = AttrDict(z=zset)
137 zset=z4-4406.*u.cm-magnetIncrease-extraVesselLength
138 c.vetoStation = AttrDict(z=zset)
139
140 c.z = c.TrackStation2.z + 0.5 * (c.TrackStation3.z - c.TrackStation2.z)
141 c.scintillator = AttrDict(z=0*u.cm)
142 c.scintillator.Rmin = 251.*u.cm
143 c.scintillator.Rmax = 260.*u.cm
144
145 c.strawtubes = AttrDict(z=0*u.cm)
146 if strawDesign==4:
147 c.strawtubes.InnerStrawDiameter = 0.975*u.cm
148 c.strawtubes.StrawPitch = 1.76*u.cm
149 c.strawtubes.DeltazLayer = 1.1*u.cm
150 c.strawtubes.DeltazPlane = 2.6*u.cm
151 c.strawtubes.YLayerOffset = c.strawtubes.StrawPitch / 2.
152 c.strawtubes.YPlaneOffset = c.strawtubes.StrawPitch / 4.
153 c.strawtubes.FrameMaterial = "aluminium"
154 c.strawtubes.FrameLateralWidth = 1.*u.cm
155 c.strawtubes.DeltazFrame = 10.*u.cm
156 elif strawDesign==10: # 10 - baseline for 2018
157 c.strawtubes.InnerStrawDiameter = 1.975*u.cm
158 c.strawtubes.StrawPitch = 3.60*u.cm
159 c.strawtubes.DeltazLayer = 2.1*u.cm
160 c.strawtubes.DeltazPlane = 4.2*u.cm
161 c.strawtubes.YLayerOffset = 1.9*u.cm
162 c.strawtubes.YPlaneOffset = 1.3*u.cm
163 c.strawtubes.FrameMaterial = "steel"
164 c.strawtubes.FrameLateralWidth = 1.2*u.m
165 c.strawtubes.DeltazFrame = 2.5*u.cm
166
167 c.strawtubes.WallThickness = 0.0039*u.cm
168 c.strawtubes.OuterStrawDiameter = (c.strawtubes.InnerStrawDiameter + 2*c.strawtubes.WallThickness)
169
170 c.strawtubes.StrawsPerLayer = int(c.Yheight/c.strawtubes.StrawPitch)
171 c.strawtubes.ViewAngle = 5
172 c.strawtubes.WireThickness = 0.003*u.cm
173 c.strawtubes.DeltazView = 10.*u.cm
174 c.strawtubes.VacBox_x = 300.*u.cm
175 c.strawtubes.VacBox_y = 600.*u.cm * c.Yheight / (10.*u.m)
176
177 c.Bfield = AttrDict(z=c.z)
178 c.Bfield.max = 0 # 1.4361*u.kilogauss # was 1.15 in EOI
179 c.Bfield.y = c.Yheight
180 c.Bfield.x = 3.*u.m
181 c.Bfield.fieldMap = "field/MainSpectrometerField.txt"
182 if c.magnetDesign>3: # MISIS design
183 c.Bfield.YokeWidth=0.85*u.m # full width 200.*cm;
184 c.Bfield.YokeDepth=1.75*u.m # half length 200 *cm;
185 c.Bfield.CoilThick=25.*u.cm # thickness
186 VesselThick=37.*u.cm; # full thickness
187 c.Bfield.x = 251.*u.cm+VesselThick; # half apertures
188 c.Bfield.y = 501.*u.cm+VesselThick+c.Bfield.CoilThick
189
190# TimeDet
191 c.TimeDet = AttrDict(z=0)
192 c.TimeDet.dzBarRow = 1.2 * u.cm
193 c.TimeDet.dzBarCol = 2.4 * u.cm
194 c.TimeDet.zBar = 1 * u.cm
195 c.TimeDet.DZ = (c.TimeDet.dzBarRow + c.TimeDet.dzBarCol + c.TimeDet.zBar) / 2
196 c.TimeDet.DX = 250 * u.cm
197 c.TimeDet.DY = 500 * u.cm
198 c.TimeDet.z = c.Chamber6.z + c.chambers.Tub6length + c.Veto.lidThickness + c.TimeDet.DZ + 1*u.cm # safety margin
199
200 if CaloDesign==0:
201 c.HcalOption = 1
202 c.EcalOption = 1
203 c.preshowerOption = 0
204 c.splitCal = 0
205 elif CaloDesign==3:
206 c.HcalOption = 2
207 c.EcalOption = 1
208 c.preshowerOption = 0
209 c.splitCal = 0
210 elif CaloDesign==1:
211 c.HcalOption = 1
212 c.EcalOption = 1
213 c.preshowerOption = 1
214 elif CaloDesign==2:
215 c.HcalOption = -1
216 c.EcalOption = 2
217 c.preshowerOption = 0
218 else:
219 print("CaloDesign option wrong -> ",CaloDesign)
220 1/0
221
222 presShowerDeltaZ = 0.
223 if c.preshowerOption >0:
224 PreshowerStart = c.TimeDet.z + c.TimeDet.DZ + 5*u.cm + presShowerDeltaZ
225 c.PreshowerFilter0 = AttrDict(z= PreshowerStart )
226 c.PreshowerStation0 = AttrDict(z= c.PreshowerFilter0.z + 10*u.cm )
227
228 c.Preshower = AttrDict(z=0)
229 c.Preshower.XMax = 300.*u.cm
230 c.Preshower.YMax = 600.*u.cm * c.Yheight / (10.*u.m)
231 c.Preshower.ActiveThickness = 0.5*u.cm
232 c.Preshower.FilterThickness0 = 1.4*u.cm
233
234 PreshowerLeverArm=1*u.m
235
236 c.PreshowerFilter1 = AttrDict(z= c.PreshowerStation0.z +PreshowerLeverArm )
237 c.PreshowerStation1 = AttrDict(z= c.PreshowerFilter1.z + 10*u.cm )
238 c.Preshower.FilterThickness1 = 2.*u.cm
239
240 presShowerDeltaZ = PreshowerLeverArm + 2*10*u.cm + 2*2.*u.cm
241
242 c.SplitCal = AttrDict(z=0)
243 c.SplitCal.ZStart = c.TimeDet.z + c.TimeDet.DZ + 5*u.cm + presShowerDeltaZ
244 c.SplitCal.XMax = 600.*u.cm/2. #290.*u.cm #half length
245 c.SplitCal.YMax = 1200.*u.cm/2. #510.*u.cm * c.Yheight / (10.*u.m) #half length
246 c.SplitCal.Empty = 0*u.cm
247 c.SplitCal.BigGap = 100*u.cm
248 c.SplitCal.ActiveECALThickness = 0.56*u.cm
249 c.SplitCal.FilterECALThickness = 0.28*u.cm # 0.56*u.cm 1.757*u.cm
250 c.SplitCal.FilterECALThickness_first = 0.28*u.cm
251 c.SplitCal.ActiveHCALThickness = 90*u.cm
252 c.SplitCal.FilterHCALThickness = 90*u.cm
253 c.SplitCal.nECALSamplings = 50
254 c.SplitCal.nHCALSamplings = 0
255 c.SplitCal.ActiveHCAL = 0
256 c.SplitCal.FilterECALMaterial= 3 # 1=scintillator 2=Iron 3 = lead 4 =Argon
257 c.SplitCal.FilterHCALMaterial= 2
258 c.SplitCal.ActiveECALMaterial= 1
259 c.SplitCal.ActiveHCALMaterial= 1
260 c.SplitCal.ActiveECAL_gas_Thickness=1.12*u.cm
261 c.SplitCal.num_precision_layers=1
262 c.SplitCal.first_precision_layer=6
263 c.SplitCal.second_precision_layer=10
264 c.SplitCal.third_precision_layer=13
265 c.SplitCal.ActiveECAL_gas_gap=10*u.cm
266 c.SplitCal.NModulesInX = 2
267 c.SplitCal.NModulesInY = 4
268 c.SplitCal.NStripsPerModule = 50
269 c.SplitCal.StripHalfWidth = 3*u.cm # c.SplitCal.XMax/(c.SplitCal.NStripsPerModule*c.SplitCal.NModulesInX)
270 c.SplitCal.StripHalfLength = 150*u.cm # c.SplitCal.YMax/c.SplitCal.NModulesInY
271 c.SplitCal.SplitCalThickness=(c.SplitCal.FilterECALThickness_first-c.SplitCal.FilterECALThickness)+(c.SplitCal.FilterECALThickness+c.SplitCal.ActiveECALThickness)*c.SplitCal.nECALSamplings+c.SplitCal.BigGap
272
273 c.ecal = AttrDict(z = c.TimeDet.z + c.TimeDet.DZ + 5*u.cm + presShowerDeltaZ) #
274 c.ecal.File = EcalGeoFile
275 hcalThickness = 232*u.cm
276 if c.HcalOption == 2: hcalThickness = 110*u.cm # to have same interaction length as before
277 if not c.HcalOption < 0:
278 c.hcal = AttrDict(z=c.ecal.z + hcalThickness/2. + 45.*u.cm )
279 c.hcal.hcalSpace = hcalThickness + 5.5*u.cm
280 c.hcal.File = HcalGeoFile
281 else:
282 c.hcal = AttrDict(z=c.ecal.z)
283 if c.EcalOption == 1:
284 c.MuonStation0 = AttrDict(z=c.hcal.z+hcalThickness/2.+20.5*u.cm)
285 if c.EcalOption == 2:
286 c.MuonStation0 = AttrDict(z=c.SplitCal.ZStart+10*u.cm+c.SplitCal.SplitCalThickness)
287
288 c.MuonStation1 = AttrDict(z=c.MuonStation0.z+1*u.m)
289 c.MuonStation2 = AttrDict(z=c.MuonStation0.z+2*u.m)
290 c.MuonStation3 = AttrDict(z=c.MuonStation0.z+3*u.m)
291
292 c.MuonFilter0 = AttrDict(z=c.MuonStation0.z+50.*u.cm)
293 c.MuonFilter1 = AttrDict(z=c.MuonStation0.z+150.*u.cm)
294 c.MuonFilter2 = AttrDict(z=c.MuonStation0.z+250.*u.cm)
295
296 c.Muon = AttrDict(z=0)
297 c.Muon.XMax = 300.*u.cm
298 c.Muon.YMax = 600.*u.cm * c.Yheight / (10.*u.m)
299
300 c.Muon.ActiveThickness = 0.5*u.cm
301 c.Muon.FilterThickness = 30.*u.cm
302
303 # target absorber muon shield setup, decayVolume.length = nominal EOI length, only kept to define z=0
304 c.decayVolume = AttrDict(z=0*u.cm)
305 c.decayVolume.length = 50*u.m
306
307 c.muShield = AttrDict(z=0*u.cm)
308 c.muShieldDesign = muShieldDesign
309 c.muShield.Field = 1.8 # in units of Tesla expected by ShipMuonShield
310 # design 4,5,6
311 c.muShield.LE = 10*u.m # - 0.5 m air - Goliath: 4.5 m - 0.5 m air - nu-tau mu-det: 3 m - 0.5 m air. finally 10m asked by Giovanni
312 c.muShield.dZ0 = 2.5*u.m if muShieldDesign == 6 else 1*u.m
313 c.muShield.dZ1 = 3.5*u.m
314 c.muShield.dZ2 = 6.*u.m
315 c.muShield.dZ3 = 2.5*u.m
316 c.muShield.dZ4 = 3.*u.m
317 c.muShield.dZ5 = 0.*u.m # 28Oct #5 removed
318 c.muShield.dZ6 = 3.*u.m
319 c.muShield.dZ7 = 3.*u.m
320 c.muShield.dZ8 = 3.*u.m
321 c.muShield.dXgap = 0.2*u.m
322 c.muShield.dZgap = 0.1*u.m
323
324 c.muShieldStepGeo = muShieldStepGeo
325 c.muShieldWithCobaltMagnet = muShieldWithCobaltMagnet
326
327 # zGap to compensate automatic shortening of magnets
328 zGap = 0.5 * c.muShield.dZgap # halflengh of gap
329 if muShieldDesign == 7:
330 c.muShield.dZ1 = 0.7 * u.m + zGap
331 c.muShield.dZ2 = 1.7 * u.m + zGap
332 c.muShield.dZ3 = 2.0*u.m + zGap
333 c.muShield.dZ4 = 2.0*u.m + zGap
334 c.muShield.dZ5 = 2.75*u.m + zGap
335 c.muShield.dZ6 = 2.4*u.m + zGap
336 c.muShield.dZ7 = 3.0*u.m + zGap
337 c.muShield.dZ8 = 2.35*u.m + zGap
338 c.muShield.dXgap = 0.*u.m
339 elif muShieldDesign == 9:
340 c.muShield.Field = 1.7 # Tesla
341 c.muShield.dZ1 = 0.35 * u.m + zGap
342 c.muShield.dZ2 = 2.26 * u.m + zGap
343 c.muShield.dZ3 = 2.08 * u.m + zGap
344 c.muShield.dZ4 = 2.07 * u.m + zGap
345 c.muShield.dZ5 = 2.81 * u.m + zGap
346 c.muShield.dZ6 = 2.48 * u.m + zGap
347 c.muShield.dZ7 = 3.05 * u.m + zGap
348 c.muShield.dZ8 = 2.42 * u.m + zGap
349 c.muShield.dXgap = 0. * u.m
350 c.muShield.half_X_max = 179 * u.cm
351 c.muShield.half_Y_max = 317 * u.cm
352 elif muShieldDesign == 8:
353 assert muShieldGeo
354 c.muShieldGeo = muShieldGeo
355 print("Load geo")
356 f = r.TFile.Open(muShieldGeo)
357 params = r.TVectorD()
358 params.Read('params')
359 f.Close()
360 c.muShield.dZ1 = 0.35*u.m + zGap
361 c.muShield.dZ2 = 2.26*u.m + zGap
362 c.muShield.dZ3 = params[2]
363 c.muShield.dZ4 = params[3]
364 c.muShield.dZ5 = params[4]
365 c.muShield.dZ6 = params[5]
366 c.muShield.dZ7 = params[6]
367 c.muShield.dZ8 = params[7]
368 c.muShield.dXgap = 0.*u.m
369
370 offset = 7
371 c.muShield.half_X_max = 0
372 c.muShield.half_Y_max = 0
373 for index in range(2, 8):
374 f_l = params[offset + index * 6 + 1]
375 f_r = params[offset + index * 6 + 2]
376 h_l = params[offset + index * 6 + 3]
377 h_r = params[offset + index * 6 + 4]
378 g_l = params[offset + index * 6 + 5]
379 g_r = params[offset + index * 6 + 6]
380 c.muShield.half_X_max = max(c.muShield.half_X_max, 2 * f_l + g_l, 2 * f_r + g_r)
381 c.muShield.half_Y_max = max(c.muShield.half_Y_max, h_l + f_l, h_r + f_r)
382 c.muShield.half_X_max += 15 * u.cm
383 c.muShield.half_Y_max += 15 * u.cm
384
385 if muShieldDesign in range(7, 10):
386 c.muShield.length = 2 * (
387 c.muShield.dZ1 + c.muShield.dZ2 +
388 c.muShield.dZ3 + c.muShield.dZ4 +
389 c.muShield.dZ5 + c.muShield.dZ6 +
390 c.muShield.dZ7 + c.muShield.dZ8
391 ) + c.muShield.LE
392 c.muShield.z = -(c.decayVolume.length + c.muShield.length) / 2.
393
394 if muShieldDesign == 3:
395 c.muShield.dZ1 = 3.5*u.m
396 c.muShield.dZ2 = 5.*u.m
397 c.muShield.dZ3 = 3.5*u.m
398 c.muShield.dZ4 = 2.0*u.m
399 c.muShield.dZ5 = 1.*u.m
400 c.muShield.dZ6 = 3.*u.m
401 c.muShield.dZ7 = 3.*u.m
402 c.muShield.dZ8 = 3.*u.m
403 c.muShield.dXgap = 0.2*u.m
404
405 if muShieldDesign == 2:
406 c.muShield.dZ0 = 0*u.m # extra hadron absorber
407 c.muShield.dZ1 = 2.5*u.m
408 c.muShield.dZ2 = 3.5*u.m
409 c.muShield.dZ3 = 3.0*u.m
410 c.muShield.dZ4 = 3.0*u.m
411 c.muShield.dZ5 = 2.5*u.m
412 c.muShield.dZ6 = 2.5*u.m
413 c.muShield.length = 2*(c.muShield.dZ1+c.muShield.dZ2+c.muShield.dZ3+c.muShield.dZ4+
414 c.muShield.dZ5+c.muShield.dZ6) + c.muShield.LE # leave some space for nu-tau detector
415 # for passive design, fDesign==1
416 if muShieldDesign == 1:
417 c.muShield.length = 70*u.m
418 c.muShield.z = -c.decayVolume.length/2.-c.muShield.length/2. - c.muShield.LE # leave some space for nu-tau
419 if muShieldDesign == 3 or muShieldDesign == 4 or muShieldDesign == 5:
420 c.muShield.length = 2*(c.muShield.dZ0+c.muShield.dZ1+c.muShield.dZ2+c.muShield.dZ3+c.muShield.dZ4+c.muShield.dZ5+c.muShield.dZ6
421 +c.muShield.dZ7+c.muShield.dZ8 ) + c.muShield.LE # leave some space for nu-tau
422 c.muShield.z = -c.decayVolume.length/2.-c.muShield.length/2.
423 if muShieldDesign == 6:
424 c.muShield.length = 2*(c.muShield.dZ1+c.muShield.dZ2+c.muShield.dZ3+c.muShield.dZ4+c.muShield.dZ5+c.muShield.dZ6
425 +c.muShield.dZ7+c.muShield.dZ8 ) + c.muShield.LE # leave some space for nu-tau
426 c.muShield.z = -c.decayVolume.length/2.-c.muShield.length/2.
427
428 c.hadronAbsorber = AttrDict(z=0*u.cm)
429 if muShieldDesign > 5: c.hadronAbsorber.length = 5.00*u.m
430 if muShieldDesign > 6: c.hadronAbsorber.length = 0*u.m # magnetized, counted inside muonshield
431 else: c.hadronAbsorber.length = 3.00*u.m
432 c.hadronAbsorber.z = c.muShield.z - c.muShield.length/2. - c.hadronAbsorber.length/2.
433
434 c.hadronAbsorber.WithConstField = True
435 c.muShield.WithConstField = True
436
437 c.target = AttrDict(z=0*u.cm)
438 c.targetOpt = targetOpt
439 if targetOpt < 10:
440 c.target.sl = 1*u.cm # air slit total length
441 c.target.length = 50*u.cm + c.target.sl * (targetOpt-1)
442 else:
443 # material,length
444 c.target.M1 = "molybdenum"
445 c.target.L1 = 8.*u.cm
446 c.target.M2 = "molybdenum"
447 c.target.L2 = 2.5*u.cm
448 c.target.M3 = "molybdenum"
449 c.target.L3 = 2.5*u.cm
450 c.target.M4 = "molybdenum"
451 c.target.L4 = 2.5*u.cm
452 c.target.M5 = "molybdenum"
453 c.target.L5 = 2.5*u.cm
454 c.target.M6 = "molybdenum"
455 c.target.L6 = 2.5*u.cm
456 c.target.M7 = "molybdenum"
457 c.target.L7 = 2.5*u.cm
458 c.target.M8 = "molybdenum"
459 c.target.L8 = 2.5*u.cm
460 c.target.M9 = "molybdenum"
461 c.target.L9 = 5.0*u.cm
462 c.target.M10 = "molybdenum"
463 c.target.L10 = 5.0*u.cm
464 c.target.M11 = "molybdenum"
465 c.target.L11 = 6.5*u.cm
466 c.target.M12 = "molybdenum"
467 c.target.L12 = 8.*u.cm
468 c.target.M13 = "molybdenum"
469 c.target.L13 = 8.*u.cm
470 c.target.M14 = "tungsten"
471 c.target.L14 = 5.*u.cm
472 c.target.M15 = "tungsten"
473 c.target.L15 = 8.*u.cm
474 c.target.M16 = "tungsten"
475 c.target.L16 = 10.*u.cm
476 c.target.M17 = "tungsten"
477 c.target.L17 = 20.*u.cm
478 c.target.M18 = "tungsten"
479 c.target.L18 = 35.*u.cm
480 c.target.sl = 0.5*u.cm # H20 slit *17 times
481 c.target.xy = 30.*u.cm # full length in x and y
482 c.target.length = 17*c.target.sl + c.target.L1 + 7*c.target.L2 + 3*c.target.L9 + c.target.L11 + 3*c.target.L12 + c.target.L16 + c.target.L17 + c.target.L18
483 # interaction point, start of target
484 c.target.z = c.hadronAbsorber.z - c.hadronAbsorber.length/2. - c.target.length/2.
485 c.target.z0 = c.target.z - c.target.length/2.
486
487# for the digitizing step
488 c.strawtubes.v_drift = 1./(30*u.ns/u.mm) # for baseline NA62 5mm radius straws)
489 c.strawtubes.sigma_spatial = 0.012*u.cm # according to Massi's TP section
490# size of straws
491 c.strawtubes.StrawLength = c.xMax
492 if tankDesign == 5:
493 zF = c.target.z0+c.zFocusX
494 c.strawtubes.StrawLength12 = c.xMax*(c.TrackStation1.z-2*c.strawtubes.DeltazView-zF)/(z4-zF)
495 c.strawtubes.StrawLengthVeto = c.xMax*(c.vetoStation.z-c.strawtubes.DeltazView-zF)/(z4-zF)
496 zF = c.target.z0+c.zFocusY
497 c.strawtubes.vetoydim = c.Yheight/2.*(c.vetoStation.z-c.strawtubes.DeltazView-zF)/(z4-zF)
498 c.strawtubes.tr12ydim = c.Yheight/2.*(c.TrackStation1.z-2*c.strawtubes.DeltazView-zF)/(z4-zF)
499 c.strawtubes.tr34ydim = int(c.Yheight/2.)
500 else:
501 c.strawtubes.StrawLength12 = c.strawtubes.StrawLength
502 c.strawtubes.StrawLengthVeto = c.strawtubes.StrawLength
503 if tankDesign > 5: c.strawtubes.StrawLengthVeto = 0.5 # switch of veto strawtracker
504 c.strawtubes.vetoydim = int(c.Yheight/2.)
505 c.strawtubes.tr12ydim = int(c.Yheight/2.)
506 c.strawtubes.tr34ydim = int(c.Yheight/2.)
507
508 #Parameters for tau neutrino target Magnet
509 if nuTauTargetDesign!=2:
510 c.EmuMagnet = AttrDict(z=0*u.cm)
511 c.EmuMagnet.Design = nuTauTargetDesign
512 c.EmuMagnet.B=1.25*u.tesla
513 c.EmuMagnet.GapDown = 25*u.cm
514 if c.EmuMagnet.Design==3:
515 scale=1.
516 c.EmuMagnet.WithConstField=False #now loaded field map
517 c.EmuMagnet.X = scale*2.2*u.m
518 c.EmuMagnet.Y = scale*4.0*u.m
519 c.EmuMagnet.Z = 7.2*u.m
520 c.EmuMagnet.BaseX = scale*c.EmuMagnet.X
521 c.EmuMagnet.BaseY = scale*0.7*u.m
522 c.EmuMagnet.BaseZ = scale*c.EmuMagnet.Z
523 c.EmuMagnet.GapDown = 25*u.cm
524 c.EmuMagnet.GapUp = 27*u.cm
525 #c.EmuMagnet.ColX =scale*25*u.cm
526 c.EmuMagnet.ColX = scale*60*u.cm
527 c.EmuMagnet.ColY = scale*c.EmuMagnet.Y - 2 *scale * c.EmuMagnet.BaseY #avoid overlapping between bases and columns
528 c.EmuMagnet.ColZ = scale*c.EmuMagnet.Z
529 c.EmuMagnet.CutLength = scale * 45*u.cm
530 c.EmuMagnet.CutHeight = scale * 144*u.cm
531 c.EmuMagnet.CoilX = c.EmuMagnet.X-2*c.EmuMagnet.ColX
532 c.EmuMagnet.CoilY = 50 *u.cm
533 c.EmuMagnet.Height1 = c.EmuMagnet.Y-2*c.EmuMagnet.BaseY
534 c.EmuMagnet.Height2 = c.EmuMagnet.Height1-2*c.EmuMagnet.CoilY
535 c.EmuMagnet.Thickness = scale*40*u.cm
536 c.EmuMagnet.PillarX = 0.5*u.m
537 c.EmuMagnet.PillarZ = 0.5*u.m
538 c.EmuMagnet.PillarY = 10*u.m - c.EmuMagnet.Y/2 - 0.1*u.mm - c.cave.floorHeightMuonShield
539 if c.EmuMagnet.Design<2:
540 c.EmuMagnet.WithConstField=True #older geometries still use constant fields
541 c.EmuMagnet.Z = 4.5*u.m
542 c.EmuMagnet.GapUp = 27*u.cm
543 if c.EmuMagnet.Design == 1:
544 scale = 1.
545 c.EmuMagnet.X = scale*1.7*u.m
546 c.EmuMagnet.Y = scale*3.2*u.m
547 c.EmuMagnet.Radius = scale*1.1*u.m
548 c.EmuMagnet.Height1 = scale*30*u.cm
549 c.EmuMagnet.Height2 = scale*c.EmuMagnet.Height1
550 c.EmuMagnet.Distance = scale*c.EmuMagnet.X-2*c.EmuMagnet.Height1
551 c.EmuMagnet.ColX =scale*c.EmuMagnet.Distance
552 c.EmuMagnet.ColY = scale*0.7*u.m
553 c.EmuMagnet.ColZ = 0.9*u.m
554 c.EmuMagnet.BaseX = scale*c.EmuMagnet.Height1
555 c.EmuMagnet.BaseY = scale*c.EmuMagnet.Y
556 c.EmuMagnet.BaseZ = scale*c.EmuMagnet.Z
557 c.EmuMagnet.PillarX = 0.5*u.m
558 c.EmuMagnet.PillarZ = 0.5*u.m
559 c.EmuMagnet.PillarY = 10*u.m - c.EmuMagnet.Y/2 - 0.1*u.mm - c.cave.floorHeightMuonShield
560 #10m is the half-height of the cave
561 if c.EmuMagnet.Design == 0: #TP MagnetConfig
562 c.EmuMagnet.X = 3.6*u.m
563 c.EmuMagnet.Radius = 1*u.m
564 c.EmuMagnet.Height1 = 45*u.cm
565 c.EmuMagnet.Height2 = 30*u.cm
566 c.EmuMagnet.Distance = 105*u.cm
567 c.EmuMagnet.BaseX = c.EmuMagnet.X
568 c.EmuMagnet.BaseY = 57*u.cm
569 c.EmuMagnet.BaseZ = c.EmuMagnet.Z
570 c.EmuMagnet.ColX = 0*u.m
571 c.EmuMagnet.ColY = c.EmuMagnet.BaseY
572 c.EmuMagnet.ColZ = 0*u.m
573 c.EmuMagnet.Y = 2*c.EmuMagnet.BaseY+c.EmuMagnet.Height1+c.EmuMagnet.Height2+c.EmuMagnet.Distance
574 c.EmuMagnet.PillarX = 0 *u.m
575 c.EmuMagnet.PillarZ = 0 * u.m
576 c.EmuMagnet.PillarY = 0 * u.m
577
578
579
580
581 #Parameters for tau muon detector
582 c.tauMudet = AttrDict(z=0*u.cm)
583 if nuTauTargetDesign<=2:
584 c.tauMudet.NFe = 12
585 c.tauMudet.NRpc= 11
586 if nuTauTargetDesign==0: #TP
587 c.tauMudet.YRyoke = 90*u.cm
588 c.tauMudet.YRyoke_s = c.tauMudet.YRyoke-30*u.cm
589 c.tauMudet.Xtot = 4.*u.m
590 c.tauMudet.YFe = 8*u.m
591 c.tauMudet.Ytot = c.tauMudet.YFe + 2*c.tauMudet.YRyoke
592 c.tauMudet.PillarX = 0*u.cm
593 c.tauMudet.PillarZ = 0*u.cm
594 c.tauMudet.PillarY=0 *u.cm
595 if nuTauTargetDesign>=1: #NEW with Davide or without magnet
596 scaleMudet=1.0
597 c.tauMudet.YRyoke = scaleMudet*40*u.cm
598 c.tauMudet.YRyoke_s = scaleMudet*27*u.cm
599 c.tauMudet.Xtot = scaleMudet*1.5*u.m
600 c.tauMudet.Ytot = scaleMudet*3.8*u.m
601 c.tauMudet.YFe = c.tauMudet.Ytot - 2*c.tauMudet.YRyoke
602 c.tauMudet.PillarX = 40*u.cm
603 c.tauMudet.PillarZ = 50*u.cm
604 c.tauMudet.PillarY = 10*u.m - c.cave.floorHeightMuonShield - c.tauMudet.Ytot/2 -10*u.cm - 0.1*u.mm
605 c.tauMudet.XRyoke = c.tauMudet.Xtot+20*u.cm
606 c.tauMudet.XRyoke_s = c.tauMudet.Xtot
607 c.tauMudet.Ztot = 4.76*u.m
608 c.tauMudet.XFe = c.tauMudet.Xtot
609 c.tauMudet.XRpc = c.tauMudet.Xtot
610 c.tauMudet.YRpc = c.tauMudet.YFe-20*u.cm
611 c.tauMudet.ZFe = 5.*u.cm
612 c.tauMudet.ZRpc = 2.*u.cm
613 c.tauMudet.ZArm = c.tauMudet.NFe*c.tauMudet.ZFe + c.tauMudet.NRpc*c.tauMudet.ZRpc
614 c.tauMudet.GapD = 27.*u.cm
615 c.tauMudet.GapM = 122*u.cm
616 c.tauMudet.ZRyoke = 2*c.tauMudet.ZArm + c.tauMudet.GapM
617 c.tauMudet.ZRyoke_s = c.tauMudet.GapM
618 c.tauMudet.CoilH = 5*u.cm
619 c.tauMudet.CoilW = 2*u.cm
620 c.tauMudet.CoilG = 2*u.cm
621 c.tauMudet.N =20
622 c.tauMudet.zMudetC = -c.decayVolume.length/2. - c.tauMudet.GapD - c.tauMudet.Ztot/2
623 c.tauMudet.B = 1.5 * u.tesla
624 if nuTauTargetDesign==3:
625 scaleMudet=1.
626 c.tauMudet.NFethick = 4 #upstream slabs, more thick
627 c.tauMudet.NFethin = 4 #downstream slabs, less thick
628 c.tauMudet.NRpc= 8
629
630 c.tauMudet.XFe = scaleMudet*1.950*u.m #layer dimensions, excluded supports
631 c.tauMudet.YFe = scaleMudet*3.850*u.m
632
633 c.tauMudet.ZFethick = 15.*u.cm
634 c.tauMudet.ZFethin = 10.* u.cm
635
636 c.tauMudet.XRpc = c.tauMudet.XFe
637 c.tauMudet.YRpc = c.tauMudet.YFe
638 c.tauMudet.ZRpc = 8.*u.cm
639 #support structure
640 c.tauMudet.UpperSupportX = 30 * u.cm
641 c.tauMudet.UpperSupportY = 32 * u.cm
642 c.tauMudet.LowerSupportX = 30 * u.cm
643 c.tauMudet.LowerSupportY = 40 * u.cm
644 c.tauMudet.LateralSupportX = 30.5 * u.cm
645 c.tauMudet.LateralSupportY = 32 * u.cm
646
647 c.tauMudet.Xtot = c.tauMudet.XFe + 2 * c.tauMudet.LateralSupportX#now we need to include also supports.
648 c.tauMudet.Ytot = c.tauMudet.YFe + c.tauMudet.UpperSupportY + c.tauMudet.LowerSupportY
649 c.tauMudet.Ztot = c.tauMudet.NRpc*c.tauMudet.ZRpc+c.tauMudet.NFethick*c.tauMudet.ZFethick + c.tauMudet.NFethin*c.tauMudet.ZFethin
650 #c.tauMudet.zMudetC = -c.decayVolume.length/2. - c.tauMudet.Ztot/2
651 c.tauMudet.zMudetC = c.Chamber1.z -c.chambers.Tub1length - c.tauMudet.Ztot/2 -31*u.cm;
652 #lateral cuts
653 c.tauMudet.CutHeight = 78.548 * u.cm
654 c.tauMudet.CutLength = (c.tauMudet.CutHeight / 2) / (r.TMath.Tan(r.TMath.DegToRad() * 55))
655 #upper cover
656 c.tauMudet.XCov = c.tauMudet.XFe
657 c.tauMudet.YCov = 6*u.cm
658 c.tauMudet.ZCov = c.tauMudet.NFethick*c.tauMudet.ZFethick+c.tauMudet.NRpc*c.tauMudet.ZRpc+c.tauMudet.NFethin*c.tauMudet.ZFethin
659
660 c.tauMudet.YSpacing = 28.5*u.cm
661 #lateral cover
662 c.tauMudet.XLateral = 7*u.cm
663 c.tauMudet.YLateral = c.tauMudet.LateralSupportY
664 c.tauMudet.ZLateral = c.tauMudet.ZCov
665 #lateral cross
666 c.tauMudet.XCross = 2*u.cm
667 c.tauMudet.YCross = c.tauMudet.YFe-2*c.tauMudet.YLateral-2*c.tauMudet.YSpacing - 8*u.cm
668 c.tauMudet.ZCross = c.tauMudet.ZCov
669 c.tauMudet.WidthArm = 2* u.cm
670 #RPC frame
671 c.tauMudet.XRpc_outer = 284.5*u.cm
672 c.tauMudet.YRpc_outer = 428.2*u.cm
673 c.tauMudet.ZRpc_outer = 2.2*u.cm
674 c.tauMudet.XRpc_inner = 190*u.cm
675 c.tauMudet.YRpc_inner = 372*u.cm
676 c.tauMudet.ZRpc_inner = 1.7*u.cm
677 #RPC Gap
678 c.tauMudet.XRpcGap = c.tauMudet.XRpc_inner
679 c.tauMudet.YRpcGap = 120*u.cm
680 c.tauMudet.ZRpcGap = 0.2*u.cm
681
682 c.tauMudet.PillarX = 40*u.cm
683 c.tauMudet.PillarZ = 50*u.cm
684 c.tauMudet.PillarY = 10*u.m - c.cave.floorHeightMuonShield - c.tauMudet.Ytot/2 - 0.1*u.mm
685 c.tauMudet.XGas = c.tauMudet.XRpc
686 c.tauMudet.YGas = c.tauMudet.YRpc
687 c.tauMudet.ZGas = 1*u.mm
688 c.tauMudet.XStrip = c.tauMudet.XRpc
689 c.tauMudet.YStrip = c.tauMudet.YRpc
690 c.tauMudet.ZStrip = 0.02*u.mm
691 c.tauMudet.XPet = c.tauMudet.XRpc
692 c.tauMudet.YPet = c.tauMudet.YRpc
693 c.tauMudet.ZPet = 0.1*u.mm
694 c.tauMudet.XEle = c.tauMudet.XRpc
695 c.tauMudet.YEle = c.tauMudet.YRpc
696 c.tauMudet.ZEle = 1*u.mm
697
698 if nuTauTargetDesign==0 or nuTauTargetDesign==1:
699 c.EmuMagnet.zC = -c.decayVolume.length/2. - c.tauMudet.GapD - c.tauMudet.Ztot - c.EmuMagnet.GapDown - c.EmuMagnet.Z/2
700
701 if nuTauTargetDesign==3:
702 c.EmuMagnet.zC = c.tauMudet.zMudetC - c.tauMudet.Ztot/2 - c.EmuMagnet.GapDown - c.EmuMagnet.Z/2
703
704 #tau Bricks
705 c.NuTauTarget = AttrDict(z=0*u.cm)
706 c.NuTauTarget.Design = nuTauTargetDesign
707 if nuTauTargetDesign!=2:
708 c.NuTauTarget.zC = c.EmuMagnet.zC
709 if nuTauTargetDesign==2:
710 c.NuTauTarget.zC = -c.decayVolume.length/2. - c.tauMudet.GapD - c.tauMudet.Ztot -2.5*u.m
711
712 if c.NuTauTarget.Design == 0: #TP
713 c.NuTauTarget.row=7
714 c.NuTauTarget.col=15
715 c.NuTauTarget.wall=11
716 if c.NuTauTarget.Design == 1: #NEW with magnet
717 c.NuTauTarget.row=14
718 c.NuTauTarget.col=6
719 c.NuTauTarget.wall=11
720 if c.NuTauTarget.Design == 2: #NEW with NO magnet
721 c.NuTauTarget.row=20
722 c.NuTauTarget.col=9
723 c.NuTauTarget.wall=20
724 if c.NuTauTarget.Design == 3: #One unique magnet, eventually more than one target volume
725 #c.NuTauTarget.n_plates = 56
726 c.NuTauTarget.row = 2
727 c.NuTauTarget.col = 2
728 c.NuTauTarget.wall = 19
729 c.NuTauTarget.n_plates = 56
730
731 c.NuTauTarget.target = 1 #number of neutrino target volumes
732
733 c.NuTauTarget.nuTargetPassive = nuTargetPassive
734
735 # space for the structure that holds the brick
736 c.NuTauTarget.Ydist = 0.0*u.cm
737 c.NuTauTarget.SingleEmFilm = True
738 c.NuTauTarget.EmTh = 0.0070 * u.cm
739 c.NuTauTarget.EmX = 40.0 * u.cm
740 c.NuTauTarget.EmY = 40.0 * u.cm
741 c.NuTauTarget.PBTh = 0.0175 * u.cm
742 c.NuTauTarget.LeadTh = 0.1 * u.cm
743 c.NuTauTarget.EPlW = 2* c.NuTauTarget.EmTh + c.NuTauTarget.PBTh
744 c.NuTauTarget.AllPW = c.NuTauTarget.LeadTh + c.NuTauTarget.EPlW
745 c.NuTauTarget.BrX = 41.0 * u.cm
746 c.NuTauTarget.BrY = 41.0 * u.cm
747 c.NuTauTarget.BrPackZ = 0.1045 * u.cm
748 c.NuTauTarget.BrPackX = c.NuTauTarget.BrX - c.NuTauTarget.EmX
749 c.NuTauTarget.BrPackY = c.NuTauTarget.BrY - c.NuTauTarget.EmY
750 c.NuTauTarget.BrZ = c.NuTauTarget.n_plates * c.NuTauTarget.AllPW + c.NuTauTarget.EPlW + c.NuTauTarget.BrPackZ
751
752 #TargetTrackers!
753 c.NuTauTT = AttrDict(z=0*u.cm)
754 c.NuTauTT.design = nuTauTargetDesign
755 c.NuTauTT.n_hor_planes = 11
756 c.NuTauTT.n_vert_planes = 7
757 c.NuTauTT.scifimat_width = 13.06 * u.cm # old value 13.045
758 c.NuTauTT.scifimat_hor = 94.315 * u.cm #13.045 * 7 + endpieces = length of hor. mats
759 c.NuTauTT.scifimat_vert = 146.495 * u.cm #13.045 * 11 + endpieces = length of vert. mats
760 c.NuTauTT.scifimat_z = 0.145 * u.cm # Scintillating fiber mat
761 c.NuTauTT.support_z = 0.02 * u.cm # Support carbon composite
762 c.NuTauTT.honeycomb_z = 2 * u.cm # Airex (or Nomex)
763 c.NuTauTT.TTX = c.NuTauTT.scifimat_hor
764 c.NuTauTT.TTY = c.NuTauTT.scifimat_vert
765 c.NuTauTT.TTZ = 2 * c.NuTauTT.support_z + 2 * c.NuTauTT.scifimat_z + c.NuTauTT.honeycomb_z
766 c.NuTauTT.n = c.NuTauTarget.wall
767 # should be called after TTX, TTY
768 c.NuTauTarget.xdim = c.NuTauTT.TTX
769 c.NuTauTarget.ydim = c.NuTauTT.TTY
770 c.NuTauTarget.WallXDim = c.NuTauTarget.col*c.NuTauTarget.BrX
771 c.NuTauTarget.WallYDim = c.NuTauTarget.row*c.NuTauTarget.BrY+(c.NuTauTarget.row-1)*c.NuTauTarget.Ydist
772 c.NuTauTarget.WallZDim = c.NuTauTarget.BrZ
773
774 #HPT
775 c.tauHPT = AttrDict(z=0*u.cm)
776 c.tauHPT.design = nuTauTargetDesign
777 c.tauHPT.n_hor_planes = 11
778 c.tauHPT.n_vert_planes = 7
779 c.tauHPT.scifimat_width = c.NuTauTT.scifimat_width
780 c.tauHPT.scifimat_hor = c.NuTauTT.scifimat_hor
781 c.tauHPT.scifimat_vert = c.NuTauTT.scifimat_vert
782 c.tauHPT.scifimat_z = c.NuTauTT.scifimat_z
783 c.tauHPT.support_z = c.NuTauTT.support_z
784 c.tauHPT.honeycomb_z = c.NuTauTT.honeycomb_z
785 c.tauHPT.TX = c.tauHPT.scifimat_hor
786 c.tauHPT.TY = c.tauHPT.scifimat_vert
787 c.tauHPT.TZ = 2 * c.tauHPT.support_z + 2 * c.tauHPT.scifimat_z + c.tauHPT.honeycomb_z
788
789 if nuTauTargetDesign<3:
790 c.tauHPT.DZ = 15*u.cm
791 c.tauHPT.DX = c.tauMudet.XFe
792 c.tauHPT.DY = c.tauMudet.YFe
793 c.tauHPT.ConcreteX = c.tauHPT.DX
794 c.tauHPT.ConcreteY = c.tauMudet.Ytot/2 - c.tauHPT.DY/2
795 c.tauHPT.ConcreteZ = c.tauHPT.DZ
796 if nuTauTargetDesign==3:
797 c.tauHPT.SRDY = 10 * u.cm #additional detectors for improving acceptance
798 c.tauHPT.DX = c.tauHPT.TX
799 c.tauHPT.DY = c.tauHPT.TY
800 c.tauHPT.DZ = c.tauHPT.TZ
801 c.tauHPT.nHPT = 5 # number of downstream trackers after neutrino target
802
803 if nuTauTargetDesign!=2: #TP or NEW with magnet
804 c.NuTauTarget.RohG = 1.5 * u.cm
805 c.NuTauTarget.LayerCESW = c.NuTauTarget.RohG + c.NuTauTarget.EPlW
806 c.NuTauTarget.CESPack = 0.3055 * u.cm
807 c.NuTauTarget.CESW = 2 * c.NuTauTarget.LayerCESW + c.NuTauTarget.EPlW + c.NuTauTarget.CESPack
808 c.NuTauTarget.CellW = c.NuTauTarget.BrZ + c.NuTauTarget.CESW
809 if nuTauTargetDesign!=3:
810 c.NuTauTarget.zdim = c.NuTauTarget.wall* c.NuTauTarget.CellW + (c.NuTauTarget.wall+1)*c.NuTauTT.TTZ
811 if nuTauTargetDesign ==3:
812 c.NuTauTarget.zdim = c.NuTauTarget.wall* c.NuTauTarget.CellW + c.NuTauTarget.wall*c.NuTauTT.TTZ
813 c.NuTauTarget.zC = c.EmuMagnet.zC - c.NuTauTarget.zdim/2.
814 c.tauHPT.TotalDZ = (c.EmuMagnet.Z - c.EmuMagnet.Height1) - c.NuTauTarget.zdim # MagRegion-Target
815 c.tauHPT.distHPT = (c.tauHPT.TotalDZ - c.tauHPT.nHPT * c.tauHPT.DZ) / (c.tauHPT.nHPT - 1)
816
817 if nuTauTargetDesign == 2: #NEW with NO magnet
818 c.NuTauTarget.RohG = 0 * u.cm
819 c.NuTauTarget.LayerCESW =0 *u.cm
820 c.NuTauTarget.CESPack = 0* u.cm
821 c.NuTauTarget.CESW = 0*u.cm
822 c.NuTauTarget.CellW = c.NuTauTarget.BrZ
823 c.NuTauTarget.zdim = c.NuTauTarget.wall* c.NuTauTarget.CellW + (c.NuTauTarget.wall+1)*c.NuTauTT.TTZ
824
825 c.NuTauTarget.BaseX = c.NuTauTarget.xdim + 20*u.cm
826 c.NuTauTarget.BaseY = 20*u.cm
827 c.NuTauTarget.BaseZ = c.NuTauTarget.zdim +40*u.cm
828 c.NuTauTarget.PillarX = 0.5*u.m
829 c.NuTauTarget.PillarZ = 0.5*u.m
830 c.NuTauTarget.PillarY = 10*u.m - c.NuTauTarget.ydim/2 -c.NuTauTarget.BaseY- 0.1*u.mm - c.cave.floorHeightMuonShield
831
832 #Upstream Tagger
833 c.UpstreamTagger = AttrDict(z=0)
834 c.UpstreamTagger.Z_Glass = 0.2 * u.cm
835 c.UpstreamTagger.Y_Glass = 105 * u.cm
836 c.UpstreamTagger.X_Glass = 223 * u.cm
837 c.UpstreamTagger.Z_Glass_Border = 0.2 * u.cm
838 c.UpstreamTagger.Y_Glass_Border = 1.0 * u.cm
839 c.UpstreamTagger.X_Glass_Border = 1.0 * u.cm
840 c.UpstreamTagger.Z_PMMA = 0.8 * u.cm
841 c.UpstreamTagger.Y_PMMA = 108 * u.cm
842 c.UpstreamTagger.X_PMMA = 226 * u.cm
843 c.UpstreamTagger.DY_PMMA = 1.5 * u.cm
844 c.UpstreamTagger.DX_PMMA = 1.5 * u.cm
845 c.UpstreamTagger.DZ_PMMA = 0.1 * u.cm
846 c.UpstreamTagger.Z_FreonSF6 = 0.1 * u.cm
847 c.UpstreamTagger.Y_FreonSF6 = 107 * u.cm
848 c.UpstreamTagger.X_FreonSF6 = 225 * u.cm
849 c.UpstreamTagger.Z_FreonSF6_2 = 0.8 * u.cm
850 c.UpstreamTagger.Y_FreonSF6_2 = 0.5 * u.cm
851 c.UpstreamTagger.X_FreonSF6_2 = 0.5 * u.cm
852 c.UpstreamTagger.Z_FR4 = 0.15 * u.cm
853 c.UpstreamTagger.Y_FR4 = 111 * u.cm
854 c.UpstreamTagger.X_FR4 = 229 * u.cm
855 c.UpstreamTagger.Z_Aluminium = 1.1503 * u.cm
856 c.UpstreamTagger.Y_Aluminium = 111 * u.cm
857 c.UpstreamTagger.X_Aluminium = 233 * u.cm
858 c.UpstreamTagger.DZ_Aluminium = 0.1 * u.cm
859 c.UpstreamTagger.DY_Aluminium = 1 * u.cm
860 c.UpstreamTagger.DX_Aluminium = 0.2 * u.cm
861 c.UpstreamTagger.Z_Air = 1.1503 * u.cm
862 c.UpstreamTagger.Y_Air = 0 * u.cm
863 c.UpstreamTagger.X_Air = 2 * u.cm
864 c.UpstreamTagger.Z_Strip = 0.0003 * u.cm
865 c.UpstreamTagger.Y_Strip = 3.1 * u.cm
866 c.UpstreamTagger.X_Strip = 229 * u.cm
867 c.UpstreamTagger.X_Strip64 = 3.3 * u.cm
868 c.UpstreamTagger.Y_Strip64 = 111 * u.cm
869 c.UpstreamTagger.Z_Position = c.tauMudet.zMudetC + (c.tauMudet.Ztot)/2 + 12.0*u.cm