3 ##################################################################################
5 # This script is based on generate_dunedphase10kt_v2.pl (see description
6 # in there file for more info). Some parameters were changed to generate
7 # a first version of the protodune dual phase geometry (e.g. driftTPCActive
8 # and number of CRM's). The beam window is not included in this version!
9 # For more info, please contact Christoph Alt: christoph.alt@cern.ch
11 ##################################################################################
19 Math::BigFloat->precision(-16);
21 GetOptions( "help|h" => \$help,
22 "suffix|s:s" => \$suffix,
23 "output|o:s" => \$output,
24 "wires|w:s" => \$wires,
25 "optical|opt:s" => \$optical);
29 # If the user requested help, print the usage notes and exit.
34 if ( ! defined $suffix )
36 # The user didn't supply a suffix, so append nothing to the file
42 # Otherwise, stick a "-" before the suffix, so that a suffix of
43 # "test" applied to filename.gdml becomes "filename-test.gdml".
44 $suffix = "-" . $suffix;
47 #if ( ! defined $workspace ) # not done
51 #elsif ( $workspace == 1)
53 # print "\t\tCreating smaller workspace geometry.\n";
55 $basename = "protodunedphase";
59 my $FieldCage_switch="on";
60 $GroundGrid_switch="off";
61 $Cathode_switch="off";
62 $ExtractionGrid_switch="off";
69 $GroundGrid_switch="on";
71 $ExtractionGrid_switch="on";
72 $basename = $basename."_optical";
78 # set wires on to be the default, unless given an input by the user
80 $wires_on = 1; # 1=on, 0=off
91 $basename = $basename."_nowires";
94 #if ( $workspace == 1 )
96 # $basename = $basename."_workspace";
100 ##################################################################
101 ############## Parameters for Charge Readout Plane ###############
103 # dune10kt dual-phase
104 $wirePitch = 0.3125; # channel pitch
105 $nChannelsViewPerCRM = 960; # channels per collection view
106 $borderCRM = 0.5; # dead space at the border of each CRM
108 # dimensions of a single Charge Readout Module (CRM)
109 $widthCRM_active = $wirePitch * $nChannelsViewPerCRM;
110 $lengthCRM_active = $wirePitch * $nChannelsViewPerCRM;
112 $widthCRM = $widthCRM_active + 2 * $borderCRM;
113 $lengthCRM = $lengthCRM_active + 2 * $borderCRM;
115 # number of CRMs in y and z
119 # calculate tpc area based on number of CRMs and their dimensions
120 $widthTPCActive = $nCRM_y * $widthCRM; # around 600
121 $lengthTPCActive = $nCRM_z * $lengthCRM; # around 600
123 # active volume dimensions
124 $driftTPCActive = 597.0;
126 # model anode strips as wires
128 $ReadoutPlane = 2 * $padWidth;
130 #$padHeight = 0.0035;
132 ##################################################################
133 ############## Parameters for TPC and inner volume ###############
135 # inner volume dimensions of the cryostat
141 # width of gas argon layer on top
142 #$HeightGaseousAr = 81.8;
143 $HeightGaseousAr = 51.5;
145 # size of liquid argon buffer
146 $xLArBuffer = $Argon_x - $driftTPCActive - $HeightGaseousAr - $ReadoutPlane;
147 $yLArBuffer = 0.5 * ($Argon_y - $widthTPCActive);
148 $zLArBuffer = 0.5 * ($Argon_z - $lengthTPCActive);
151 #$SteelThickness = 0.12; # membrane
152 $SteelThickness = 0.2; # membrane
154 $Cryostat_x = $Argon_x + 2*$SteelThickness;
155 $Cryostat_y = $Argon_y + 2*$SteelThickness;
156 $Cryostat_z = $Argon_z + 2*$SteelThickness;
158 ##################################################################
159 ############## Field Cage Parameters ###############
161 $FieldShaperSizeX = 304.9;
162 $FieldShaperSizeY = 5.999;
163 $FieldShaperSizeZ = 4.603;
165 $FieldCageShaperProfileShift=-4.82;
166 $NFieldShapers = 100.0;
167 $FFSSeparation = 6.0;
169 $FieldCageSizeX = $FieldShaperSizeX+0.2;
170 $FieldCageSizeY = $FieldShaperSizeY+0.2;
171 $FieldCageSizeZ = $NFieldShapers*$FFSSeparation;
173 $FFSPositionX = 277.5;
174 $FFSPositionY = 153.521;
175 $FFSPositionZ = 309.593;
178 ##################################################################
179 ############## Parameters for PMTs ###############
181 #pos in cm inside the cryostat
182 #$pmt_pos_x = -300-(5.5 * 2.54)+5.115; #just below the active volume
183 #$pmt_pos_x = -300-(5.5 * 2.54)+5.115 + 22 -141.5; just on the top of the cryostat (new version)
184 ##$pmt_pos_x = -300 + 5.115 - 1.27*2.54 + 22 -107.8; #8.4cm from the bottom volTPCActive
187 # $pmt_pos_x = -$Argon_x/2 - 0.5*($HeightPMT);
189 #pmts not equally spaced:
190 @pmt_pos = ( ' y="-238" z="-170" ', #pmt1
191 ' y="-238" z="-34" ', #pmt2
192 ' y="-238" z="34" ', #pmt3
193 ' y="-238" z="170" ', #pmt4
194 ' y="-170" z="-238" ', #pmt5
195 ' y="-170" z="-102" ', #pmt6
196 ' y="-170" z="102" ', #pmt7
197 ' y="-170" z="238" ', #pmt8
198 ' y="-102" z="-170" ', #pmt9
199 ' y="-102" z="-34" ', #pmt10
200 ' y="-102" z="34" ', #pmt11
201 ' y="-102" z="170" ', #pmt12
202 ' y="-34" z="-238" ', #pmt13
203 ' y="-34" z="-102" ', #pmt14
204 ' y="-34" z="-34" ', #pmt15
205 ' y="-34" z="34" ', #pmt16
206 ' y="-34" z="102" ', #pmt17
207 ' y="-34" z="238" ', #pmt18
208 ' y="34" z="-238" ', #pmt19
209 ' y="34" z="-102" ', #pmt20
210 ' y="34" z="-34" ', #pmt21
211 ' y="34" z="34" ', #pmt22
212 ' y="34" z="102" ', #pmt23
213 ' y="34" z="238" ', #pmt24
214 ' y="102" z="-170" ', #pmt25
215 ' y="102" z="-34" ', #pmt26
216 ' y="102" z="34" ', #pmt27
217 ' y="102" z="170" ', #pmt28
218 ' y="170" z="-238" ', #pmt29
219 ' y="170" z="-102" ', #pmt30
220 ' y="170" z="102" ', #pmt31
221 ' y="170" z="238" ', #pmt32
222 ' y="238" z="-170" ', #pmt33
223 ' y="238" z="-34" ', #pmt34
224 ' y="238" z="34" ', #pmt35
225 ' y="238" z="170" '); #PMT36
227 #pmts equally spaced:
228 # @pmt_pos = ( ' y="-162.5" z="-162.5"', #PMT1
229 # ' y="-162.5" z="-97.5"', #PMT2
230 # ' y="-162.5" z="-32.5"', #PMT3
231 # ' y="-162.5" z="32.5"', #PMT4
232 # ' y="-162.5" z="97.5"', #PMT5
233 # ' y="-162.5" z="162.5"', #PMT6
234 # ' y="-97.5" z="-162.5"', #PMT7
235 # ' y="-97.5" z="-97.5"', #PMT8
236 # ' y="-97.5" z="-32.5"', #PMT9
237 # ' y="-97.5" z="32.5"', #PMT10#
238 # ' y="-97.5" z="97.5"', #PMT11
239 # ' y="-97.5" z="162.5"', #PMT12
240 # ' y="-32.5" z="-162.5"', #PMT13
241 # ' y="-32.5" z="-97.5"', #PMT14
242 # ' y="-32.5" z="-32.5"', #PMT15
243 # ' y="-32.5" z="32.5"', #PMT16
244 # ' y="-32.5" z="97.5"', #PMT17
245 # ' y="-32.5" z="162.5"', #PMT18
246 # ' y="32.5" z="-162.5"', #PMT19
247 # ' y="32.5" z="-97.5"', #PMT20
248 # ' y="32.5" z="-32.5"', #PMT21
249 # ' y="32.5" z="32.5"', #PMT22
250 # ' y="32.5" z="97.5"', #PMT23
251 # ' y="32.5" z="162.5"', #PMT24
252 # ' y="97.5" z="-162.5"', #PMT25
253 # ' y="97.5" z="-97.5"', #PMT26
254 # ' y="97.5" z="-32.5"', #PMT27
255 # ' y="97.5" z="32.5"', #PMT27
256 # ' y="97.5" z="97.5"', #PMT29
257 # ' y="97.5" z="162.5"', #PMT30
258 # ' y="162.5" z="-162.5"', #PMT31
259 # ' y="162.5" z="-97.5"', #PMT32
260 # ' y="162.5" z="-32.5"', #PMT33
261 # ' y="162.5" z="32.5"', #PMT34
262 # ' y="162.5" z="97.5"', #PMT35
263 # ' y="162.5" z="162.5"'); #PMT36
265 ##################################################################
266 ############## DetEnc and World relevant parameters #############
273 $FracMassOfSteel = 0.5; #The steel support is not a solid block, but a mixture of air and steel
274 $FracMassOfAir = 1 - $FracMassOfSteel;
277 $SpaceSteelSupportToWall = 200;
278 $SpaceSteelSupportToCeiling = 200;
280 $DetEncWidth = $Cryostat_x
281 + 2*($SteelSupport_x + $FoamPadding) + 2*$SpaceSteelSupportToWall;
282 $DetEncHeight = $Cryostat_y
283 + 2*($SteelSupport_y + $FoamPadding) + $SpaceSteelSupportToCeiling;
284 $DetEncLength = $Cryostat_z
285 + 2*($SteelSupport_z + $FoamPadding) + 2*$SpaceSteelSupportToWall;
287 $posCryoInDetEnc_y = 0;
288 $posCryoInDetEnc_y2 = - $DetEncHeight/2 + $SteelSupport_y + $FoamPadding + $Cryostat_y/2;
290 $posTopSteelStruct = $Argon_x/2+$FoamPadding+$SteelSupport_x;
291 $posBotSteelStruct = -$Argon_x/2-$FoamPadding-$SteelSupport_x;
292 $posZBackSteelStruct = $Argon_z/2+$FoamPadding+$SteelSupport_z;
293 $posZFrontSteelStruct = -$Argon_z/2-$FoamPadding-$SteelSupport_z;
294 $posLeftSteelStruct = -$Argon_y/2-$FoamPadding-$SteelSupport_y;
295 $posRightSteelStruct = $Argon_y/2+$FoamPadding+$SteelSupport_y;
297 $RockThickness = 3000;
299 # We want the world origin to be at the very front of the fiducial volume.
300 # move it to the front of the enclosure, then back it up through the concrete/foam,
301 # then through the Cryostat shell, then through the upstream dead LAr (including the
302 # dead LAr on the edge of the TPC)
303 # This is to be added to the z position of every volume in volWorld
305 $OriginZSet = $DetEncLength/2.0
306 - $SpaceSteelSupportToWall
313 # We want the world origin to be vertically centered on active TPC
314 # This is to be added to the y position of every volume in volWorld
316 $OriginYSet = $DetEncHeight/2.0
321 - $widthTPCActive/2.0
322 + $posCryoInDetEnc_y2;
324 $OriginXSet = $DetEncWidth/2.0
325 -$SpaceSteelSupportToWall
330 -$driftTPCActive/2.0;
333 ##################################################################
334 ############### Parameters for det elements ######################
337 #$Cathode_x = $widthTPCActive;
339 #$Cathode_z = $lengthTPCActive;
343 #+++++++++++++++++++++++++ End defining variables ++++++++++++++++++++++++++
346 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
347 #+++++++++++++++++++++++++++++++++++++++++ usage +++++++++++++++++++++++++++++++++++++++++
348 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
352 print "Usage: $0 [-h|--help] [-o|--output <fragments-file>] [-s|--suffix <string>]\n";
353 print " if -o is omitted, output goes to STDOUT; <fragments-file> is input to make_gdml.pl\n";
354 print " -s <string> appends the string to the file names; useful for multiple detector versions\n";
355 print " -h prints this message, then quits\n";
360 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
361 #++++++++++++++++++++++++++++++++++++++ gen_Define +++++++++++++++++++++++++++++++++++++++
362 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
367 # Create the <define> fragment file name,
368 # add file to list of fragments,
370 $DEF = $basename."_Def" . $suffix . ".gdml";
371 push (@gdmlFiles, $DEF);
373 open(DEF) or die("Could not open file $DEF for writing");
377 <?xml version='1.0'?>
387 <position name="posCryoInDetEnc" unit="cm" x="0" y="$posCryoInDetEnc_y" z="0"/>
388 <position name="posCenter" unit="cm" x="0" y="0" z="0"/>
389 <rotation name="rPlus90AboutX" unit="deg" x="90" y="0" z="0"/>
390 <rotation name="rMinus90AboutX" unit="deg" x="270" y="0" z="0"/>
392 <rotation name="rMinus90AboutYMinus90AboutX" unit="deg" x="270" y="270" z="0"/>
393 <rotation name="rPlus180AboutXPlus180AboutY" unit="deg" x="180" y="180" z="0"/>
394 <rotation name="rIdentity" unit="deg" x="0" y="0" z="0"/>
396 <rotation name="rPlus180AboutX" unit="deg" x="180" y="0" z="0"/>
397 <rotation name="rPlus180AboutY" unit="deg" x="0" y="180" z="0"/>
398 <rotation name="rPlus180AboutZ" unit="deg" x="0" y="0" z="180"/>
400 <rotation name="rPlus90AboutY" unit="deg" x="0" y="90" z="0"/>
401 <rotation name="rMinus90AboutY" unit="deg" x="0" y="270" z="0"/>
404 <rotation name="rot04" unit="deg" x="0" y="270" z="90"/>
405 <rotation name="rot07" unit="deg" x="0" y="90" z="90"/>
407 <rotation name="rot03" unit="deg" x="0" y="90" z="270"/>
408 <rotation name="rot08" unit="deg" x="0" y="270" z="270"/>
410 <rotation name="rot06" unit="deg" x="180" y="270" z="0"/>
411 <rotation name="rot05" unit="deg" x="180" y="90" z="0"/>
413 <rotation name="rPlus90AboutZ" unit="deg" x="0" y="0" z="90"/>
414 <rotation name="rMinus90AboutZ" unit="deg" x="0" y="0" z="270"/>
417 <rotation name="rBeamW3" unit="deg" x="0" y="-16.1824077173347" z="43.7252002244654"/>
430 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
431 #+++++++++++++++++++++++++++++++++++++ gen_Materials +++++++++++++++++++++++++++++++++++++
432 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
437 # Create the <materials> fragment file name,
438 # add file to list of output GDML fragments,
440 $MAT = $basename."_Materials" . $suffix . ".gdml";
441 push (@gdmlFiles, $MAT);
444 open(MAT) or die("Could not open file $MAT for writing");
446 # Add any materials special to this geometry by defining a mulitline string
447 # and passing it to the gdmlMaterials::gen_Materials() function.
449 <!-- preliminary values -->
450 <material name="AirSteelMixture" formula="AirSteelMixture">
451 <D value=" @{[0.001205*(1-$FracMassOfSteel) + 7.9300*$FracMassOfSteel]} " unit="g/cm3"/>
452 <fraction n="$FracMassOfSteel" ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
453 <fraction n="$FracMassOfAir" ref="Air"/>
457 # add the general materials used anywere
458 print MAT gdmlMaterials::gen_Materials( $asmix );
465 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
466 #++++++++++++++++++++++++++++++++++++++ gen_ExtractionGrid +++++++++++++++++++++++++++++++++++
467 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
469 sub gen_ExtractionGrid {
471 $ExtractionGrid = $basename."_ExtractionGrid" . $suffix . ".gdml";
472 push (@gdmlFiles, $ExtractionGrid);
473 $ExtractionGrid = ">" . $ExtractionGrid;
474 open(ExtractionGrid) or die("Could not open file $ExtractionGrid for writing");
476 # The standard XML prefix and starting the gdml
477 print ExtractionGrid <<EOF;
478 <?xml version='1.0'?>
483 $ExtractionGridRadious = 0.05;
484 $ExtractionGridPitch = 0.3;
486 $ExtractionGridSizeX = 2*$ExtractionGridRadious;
488 $ExtractionGridSizeY = $widthCRM_active;
489 $ExtractionGridSizeZ = $lengthCRM_active;
491 print ExtractionGrid <<EOF;
494 <tube name="solExtractionGridCable" rmin="0" rmax="$ExtractionGridRadious" z="$ExtractionGridSizeZ" deltaphi="360" startphi="0" aunit="deg" lunit="cm"/>
495 <box name="solExtractionGrid" x="@{[$ExtractionGridSizeX]}" y="$ExtractionGridSizeY" z="@{[$ExtractionGridSizeZ]}" lunit="cm"/>
501 print ExtractionGrid <<EOF;
505 <volume name="volExtractionGridCable">
506 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
507 <solidref ref="solExtractionGridCable"/>
510 <volume name="volExtractionGrid">
511 <materialref ref="LAr"/>
512 <solidref ref="solExtractionGrid"/>
515 for($ii=0;$ii<$ExtractionGridSizeY;$ii=$ii+$ExtractionGridPitch)
517 print ExtractionGrid <<EOF;
519 <volumeref ref="volExtractionGridCable"/>
520 <position name="posExtractionGridCable$ii" unit="cm" x="0" y="@{[$ii-0.5*$ExtractionGridSizeY]}" z="0"/>
521 <rotation name="GGrot$aux2" unit="deg" x="0" y="90" z="0" />
527 for($jj=0;$jj<$ExtractionGridSizeZ;$jj=$jj+$ExtractionGridPitch)
529 print ExtractionGrid <<EOF;
531 <volumeref ref="volExtractionGridCable"/>
532 <position name="posExtractionGridCableLat$jj" unit="cm" x="0" y="0" z="@{[$jj-0.5*$ExtractionGridSizeZ]}"/>
533 <rotation name="GGrot$aux2" unit="deg" x="90" y="0" z="0" />
539 print ExtractionGrid <<EOF;
545 close(ExtractionGrid);
550 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
551 #++++++++++++++++++++++++++++++++++++++++ gen_TPC ++++++++++++++++++++++++++++++++++++++++
552 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
556 my $TPCActive_x = $driftTPCActive;
557 my $TPCActive_y = $widthCRM_active;
558 my $TPCActive_z = $lengthCRM_active;
561 my $TPC_x = $TPCActive_x + $ReadoutPlane;
562 my $TPC_y = $widthCRM;
563 my $TPC_z = $lengthCRM;
566 $TPC = $basename."_TPC" . $suffix . ".gdml";
567 push (@gdmlFiles, $TPC);
569 open(TPC) or die("Could not open file $TPC for writing");
571 # The standard XML prefix and starting the gdml
573 <?xml version='1.0'?>
578 # All the TPC solids save the wires.
581 <box name="CRM" lunit="cm"
585 <box name="CRMVPlane" lunit="cm"
589 <box name="CRMZPlane" lunit="cm"
593 <box name="CRMActive" lunit="cm"
600 #++++++++++++++++++++++++++++ Wire Solids ++++++++++++++++++++++++++++++
601 # in principle we only need only one wire solid, since CRM is a square
602 # but to be more general ...
606 <tube name="CRMWireV"
607 rmax="@{[0.5*$padWidth]}"
612 <tube name="CRMWireZ"
613 rmax="@{[0.5*$padWidth]}"
623 # Begin structure and create wire logical volumes
627 <volume name="volTPCActive">
628 <materialref ref="LAr"/>
629 <solidref ref="CRMActive"/>
636 <volume name="volTPCWireV">
637 <materialref ref="Copper_Beryllium_alloy25"/>
638 <solidref ref="CRMWireV"/>
641 <volume name="volTPCWireZ">
642 <materialref ref="Copper_Beryllium_alloy25"/>
643 <solidref ref="CRMWireZ"/>
650 <volume name="volTPCPlaneV">
651 <materialref ref="LAr"/>
652 <solidref ref="CRMVPlane"/>
655 if ($wires_on==1) # add wires to Z plane
657 for($i=0;$i<$nChannelsViewPerCRM;++$i)
659 my $ypos = -0.5 * $TPCActive_y + ($i+0.5)*$wirePitch + 0.5*$padWidth;
663 <volumeref ref="volTPCWireV"/>
664 <position name="posWireV$i" unit="cm" x="0" y="$ypos" z="0"/>
665 <rotationref ref="rIdentity"/>
674 <volume name="volTPCPlaneZ">
675 <materialref ref="LAr"/>
676 <solidref ref="CRMZPlane"/>
680 if ($wires_on==1) # add wires to X plane
682 for($i=0;$i<$nChannelsViewPerCRM;++$i)
685 my $zpos = -0.5 * $TPCActive_z + ($i+0.5)*$wirePitch + 0.5*$padWidth;
688 <volumeref ref="volTPCWireZ"/>
689 <position name="posWireZ$i" unit="cm" x="0" y="0" z="$zpos"/>
690 <rotationref ref="rPlus90AboutX"/>
702 $posVplane[0] = 0.5*$TPC_x - 1.5*$padWidth;
706 $posZplane[0] = 0.5*$TPC_x - 0.5*$padWidth;
710 $posTPCActive[0] = -$ReadoutPlane;
711 $posTPCActive[1] = 0;
712 $posTPCActive[2] = 0;
714 $ExtractionGridX = 0.5*$Argon_x-$HeightGaseousAr-0.5-0.5*$ExtractionGridSizeX;
715 $ExtractionGridY = 0;
716 $ExtractionGridZ = 0;
718 $ExtractionGridX = 0.5*$TPC_x-0.5-0.5*$ExtractionGridSizeX;
719 $ExtractionGridY = 0;
720 $ExtractionGridZ = 0;
722 #wrap up the TPC file
725 <volume name="volTPC">
726 <materialref ref="LAr"/>
727 <solidref ref="CRM"/>
729 <volumeref ref="volTPCPlaneV"/>
730 <position name="posPlaneV" unit="cm"
731 x="$posVplane[0]" y="$posVplane[1]" z="$posVplane[2]"/>
732 <rotationref ref="rIdentity"/>
735 <volumeref ref="volTPCPlaneZ"/>
736 <position name="posPlaneZ" unit="cm"
737 x="$posZplane[0]" y="$posZplane[1]" z="$posZplane[2]"/>
738 <rotationref ref="rIdentity"/>
741 <volumeref ref="volTPCActive"/>
742 <position name="posActive" unit="cm"
743 x="$posTPCActive[0]" y="$posTPCActive[1]" z="$posTPCActive[2]"/>
744 <rotationref ref="rIdentity"/>
748 if ( $ExtractionGrid_switch eq "on" )
753 <volumeref ref="volExtractionGrid"/>
754 <position name="posExtractionGrid" unit="cm" x="$ExtractionGridX" y="$ExtractionGridY" z="$ExtractionGridZ"/>
773 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
774 #++++++++++++++++++++++++++++++++++++++ gen_FieldCage +++++++++++++++++++++++++++++++++++++
775 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
783 $FieldCage = $basename."_FieldCage" . $suffix . ".gdml";
784 push (@gdmlFiles, $FieldCage);
785 $FieldCage = ">" . $FieldCage;
786 open(FieldCage) or die("Could not open file $FieldCage for writing");
788 # Create the <define> fragment file name,
789 # add file to list of fragments,
795 # The standard XML prefix and starting the gdml
796 print FieldCage <<EOF;
797 <?xml version='1.0'?>
800 # The printing solids used in the Field Cage
801 print FieldCage <<EOF;
805 <xtru name="FIELD_SHAPER-SOL" lunit="mm">
806 <twoDimVertex x="3.174889" y="4.182078"/>
807 <twoDimVertex x="3.287192" y="4.163508"/>
808 <twoDimVertex x="3.392385" y="4.120019"/>
809 <twoDimVertex x="3.485016" y="4.053866"/>
810 <twoDimVertex x="3.560284" y="3.968476"/>
811 <twoDimVertex x="3.614289" y="3.868273"/>
812 <twoDimVertex x="3.640993" y="3.777188"/>
813 <twoDimVertex x="3.650003" y="3.682696"/>
814 <twoDimVertex x="3.650003" y="0.765841000000002"/>
815 <twoDimVertex x="3.635299" y="0.645475999999999"/>
816 <twoDimVertex x="3.59205" y="0.532188999999999"/>
817 <twoDimVertex x="3.522803" y="0.432644"/>
818 <twoDimVertex x="3.431628" y="0.352698"/>
819 <twoDimVertex x="3.323888" y="0.297053000000002"/>
820 <twoDimVertex x="3.226003" y="0.271650999999999"/>
821 <twoDimVertex x="3.125008" y="0.266466999999999"/>
822 <twoDimVertex x="3.044094" y="0.263959"/>
823 <twoDimVertex x="2.964646" y="0.248422999999999"/>
824 <twoDimVertex x="2.852753" y="0.201684"/>
825 <twoDimVertex x="2.755402" y="0.129382"/>
826 <twoDimVertex x="2.67832" y="0.0357690000000019"/>
827 <twoDimVertex x="2.626041" y="-0.0736460000000001"/>
828 <twoDimVertex x="2.60164" y="-0.192428"/>
829 <twoDimVertex x="2.606552" y="-0.313592"/>
830 <twoDimVertex x="2.640488" y="-0.430011"/>
831 <twoDimVertex x="2.701452" y="-0.534835000000001"/>
832 <twoDimVertex x="2.785858" y="-0.6219"/>
833 <twoDimVertex x="2.888742" y="-0.686086"/>
834 <twoDimVertex x="3.004052" y="-0.723614999999999"/>
835 <twoDimVertex x="3.125005" y="-0.732282000000001"/>
836 <twoDimVertex x="3.245956" y="-0.740949000000001"/>
837 <twoDimVertex x="3.361264" y="-0.778479999999998"/>
838 <twoDimVertex x="3.464146" y="-0.842666000000001"/>
839 <twoDimVertex x="3.548551" y="-0.929731"/>
840 <twoDimVertex x="3.609514" y="-1.034553"/>
841 <twoDimVertex x="3.639776" y="-1.131048"/>
842 <twoDimVertex x="3.650003" y="-1.231656"/>
843 <twoDimVertex x="3.650003" y="-4.051359"/>
844 <twoDimVertex x="3.636188" y="-4.168081"/>
845 <twoDimVertex x="3.595506" y="-4.278353"/>
846 <twoDimVertex x="3.530206" y="-4.376082"/>
847 <twoDimVertex x="3.443895" y="-4.455866"/>
848 <twoDimVertex x="3.341345" y="-4.513298"/>
849 <twoDimVertex x="3.247548" y="-4.54175"/>
850 <twoDimVertex x="3.150003" y="-4.551358"/>
851 <twoDimVertex x="2.599999" y="-4.551358"/>
852 <twoDimVertex x="2.521782" y="-4.557514"/>
853 <twoDimVertex x="2.44549" y="-4.57583"/>
854 <twoDimVertex x="2.338749" y="-4.625038"/>
855 <twoDimVertex x="2.246446" y="-4.697805"/>
856 <twoDimVertex x="2.173679" y="-4.790109"/>
857 <twoDimVertex x="2.124471" y="-4.89685"/>
858 <twoDimVertex x="2.10154" y="-5.012128"/>
859 <twoDimVertex x="2.106155" y="-5.129575"/>
860 <twoDimVertex x="2.138059" y="-5.2427"/>
861 <twoDimVertex x="2.19549" y="-5.345251"/>
862 <twoDimVertex x="2.275275" y="-5.431561"/>
863 <twoDimVertex x="2.373003" y="-5.496861"/>
864 <twoDimVertex x="2.483276" y="-5.537543"/>
865 <twoDimVertex x="2.599999" y="-5.551358"/>
866 <twoDimVertex x="4.449998" y="-5.551358"/>
867 <twoDimVertex x="4.547543" y="-5.54175"/>
868 <twoDimVertex x="4.64134" y="-5.513298"/>
869 <twoDimVertex x="4.743891" y="-5.455866"/>
870 <twoDimVertex x="4.830201" y="-5.376082"/>
871 <twoDimVertex x="4.895501" y="-5.278353"/>
872 <twoDimVertex x="4.936183" y="-5.168081"/>
873 <twoDimVertex x="4.949998" y="-5.051358"/>
874 <twoDimVertex x="4.949998" y="3.827153"/>
875 <twoDimVertex x="4.965356" y="3.950123"/>
876 <twoDimVertex x="5.010485" y="4.065541"/>
877 <twoDimVertex x="5.082615" y="4.166314"/>
878 <twoDimVertex x="5.177314" y="4.246251"/>
879 <twoDimVertex x="5.288764" y="4.300442"/>
880 <twoDimVertex x="5.389517" y="4.323481"/>
881 <twoDimVertex x="5.492853" y="4.325318"/>
882 <twoDimVertex x="9.961787" y="3.782179"/>
883 <twoDimVertex x="13.85859" y="2.875176"/>
884 <twoDimVertex x="17.583122" y="1.413806"/>
885 <twoDimVertex x="21.056972" y="-0.571162999999999"/>
886 <twoDimVertex x="21.410387" y="-0.867622000000001"/>
887 <twoDimVertex x="21.693333" y="-1.231946"/>
888 <twoDimVertex x="21.893082" y="-1.647748"/>
889 <twoDimVertex x="22.000649" y="-2.096324"/>
890 <twoDimVertex x="22.011195" y="-2.557496"/>
891 <twoDimVertex x="21.924246" y="-3.01052"/>
892 <twoDimVertex x="21.743713" y="-3.435018"/>
893 <twoDimVertex x="21.477717" y="-3.811897"/>
894 <twoDimVertex x="21.138223" y="-4.124202"/>
895 <twoDimVertex x="20.740501" y="-4.357886"/>
896 <twoDimVertex x="20.302442" y="-4.502438"/>
897 <twoDimVertex x="19.84375" y="-4.551358"/>
898 <twoDimVertex x="14.900003" y="-4.551358"/>
899 <twoDimVertex x="14.821786" y="-4.557514"/>
900 <twoDimVertex x="14.745494" y="-4.57583"/>
901 <twoDimVertex x="14.638754" y="-4.625038"/>
902 <twoDimVertex x="14.54645" y="-4.697805"/>
903 <twoDimVertex x="14.473683" y="-4.790109"/>
904 <twoDimVertex x="14.424475" y="-4.89685"/>
905 <twoDimVertex x="14.401544" y="-5.012128"/>
906 <twoDimVertex x="14.406159" y="-5.129575"/>
907 <twoDimVertex x="14.438063" y="-5.2427"/>
908 <twoDimVertex x="14.495494" y="-5.345251"/>
909 <twoDimVertex x="14.575279" y="-5.431561"/>
910 <twoDimVertex x="14.673007" y="-5.496862"/>
911 <twoDimVertex x="14.78328" y="-5.537543"/>
912 <twoDimVertex x="14.900003" y="-5.551358"/>
913 <twoDimVertex x="19.843727" y="-5.551355"/>
914 <twoDimVertex x="20.513314" y="-5.479951"/>
915 <twoDimVertex x="21.152782" y="-5.268942"/>
916 <twoDimVertex x="21.733367" y="-4.927821"/>
917 <twoDimVertex x="22.228955" y="-4.471929"/>
918 <twoDimVertex x="22.617251" y="-3.921775"/>
919 <twoDimVertex x="22.880791" y="-3.302104"/>
920 <twoDimVertex x="23.007719" y="-2.640792"/>
921 <twoDimVertex x="22.992327" y="-1.967586"/>
922 <twoDimVertex x="22.835306" y="-1.312766"/>
923 <twoDimVertex x="22.543721" y="-0.705788999999999"/>
924 <twoDimVertex x="22.130685" y="-0.173957000000001"/>
925 <twoDimVertex x="21.614779" y="0.258807000000001"/>
926 <twoDimVertex x="18.014949" y="2.315762"/>
927 <twoDimVertex x="14.155346" y="3.830128"/>
928 <twoDimVertex x="10.117223" y="4.770024"/>
929 <twoDimVertex x="4.51123" y="5.404618"/>
930 <twoDimVertex x="-1.128658" y="5.551358"/>
931 <twoDimVertex x="-10.117225" y="4.770024"/>
932 <twoDimVertex x="-14.155346" y="3.830128"/>
933 <twoDimVertex x="-18.014946" y="2.315762"/>
934 <twoDimVertex x="-21.614774" y="0.258808999999999"/>
935 <twoDimVertex x="-22.130682" y="-0.173954999999999"/>
936 <twoDimVertex x="-22.543718" y="-0.705787000000001"/>
937 <twoDimVertex x="-22.835302" y="-1.312765"/>
938 <twoDimVertex x="-22.992326" y="-1.967584"/>
939 <twoDimVertex x="-23.007719" y="-2.64079"/>
940 <twoDimVertex x="-22.880788" y="-3.302103"/>
941 <twoDimVertex x="-22.61725" y="-3.921773"/>
942 <twoDimVertex x="-22.228952" y="-4.471928"/>
943 <twoDimVertex x="-21.733366" y="-4.92782"/>
944 <twoDimVertex x="-21.15278" y="-5.268942"/>
945 <twoDimVertex x="-20.513313" y="-5.479951"/>
946 <twoDimVertex x="-19.843727" y="-5.551358"/>
947 <twoDimVertex x="-14.900001" y="-5.551358"/>
948 <twoDimVertex x="-14.821785" y="-5.545203"/>
949 <twoDimVertex x="-14.745493" y="-5.526886"/>
950 <twoDimVertex x="-14.638752" y="-5.477678"/>
951 <twoDimVertex x="-14.546447" y="-5.404911"/>
952 <twoDimVertex x="-14.47368" y="-5.312607"/>
953 <twoDimVertex x="-14.424472" y="-5.205866"/>
954 <twoDimVertex x="-14.401542" y="-5.090588"/>
955 <twoDimVertex x="-14.406156" y="-4.973141"/>
956 <twoDimVertex x="-14.438062" y="-4.860016"/>
957 <twoDimVertex x="-14.495493" y="-4.757466"/>
958 <twoDimVertex x="-14.575277" y="-4.671155"/>
959 <twoDimVertex x="-14.673006" y="-4.605854"/>
960 <twoDimVertex x="-14.783279" y="-4.565174"/>
961 <twoDimVertex x="-14.900001" y="-4.551358"/>
962 <twoDimVertex x="-19.84375" y="-4.551355"/>
963 <twoDimVertex x="-20.30244" y="-4.502438"/>
964 <twoDimVertex x="-20.740499" y="-4.357886"/>
965 <twoDimVertex x="-21.13822" y="-4.124202"/>
966 <twoDimVertex x="-21.477714" y="-3.811899"/>
967 <twoDimVertex x="-21.743711" y="-3.43502"/>
968 <twoDimVertex x="-21.924244" y="-3.010522"/>
969 <twoDimVertex x="-22.011194" y="-2.557498"/>
970 <twoDimVertex x="-22.000646" y="-2.096328"/>
971 <twoDimVertex x="-21.893081" y="-1.647752"/>
972 <twoDimVertex x="-21.693334" y="-1.23195"/>
973 <twoDimVertex x="-21.410389" y="-0.867626000000001"/>
974 <twoDimVertex x="-21.056972" y="-0.571165999999998"/>
975 <twoDimVertex x="-17.583122" y="1.413806"/>
976 <twoDimVertex x="-13.858589" y="2.875176"/>
977 <twoDimVertex x="-9.961782" y="3.782178"/>
978 <twoDimVertex x="-5.492853" y="4.325312"/>
979 <twoDimVertex x="-5.369017" y="4.320551"/>
980 <twoDimVertex x="-5.250157" y="4.285479"/>
981 <twoDimVertex x="-5.143572" y="4.222252"/>
982 <twoDimVertex x="-5.055813" y="4.134755"/>
983 <twoDimVertex x="-4.992267" y="4.028359"/>
984 <twoDimVertex x="-4.960678" y="3.929951"/>
985 <twoDimVertex x="-4.949997" y="3.827153"/>
986 <twoDimVertex x="-4.949997" y="-5.051358"/>
987 <twoDimVertex x="-4.940388" y="-5.148903"/>
988 <twoDimVertex x="-4.911935" y="-5.2427"/>
989 <twoDimVertex x="-4.854504" y="-5.345251"/>
990 <twoDimVertex x="-4.77472" y="-5.431561"/>
991 <twoDimVertex x="-4.676991" y="-5.496861"/>
992 <twoDimVertex x="-4.566719" y="-5.537543"/>
993 <twoDimVertex x="-4.449997" y="-5.551358"/>
994 <twoDimVertex x="-2.599997" y="-5.551358"/>
995 <twoDimVertex x="-2.52178" y="-5.545203"/>
996 <twoDimVertex x="-2.445489" y="-5.526886"/>
997 <twoDimVertex x="-2.338748" y="-5.477678"/>
998 <twoDimVertex x="-2.246443" y="-5.404911"/>
999 <twoDimVertex x="-2.173677" y="-5.312607"/>
1000 <twoDimVertex x="-2.124468" y="-5.205866"/>
1001 <twoDimVertex x="-2.101538" y="-5.090588"/>
1002 <twoDimVertex x="-2.106153" y="-4.973141"/>
1003 <twoDimVertex x="-2.138057" y="-4.860016"/>
1004 <twoDimVertex x="-2.195489" y="-4.757466"/>
1005 <twoDimVertex x="-2.275273" y="-4.671155"/>
1006 <twoDimVertex x="-2.373002" y="-4.605854"/>
1007 <twoDimVertex x="-2.483274" y="-4.565174"/>
1008 <twoDimVertex x="-2.599997" y="-4.551358"/>
1009 <twoDimVertex x="-3.150001" y="-4.551358"/>
1010 <twoDimVertex x="-3.266724" y="-4.537543"/>
1011 <twoDimVertex x="-3.376997" y="-4.496862"/>
1012 <twoDimVertex x="-3.474725" y="-4.431561"/>
1013 <twoDimVertex x="-3.55451" y="-4.345251"/>
1014 <twoDimVertex x="-3.611941" y="-4.2427"/>
1015 <twoDimVertex x="-3.640394" y="-4.148904"/>
1016 <twoDimVertex x="-3.650001" y="-4.051359"/>
1017 <twoDimVertex x="-3.650001" y="-1.231656"/>
1018 <twoDimVertex x="-3.635296" y="-1.111289"/>
1019 <twoDimVertex x="-3.592049" y="-0.998002"/>
1020 <twoDimVertex x="-3.522801" y="-0.89846"/>
1021 <twoDimVertex x="-3.431626" y="-0.818512999999999"/>
1022 <twoDimVertex x="-3.323887" y="-0.762865999999999"/>
1023 <twoDimVertex x="-3.226001" y="-0.737466000000001"/>
1024 <twoDimVertex x="-3.125007" y="-0.732282000000001"/>
1025 <twoDimVertex x="-3.049645" y="-0.722729999999999"/>
1026 <twoDimVertex x="-2.976599" y="-0.701872999999999"/>
1027 <twoDimVertex x="-2.875039" y="-0.650507999999999"/>
1028 <twoDimVertex x="-2.787724" y="-0.577507999999998"/>
1029 <twoDimVertex x="-2.719181" y="-0.486654000000002"/>
1030 <twoDimVertex x="-2.672959" y="-0.382652"/>
1031 <twoDimVertex x="-2.651454" y="-0.270893000000001"/>
1032 <twoDimVertex x="-2.65578" y="-0.157163000000001"/>
1033 <twoDimVertex x="-2.685712" y="-0.0473590000000002"/>
1034 <twoDimVertex x="-2.739699" y="0.0528300000000002"/>
1035 <twoDimVertex x="-2.814946" y="0.138217000000001"/>
1036 <twoDimVertex x="-2.907552" y="0.204374999999999"/>
1037 <twoDimVertex x="-3.012722" y="0.247876000000002"/>
1038 <twoDimVertex x="-3.125003" y="0.266466999999999"/>
1039 <twoDimVertex x="-3.245954" y="0.275136"/>
1040 <twoDimVertex x="-3.361263" y="0.312666"/>
1041 <twoDimVertex x="-3.464144" y="0.376850999999998"/>
1042 <twoDimVertex x="-3.548549" y="0.463915"/>
1043 <twoDimVertex x="-3.609512" y="0.568739000000001"/>
1044 <twoDimVertex x="-3.639774" y="0.665232"/>
1045 <twoDimVertex x="-3.650001" y="0.765841000000002"/>
1046 <twoDimVertex x="-3.650001" y="3.682696"/>
1047 <twoDimVertex x="-3.637045" y="3.795785"/>
1048 <twoDimVertex x="-3.598845" y="3.903012"/>
1049 <twoDimVertex x="-3.537384" y="3.998822"/>
1050 <twoDimVertex x="-3.455846" y="4.078246"/>
1051 <twoDimVertex x="-3.358455" y="4.137171"/>
1052 <twoDimVertex x="-3.268812" y="4.168376"/>
1053 <twoDimVertex x="-3.174888" y="4.182084"/>
1056 <section zOrder="0" zPosition="-1523.5077" xOffset="0" yOffset="0" scalingFactor="1"/>
1057 <section zOrder="1" zPosition="1431.2323" xOffset="0" yOffset="0" scalingFactor="1"/>
1058 <section zOrder="2" zPosition="1523.5077" xOffset="0" yOffset="@{[10*$FieldCageShaperProfileShift]}" scalingFactor="1"/>
1063 <box name="FieldCageModule" lunit="cm"
1066 z="$FieldCageSizeZ"/>
1072 print FieldCage <<EOF;
1078 <volume name="volFIELDSHAPER">
1079 <materialref ref="ALUMINUM_Al"/>
1080 <solidref ref="FIELD_SHAPER-SOL"/>
1084 <volume name="volFieldCageModule">
1085 <materialref ref="LAr"/>
1086 <solidref ref="FieldCageModule"/>
1089 for ( $i=0; $i<$NFieldShapers; $i=$i+1 ) { # pmts with coating
1091 $Zposition = +0.5*$FieldCageSizeZ-0.5*$FFSSeparation-$i*$FFSSeparation;
1092 print FieldCage <<EOF;
1095 <volumeref ref="volFIELDSHAPER"/>
1096 <position name="posFieldShaper$i" unit="cm" x="0" y="@{[-0.5*$FieldCageShaperProfileShift]}" z="$Zposition"/>
1097 <rotation name="FShaperRot$i" unit="deg" x="0" y="270" z="0"/>
1103 print FieldCage <<EOF;
1113 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1114 #++++++++++++++++++++++++++++++++++++++ gen_GroundGrid +++++++++++++++++++++++++++++++++++
1115 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1117 sub gen_GroundGrid {
1119 $GroundGrid = $basename."_GroundGrid" . $suffix . ".gdml";
1120 push (@gdmlFiles, $GroundGrid);
1121 $GroundGrid = ">" . $GroundGrid;
1122 open(GroundGrid) or die("Could not open file $GroundGrid for writing");
1124 # The standard XML prefix and starting the gdml
1125 print GroundGrid <<EOF;
1126 <?xml version='1.0'?>
1131 $GroundGridTubeLength = 297.5;
1132 $GroundGridInnerRadious = 1.85;
1133 $GroundGridOuterRadious = 2.0;
1134 $GroundGridTorRad = 16;
1136 $GroundGridInnerStructureLength = 313.5;
1137 $GroundGridInnerStructureWidth = 2;
1138 $GroundGridInnerStructureHeight = 4;
1139 $GroundGridInnerStructureSeparation = 65.0;
1140 $GroundGridInnerStructureNumberOfBars = 4;
1142 $GroundGridInnerStructureNumberOfCablesPerInnerSquare = 5.0;
1143 $GroundGridInnerStructureCableRadious = 0.1;
1144 $GroundGridInnerStructureCableSeparation = $GroundGridInnerStructureSeparation/($GroundGridInnerStructureNumberOfCablesPerInnerSquare+1);
1146 print GroundGrid <<EOF;
1149 <torus name="GroundGridCorner" rmin="$GroundGridInnerRadious" rmax="$GroundGridOuterRadious" rtor="$GroundGridTorRad" deltaphi="90" startphi="0" aunit="deg" lunit="cm"/>
1150 <tube name="GroundGridtube" rmin="$GroundGridInnerRadious" rmax="$GroundGridOuterRadious" z="$GroundGridTubeLength" deltaphi="360" startphi="0" aunit="deg" lunit="cm"/>
1151 <box name="GroundGridInnerBoxBorder" x="@{[0.5*$GroundGridInnerStructureWidth]}" y="$GroundGridInnerStructureHeight" z="@{[$GroundGridInnerStructureLength]}" lunit="cm"/>
1152 <box name="GroundGridInnerBox" x="@{[$GroundGridInnerStructureWidth]}" y="$GroundGridInnerStructureHeight" z="@{[$GroundGridInnerStructureLength]}" lunit="cm"/>
1153 <box name="GroundGridModule" x="@{[$GroundGridInnerStructureLength+2+$GroundGridOuterRadious]}" y="$GroundGridInnerStructureHeight" z="@{[$GroundGridInnerStructureLength+2+$GroundGridOuterRadious]}" lunit="cm"/>
1154 <tube name="GroundGridCable" rmin="0" rmax="$GroundGridInnerStructureCableRadious" z="@{[$GroundGridInnerStructureLength]}" deltaphi="360" startphi="0" aunit="deg" lunit="cm"/>
1158 <union name="GGunion1">
1159 <first ref="GroundGridtube"/>
1160 <second ref="GroundGridCorner"/>
1161 <position name="GGcorner1" unit="cm" x="@{[-$GroundGridTorRad]}" y="0" z="@{[0.5*$GroundGridTubeLength]}"/>
1162 <rotation name="GGrot1" unit="deg" x="90" y="0" z="0" />
1165 <union name="GGunion2">
1166 <first ref="GGunion1"/>
1167 <second ref="GroundGridtube"/>
1168 <position name="GGcorner2" unit="cm" x="@{[-0.5*$GroundGridTubeLength-$GroundGridTorRad]}" y="0" z="@{[+0.5*$GroundGridTubeLength+$GroundGridTorRad]}"/>
1169 <rotation name="GGrot2" unit="deg" x="0" y="90" z="0" />
1172 <union name="GGunion3">
1173 <first ref="GGunion2"/>
1174 <second ref="GroundGridInnerBoxBorder"/>
1175 <position name="GGcorner3" unit="cm" x="@{[-$GroundGridTubeLength-$GroundGridTorRad+0.25*$GroundGridInnerStructureWidth]}" y="0" z="@{[$GroundGridTorRad-0.5*($GroundGridInnerStructureLength-$GroundGridTubeLength)]}"/>
1179 <union name="GGunion4">
1180 <first ref="GGunion3"/>
1181 <second ref="GroundGridInnerBoxBorder"/>
1182 <position name="GGcorner4" unit="cm" x="@{[-0.5*$GroundGridTubeLength-$GroundGridTorRad+0.5*($GroundGridInnerStructureLength-$GroundGridTubeLength)]}" y="0" z="@{[-0.5*$GroundGridTubeLength+0.25*$GroundGridInnerStructureWidth]}"/>
1183 <rotation name="GGrot4" unit="deg" x="0" y="90" z="0" />
1190 $xGGorigin=0.5*($GroundGridInnerStructureLength+2+$GroundGridOuterRadious)-$GroundGridOuterRadious-2;
1191 $zGGoriging=-0.5*($GroundGridInnerStructureLength+2+$GroundGridOuterRadious)+0.5*$GroundGridTubeLength;
1194 print GroundGrid <<EOF;
1198 <volume name="volGroundGridCable">
1199 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1200 <solidref ref="GroundGridCable"/>
1203 <volume name="volGroundGridInnerBox">
1204 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1205 <solidref ref="GroundGridInnerBox"/>
1208 <volume name="volGGunion">
1209 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1210 <solidref ref="GGunion4"/>
1213 <volume name="volGroundGrid">
1214 <materialref ref="LAr"/>
1215 <solidref ref="GroundGridModule"/>
1218 <volumeref ref="volGGunion"/>
1219 <position name="posGG18" unit="cm" x="@{[$xGGorigin]}" y="0" z="@{[$zGGoriging]}"/>
1226 for($ii=0;$ii<$GroundGridInnerStructureNumberOfBars;$ii++)
1229 print GroundGrid <<EOF;
1231 <volumeref ref="volGroundGridInnerBox"/>
1232 <position name="posGGInnerBox$ii" unit="cm" x="@{[$xGGorigin-$GroundGridTubeLength-$GroundGridTorRad+$GroundGridInnerStructureWidth+($ii+1)*$GroundGridInnerStructureSeparation]}" y="0" z="@{[zGGoriging+$GroundGridTorRad-0.5*($GroundGridInnerStructureLength-$GroundGridTubeLength)-0.5*$GroundGridTorRad- 0.5*$GroundGridOuterRadious]}"/>
1238 for($ii=0;$ii<=$GroundGridInnerStructureNumberOfBars;$ii++)
1240 for($jj=0;$jj<$GroundGridInnerStructureNumberOfCablesPerInnerSquare;$jj++)
1242 print GroundGrid <<EOF;
1244 <volumeref ref="volGroundGridCable"/>
1245 <position name="posGGCable$ii$jj" unit="cm" x="@{[$xGGorigin-$GroundGridTubeLength-$GroundGridTorRad+$GroundGridInnerStructureWidth+($ii)*$GroundGridInnerStructureSeparation + ($jj+1)*$GroundGridInnerStructureCableSeparation]}" y="0" z="@{[zGGoriging+$GroundGridTorRad-0.5*($GroundGridInnerStructureLength-$GroundGridTubeLength)-0.5*$GroundGridTorRad- 0.5*$GroundGridOuterRadious]}"/>
1248 if($ii ==$GroundGridInnerStructureNumberOfBars) { if($jj == 3){ $jj=$GroundGridInnerStructureNumberOfCablesPerInnerSquare;}}
1253 for($ii=0;$ii<$GroundGridInnerStructureNumberOfBars;$ii++)
1256 print GroundGrid <<EOF;
1258 <volumeref ref="volGroundGridInnerBox"/>
1259 <position name="posGGInnerBoxLat$ii" unit="cm" x="@{[$xGGorigin-0.5*$GroundGridTubeLength-$GroundGridTorRad+0.5*($GroundGridInnerStructureLength-$GroundGridTubeLength)]}" y="0" z="@{[zGGoriging-0.5*$GroundGridTubeLength+$GroundGridInnerStructureWidth +($ii+1)*$GroundGridInnerStructureSeparation - 0.5*$GroundGridTorRad- 0.5*$GroundGridOuterRadious]}"/>
1260 <rotation name="GGrot$aux2" unit="deg" x="0" y="90" z="0" />
1265 print GroundGrid <<EOF;
1277 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1278 #++++++++++++++++++++++++++++++++++++++ gen_Cathode +++++++++++++++++++++++++++++++++++++
1279 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1283 $Cathode = $basename."_Cathode" . $suffix . ".gdml";
1284 push (@gdmlFiles, $Cathode);
1285 $Cathode = ">" . $Cathode;
1286 open(Cathode) or die("Could not open file $Cathode for writing");
1288 # The standard XML prefix and starting the gdml
1289 print Cathode <<EOF;
1290 <?xml version='1.0'?>
1295 $CathodeTubeLength = 297.5;
1296 $CathodeInnerRadious = 1.85;
1297 $CathodeOuterRadious = 2.0;
1298 $CathodeTorRad = 16;
1300 $CathodeInnerStructureLength = 313.5;
1301 $CathodeInnerStructureWidth = 2;
1302 $CathodeInnerStructureHeight = 4;
1303 $CathodeInnerStructureSeparation = 65.0;
1304 $CathodeInnerStructureNumberOfBars = 4;
1306 $CathodeInnerStructureNumberOfCablesPerInnerSquare = 5.0;
1307 $CathodeInnerStructureCableRadious = 0.5;
1308 $CathodeInnerStructureCableSeparation = $CathodeInnerStructureSeparation/($CathodeInnerStructureNumberOfCablesPerInnerSquare+1);
1309 $CathodeInnerCableLength = 128.0;
1310 $CathodeInnerCableLengthShort = 47.5;#48.5;
1312 $CathodeSupportTubeLength = 252.0;
1313 $CathodeSupportInnerRadious = 1.85;
1314 $CathodeSupportOuterRadious = 2.0;
1315 $CathodeSupportTorRad = 12;
1317 $CathodeSupportInnerStructureLength = 264.0;
1318 $CathodeSupportInnerStructureWidth = 2;
1319 $CathodeSupportInnerStructureHeight = 4;
1320 $CathodeSupportInnerStructureSeparation = 65.0;
1321 $CathodeSupportInnerStructureNumberOfBars = 3;
1323 $CathodeSupportDistance =20;
1324 $CathodeModuleX =$CathodeInnerStructureLength+2+$CathodeOuterRadious;
1325 $CathodeModuleY =$CathodeInnerStructureHeight + $CathodeSupportDistance;
1326 $CathodeModuleZ =$CathodeInnerStructureLength+2+$CathodeOuterRadious;
1328 $CathodeSupportSeparatorsHeight=$CathodeSupportDistance-$CathodeInnerStructureHeight;
1330 $CathodeSupportSeparatorsBorderLength=33;#53.39;
1331 print Cathode <<EOF;
1334 <torus name="CathodeCorner" rmin="$CathodeInnerRadious" rmax="$CathodeOuterRadious" rtor="$CathodeTorRad" deltaphi="90" startphi="0" aunit="deg" lunit="cm"/>
1335 <tube name="Cathodetube" rmin="$CathodeInnerRadious" rmax="$CathodeOuterRadious" z="$CathodeTubeLength" deltaphi="360" startphi="0" aunit="deg" lunit="cm"/>
1336 <box name="CathodeInnerBoxBorder" x="@{[0.5*$CathodeInnerStructureWidth]}" y="$CathodeInnerStructureHeight" z="@{[$CathodeInnerStructureLength]}" lunit="cm"/>
1337 <box name="CathodeInnerBox" x="@{[$CathodeInnerStructureWidth]}" y="$CathodeInnerStructureHeight" z="@{[$CathodeInnerStructureLength]}" lunit="cm"/>
1338 <box name="CathodeModule" x="@{[$CathodeModuleX]}" y="$CathodeModuleY" z="@{[$CathodeModuleZ]}" lunit="cm"/>
1339 <box name="CathodeSupportSeparators" x="@{[$CathodeSupportInnerStructureWidth]}" y="@{[$CathodeSupportSeparatorsHeight]}" z="@{[$CathodeSupportInnerStructureHeight]}" lunit="cm"/>
1340 <box name="CathodeSupportSeparatorsBorder" x="@{[$CathodeSupportInnerStructureWidth]}" y="$CathodeSupportSeparatorsBorderLength" z="@{[$CathodeSupportInnerStructureHeight]}" lunit="cm"/>
1341 <tube name="CathodeCable" rmin="0" rmax="$CathodeInnerStructureCableRadious" z="@{[$CathodeInnerCableLength]}" deltaphi="360" startphi="0" aunit="deg" lunit="cm"/>
1342 <tube name="CathodeCableShort" rmin="0" rmax="$CathodeInnerStructureCableRadious" z="@{[$CathodeInnerCableLengthShort]}" deltaphi="360" startphi="0" aunit="deg" lunit="cm"/>
1343 <tube name="CathodeCableShortShort" rmin="0" rmax="$CathodeInnerStructureCableRadious" z="@{[$CathodeInnerCableLengthShort-3]}" deltaphi="360" startphi="0" aunit="deg" lunit="cm"/>
1347 <union name="Cathunion1">
1348 <first ref="Cathodetube"/>
1349 <second ref="CathodeCorner"/>
1350 <position name="Cathcorner1" unit="cm" x="@{[-$CathodeTorRad]}" y="0" z="@{[0.5*$CathodeTubeLength]}"/>
1351 <rotation name="Cathrot1" unit="deg" x="90" y="0" z="0" />
1354 <union name="Cathunion2">
1355 <first ref="Cathunion1"/>
1356 <second ref="Cathodetube"/>
1357 <position name="Cathcorner2" unit="cm" x="@{[-0.5*$CathodeTubeLength-$CathodeTorRad]}" y="0" z="@{[+0.5*$CathodeTubeLength+$CathodeTorRad]}"/>
1358 <rotation name="Cathrot2" unit="deg" x="0" y="90" z="0" />
1361 <union name="Cathunion3">
1362 <first ref="Cathunion2"/>
1363 <second ref="CathodeInnerBoxBorder"/>
1364 <position name="Cathcorner3" unit="cm" x="@{[-$CathodeTubeLength-$CathodeTorRad+0.25*$CathodeInnerStructureWidth]}" y="0" z="@{[$CathodeTorRad-0.5*($CathodeInnerStructureLength-$CathodeTubeLength)]}"/>
1368 <union name="Cathunion4">
1369 <first ref="Cathunion3"/>
1370 <second ref="CathodeInnerBoxBorder"/>
1371 <position name="Cathcorner4" unit="cm" x="@{[-0.5*$CathodeTubeLength-$CathodeTorRad+0.5*($CathodeInnerStructureLength-$CathodeTubeLength)]}" y="0" z="@{[-0.5*$CathodeTubeLength+0.25*$CathodeInnerStructureWidth]}"/>
1372 <rotation name="Cathrot4" unit="deg" x="0" y="90" z="0" />
1376 <torus name="CathodeSupportCorner" rmin="$CathodeSupportInnerRadious" rmax="$CathodeSupportOuterRadious" rtor="$CathodeSupportTorRad" deltaphi="90" startphi="0" aunit="deg" lunit="cm"/>
1377 <tube name="CathodeSupporttube" rmin="$CathodeSupportInnerRadious" rmax="$CathodeSupportOuterRadious" z="$CathodeSupportTubeLength" deltaphi="360" startphi="0" aunit="deg" lunit="cm"/>
1378 <box name="CathodeSupportInnerBoxBorder" x="@{[0.5*$CathodeSupportInnerStructureWidth]}" y="$CathodeSupportInnerStructureHeight" z="@{[$CathodeSupportInnerStructureLength]}" lunit="cm"/>
1379 <box name="CathodeSupportInnerBox" x="@{[$CathodeSupportInnerStructureWidth]}" y="$CathodeSupportInnerStructureHeight" z="@{[$CathodeSupportInnerStructureLength]}" lunit="cm"/>
1380 <box name="CathodeSupportModule" x="@{[$CathodeSupportInnerStructureLength+2+$CathodeSupportOuterRadious]}" y="$CathodeSupportInnerStructureHeight" z="@{[$CathodeSupportInnerStructureLength+2+$CathodeSupportOuterRadious]}" lunit="cm"/>
1384 <union name="CathSupunion1">
1385 <first ref="CathodeSupporttube"/>
1386 <second ref="CathodeSupportCorner"/>
1387 <position name="CathSupcorner1" unit="cm" x="@{[-$CathodeSupportTorRad]}" y="0" z="@{[0.5*$CathodeSupportTubeLength]}"/>
1388 <rotation name="CathSuprot1" unit="deg" x="90" y="0" z="0" />
1391 <union name="CathSupunion2">
1392 <first ref="CathSupunion1"/>
1393 <second ref="CathodeSupporttube"/>
1394 <position name="CathSupcorner2" unit="cm" x="@{[-0.5*$CathodeSupportTubeLength-$CathodeSupportTorRad]}" y="0" z="@{[+0.5*$CathodeSupportTubeLength+$CathodeSupportTorRad]}"/>
1395 <rotation name="CathSuprot2" unit="deg" x="0" y="90" z="0" />
1398 <union name="CathSupunion3">
1399 <first ref="CathSupunion2"/>
1400 <second ref="CathodeSupportInnerBoxBorder"/>
1401 <position name="CathSupcorner3" unit="cm" x="@{[-$CathodeSupportTubeLength-$CathodeSupportTorRad+0.25*$CathodeSupportInnerStructureWidth]}" y="0" z="@{[$CathodeSupportTorRad-0.5*($CathodeSupportInnerStructureLength-$CathodeSupportTubeLength)]}"/>
1405 <union name="CathSupunion4">
1406 <first ref="CathSupunion3"/>
1407 <second ref="CathodeSupportInnerBoxBorder"/>
1408 <position name="CathSupcorner4" unit="cm" x="@{[-0.5*$CathodeSupportTubeLength-$CathodeSupportTorRad+0.5*($CathodeSupportInnerStructureLength-$CathodeSupportTubeLength)]}" y="0" z="@{[-0.5*$CathodeSupportTubeLength+0.25*$CathodeSupportInnerStructureWidth]}"/>
1409 <rotation name="CathSuprot4" unit="deg" x="0" y="90" z="0" />
1417 $xCathorigin=0.5*($CathodeModuleX)-$CathodeOuterRadious-2;
1418 $yCathorigin=0.5*$CathodeModuleY - 0.5*$CathodeInnerStructureHeight;
1419 $zCathoriging=-0.5*($CathodeModuleX)+0.5*$CathodeTubeLength;
1420 $xCathSuporigin=$xCathorigin+($CathodeSupportInnerStructureLength-$CathodeInnerStructureLength);
1421 $zCathSuporigin=-$zCathoriging-($CathodeInnerStructureLength+$CathodeOuterRadious-$CathodeSupportInnerStructureLength-$CathodeSupportOuterRadious)+7;
1423 $xCathSuporigin=$xCathorigin+($CathodeSupportInnerStructureLength-$CathodeInnerStructureLength);
1424 $zCathSuporigin=-0.5*($CathodeModuleZ)+0.5*$CathodeSupportTubeLength;
1425 $yCathSuporigin=$yCathorigin-$CathodeSupportDistance;
1428 print Cathode <<EOF;
1434 <volume name="volCathodeSupportSeparators">
1435 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1436 <solidref ref="CathodeSupportSeparators"/>
1439 <volume name="volCathodeSupportSeparatorsBorder">
1440 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1441 <solidref ref="CathodeSupportSeparatorsBorder"/>
1447 <volume name="volCathodeCable">
1448 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1449 <solidref ref="CathodeCable"/>
1452 <volume name="volCathodeCableShort">
1453 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1454 <solidref ref="CathodeCableShort"/>
1457 <volume name="volCathodeCableShortShort">
1458 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1459 <solidref ref="CathodeCableShortShort"/>
1462 <volume name="volCathodeInnerBox">
1463 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1464 <solidref ref="CathodeInnerBox"/>
1467 <volume name="volCathodeSupportInnerBox">
1468 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1469 <solidref ref="CathodeSupportInnerBox"/>
1473 <volume name="volCathunion">
1474 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1475 <solidref ref="Cathunion4"/>
1478 <volume name="volCathSupunion">
1479 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1480 <solidref ref="CathSupunion4"/>
1483 <volume name="volCathode">
1484 <materialref ref="LAr"/>
1485 <solidref ref="CathodeModule"/>
1488 <volumeref ref="volCathunion"/>
1489 <position name="posCath18" unit="cm" x="@{[$xCathorigin]}" y="$yCathorigin" z="@{[$zCathoriging]}"/>
1493 <volumeref ref="volCathSupunion"/>
1494 <position name="posCathSup" unit="cm" x="@{[$xCathSuporigin]}" y="$yCathSuporigin" z="@{[$zCathSuporigin]}"/>
1501 for($ii=0;$ii<$CathodeInnerStructureNumberOfBars;$ii++)
1504 print Cathode <<EOF;
1506 <volumeref ref="volCathodeInnerBox"/>
1507 <position name="posCathInnerBox$ii" unit="cm" x="@{[$xCathorigin-$CathodeTubeLength-$CathodeTorRad+$CathodeInnerStructureWidth+($ii+1)*$CathodeInnerStructureSeparation]}" y="$yCathorigin" z="@{[zCathoriging+$CathodeTorRad-0.5*($CathodeInnerStructureLength-$CathodeTubeLength)-0.5*$CathodeTorRad- 0.5*$CathodeOuterRadious]}"/>
1515 for($ii=0;$ii<$CathodeInnerStructureNumberOfBars;$ii++)
1518 print Cathode <<EOF;
1520 <volumeref ref="volCathodeInnerBox"/>
1521 <position name="posCathInnerBoxLat$ii" unit="cm" x="@{[$xCathorigin-0.5*$CathodeTubeLength-$CathodeTorRad+0.5*($CathodeInnerStructureLength-$CathodeTubeLength)]}" y="$yCathorigin" z="@{[zCathoriging-0.5*$CathodeTubeLength+$CathodeInnerStructureWidth +($ii+1)*$CathodeInnerStructureSeparation - 0.5*$CathodeTorRad- 0.5*$CathodeOuterRadious]}"/>
1522 <rotation name="Cathrot$aux2" unit="deg" x="0" y="90" z="0" />
1529 for($kk=0;$kk<$CathodeInnerStructureNumberOfBars;$kk=$kk+2)
1531 for($ii=0;$ii<=$CathodeInnerStructureNumberOfBars;$ii=$ii+2)
1533 if ($kk==2) {$ii=$ii+2;};
1535 for($jj=0;$jj<2*$CathodeInnerStructureNumberOfCablesPerInnerSquare+1;$jj++)
1537 print Cathode <<EOF;
1539 <volumeref ref="volCathodeCable"/>
1540 <position name="posCathCable$ii$jj$kk" unit="cm" x="@{[($xCathorigin-$CathodeTubeLength-$CathodeTorRad+$CathodeInnerStructureWidth+($ii)*$CathodeInnerStructureSeparation+($jj+1)*$CathodeInnerStructureCableSeparation)]}" y="$yCathorigin" z="@{[zCathoriging-0.5*$CathodeTubeLength+$CathodeInnerStructureWidth +($kk+1)*$CathodeInnerStructureSeparation - 0.5*$CathodeTorRad- 0.5*$CathodeOuterRadious]}"/>
1543 if($ii ==$CathodeInnerStructureNumberOfCablesPerInnerSquare-1 && $jj ==$CathodeInnerStructureNumberOfCablesPerInnerSquare-2) {$jj=2*$CathodeInnerStructureNumberOfCablesPerInnerSquare+1;}
1544 if($jj ==$CathodeInnerStructureNumberOfCablesPerInnerSquare-1) {$jj++;}
1547 if ($kk==2) {$ii=$ii+2;};
1548 if ($kk==0) {$ii=$ii+2;};
1555 for($ii=0;$ii<=$CathodeInnerStructureNumberOfBars;$ii=$ii+4)
1557 for($jj=0;$jj<2*$CathodeInnerStructureNumberOfCablesPerInnerSquare+1;$jj++)
1559 print Cathode <<EOF;
1561 <volumeref ref="volCathodeCableShort"/>
1562 <position name="posCathCableShort$ii$jj$kk" unit="cm" x="@{[($xCathorigin-$CathodeTubeLength-$CathodeTorRad+$CathodeInnerStructureWidth+($ii)*$CathodeInnerStructureSeparation+($jj+1)*$CathodeInnerStructureCableSeparation)]}" y="$yCathorigin" z="@{[zCathoriging-0.5*$CathodeTubeLength+$CathodeInnerStructureWidth +($kk)*$CathodeInnerStructureSeparation - 0.5*$CathodeTorRad- 0.5*$CathodeOuterRadious+0.5*$CathodeInnerCableLengthShort+1]}"/>
1565 if($ii ==$CathodeInnerStructureNumberOfCablesPerInnerSquare-1 && $jj ==$CathodeInnerStructureNumberOfCablesPerInnerSquare-3) {$jj=2*$CathodeInnerStructureNumberOfCablesPerInnerSquare+1;}
1566 if($jj ==$CathodeInnerStructureNumberOfCablesPerInnerSquare-1) {$jj++;}
1567 #Falta el $ii 4 $jj 2 that needs to be shorter to not overlap.
1569 #print "$ii $jj \n";
1577 print Cathode <<EOF;
1579 <volumeref ref="volCathodeCableShortShort"/>
1580 <position name="posCathCableShort$ii$jj$kk" unit="cm" x="@{[($xCathorigin-$CathodeTubeLength-$CathodeTorRad+$CathodeInnerStructureWidth+($ii)*$CathodeInnerStructureSeparation+($jj+1)*$CathodeInnerStructureCableSeparation)]}" y="$yCathorigin" z="@{[zCathoriging-0.5*$CathodeTubeLength+$CathodeInnerStructureWidth +($kk)*$CathodeInnerStructureSeparation - 0.5*$CathodeTorRad- 0.5*$CathodeOuterRadious+0.5*$CathodeInnerCableLengthShort+1-1]}"/>
1584 for($ii=0;$ii<$CathodeInnerStructureNumberOfBars;$ii=$ii+2)
1586 for($kk=0;$kk<=$CathodeInnerStructureNumberOfBars;$kk=$kk+2)
1588 if ($ii==0) {$kk=$kk+2;};
1590 for($jj=0;$jj<2*$CathodeInnerStructureNumberOfCablesPerInnerSquare+1;$jj++)
1592 print Cathode <<EOF;
1594 <volumeref ref="volCathodeCable"/>
1595 <position name="posCathCable$ii$jj$kk" unit="cm" x="@{[$xCathorigin-$CathodeTubeLength-$CathodeTorRad+$CathodeInnerStructureWidth+($ii+1)*$CathodeInnerStructureSeparation]}" y="$yCathorigin" z="@{[zCathoriging-0.5*$CathodeTubeLength+$CathodeInnerStructureWidth +($kk)*$CathodeInnerStructureSeparation - 0.5*$CathodeTorRad- 0.5*$CathodeOuterRadious +($jj+1)*$CathodeInnerStructureCableSeparation]}"/>
1596 <rotation name="CathCablerot$ii$jj$kk" unit="deg" x="0" y="90" z="0" />
1599 if($kk ==$CathodeInnerStructureNumberOfCablesPerInnerSquare-1 && $jj ==$CathodeInnerStructureNumberOfCablesPerInnerSquare-2) {$jj=2*$CathodeInnerStructureNumberOfCablesPerInnerSquare+1;}
1600 if($jj ==$CathodeInnerStructureNumberOfCablesPerInnerSquare-1) {$jj++;}
1603 if ($ii==2) {$kk=$kk+2;};
1604 if ($ii==0) {$kk=$kk+2;};
1611 for($jj=0;$jj<2*$CathodeInnerStructureNumberOfCablesPerInnerSquare+1;$jj++)
1613 print Cathode <<EOF;
1615 <volumeref ref="volCathodeCableShort"/>
1616 <position name="posCathCableShort$ii$jj$kk" unit="cm" x="@{[$xCathorigin-$CathodeTubeLength-$CathodeTorRad+$CathodeInnerStructureWidth+($ii)*$CathodeInnerStructureSeparation+0.5*$CathodeInnerCableLengthShort+1]}" y="$yCathorigin" z="@{[zCathoriging-0.5*$CathodeTubeLength+$CathodeInnerStructureWidth +($kk)*$CathodeInnerStructureSeparation - 0.5*$CathodeTorRad- 0.5*$CathodeOuterRadious +($jj+1)*$CathodeInnerStructureCableSeparation]}"/>
1617 <rotation name="CathCablerot$ii$jj$kk" unit="deg" x="0" y="90" z="0" />
1621 if($jj ==$CathodeInnerStructureNumberOfCablesPerInnerSquare-1) {$jj++;}
1625 for($ii=0;$ii<$CathodeSupportInnerStructureNumberOfBars;$ii++)
1627 print Cathode <<EOF;
1629 <volumeref ref="volCathodeSupportInnerBox"/>
1630 <position name="posCathSupInnerBoxLat$ii" unit="cm" x="@{[$xCathSuporigin-0.5*$CathodeSupportTubeLength-$CathodeSupportTorRad+0.5*($CathodeSupportInnerStructureLength-$CathodeSupportTubeLength)]}" y="$yCathSuporigin" z="@{[zCathoriging-0.5*$CathodeTubeLength+$CathodeInnerStructureWidth +($ii+1)*$CathodeInnerStructureSeparation - 0.5*$CathodeTorRad- 0.5*$CathodeOuterRadious]}"/>
1631 <rotation name="CathSupInnerBoxLatrot$ii" unit="deg" x="0" y="90" z="0" />
1636 for($ii=0;$ii<$CathodeSupportInnerStructureNumberOfBars;$ii++)
1639 print Cathode <<EOF;
1641 <volumeref ref="volCathodeSupportInnerBox"/>
1642 <position name="posCathSupInnerBox$ii" unit="cm" x="@{[$xCathSuporigin-$CathodeSupportTubeLength-$CathodeSupportTorRad+$CathodeSupportInnerStructureWidth+($ii+1)*$CathodeSupportInnerStructureSeparation]}" y="$yCathSuporigin" z="@{[$zCathSuporigin+$CathodeSupportTorRad-$CathodeSupportOuterRadious-4]}"/>
1648 for($ii=0;$ii<=$CathodeSupportInnerStructureNumberOfBars+1;$ii++)
1650 for($jj=0;$jj<=$CathodeSupportInnerStructureNumberOfBars+1;$jj++)
1651 { print Cathode <<EOF;
1653 <volumeref ref="volCathodeSupportSeparators"/>
1654 <position name="posCathodeSupportSeparators$ii$jj" unit="cm" x="@{[$xCathSuporigin-$CathodeSupportTubeLength-$CathodeSupportTorRad+$CathodeSupportInnerStructureWidth+($ii)*$CathodeSupportInnerStructureSeparation]}" y="@{[0.5*$CathodeSupportSeparatorsHeight+$yCathSuporigin+2]}" z="@{[zCathoriging-0.5*$CathodeTubeLength+$CathodeInnerStructureWidth +($jj)*$CathodeInnerStructureSeparation - 0.5*$CathodeTorRad- 0.5*$CathodeOuterRadious]}"/>
1657 if(($jj==$CathodeSupportInnerStructureNumberOfBars+1 )&& $jj!=$ii)
1660 print Cathode <<EOF;
1662 <volumeref ref="volCathodeSupportSeparatorsBorder"/>
1663 <position name="posCathodeSupportSeparatorsBorder$ii$jj" unit="cm" x="@{[$xCathSuporigin-$CathodeSupportTubeLength-$CathodeSupportTorRad+$CathodeSupportInnerStructureWidth+($ii)*$CathodeSupportInnerStructureSeparation]}" y="@{[0.5*$CathodeSupportDistance+$yCathSuporigin]}" z="@{[zCathoriging-0.5*$CathodeTubeLength+$CathodeInnerStructureWidth +($jj)*$CathodeInnerStructureSeparation - 0.5*$CathodeTorRad- 0.5*$CathodeOuterRadious+0.5*49.5]}"/>
1664 <rotation name="CathSupSepRot$ii$jj" unit="deg" x="292" y="0" z="0" />
1670 if(($ii==$CathodeSupportInnerStructureNumberOfBars+1)&& $jj!=$ii)
1673 print Cathode <<EOF;
1675 <volumeref ref="volCathodeSupportSeparatorsBorder"/>
1676 <position name="posCathodeSupportSeparatorsBorder$ii$jj" unit="cm" x="@{[$xCathSuporigin-$CathodeSupportTubeLength-$CathodeSupportTorRad+$CathodeSupportInnerStructureWidth+($ii)*$CathodeSupportInnerStructureSeparation+0.5*49.5]}" y="@{[0.5*$CathodeSupportDistance+$yCathSuporigin]}" z="@{[zCathoriging-0.5*$CathodeTubeLength+$CathodeInnerStructureWidth +($jj)*$CathodeInnerStructureSeparation - 0.5*$CathodeTorRad- 0.5*$CathodeOuterRadious]}"/>
1677 <rotation name="CathSupSepRot$ii$jj" unit="deg" x="0" y="0" z="68" />
1685 if($ii==$CathodeSupportInnerStructureNumberOfBars+1){if($jj==$CathodeSupportInnerStructureNumberOfBars) {$j++;}}
1689 print Cathode <<EOF;
1699 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1700 #++++++++++++++++++++++++++++++++++++++ gen_LEMs +++++++++++++++++++++++++++++++++++++
1701 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1706 $LEMs = $basename."_LEMs" . $suffix . ".gdml";
1707 push (@gdmlFiles, $LEMs);
1708 $LEMs = ">" . $LEMs;
1709 open(LEMs) or die("Could not open file $LEMs for writing");
1711 # The standard XML prefix and starting the gdml
1713 <?xml version='1.0'?>
1724 <box name="solLEMs" x="@{[$LEMsSizeX]}" y="$LEMsSizeY" z="@{[$LEMsSizeZ]}" lunit="cm"/>
1733 <volume name="volLEMs">
1734 <materialref ref="Copper_Beryllium_alloy25"/>
1735 <solidref ref="solLEMs"/>
1743 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1744 #++++++++++++++++++++++++++++++++++++++ gen_pmt +++++++++++++++++++++++++++++++++++++
1745 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1750 #$PMT_COATING_THICKNESS=0.2;#
1751 #$PMT_PLATE_THICKNESS=0.4;
1752 #$PMT_GLASS_THICKNESS=0.2;
1754 $PMT = $basename."_PMT" . $suffix . ".gdml";
1755 push (@gdmlFiles, $PMT);
1757 open(PMT) or die("Could not open file $PMT for writing");
1759 # The standard XML prefix and starting the gdml
1761 <?xml version='1.0'?>
1769 <tube name="PMTVolume"
1776 <tube aunit="deg" deltaphi="360" lunit="mm" name="pmtMiddleCylinder" rmax="102.351822048586" rmin="100.351822048586" startphi="0" z="54"/>
1777 <sphere aunit="deg" deltaphi="360" deltatheta="50" lunit="mm" name="sphPartTop" rmax="133" rmin="131" startphi="0" starttheta="0"/>
1778 <union name="pmt0x7fb8f489dfe0">
1779 <first ref="pmtMiddleCylinder"/>
1780 <second ref="sphPartTop"/>
1781 <position name="pmt0x7fb8f489dfe0_pos" unit="mm" x="0" y="0" z="-57.2051768689367"/>
1783 <sphere aunit="deg" deltaphi="360" deltatheta="31.477975238527" lunit="mm" name="sphPartBtm" rmax="133" rmin="131" startphi="0" starttheta="130"/>
1784 <union name="pmt0x7fb8f48a0d50">
1785 <first ref="pmt0x7fb8f489dfe0"/>
1786 <second ref="sphPartBtm"/>
1787 <position name="pmt0x7fb8f48a0d50_pos" unit="mm" x="0" y="0" z="57.2051768689367"/>
1789 <tube aunit="deg" deltaphi="360" lunit="mm" name="pmtBtmTube" rmax="44.25" rmin="42.25" startphi="0" z="72"/>
1790 <union name="solidpmt">
1791 <first ref="pmt0x7fb8f48a0d50"/>
1792 <second ref="pmtBtmTube"/>
1793 <position name="solidpmt_pos" unit="mm" x="0" y="0" z="-104.905637496842"/>
1795 <sphere aunit="deg" deltaphi="360" deltatheta="50" lunit="mm" name="pmt0x7fb8f48a1eb0" rmax="133.2" rmin="133" startphi="0" starttheta="0"/>
1796 <sphere aunit="deg" deltaphi="360" deltatheta="46.5" lunit="mm" name="pmt0x7fb8f48a4860" rmax="131" rmin="130.999" startphi="0" starttheta="0"/>
1806 <volume name="pmtCoatVol">
1807 <materialref ref="LAr"/>
1808 <solidref ref="pmt0x7fb8f48a1eb0"/>
1809 <auxiliary auxtype="SensDet" auxvalue="PhotonDetector"/>
1812 <volume name="allpmt">
1813 <materialref ref="Glass"/>
1814 <solidref ref="solidpmt"/>
1817 <volume name="volPMT_coated">
1818 <materialref ref="LAr"/>
1819 <solidref ref="PMTVolume"/>
1822 <volumeref ref="allpmt"/>
1823 <position name="posallpmt" unit="cm" x="0" y="0" z="@{[1.27*2.54]}"/>
1826 <physvol name="volOpDetSensitive">
1827 <volumeref ref="pmtCoatVol"/>
1828 <position name="posOpDetSensitive" unit="cm" x="0" y="0" z="@{[1.27*2.54- (2.23*2.54)]}"/>
1839 #<volumeref ref="pmtCathVol"/>
1840 # <position name="pmtCath_pos" unit="cm" x="0" y="0" z="0"/>#8*2.54 + 0.9"/>
1842 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1843 #++++++++++++++++++++++++++++++++++++++ gen_Cryostat +++++++++++++++++++++++++++++++++++++
1844 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1849 # Create the cryostat fragment file name,
1850 # add file to list of output GDML fragments,
1852 $CRYO = $basename."_Cryostat" . $suffix . ".gdml";
1853 push (@gdmlFiles, $CRYO);
1854 $CRYO = ">" . $CRYO;
1855 open(CRYO) or die("Could not open file $CRYO for writing");
1858 # The standard XML prefix and starting the gdml
1860 <?xml version='1.0'?>
1864 # All the cryostat solids.
1867 <box name="Cryostat" lunit="cm"
1872 <box name="ArgonInterior" lunit="cm"
1877 <box name="GaseousArgon" lunit="cm"
1878 x="$HeightGaseousAr"
1882 <subtraction name="SteelShell">
1883 <first ref="Cryostat"/>
1884 <second ref="ArgonInterior"/>
1890 # Cryostat structure
1893 <volume name="volSteelShell">
1894 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni" />
1895 <solidref ref="SteelShell" />
1897 <volume name="volGaseousArgon">
1898 <materialref ref="ArGas"/>
1899 <solidref ref="GaseousArgon"/>
1902 if ( $LEMs_switch eq "on" )
1905 $posLEMsX = -0.5*$HeightGaseousAr+0.5+0.5*$LEMsSizeX;
1911 <volumeref ref="volLEMs"/>
1912 <position name="posLEMs" unit="cm" x="$posLEMsX" y="$posLEMsY" z="$posLEMsZ"/>
1921 <volume name="volCryostat">
1922 <materialref ref="LAr" />
1923 <solidref ref="Cryostat" />
1925 <volumeref ref="volGaseousArgon"/>
1926 <position name="posGaseousArgon" unit="cm" x="@{[$Argon_x/2-$HeightGaseousAr/2]}" y="0" z="0"/>
1929 <volumeref ref="volSteelShell"/>
1930 <position name="posSteelShell" unit="cm" x="0" y="0" z="0"/>
1935 if ($tpc_on==1) # place TPC inside croysotat
1937 $posX = $Argon_x/2 - $HeightGaseousAr - 0.5*($driftTPCActive + $ReadoutPlane);
1938 $posY = -0.5*$Argon_y + $yLArBuffer;
1939 $posZ = -0.5*$Argon_z + $zLArBuffer;
1941 @crp_posy = ( $posY+1.5*$lengthCRM, $posY+1.5*$lengthCRM, $posY+0.5*$lengthCRM, $posY+0.5*$lengthCRM );
1942 @crp_posz = ( $posZ+1.5*$lengthCRM, $posZ+0.5*$lengthCRM, $posZ+0.5*$lengthCRM, $posZ+1.5*$lengthCRM );
1945 foreach $posZ (@crp_posz) {
1946 $posY = @crp_posy[$idx];
1949 <volumeref ref="volTPC"/>
1950 <position name="posTPC\-$idx" unit="cm"
1951 x="$posX" y="$posY" z="$posZ"/>
1962 if ( $pmt_switch eq "on" ) {
1963 $pmt_pos_x = -$Argon_x/2 + 0.5*($HeightPMT);
1964 for ( $i=0; $i<36; $i=$i+1 ) { # pmts with coating
1967 <volumeref ref="volPMT_coated"/>
1968 <position name="posPMT$i" unit="cm" x="$pmt_pos_x" @pmt_pos[$i]/>
1969 <rotationref ref="rMinus90AboutY"/>
1976 $GroundGridPosX=-$Argon_x/2 + 47.5;
1977 $GroundGridPosY=0.5*($GroundGridInnerStructureLength+2+$GroundGridOuterRadious);
1979 if ( $GroundGrid_switch eq "on" )
1983 <volumeref ref="volGroundGrid"/>
1984 <position name="posGroundGrid01" unit="cm" x="$GroundGridPosX" y="@{[-$GroundGridPosY]}" z="@{[$GroundGridPosY]}"/>
1985 <rotation name="rotGG01" unit="deg" x="0" y="0" z="90" />
1989 <volumeref ref="volGroundGrid"/>
1990 <position name="posGroundGrid02" unit="cm" x="$GroundGridPosX" y="@{[-$GroundGridPosY]}" z="@{[-$GroundGridPosY]}"/>
1991 <rotation name="rotGG02" unit="deg" x="0" y="180" z="90" />
1995 <volumeref ref="volGroundGrid"/>
1996 <position name="posGroundGrid03" unit="cm" x="$GroundGridPosX" y="@{[$GroundGridPosY]}" z="@{[-$GroundGridPosY]}"/>
1997 <rotation name="rotGG03" unit="deg" x="180" y="0" z="90" />
2001 <volumeref ref="volGroundGrid"/>
2002 <position name="posGroundGrid04" unit="cm" x="$GroundGridPosX" y="@{[$GroundGridPosY]}" z="@{[$GroundGridPosY]}"/>
2003 <rotation name="rotGG04" unit="deg" x="180" y="180" z="90"/>
2009 $CathodePosX=-$Argon_x/2 + 47.5 + 94.0 - 0.5*$CathodeSupportDistance-5.1;
2010 $CathodePosY=0.5*($CathodeInnerStructureLength+2+$CathodeOuterRadious);
2012 if ( $Cathode_switch eq "on" )
2016 <volumeref ref="volCathode"/>
2017 <position name="posCathode01" unit="cm" x="$CathodePosX" y="@{[-$CathodePosY]}" z="@{[$CathodePosY]}"/>
2018 <rotation name="rotCath01" unit="deg" x="0" y="0" z="90" />
2022 <volumeref ref="volCathode"/>
2023 <position name="posCathode02" unit="cm" x="$CathodePosX" y="@{[-$CathodePosY]}" z="@{[-$CathodePosY]}"/>
2024 <rotation name="rotCath02" unit="deg" x="270" y="0" z="90" />
2028 <volumeref ref="volCathode"/>
2029 <position name="posCathode03" unit="cm" x="$CathodePosX" y="@{[$CathodePosY]}" z="@{[-$CathodePosY]}"/>
2030 <rotation name="rotCath03" unit="deg" x="180" y="0" z="90" />
2034 <volumeref ref="volCathode"/>
2035 <position name="posCathode04" unit="cm" x="$CathodePosX" y="@{[$CathodePosY]}" z="@{[$CathodePosY]}"/>
2036 <rotation name="rotCath04" unit="deg" x="90" y="0" z="90"/>
2042 if ( $FieldCage_switch eq "on" )
2045 $FFSPositionX = -$OriginXSet-1.3;
2046 $FFSPositionY = 309.593;
2047 $FFSPositionZ = 153.521;
2050 <volumeref ref="volFieldCageModule"/>
2051 <position name="posFieldCageModule01" unit="cm" x="$FFSPositionX" y="$FFSPositionY" z="$FFSPositionZ"/>
2052 <rotationref ref="rPlus90AboutY"/>
2055 $FFSPositionX = -$OriginXSet-1.3;
2056 $FFSPositionY = 309.593;
2057 $FFSPositionZ = -153.521;
2060 <volumeref ref="volFieldCageModule"/>
2061 <position name="posFieldCageModule02" unit="cm" x="$FFSPositionX" y="$FFSPositionY" z="$FFSPositionZ"/>
2062 <rotationref ref="rMinus90AboutY"/>
2065 $FFSPositionX = -$OriginXSet-1.3;
2066 $FFSPositionY = -309.593;
2067 $FFSPositionZ = -153.521;
2070 <volumeref ref="volFieldCageModule"/>
2071 <position name="posFieldCageModule05" unit="cm" x="$FFSPositionX" y="$FFSPositionY" z="$FFSPositionZ"/>
2072 <rotationref ref="rot05"/>
2076 $FFSPositionX = -$OriginXSet-1.3;
2077 $FFSPositionY = -309.593;
2078 $FFSPositionZ = 153.521;
2081 <volumeref ref="volFieldCageModule"/>
2082 <position name="posFieldCageModule06" unit="cm" x="$FFSPositionX" y="$FFSPositionY" z="$FFSPositionZ"/>
2083 <rotationref ref="rot06"/>
2088 $FFSPositionX = -$OriginXSet-1.3;
2089 $FFSPositionY = 153.521;
2090 $FFSPositionZ = -309.593;
2093 <volumeref ref="volFieldCageModule"/>
2094 <position name="posFieldCageModule03" unit="cm" x="$FFSPositionX" y="$FFSPositionY" z="$FFSPositionZ"/>
2095 <rotationref ref="rot03"/>
2099 $FFSPositionX = -$OriginXSet-1.3;
2100 $FFSPositionY = -153.521;
2101 $FFSPositionZ = -309.593;
2104 <volumeref ref="volFieldCageModule"/>
2105 <position name="posFieldCageModule04" unit="cm" x="$FFSPositionX" y="$FFSPositionY" z="$FFSPositionZ"/>
2106 <rotationref ref="rot04"/>
2110 $FFSPositionX = -$OriginXSet-1.3;
2111 $FFSPositionY = -153.521;
2112 $FFSPositionZ = 309.593;
2115 <volumeref ref="volFieldCageModule"/>
2116 <position name="posFieldCageModule07" unit="cm" x="$FFSPositionX" y="$FFSPositionY" z="$FFSPositionZ"/>
2117 <rotationref ref="rot07"/>
2121 $FFSPositionX = -$OriginXSet-1.3;
2122 $FFSPositionY = 153.521;
2123 $FFSPositionZ = 309.593;
2126 <volumeref ref="volFieldCageModule"/>
2127 <position name="posFieldCageModule08" unit="cm" x="$FFSPositionX" y="$FFSPositionY" z="$FFSPositionZ"/>
2128 <rotationref ref="rot08"/>
2147 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2148 #+++++++++++++++++++++++++++++++++++++ gen_Enclosure +++++++++++++++++++++++++++++++++++++
2149 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2154 # Create the detector enclosure fragment file name,
2155 # add file to list of output GDML fragments,
2157 $ENCL = $basename."_DetEnclosure" . $suffix . ".gdml";
2158 push (@gdmlFiles, $ENCL);
2159 $ENCL = ">" . $ENCL;
2160 open(ENCL) or die("Could not open file $ENCL for writing");
2163 # The standard XML prefix and starting the gdml
2165 <?xml version='1.0'?>
2170 # All the detector enclosure solids.
2174 <box name="FoamPadBlock" lunit="cm"
2175 x="@{[$Cryostat_x + 2*$FoamPadding]}"
2176 y="@{[$Cryostat_y + 2*$FoamPadding]}"
2177 z="@{[$Cryostat_z + 2*$FoamPadding]}" />
2179 <subtraction name="FoamPadding">
2180 <first ref="FoamPadBlock"/>
2181 <second ref="Cryostat"/>
2182 <positionref ref="posCenter"/>
2186 <box name="SteelSupportBlock" lunit="cm"
2187 x="@{[$Cryostat_x + 2*$FoamPadding + 2*$SteelSupport_x]}"
2188 y="@{[$Cryostat_y + 2*$FoamPadding + 2*$SteelSupport_y]}"
2189 z="@{[$Cryostat_z + 2*$FoamPadding + 2*$SteelSupport_z]}" />
2191 <subtraction name="SteelSupport">
2192 <first ref="SteelSupportBlock"/>
2193 <second ref="FoamPadBlock"/>
2194 <positionref ref="posCenter"/>
2198 <box name="DetEnclosure" lunit="cm"
2203 <box name="boxCryoTop" x="1016.8" y="1016.8" z="61.8" lunit="cm"/>
2204 <box name="boxCryoWallLg" x="1140.4" y="1075.6" z="61.8" lunit="cm"/>
2205 <box name="boxCryoWallSm" x="1016.8" y="1075.6" z="61.8" lunit="cm"/>
2206 <box name="box1" x="160" y="160" z="61.8" lunit="cm"/>
2207 <box name="box2" x="158.2" y="158.2" z="56.2" lunit="cm"/>
2208 <box name="box3" x="137.2" y="137.2" z="61.801" lunit="cm"/>
2209 <box name="box4" x="158.2" y="13.6" z="27.4" lunit="cm"/>
2210 <box name="box5" x="158.2" y="6.425" z="24.96" lunit="cm"/>
2211 <box name="box11" x="108.4" y="160" z="61.8" lunit="cm"/>
2212 <box name="box12" x="107.5" y="158.2" z="56.2" lunit="cm"/>
2213 <box name="box13" x="97" y="137.2" z="61.81" lunit="cm"/>
2214 <box name="box16" x="107.5" y="13.6" z="27.4" lunit="cm"/>
2215 <box name="box17" x="107.5" y="6.425" z="24.96" lunit="cm"/>
2216 <box name="box21" x="137.8" y="160" z="61.8" lunit="cm"/>
2217 <box name="box22" x="136.9" y="158.2" z="56.2" lunit="cm"/>
2218 <box name="box23" x="126.4" y="137.2" z="61.801" lunit="cm"/>
2219 <box name="box26" x="102.5" y="13.6" z="27.4" lunit="cm"/>
2220 <box name="box27" x="102.5" y="6.425" z="24.96" lunit="cm"/>
2221 <box name="box31" x="170.2" y="160" z="61.8" lunit="cm"/>
2222 <box name="box32" x="169.3" y="158.2" z="56.2" lunit="cm"/>
2223 <box name="box33" x="158.8" y="137.2" z="61.801" lunit="cm"/>
2224 <box name="box36" x="135.8" y="13.6" z="27.4" lunit="cm"/>
2225 <box name="box37" x="135.8" y="6.425" z="24.96" lunit="cm"/>
2228 <subtraction name="boxHoll">
2230 <second ref="box2"/>
2232 <subtraction name="boxLargeCent">
2233 <first ref="boxHoll"/>
2234 <second ref="box3"/>
2236 <subtraction name="boxBarI">
2238 <second ref="box5"/>
2239 <position name="posBoxBarI" x="0" y="3.5876" z="0" unit="cm"/>
2241 <subtraction name="boxBarCent">
2242 <first ref="boxBarI"/>
2243 <second ref="box5"/>
2244 <position name="posBoxBarCent" x="0" y="-3.5876" z="0" unit="cm"/>
2246 <union name="boxUniCent">
2247 <first ref="boxLargeCent"/>
2248 <second ref="boxBarCent"/>
2249 <position name="posBoxUniCent" x="0" y="0" z="-17.2" unit="cm"/>
2251 <union name="UnitCent">
2252 <first ref="boxUniCent"/>
2253 <second ref="boxBarCent"/>
2254 <position name="posUnitCent" x="0" y="0" z="-17.2" unit="cm"/>
2255 <rotation name="rotUnitCent" x="0" y="0" z="90" unit="deg"/>
2258 <subtraction name="boxTopHoll">
2259 <first ref="box11"/>
2260 <second ref="box12"/>
2261 <position name="posboxTopHoll" x="0.451" y="0" z="0" unit="cm"/>
2263 <subtraction name="boxLargeTop">
2264 <first ref="boxTopHoll"/>
2265 <second ref="box13"/>
2266 <position name="posboxLargeTop" x="5.701" y="0" z="0" unit="cm"/>
2268 <subtraction name="boxBarTopI">
2269 <first ref="box16"/>
2270 <second ref="box17"/>
2271 <position name="posboxBarTopI" x="0" y="3.5876" z="0" unit="cm"/>
2273 <subtraction name="boxBarTop">
2274 <first ref="boxBarTopI"/>
2275 <second ref="box17"/>
2276 <position name="posboxBarTop" x="0" y="-3.5876" z="0" unit="cm"/>
2278 <union name="boxUniTop">
2279 <first ref="boxLargeTop"/>
2280 <second ref="boxBarCent"/>
2281 <position name="posboxUni1" x="5.6" y="0" z="-17.2" unit="cm"/>
2282 <rotation name="rotUni1" x="0" y="0" z="90" unit="deg"/>
2284 <union name="UnitTop">
2285 <first ref="boxUniTop"/>
2286 <second ref="boxBarTop"/>
2287 <position name="posUniTop" x="0.45" y="0" z="-17.2" unit="cm"/>
2291 <subtraction name="boxCryoWallSmUS">
2292 <first ref="boxCryoWallSm"/>
2293 <second ref="BeamWindowStSu"/>
2294 <position name="posBWCryoWallUS" x="-34.5198845542345" y="131.897988017573" z="0." unit="cm"/>
2295 < rotationref ref="rBeamW3"/>
2299 <subtraction name="boxWallUHoll">
2300 <first ref="box21"/>
2301 <second ref="box22"/>
2302 <position name="posboxWallUHoll" x="0.451" y="0" z="0" unit="cm"/>
2304 <subtraction name="boxLargeWallU">
2305 <first ref="boxWallUHoll"/>
2306 <second ref="box23"/>
2307 <position name="posboxLargeWallU" x="5.701" y="0" z="0" unit="cm"/>
2309 <subtraction name="boxBarWallUI">
2310 <first ref="box26"/>
2311 <second ref="box27"/>
2312 <position name="posboxBarWallUI" x="0" y="3.5876" z="0" unit="cm"/>
2314 <subtraction name="boxBarWallU">
2315 <first ref="boxBarWallUI"/>
2316 <second ref="box27"/>
2317 <position name="posboxBarWallU" x="0" y="-3.5876" z="0" unit="cm"/>
2319 <union name="boxUniWallU">
2320 <first ref="boxLargeWallU"/>
2321 <second ref="boxBarCent"/>
2322 <position name="posboxUni2" x="-9.1" y="0" z="-17.2" unit="cm"/>
2323 <rotation name="rotUni2" x="0" y="0" z="90" unit="deg"/>
2325 <union name="UnitWallU">
2326 <first ref="boxUniWallU"/>
2327 <second ref="boxBarWallU"/>
2328 <position name="posUniWallU" x="-16.75" y="0" z="-17.2" unit="cm"/>
2331 <subtraction name="boxWallLHoll">
2332 <first ref="box31"/>
2333 <second ref="box32"/>
2334 <position name="posboxWallLHoll" x="0.451" y="0" z="0" unit="cm"/>
2336 <subtraction name="boxLargeWallL">
2337 <first ref="boxWallLHoll"/>
2338 <second ref="box33"/>
2339 <position name="posboxLargeWallL" x="5.701" y="0" z="0" unit="cm"/>
2341 <subtraction name="boxBarWallLI">
2342 <first ref="box36"/>
2343 <second ref="box37"/>
2344 <position name="posboxBarWallLI" x="0" y="3.5876" z="0" unit="cm"/>
2346 <subtraction name="boxBarWallL">
2347 <first ref="boxBarWallLI"/>
2348 <second ref="box37"/>
2349 <position name="posboxBarWallL" x="0" y="-3.5876" z="0" unit="cm"/>
2351 <union name="boxUniWallL">
2352 <first ref="boxLargeWallL"/>
2353 <second ref="boxBarCent"/>
2354 <position name="posboxUni3" x="-25.3" y="0" z="-17.2" unit="cm"/>
2355 <rotation name="rotUni3" x="0" y="0" z="90" unit="deg"/>
2357 <union name="UnitWallL">
2358 <first ref="boxUniWallL"/>
2359 <second ref="boxBarWallL"/>
2360 <position name="posUniWallL" x="-16.3" y="0" z="-17.2" unit="cm"/>
2368 # Detector enclosure structure
2371 <volume name="volFoamPadding">
2372 <materialref ref="foam_protoDUNEdp"/>
2373 <solidref ref="FoamPadding"/>
2376 <volume name="volSteelSupport">
2377 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
2378 <solidref ref="SteelSupport"/>
2381 <volume name="volUnitCent">
2382 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
2383 <solidref ref="UnitCent"/>
2385 <volume name="volUnitTop">
2386 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
2387 <solidref ref="UnitTop"/>
2389 <volume name="volUnitWallS">
2390 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
2391 <solidref ref="UnitWallU"/>
2393 <volume name="volUnitWallL">
2394 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
2395 <solidref ref="UnitWallL"/>
2398 <volume name="volSteelSupport_TB">
2399 <materialref ref="Air"/>
2400 <solidref ref="boxCryoTop"/>
2401 <physvol name="volUnitTBCent_0-0">
2402 <volumeref ref="volUnitCent"/>
2403 <position name="posUnitTBCent_0-0" x="-320" y="-320" z="0" unit="cm"/>
2405 <physvol name="volUnitTBCent_0-1">
2406 <volumeref ref="volUnitCent"/>
2407 <position name="posUnitTBCent_0-1" x="-320" y="-160" z="0" unit="cm"/>
2409 <physvol name="volUnitTBCent_0-2">
2410 <volumeref ref="volUnitCent"/>
2411 <position name="posUnitTBCent_0-2" x="-320" y="0" z="0" unit="cm"/>
2413 <physvol name="volUnitTBCent_0-3">
2414 <volumeref ref="volUnitCent"/>
2415 <position name="posUnitTBCent_0-3" x="-320" y="160" z="0" unit="cm"/>
2417 <physvol name="volUnitTBCent_0-4">
2418 <volumeref ref="volUnitCent"/>
2419 <position name="posUnitTBCent_0-4" x="-320" y="320" z="0" unit="cm"/>
2421 <physvol name="volUnitTBE_0">
2422 <volumeref ref="volUnitTop"/>
2423 <position name="posUnitTBE_0" x="454.2" y="-320" z="0" unit="cm"/>
2425 <physvol name="volUnitTBS_0">
2426 <volumeref ref="volUnitTop"/>
2427 <position name="posUnitTBS_0" x="-320" y="454.2" z="0" unit="cm"/>
2428 <rotation name="rotUnitTBS_0" x="0" y="0" z="-90" unit="deg"/>
2430 <physvol name="volUnitTBW_0">
2431 <volumeref ref="volUnitTop"/>
2432 <position name="posUnitTBW_0" x="-454.2" y="-320" z="0" unit="cm"/>
2433 <rotation name="rotUnitTBW_0" x="0" y="0" z="-180" unit="deg"/>
2435 <physvol name="volUnitTBN_0">
2436 <volumeref ref="volUnitTop"/>
2437 <position name="posUnitTBN_0" x="-320" y="-454.2" z="0" unit="cm"/>
2438 <rotation name="rotUnitTBN_0" x="0" y="0" z="-270" unit="deg"/>
2440 <physvol name="volUnitTBCent_1-0">
2441 <volumeref ref="volUnitCent"/>
2442 <position name="posUnitTBCent_1-0" x="-160" y="-320" z="0" unit="cm"/>
2444 <physvol name="volUnitTBCent_1-1">
2445 <volumeref ref="volUnitCent"/>
2446 <position name="posUnitTBCent_1-1" x="-160" y="-160" z="0" unit="cm"/>
2448 <physvol name="volUnitTBCent_1-2">
2449 <volumeref ref="volUnitCent"/>
2450 <position name="posUnitTBCent_1-2" x="-160" y="0" z="0" unit="cm"/>
2452 <physvol name="volUnitTBCent_1-3">
2453 <volumeref ref="volUnitCent"/>
2454 <position name="posUnitTBCent_1-3" x="-160" y="160" z="0" unit="cm"/>
2456 <physvol name="volUnitTBCent_1-4">
2457 <volumeref ref="volUnitCent"/>
2458 <position name="posUnitTBCent_1-4" x="-160" y="320" z="0" unit="cm"/>
2460 <physvol name="volUnitTBE_1">
2461 <volumeref ref="volUnitTop"/>
2462 <position name="posUnitTBE_1" x="454.2" y="-160" z="0" unit="cm"/>
2464 <physvol name="volUnitTBS_1">
2465 <volumeref ref="volUnitTop"/>
2466 <position name="posUnitTBS_1" x="-160" y="454.2" z="0" unit="cm"/>
2467 <rotation name="rotUnitTBS_1" x="0" y="0" z="-90" unit="deg"/>
2469 <physvol name="volUnitTBW_1">
2470 <volumeref ref="volUnitTop"/>
2471 <position name="posUnitTBW_1" x="-454.2" y="-160" z="0" unit="cm"/>
2472 <rotation name="rotUnitTBW_1" x="0" y="0" z="-180" unit="deg"/>
2474 <physvol name="volUnitTBN_1">
2475 <volumeref ref="volUnitTop"/>
2476 <position name="posUnitTBN_1" x="-160" y="-454.2" z="0" unit="cm"/>
2477 <rotation name="rotUnitTBN_1" x="0" y="0" z="-270" unit="deg"/>
2479 <physvol name="volUnitTBCent_2-0">
2480 <volumeref ref="volUnitCent"/>
2481 <position name="posUnitTBCent_2-0" x="0" y="-320" z="0" unit="cm"/>
2483 <physvol name="volUnitTBCent_2-1">
2484 <volumeref ref="volUnitCent"/>
2485 <position name="posUnitTBCent_2-1" x="0" y="-160" z="0" unit="cm"/>
2487 <physvol name="volUnitTBCent_2-2">
2488 <volumeref ref="volUnitCent"/>
2489 <position name="posUnitTBCent_2-2" x="0" y="0" z="0" unit="cm"/>
2491 <physvol name="volUnitTBCent_2-3">
2492 <volumeref ref="volUnitCent"/>
2493 <position name="posUnitTBCent_2-3" x="0" y="160" z="0" unit="cm"/>
2495 <physvol name="volUnitTBCent_2-4">
2496 <volumeref ref="volUnitCent"/>
2497 <position name="posUnitTBCent_2-4" x="0" y="320" z="0" unit="cm"/>
2499 <physvol name="volUnitTBE_2">
2500 <volumeref ref="volUnitTop"/>
2501 <position name="posUnitTBE_2" x="454.2" y="0" z="0" unit="cm"/>
2503 <physvol name="volUnitTBS_2">
2504 <volumeref ref="volUnitTop"/>
2505 <position name="posUnitTBS_2" x="0" y="454.2" z="0" unit="cm"/>
2506 <rotation name="rotUnitTBS_2" x="0" y="0" z="-90" unit="deg"/>
2508 <physvol name="volUnitTBW_2">
2509 <volumeref ref="volUnitTop"/>
2510 <position name="posUnitTBW_2" x="-454.2" y="0" z="0" unit="cm"/>
2511 <rotation name="rotUnitTBW_2" x="0" y="0" z="-180" unit="deg"/>
2513 <physvol name="volUnitTBN_2">
2514 <volumeref ref="volUnitTop"/>
2515 <position name="posUnitTBN_2" x="0" y="-454.2" z="0" unit="cm"/>
2516 <rotation name="rotUnitTBN_2" x="0" y="0" z="-270" unit="deg"/>
2518 <physvol name="volUnitTBCent_3-0">
2519 <volumeref ref="volUnitCent"/>
2520 <position name="posUnitTBCent_3-0" x="160" y="-320" z="0" unit="cm"/>
2522 <physvol name="volUnitTBCent_3-1">
2523 <volumeref ref="volUnitCent"/>
2524 <position name="posUnitTBCent_3-1" x="160" y="-160" z="0" unit="cm"/>
2526 <physvol name="volUnitTBCent_3-2">
2527 <volumeref ref="volUnitCent"/>
2528 <position name="posUnitTBCent_3-2" x="160" y="0" z="0" unit="cm"/>
2530 <physvol name="volUnitTBCent_3-3">
2531 <volumeref ref="volUnitCent"/>
2532 <position name="posUnitTBCent_3-3" x="160" y="160" z="0" unit="cm"/>
2534 <physvol name="volUnitTBCent_3-4">
2535 <volumeref ref="volUnitCent"/>
2536 <position name="posUnitTBCent_3-4" x="160" y="320" z="0" unit="cm"/>
2538 <physvol name="volUnitTBE_3">
2539 <volumeref ref="volUnitTop"/>
2540 <position name="posUnitTBE_3" x="454.2" y="160" z="0" unit="cm"/>
2542 <physvol name="volUnitTBS_3">
2543 <volumeref ref="volUnitTop"/>
2544 <position name="posUnitTBS_3" x="160" y="454.2" z="0" unit="cm"/>
2545 <rotation name="rotUnitTBS_3" x="0" y="0" z="-90" unit="deg"/>
2547 <physvol name="volUnitTBW_3">
2548 <volumeref ref="volUnitTop"/>
2549 <position name="posUnitTBW_3" x="-454.2" y="160" z="0" unit="cm"/>
2550 <rotation name="rotUnitTBW_3" x="0" y="0" z="-180" unit="deg"/>
2552 <physvol name="volUnitTBN_3">
2553 <volumeref ref="volUnitTop"/>
2554 <position name="posUnitTBN_3" x="160" y="-454.2" z="0" unit="cm"/>
2555 <rotation name="rotUnitTBN_3" x="0" y="0" z="-270" unit="deg"/>
2557 <physvol name="volUnitTBCent_4-0">
2558 <volumeref ref="volUnitCent"/>
2559 <position name="posUnitTBCent_4-0" x="320" y="-320" z="0" unit="cm"/>
2561 <physvol name="volUnitTBCent_4-1">
2562 <volumeref ref="volUnitCent"/>
2563 <position name="posUnitTBCent_4-1" x="320" y="-160" z="0" unit="cm"/>
2565 <physvol name="volUnitTBCent_4-2">
2566 <volumeref ref="volUnitCent"/>
2567 <position name="posUnitTBCent_4-2" x="320" y="0" z="0" unit="cm"/>
2569 <physvol name="volUnitTBCent_4-3">
2570 <volumeref ref="volUnitCent"/>
2571 <position name="posUnitTBCent_4-3" x="320" y="160" z="0" unit="cm"/>
2573 <physvol name="volUnitTBCent_4-4">
2574 <volumeref ref="volUnitCent"/>
2575 <position name="posUnitTBCent_4-4" x="320" y="320" z="0" unit="cm"/>
2577 <physvol name="volUnitTBE_4">
2578 <volumeref ref="volUnitTop"/>
2579 <position name="posUnitTBE_4" x="454.2" y="320" z="0" unit="cm"/>
2581 <physvol name="volUnitTBS_4">
2582 <volumeref ref="volUnitTop"/>
2583 <position name="posUnitTBS_4" x="320" y="454.2" z="0" unit="cm"/>
2584 <rotation name="rotUnitTBS_4" x="0" y="0" z="-90" unit="deg"/>
2586 <physvol name="volUnitTBW_4">
2587 <volumeref ref="volUnitTop"/>
2588 <position name="posUnitTBW_4" x="-454.2" y="320" z="0" unit="cm"/>
2589 <rotation name="rotUnitTBW_4" x="0" y="0" z="-180" unit="deg"/>
2591 <physvol name="volUnitTBN_4">
2592 <volumeref ref="volUnitTop"/>
2593 <position name="posUnitTBN_4" x="320" y="-454.2" z="0" unit="cm"/>
2594 <rotation name="rotUnitTBN_4" x="0" y="0" z="-270" unit="deg"/>
2599 <volume name="volSteelSupport_US">
2600 <materialref ref="Air"/>
2601 <solidref ref="boxCryoWallSm"/>
2603 <physvol name="volUnitUSCent_0-0">
2604 <volumeref ref="volUnitCent"/>
2605 <position name="posUnitUSCent_0-0" x="-320" y="-320" z="0" unit="cm"/>
2606 <rotationref ref="rPlus180AboutY"/>
2609 <physvol name="volUnitUSCent_0-1">
2610 <volumeref ref="volUnitCent"/>
2611 <position name="posUnitUSCent_0-1" x="-320" y="-160" z="0" unit="cm"/>
2612 <rotationref ref="rPlus180AboutY"/>
2615 <physvol name="volUnitUSCent_0-2">
2616 <volumeref ref="volUnitCent"/>
2617 <position name="posUnitUSCent_0-2" x="-320" y="0" z="0" unit="cm"/>
2618 <rotationref ref="rPlus180AboutY"/>
2621 <physvol name="volUnitUSCent_0-3">
2622 <volumeref ref="volUnitCent"/>
2623 <position name="posUnitUSCent_0-3" x="-320" y="160" z="0" unit="cm"/>
2624 <rotationref ref="rPlus180AboutY"/>
2627 <physvol name="volUnitUSCent_0-4">
2628 <volumeref ref="volUnitCent"/>
2629 <position name="posUnitUSCent_0-4" x="-320" y="320" z="0" unit="cm"/>
2630 <rotationref ref="rPlus180AboutY"/>
2632 <physvol name="volUnitUSE_0">
2633 <volumeref ref="volUnitTop"/>
2634 <position name="posUnitUSE_0" x="454.2" y="-320" z="0" unit="cm"/>
2635 <rotationref ref="rPlus180AboutX"/>
2637 <physvol name="volUnitUSS_0">
2638 <volumeref ref="volUnitWallS"/>
2639 <position name="posUnitUSS_0" x="-320" y="468.9" z="0" unit="cm"/>
2640 <rotation name="rotUnitUSS_0" x="0" y="180" z="-90" unit="deg"/>
2642 <physvol name="volUnitUSW_0">
2643 <volumeref ref="volUnitTop"/>
2644 <position name="posUnitUSW_0" x="-454.2" y="-320" z="0" unit="cm"/>
2645 <rotation name="rotUnitUSW_0" x="180" y="0" z="-180" unit="deg"/>
2647 <physvol name="volUnitUSN_0">
2648 <volumeref ref="volUnitWallS"/>
2649 <position name="posUnitUSN_0" x="-320" y="-468.9" z="0" unit="cm"/>
2650 <rotation name="rotUnitUSN_0" x="0" y="180" z="-270" unit="deg"/>
2654 <physvol name="volUnitUSCent_1-0">
2655 <volumeref ref="volUnitCent"/>
2656 <position name="posUnitUSCent_1-0" x="-160" y="-320" z="0" unit="cm"/>
2657 <rotationref ref="rPlus180AboutY"/>
2660 <physvol name="volUnitUSCent_1-1">
2661 <volumeref ref="volUnitCent"/>
2662 <position name="posUnitUSCent_1-1" x="-160" y="-160" z="0" unit="cm"/>
2663 <rotationref ref="rPlus180AboutY"/>
2666 <physvol name="volUnitUSCent_1-2">
2667 <volumeref ref="volUnitCent"/>
2668 <position name="posUnitUSCent_1-2" x="-160" y="0" z="0" unit="cm"/>
2669 <rotationref ref="rPlus180AboutY"/>
2672 <physvol name="volUnitUSCent_1-3">
2673 <volumeref ref="volUnitCent"/>
2674 <position name="posUnitUSCent_1-3" x="-160" y="160" z="0" unit="cm"/>
2675 <rotationref ref="rPlus180AboutY"/>
2678 <physvol name="volUnitUSCent_1-4">
2679 <volumeref ref="volUnitCent"/>
2680 <position name="posUnitUSCent_1-4" x="-160" y="320" z="0" unit="cm"/>
2681 <rotationref ref="rPlus180AboutY"/>
2683 <physvol name="volUnitUSE_1">
2684 <volumeref ref="volUnitTop"/>
2685 <position name="posUnitUSE_1" x="454.2" y="-160" z="0" unit="cm"/>
2686 <rotationref ref="rPlus180AboutX"/>
2688 <physvol name="volUnitUSS_1">
2689 <volumeref ref="volUnitWallS"/>
2690 <position name="posUnitUSS_1" x="-160" y="468.9" z="0" unit="cm"/>
2691 <rotation name="rotUnitUSS_1" x="0" y="180" z="-90" unit="deg"/>
2693 <physvol name="volUnitUSW_1">
2694 <volumeref ref="volUnitTop"/>
2695 <position name="posUnitUSW_1" x="-454.2" y="-160" z="0" unit="cm"/>
2696 <rotation name="rotUnitUSW_1" x="180" y="0" z="-180" unit="deg"/>
2698 <physvol name="volUnitUSN_1">
2699 <volumeref ref="volUnitWallS"/>
2700 <position name="posUnitUSN_1" x="-160" y="-468.9" z="0" unit="cm"/>
2701 <rotation name="rotUnitUSN_1" x="0" y="180" z="-270" unit="deg"/>
2705 <physvol name="volUnitUSCent_2-0">
2706 <volumeref ref="volUnitCent"/>
2707 <position name="posUnitUSCent_2-0" x="0" y="-320" z="0" unit="cm"/>
2708 <rotationref ref="rPlus180AboutY"/>
2711 <physvol name="volUnitUSCent_2-1">
2712 <volumeref ref="volUnitCent"/>
2713 <position name="posUnitUSCent_2-1" x="0" y="-160" z="0" unit="cm"/>
2714 <rotationref ref="rPlus180AboutY"/>
2717 <physvol name="volUnitUSCent_2-2">
2718 <volumeref ref="volUnitCent"/>
2719 <position name="posUnitUSCent_2-2" x="0" y="0" z="0" unit="cm"/>
2720 <rotationref ref="rPlus180AboutY"/>
2723 <physvol name="volUnitUSCent_2-3">
2724 <volumeref ref="volUnitCent"/>
2725 <position name="posUnitUSCent_2-3" x="0" y="160" z="0" unit="cm"/>
2726 <rotationref ref="rPlus180AboutY"/>
2729 <physvol name="volUnitUSCent_2-4">
2730 <volumeref ref="volUnitCent"/>
2731 <position name="posUnitUSCent_2-4" x="0" y="320" z="0" unit="cm"/>
2732 <rotationref ref="rPlus180AboutY"/>
2734 <physvol name="volUnitUSE_2">
2735 <volumeref ref="volUnitTop"/>
2736 <position name="posUnitUSE_2" x="454.2" y="0" z="0" unit="cm"/>
2737 <rotationref ref="rPlus180AboutX"/>
2739 <physvol name="volUnitUSS_2">
2740 <volumeref ref="volUnitWallS"/>
2741 <position name="posUnitUSS_2" x="0" y="468.9" z="0" unit="cm"/>
2742 <rotation name="rotUnitUSS_2" x="0" y="180" z="-90" unit="deg"/>
2744 <physvol name="volUnitUSW_2">
2745 <volumeref ref="volUnitTop"/>
2746 <position name="posUnitUSW_2" x="-454.2" y="0" z="0" unit="cm"/>
2747 <rotation name="rotUnitUSW_2" x="180" y="0" z="-180" unit="deg"/>
2749 <physvol name="volUnitUSN_2">
2750 <volumeref ref="volUnitWallS"/>
2751 <position name="posUnitUSN_2" x="0" y="-468.9" z="0" unit="cm"/>
2752 <rotation name="rotUnitUSN_2" x="0" y="180" z="-270" unit="deg"/>
2756 <physvol name="volUnitUSCent_3-0">
2757 <volumeref ref="volUnitCent"/>
2758 <position name="posUnitUSCent_3-0" x="160" y="-320" z="0" unit="cm"/>
2759 <rotationref ref="rPlus180AboutY"/>
2762 <physvol name="volUnitUSCent_3-1">
2763 <volumeref ref="volUnitCent"/>
2764 <position name="posUnitUSCent_3-1" x="160" y="-160" z="0" unit="cm"/>
2765 <rotationref ref="rPlus180AboutY"/>
2768 <physvol name="volUnitUSCent_3-2">
2769 <volumeref ref="volUnitCent"/>
2770 <position name="posUnitUSCent_3-2" x="160" y="0" z="0" unit="cm"/>
2771 <rotationref ref="rPlus180AboutY"/>
2774 <physvol name="volUnitUSCent_3-3">
2775 <volumeref ref="volUnitCent"/>
2776 <position name="posUnitUSCent_3-3" x="160" y="160" z="0" unit="cm"/>
2777 <rotationref ref="rPlus180AboutY"/>
2780 <physvol name="volUnitUSCent_3-4">
2781 <volumeref ref="volUnitCent"/>
2782 <position name="posUnitUSCent_3-4" x="160" y="320" z="0" unit="cm"/>
2783 <rotationref ref="rPlus180AboutY"/>
2785 <physvol name="volUnitUSE_3">
2786 <volumeref ref="volUnitTop"/>
2787 <position name="posUnitUSE_3" x="454.2" y="160" z="0" unit="cm"/>
2788 <rotationref ref="rPlus180AboutX"/>
2790 <physvol name="volUnitUSS_3">
2791 <volumeref ref="volUnitWallS"/>
2792 <position name="posUnitUSS_3" x="160" y="468.9" z="0" unit="cm"/>
2793 <rotation name="rotUnitUSS_3" x="0" y="180" z="-90" unit="deg"/>
2795 <physvol name="volUnitUSW_3">
2796 <volumeref ref="volUnitTop"/>
2797 <position name="posUnitUSW_3" x="-454.2" y="160" z="0" unit="cm"/>
2798 <rotation name="rotUnitUSW_3" x="180" y="0" z="-180" unit="deg"/>
2800 <physvol name="volUnitUSN_3">
2801 <volumeref ref="volUnitWallS"/>
2802 <position name="posUnitUSN_3" x="160" y="-468.9" z="0" unit="cm"/>
2803 <rotation name="rotUnitUSN_3" x="0" y="180" z="-270" unit="deg"/>
2807 <physvol name="volUnitUSCent_4-0">
2808 <volumeref ref="volUnitCent"/>
2809 <position name="posUnitUSCent_4-0" x="320" y="-320" z="0" unit="cm"/>
2810 <rotationref ref="rPlus180AboutY"/>
2813 <physvol name="volUnitUSCent_4-1">
2814 <volumeref ref="volUnitCent"/>
2815 <position name="posUnitUSCent_4-1" x="320" y="-160" z="0" unit="cm"/>
2816 <rotationref ref="rPlus180AboutY"/>
2819 <physvol name="volUnitUSCent_4-2">
2820 <volumeref ref="volUnitCent"/>
2821 <position name="posUnitUSCent_4-2" x="320" y="0" z="0" unit="cm"/>
2822 <rotationref ref="rPlus180AboutY"/>
2825 <physvol name="volUnitUSCent_4-3">
2826 <volumeref ref="volUnitCent"/>
2827 <position name="posUnitUSCent_4-3" x="320" y="160" z="0" unit="cm"/>
2828 <rotationref ref="rPlus180AboutY"/>
2831 <physvol name="volUnitUSCent_4-4">
2832 <volumeref ref="volUnitCent"/>
2833 <position name="posUnitUSCent_4-4" x="320" y="320" z="0" unit="cm"/>
2834 <rotationref ref="rPlus180AboutY"/>
2836 <physvol name="volUnitUSE_4">
2837 <volumeref ref="volUnitTop"/>
2838 <position name="posUnitUSE_4" x="454.2" y="320" z="0" unit="cm"/>
2839 <rotationref ref="rPlus180AboutX"/>
2841 <physvol name="volUnitUSS_4">
2842 <volumeref ref="volUnitWallS"/>
2843 <position name="posUnitUSS_4" x="320" y="468.9" z="0" unit="cm"/>
2844 <rotation name="rotUnitUSS_4" x="0" y="180" z="-90" unit="deg"/>
2846 <physvol name="volUnitUSW_4">
2847 <volumeref ref="volUnitTop"/>
2848 <position name="posUnitUSW_4" x="-454.2" y="320" z="0" unit="cm"/>
2849 <rotation name="rotUnitUSW_4" x="180" y="0" z="-180" unit="deg"/>
2851 <physvol name="volUnitUSN_4">
2852 <volumeref ref="volUnitWallS"/>
2853 <position name="posUnitUSN_4" x="320" y="-468.9" z="0" unit="cm"/>
2854 <rotation name="rotUnitUSN_4" x="0" y="180" z="-270" unit="deg"/>
2860 <volume name="volSteelSupport_WS">
2861 <materialref ref="Air"/>
2862 <solidref ref="boxCryoWallSm"/>
2863 <physvol name="volUnitWSCent_0-0">
2864 <volumeref ref="volUnitCent"/>
2865 <position name="posUnitWSCent_0-0" x="-320" y="-320" z="0" unit="cm"/>
2867 <physvol name="volUnitWSCent_0-1">
2868 <volumeref ref="volUnitCent"/>
2869 <position name="posUnitWSCent_0-1" x="-320" y="-160" z="0" unit="cm"/>
2871 <physvol name="volUnitWSCent_0-2">
2872 <volumeref ref="volUnitCent"/>
2873 <position name="posUnitWSCent_0-2" x="-320" y="0" z="0" unit="cm"/>
2875 <physvol name="volUnitWSCent_0-3">
2876 <volumeref ref="volUnitCent"/>
2877 <position name="posUnitWSCent_0-3" x="-320" y="160" z="0" unit="cm"/>
2879 <physvol name="volUnitWSCent_0-4">
2880 <volumeref ref="volUnitCent"/>
2881 <position name="posUnitWSCent_0-4" x="-320" y="320" z="0" unit="cm"/>
2883 <physvol name="volUnitWSE_0">
2884 <volumeref ref="volUnitTop"/>
2885 <position name="posUnitWSE_0" x="454.2" y="-320" z="0" unit="cm"/>
2887 <physvol name="volUnitWSS_0">
2888 <volumeref ref="volUnitWallS"/>
2889 <position name="posUnitWSS_0" x="-320" y="468.9" z="0" unit="cm"/>
2890 <rotation name="rotUnitWSS_0" x="0" y="0" z="-90" unit="deg"/>
2892 <physvol name="volUnitWSW_0">
2893 <volumeref ref="volUnitTop"/>
2894 <position name="posUnitWSW_0" x="-454.2" y="-320" z="0" unit="cm"/>
2895 <rotation name="rotUnitWSW_0" x="0" y="0" z="-180" unit="deg"/>
2897 <physvol name="volUnitWSN_0">
2898 <volumeref ref="volUnitWallS"/>
2899 <position name="posUnitWSN_0" x="-320" y="-468.9" z="0" unit="cm"/>
2900 <rotation name="rotUnitWSN_0" x="0" y="0" z="-270" unit="deg"/>
2902 <physvol name="volUnitWSCent_1-0">
2903 <volumeref ref="volUnitCent"/>
2904 <position name="posUnitWSCent_1-0" x="-160" y="-320" z="0" unit="cm"/>
2906 <physvol name="volUnitWSCent_1-1">
2907 <volumeref ref="volUnitCent"/>
2908 <position name="posUnitWSCent_1-1" x="-160" y="-160" z="0" unit="cm"/>
2910 <physvol name="volUnitWSCent_1-2">
2911 <volumeref ref="volUnitCent"/>
2912 <position name="posUnitWSCent_1-2" x="-160" y="0" z="0" unit="cm"/>
2914 <physvol name="volUnitWSCent_1-3">
2915 <volumeref ref="volUnitCent"/>
2916 <position name="posUnitWSCent_1-3" x="-160" y="160" z="0" unit="cm"/>
2918 <physvol name="volUnitWSCent_1-4">
2919 <volumeref ref="volUnitCent"/>
2920 <position name="posUnitWSCent_1-4" x="-160" y="320" z="0" unit="cm"/>
2922 <physvol name="volUnitWSE_1">
2923 <volumeref ref="volUnitTop"/>
2924 <position name="posUnitWSE_1" x="454.2" y="-160" z="0" unit="cm"/>
2926 <physvol name="volUnitWSS_1">
2927 <volumeref ref="volUnitWallS"/>
2928 <position name="posUnitWSS_1" x="-160" y="468.9" z="0" unit="cm"/>
2929 <rotation name="rotUnitWSS_1" x="0" y="0" z="-90" unit="deg"/>
2931 <physvol name="volUnitWSW_1">
2932 <volumeref ref="volUnitTop"/>
2933 <position name="posUnitWSW_1" x="-454.2" y="-160" z="0" unit="cm"/>
2934 <rotation name="rotUnitWSW_1" x="0" y="0" z="-180" unit="deg"/>
2936 <physvol name="volUnitWSN_1">
2937 <volumeref ref="volUnitWallS"/>
2938 <position name="posUnitWSN_1" x="-160" y="-468.9" z="0" unit="cm"/>
2939 <rotation name="rotUnitWSN_1" x="0" y="0" z="-270" unit="deg"/>
2941 <physvol name="volUnitWSCent_2-0">
2942 <volumeref ref="volUnitCent"/>
2943 <position name="posUnitWSCent_2-0" x="0" y="-320" z="0" unit="cm"/>
2945 <physvol name="volUnitWSCent_2-1">
2946 <volumeref ref="volUnitCent"/>
2947 <position name="posUnitWSCent_2-1" x="0" y="-160" z="0" unit="cm"/>
2949 <physvol name="volUnitWSCent_2-2">
2950 <volumeref ref="volUnitCent"/>
2951 <position name="posUnitWSCent_2-2" x="0" y="0" z="0" unit="cm"/>
2953 <physvol name="volUnitWSCent_2-3">
2954 <volumeref ref="volUnitCent"/>
2955 <position name="posUnitWSCent_2-3" x="0" y="160" z="0" unit="cm"/>
2957 <physvol name="volUnitWSCent_2-4">
2958 <volumeref ref="volUnitCent"/>
2959 <position name="posUnitWSCent_2-4" x="0" y="320" z="0" unit="cm"/>
2961 <physvol name="volUnitWSE_2">
2962 <volumeref ref="volUnitTop"/>
2963 <position name="posUnitWSE_2" x="454.2" y="0" z="0" unit="cm"/>
2965 <physvol name="volUnitWSS_2">
2966 <volumeref ref="volUnitWallS"/>
2967 <position name="posUnitWSS_2" x="0" y="468.9" z="0" unit="cm"/>
2968 <rotation name="rotUnitWSS_2" x="0" y="0" z="-90" unit="deg"/>
2970 <physvol name="volUnitWSW_2">
2971 <volumeref ref="volUnitTop"/>
2972 <position name="posUnitWSW_2" x="-454.2" y="0" z="0" unit="cm"/>
2973 <rotation name="rotUnitWSW_2" x="0" y="0" z="-180" unit="deg"/>
2975 <physvol name="volUnitWSN_2">
2976 <volumeref ref="volUnitWallS"/>
2977 <position name="posUnitWSN_2" x="0" y="-468.9" z="0" unit="cm"/>
2978 <rotation name="rotUnitWSN_2" x="0" y="0" z="-270" unit="deg"/>
2980 <physvol name="volUnitWSCent_3-0">
2981 <volumeref ref="volUnitCent"/>
2982 <position name="posUnitWSCent_3-0" x="160" y="-320" z="0" unit="cm"/>
2984 <physvol name="volUnitWSCent_3-1">
2985 <volumeref ref="volUnitCent"/>
2986 <position name="posUnitWSCent_3-1" x="160" y="-160" z="0" unit="cm"/>
2988 <physvol name="volUnitWSCent_3-2">
2989 <volumeref ref="volUnitCent"/>
2990 <position name="posUnitWSCent_3-2" x="160" y="0" z="0" unit="cm"/>
2992 <physvol name="volUnitWSCent_3-3">
2993 <volumeref ref="volUnitCent"/>
2994 <position name="posUnitWSCent_3-3" x="160" y="160" z="0" unit="cm"/>
2996 <physvol name="volUnitWSCent_3-4">
2997 <volumeref ref="volUnitCent"/>
2998 <position name="posUnitWSCent_3-4" x="160" y="320" z="0" unit="cm"/>
3000 <physvol name="volUnitWSE_3">
3001 <volumeref ref="volUnitTop"/>
3002 <position name="posUnitWSE_3" x="454.2" y="160" z="0" unit="cm"/>
3004 <physvol name="volUnitWSS_3">
3005 <volumeref ref="volUnitWallS"/>
3006 <position name="posUnitWSS_3" x="160" y="468.9" z="0" unit="cm"/>
3007 <rotation name="rotUnitWSS_3" x="0" y="0" z="-90" unit="deg"/>
3009 <physvol name="volUnitWSW_3">
3010 <volumeref ref="volUnitTop"/>
3011 <position name="posUnitWSW_3" x="-454.2" y="160" z="0" unit="cm"/>
3012 <rotation name="rotUnitWSW_3" x="0" y="0" z="-180" unit="deg"/>
3014 <physvol name="volUnitWSN_3">
3015 <volumeref ref="volUnitWallS"/>
3016 <position name="posUnitWSN_3" x="160" y="-468.9" z="0" unit="cm"/>
3017 <rotation name="rotUnitWSN_3" x="0" y="0" z="-270" unit="deg"/>
3019 <physvol name="volUnitWSCent_4-0">
3020 <volumeref ref="volUnitCent"/>
3021 <position name="posUnitWSCent_4-0" x="320" y="-320" z="0" unit="cm"/>
3023 <physvol name="volUnitWSCent_4-1">
3024 <volumeref ref="volUnitCent"/>
3025 <position name="posUnitWSCent_4-1" x="320" y="-160" z="0" unit="cm"/>
3027 <physvol name="volUnitWSCent_4-2">
3028 <volumeref ref="volUnitCent"/>
3029 <position name="posUnitWSCent_4-2" x="320" y="0" z="0" unit="cm"/>
3031 <physvol name="volUnitWSCent_4-3">
3032 <volumeref ref="volUnitCent"/>
3033 <position name="posUnitWSCent_4-3" x="320" y="160" z="0" unit="cm"/>
3035 <physvol name="volUnitWSCent_4-4">
3036 <volumeref ref="volUnitCent"/>
3037 <position name="posUnitWSCent_4-4" x="320" y="320" z="0" unit="cm"/>
3039 <physvol name="volUnitWSE_4">
3040 <volumeref ref="volUnitTop"/>
3041 <position name="posUnitWSE_4" x="454.2" y="320" z="0" unit="cm"/>
3043 <physvol name="volUnitWSS_4">
3044 <volumeref ref="volUnitWallS"/>
3045 <position name="posUnitWSS_4" x="320" y="468.9" z="0" unit="cm"/>
3046 <rotation name="rotUnitWSS_4" x="0" y="0" z="-90" unit="deg"/>
3048 <physvol name="volUnitWSW_4">
3049 <volumeref ref="volUnitTop"/>
3050 <position name="posUnitWSW_4" x="-454.2" y="320" z="0" unit="cm"/>
3051 <rotation name="rotUnitWSW_4" x="0" y="0" z="-180" unit="deg"/>
3053 <physvol name="volUnitWSN_4">
3054 <volumeref ref="volUnitWallS"/>
3055 <position name="posUnitWSN_4" x="320" y="-468.9" z="0" unit="cm"/>
3056 <rotation name="rotUnitWSN_4" x="0" y="0" z="-270" unit="deg"/>
3061 <volume name="volSteelSupport_LR">
3062 <materialref ref="Air"/>
3063 <solidref ref="boxCryoWallLg"/>
3064 <physvol name="volUnitLRCent_0-0">
3065 <volumeref ref="volUnitCent"/>
3066 <position name="posUnitLRCent_0-0" x="-320" y="-320" z="0" unit="cm"/>
3068 <physvol name="volUnitLRCent_0-1">
3069 <volumeref ref="volUnitCent"/>
3070 <position name="posUnitLRCent_0-1" x="-320" y="-160" z="0" unit="cm"/>
3072 <physvol name="volUnitLRCent_0-2">
3073 <volumeref ref="volUnitCent"/>
3074 <position name="posUnitLRCent_0-2" x="-320" y="0" z="0" unit="cm"/>
3076 <physvol name="volUnitLRCent_0-3">
3077 <volumeref ref="volUnitCent"/>
3078 <position name="posUnitLRCent_0-3" x="-320" y="160" z="0" unit="cm"/>
3080 <physvol name="volUnitLRCent_0-4">
3081 <volumeref ref="volUnitCent"/>
3082 <position name="posUnitLRCent_0-4" x="-320" y="320" z="0" unit="cm"/>
3084 <physvol name="volUnitLRE_0">
3085 <volumeref ref="volUnitWallL"/>
3086 <position name="posUnitLRE_0" x="485.1" y="-320" z="0" unit="cm"/>
3088 <physvol name="volUnitLRS_0">
3089 <volumeref ref="volUnitWallS"/>
3090 <position name="posUnitLRS_0" x="-320" y="468.9" z="0" unit="cm"/>
3091 <rotation name="rotUnitLRS_0" x="0" y="0" z="-90" unit="deg"/>
3093 <physvol name="volUnitLRW_0">
3094 <volumeref ref="volUnitWallL"/>
3095 <position name="posUnitLRW_0" x="-485.1" y="-320" z="0" unit="cm"/>
3096 <rotation name="rotUnitLRW_0" x="0" y="0" z="-180" unit="deg"/>
3098 <physvol name="volUnitLRN_0">
3099 <volumeref ref="volUnitWallS"/>
3100 <position name="posUnitLRN_0" x="-320" y="-468.9" z="0" unit="cm"/>
3101 <rotation name="rotUnitLRN_0" x="0" y="0" z="-270" unit="deg"/>
3103 <physvol name="volUnitLRCent_1-0">
3104 <volumeref ref="volUnitCent"/>
3105 <position name="posUnitLRCent_1-0" x="-160" y="-320" z="0" unit="cm"/>
3107 <physvol name="volUnitLRCent_1-1">
3108 <volumeref ref="volUnitCent"/>
3109 <position name="posUnitLRCent_1-1" x="-160" y="-160" z="0" unit="cm"/>
3111 <physvol name="volUnitLRCent_1-2">
3112 <volumeref ref="volUnitCent"/>
3113 <position name="posUnitLRCent_1-2" x="-160" y="0" z="0" unit="cm"/>
3115 <physvol name="volUnitLRCent_1-3">
3116 <volumeref ref="volUnitCent"/>
3117 <position name="posUnitLRCent_1-3" x="-160" y="160" z="0" unit="cm"/>
3119 <physvol name="volUnitLRCent_1-4">
3120 <volumeref ref="volUnitCent"/>
3121 <position name="posUnitLRCent_1-4" x="-160" y="320" z="0" unit="cm"/>
3123 <physvol name="volUnitLRE_1">
3124 <volumeref ref="volUnitWallL"/>
3125 <position name="posUnitLRE_1" x="485.1" y="-160" z="0" unit="cm"/>
3127 <physvol name="volUnitLRS_1">
3128 <volumeref ref="volUnitWallS"/>
3129 <position name="posUnitLRS_1" x="-160" y="468.9" z="0" unit="cm"/>
3130 <rotation name="rotUnitLRS_1" x="0" y="0" z="-90" unit="deg"/>
3132 <physvol name="volUnitLRW_1">
3133 <volumeref ref="volUnitWallL"/>
3134 <position name="posUnitLRW_1" x="-485.1" y="-160" z="0" unit="cm"/>
3135 <rotation name="rotUnitLRW_1" x="0" y="0" z="-180" unit="deg"/>
3137 <physvol name="volUnitLRN_1">
3138 <volumeref ref="volUnitWallS"/>
3139 <position name="posUnitLRN_1" x="-160" y="-468.9" z="0" unit="cm"/>
3140 <rotation name="rotUnitLRN_1" x="0" y="0" z="-270" unit="deg"/>
3142 <physvol name="volUnitLRCent_2-0">
3143 <volumeref ref="volUnitCent"/>
3144 <position name="posUnitLRCent_2-0" x="0" y="-320" z="0" unit="cm"/>
3146 <physvol name="volUnitLRCent_2-1">
3147 <volumeref ref="volUnitCent"/>
3148 <position name="posUnitLRCent_2-1" x="0" y="-160" z="0" unit="cm"/>
3150 <physvol name="volUnitLRCent_2-2">
3151 <volumeref ref="volUnitCent"/>
3152 <position name="posUnitLRCent_2-2" x="0" y="0" z="0" unit="cm"/>
3154 <physvol name="volUnitLRCent_2-3">
3155 <volumeref ref="volUnitCent"/>
3156 <position name="posUnitLRCent_2-3" x="0" y="160" z="0" unit="cm"/>
3158 <physvol name="volUnitLRCent_2-4">
3159 <volumeref ref="volUnitCent"/>
3160 <position name="posUnitLRCent_2-4" x="0" y="320" z="0" unit="cm"/>
3162 <physvol name="volUnitLRE_2">
3163 <volumeref ref="volUnitWallL"/>
3164 <position name="posUnitLRE_2" x="485.1" y="0" z="0" unit="cm"/>
3166 <physvol name="volUnitLRS_2">
3167 <volumeref ref="volUnitWallS"/>
3168 <position name="posUnitLRS_2" x="0" y="468.9" z="0" unit="cm"/>
3169 <rotation name="rotUnitLRS_2" x="0" y="0" z="-90" unit="deg"/>
3171 <physvol name="volUnitLRW_2">
3172 <volumeref ref="volUnitWallL"/>
3173 <position name="posUnitLRW_2" x="-485.1" y="0" z="0" unit="cm"/>
3174 <rotation name="rotUnitLRW_2" x="0" y="0" z="-180" unit="deg"/>
3176 <physvol name="volUnitLRN_2">
3177 <volumeref ref="volUnitWallS"/>
3178 <position name="posUnitLRN_2" x="0" y="-468.9" z="0" unit="cm"/>
3179 <rotation name="rotUnitLRN_2" x="0" y="0" z="-270" unit="deg"/>
3181 <physvol name="volUnitLRCent_3-0">
3182 <volumeref ref="volUnitCent"/>
3183 <position name="posUnitLRCent_3-0" x="160" y="-320" z="0" unit="cm"/>
3185 <physvol name="volUnitLRCent_3-1">
3186 <volumeref ref="volUnitCent"/>
3187 <position name="posUnitLRCent_3-1" x="160" y="-160" z="0" unit="cm"/>
3189 <physvol name="volUnitLRCent_3-2">
3190 <volumeref ref="volUnitCent"/>
3191 <position name="posUnitLRCent_3-2" x="160" y="0" z="0" unit="cm"/>
3193 <physvol name="volUnitLRCent_3-3">
3194 <volumeref ref="volUnitCent"/>
3195 <position name="posUnitLRCent_3-3" x="160" y="160" z="0" unit="cm"/>
3197 <physvol name="volUnitLRCent_3-4">
3198 <volumeref ref="volUnitCent"/>
3199 <position name="posUnitLRCent_3-4" x="160" y="320" z="0" unit="cm"/>
3201 <physvol name="volUnitLRE_3">
3202 <volumeref ref="volUnitWallL"/>
3203 <position name="posUnitLRE_3" x="485.1" y="160" z="0" unit="cm"/>
3205 <physvol name="volUnitLRS_3">
3206 <volumeref ref="volUnitWallS"/>
3207 <position name="posUnitLRS_3" x="160" y="468.9" z="0" unit="cm"/>
3208 <rotation name="rotUnitLRS_3" x="0" y="0" z="-90" unit="deg"/>
3210 <physvol name="volUnitLRW_3">
3211 <volumeref ref="volUnitWallL"/>
3212 <position name="posUnitLRW_3" x="-485.1" y="160" z="0" unit="cm"/>
3213 <rotation name="rotUnitLRW_3" x="0" y="0" z="-180" unit="deg"/>
3215 <physvol name="volUnitLRN_3">
3216 <volumeref ref="volUnitWallS"/>
3217 <position name="posUnitLRN_3" x="160" y="-468.9" z="0" unit="cm"/>
3218 <rotation name="rotUnitLRN_3" x="0" y="0" z="-270" unit="deg"/>
3220 <physvol name="volUnitLRCent_4-0">
3221 <volumeref ref="volUnitCent"/>
3222 <position name="posUnitLRCent_4-0" x="320" y="-320" z="0" unit="cm"/>
3224 <physvol name="volUnitLRCent_4-1">
3225 <volumeref ref="volUnitCent"/>
3226 <position name="posUnitLRCent_4-1" x="320" y="-160" z="0" unit="cm"/>
3228 <physvol name="volUnitLRCent_4-2">
3229 <volumeref ref="volUnitCent"/>
3230 <position name="posUnitLRCent_4-2" x="320" y="0" z="0" unit="cm"/>
3232 <physvol name="volUnitLRCent_4-3">
3233 <volumeref ref="volUnitCent"/>
3234 <position name="posUnitLRCent_4-3" x="320" y="160" z="0" unit="cm"/>
3236 <physvol name="volUnitLRCent_4-4">
3237 <volumeref ref="volUnitCent"/>
3238 <position name="posUnitLRCent_4-4" x="320" y="320" z="0" unit="cm"/>
3240 <physvol name="volUnitLRE_4">
3241 <volumeref ref="volUnitWallL"/>
3242 <position name="posUnitLRE_4" x="485.1" y="320" z="0" unit="cm"/>
3244 <physvol name="volUnitLRS_4">
3245 <volumeref ref="volUnitWallS"/>
3246 <position name="posUnitLRS_4" x="320" y="468.9" z="0" unit="cm"/>
3247 <rotation name="rotUnitLRS_4" x="0" y="0" z="-90" unit="deg"/>
3249 <physvol name="volUnitLRW_4">
3250 <volumeref ref="volUnitWallL"/>
3251 <position name="posUnitLRW_4" x="-485.1" y="320" z="0" unit="cm"/>
3252 <rotation name="rotUnitLRW_4" x="0" y="0" z="-180" unit="deg"/>
3254 <physvol name="volUnitLRN_4">
3255 <volumeref ref="volUnitWallS"/>
3256 <position name="posUnitLRN_4" x="320" y="-468.9" z="0" unit="cm"/>
3257 <rotation name="rotUnitLRN_4" x="0" y="0" z="-270" unit="deg"/>
3261 <volume name="volDetEnclosure">
3262 <materialref ref="Air"/>
3263 <solidref ref="DetEnclosure"/>
3266 <volumeref ref="volFoamPadding"/>
3267 <positionref ref="posCryoInDetEnc"/>
3271 <physvol name="volSteelSupport_Top">
3272 <volumeref ref="volSteelSupport_TB"/>
3273 <position name="posSteelSupport_Top" x="$posTopSteelStruct+31.1" y="$posCryoInDetEnc_y" z="0" unit="cm"/>
3274 <rotation name="rotSteelSupport_Top" x="0" y="-90" z="0" unit="deg"/>
3278 <physvol name="volSteelSupport_Bottom">
3279 <volumeref ref="volSteelSupport_TB"/>
3280 <position name="posSteelSupport_Bottom" x="$posBotSteelStruct-31.1" y="$posCryoInDetEnc_y" z="0" unit="cm"/>
3281 <rotation name="rotSteelSupport_Bottom" x="0" y="90" z="0" unit="deg"/>
3285 <volumeref ref="volSteelSupport_US"/>
3286 <position name="posSteelSupport_US" x="0" y="$posCryoInDetEnc_y" z="$posZFrontSteelStruct-31.1" unit="cm"/>
3287 <rotation name="rotSteelSupport_Front" x="0" y="0" z="90" unit="deg"/>
3290 <physvol name="volSteelSupport_DS">
3291 <volumeref ref="volSteelSupport_WS"/>
3292 <position name="posSteelSupport_DS" x="0" y="$posCryoInDetEnc_y" z="$posZBackSteelStruct+31.1" unit="cm"/>
3293 <rotation name="rotSteelSupport_Back" x="0" y="0" z="90" unit="deg"/>
3297 <physvol name="volSteelSupport_LS">
3298 <volumeref ref="volSteelSupport_LR"/>
3299 <position name="posSteelSupport_LS" x="0" y="$posLeftSteelStruct+$posCryoInDetEnc_y-31.1" z="0" unit="cm"/>
3300 <rotation name="rotSteelSupport_LS" x="-90" y="0" z="90" unit="deg"/>
3303 <physvol name="volSteelSupport_RS">
3304 <volumeref ref="volSteelSupport_LR"/>
3305 <position name="posSteelSupport_RS" x="0" y="$posRightSteelStruct+$posCryoInDetEnc_y+31.1" z="0" unit="cm"/>
3306 <rotation name="rotSteelSupport_RS" x="90" y="0" z="90" unit="deg"/>
3310 <volumeref ref="volSteelSupport"/>
3311 <positionref ref="posCryoInDetEnc"/>
3315 <volumeref ref="volCryostat"/>
3316 <positionref ref="posCryoInDetEnc"/>
3335 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3336 #+++++++++++++++++++++++++++++++++++++++ gen_World +++++++++++++++++++++++++++++++++++++++
3337 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3342 # Create the WORLD fragment file name,
3343 # add file to list of output GDML fragments,
3345 $WORLD = $basename."_World" . $suffix . ".gdml";
3346 push (@gdmlFiles, $WORLD);
3347 $WORLD = ">" . $WORLD;
3348 open(WORLD) or die("Could not open file $WORLD for writing");
3351 # The standard XML prefix and starting the gdml
3353 <?xml version='1.0'?>
3358 # All the World solids.
3361 <box name="World" lunit="cm"
3362 x="@{[$DetEncWidth+2*$RockThickness]}"
3363 y="@{[$DetEncHeight+2*$RockThickness]}"
3364 z="@{[$DetEncLength+2*$RockThickness]}"/>
3371 <volume name="volWorld" >
3372 <materialref ref="Air"/>
3373 <solidref ref="World"/>
3376 <volumeref ref="volDetEnclosure"/>
3377 <position name="posDetEnclosure" unit="cm" x="$OriginXSet" y="$OriginYSet" z="$OriginZSet"/>
3385 # make_gdml.pl will take care of <setup/>
3392 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3393 #++++++++++++++++++++++++++++++++++++ write_fragments ++++++++++++++++++++++++++++++++++++
3394 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3396 sub write_fragments()
3398 # This subroutine creates an XML file that summarizes the the subfiles output
3399 # by the other sub routines - it is the input file for make_gdml.pl which will
3400 # give the final desired GDML file. Specify its name with the output option.
3401 # (you can change the name when running make_gdml)
3403 # This code is taken straigh from the similar MicroBooNE generate script, Thank you.
3405 if ( ! defined $output )
3407 $output = "-"; # write to STDOUT
3410 # Set up the output file.
3411 $OUTPUT = ">" . $output;
3412 open(OUTPUT) or die("Could not open file $OUTPUT");
3415 <?xml version='1.0'?>
3417 <!-- Input to Geometry/gdml/make_gdml.pl; define the GDML fragments
3418 that will be zipped together to create a detector description.
3425 <!-- These files contain GDML <constant></constant>
3426 blocks. They are read in separately, so they can be
3427 interpreted into the remaining GDML. See make_gdml.pl for
3433 foreach $filename (@defFiles)
3436 <filename> $filename </filename>
3446 <!-- The GDML file fragments to be zipped together. -->
3450 foreach $filename (@gdmlFiles)
3453 <filename> $filename </filename>
3468 print "Some key parameters for dual-phase LAr TPC (unit cm unless noted otherwise)\n";
3469 print "CRM active area : $widthCRM_active x $lengthCRM_active\n";
3470 print "CRM total area : $widthCRM x $lengthCRM\n";
3471 print "TPC active volume : $driftTPCActive x $widthTPCActive x $lengthTPCActive\n";
3472 print "Argon buffer : ($xLArBuffer, $yLArBuffer, $zLArBuffer) \n";
3473 print "Detector enclosure : $DetEncWidth x $DetEncHeight x $DetEncLength\n";
3474 print "TPC Origin : ($OriginXSet, $OriginYSet, $OriginZSet) \n";
3475 print "Field Cage : $FieldCage_switch \n";
3476 print "Cathode : $Cathode_switch \n";;
3477 print "GroundGrid : $GroundGrid_switch \n";
3478 print "ExtractionGrid : $ExtractionGrid_switch \n";
3479 print "LEMs : $LEMs_switch \n";
3480 print "PMTs : $pmt_switch \n";
3481 # run the sub routines that generate the fragments
3486 gen_Define(); # generates definitions at beginning of GDML
3487 gen_Materials(); # generates materials to be used
3489 if ( $pmt_switch eq "on" ) { gen_pmt(); }
3490 if ( $FieldCage_switch eq "on" ) { gen_FieldCage(); }
3491 if ( $GroundGrid_switch eq "on" ) { gen_GroundGrid(); }
3492 if ( $Cathode_switch eq "on" ) { gen_Cathode(); }
3493 if ( $ExtractionGrid_switch eq "on" ) { gen_ExtractionGrid(); }
3494 if ( $LEMs_switch eq "on" ) { gen_LEMs(); }
3496 gen_TPC(); # generate TPC for a given unit CRM
3499 gen_World(); # places the enclosure among DUSEL Rockk
3500 write_fragments(); # writes the XML input for make_gdml.pl
3501 # which zips together the final GDML