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 # vgalymov: fixed the CRP numbering based on the actual convention
13 ##################################################################################
21 Math::BigFloat->precision(-16);
23 GetOptions( "help|h" => \$help,
24 "suffix|s:s" => \$suffix,
25 "output|o:s" => \$output,
26 "wires|w:s" => \$wires,
27 "optical|opt:s" => \$optical,
28 "pmtdist|pmt:s" => \$pmtdist);
32 # If the user requested help, print the usage notes and exit.
37 if ( ! defined $suffix )
39 # The user didn't supply a suffix, so append nothing to the file
45 # Otherwise, stick a "-" before the suffix, so that a suffix of
46 # "test" applied to filename.gdml becomes "filename-test.gdml".
47 $suffix = "-" . $suffix;
50 # set wires on to be the default, unless given an input by the user
51 $wires_on = 1; # 1=on, 0=off
59 $basename = "protodunedphase_driftY";
62 my $FieldCage_switch="on";
63 $GroundGrid_switch="off";
64 $Cathode_switch="off";
65 $ExtractionGrid_switch="off";
72 $GroundGrid_switch="on";
74 $ExtractionGrid_switch="on";
75 $basename = $basename."_optical";
83 $basename = $basename."_uniform";
88 $basename = $basename."_nowires";
92 #if ( $workspace == 1 )
94 # $basename = $basename."_workspace";
98 ##################################################################
99 ############## Parameters for Charge Readout Plane ###############
101 # dune10kt dual-phase
102 $wirePitch = 0.3125; # channel pitch
103 $nChannelsViewPerCRM = 960; # channels per collection view
104 $borderCRM = 0.5; # dead space at the border of each CRM
106 # dimensions of a single Charge Readout Module (CRM)
107 $widthCRM_active = $wirePitch * $nChannelsViewPerCRM; # 300
108 $lengthCRM_active = $wirePitch * $nChannelsViewPerCRM; # 300
110 $widthCRM = $widthCRM_active + 2 * $borderCRM; # 301
111 $lengthCRM = $lengthCRM_active + 2 * $borderCRM; # 301
113 # number of CRMs in y and z
117 # calculate tpc area based on number of CRMs and their dimensions
118 $widthTPCActive = $nCRM_x * $widthCRM; # 602
119 $lengthTPCActive = $nCRM_z * $lengthCRM; # 602
121 # active volume dimensions
122 $driftTPCActive = 597.0;
124 # model anode strips as wires
126 $ReadoutPlane = 2 * $padWidth; # 0.03
128 #$padHeight = 0.0035;
130 ##################################################################
131 ############## Parameters for TPC and inner volume ###############
133 # inner volume dimensions of the cryostat
138 # width of gas argon layer on top
139 $HeightGaseousAr = 51.5;
141 # size of liquid argon buffer
142 $xLArBuffer = 0.5 * ($Argon_x - $widthTPCActive); # 126.2
143 $yLArBuffer = $Argon_y - $driftTPCActive - $HeightGaseousAr - $ReadoutPlane; #107.77
144 $zLArBuffer = 0.5 * ($Argon_z - $lengthTPCActive); # 126.2
147 $SteelThickness = 0.2; # membrane
149 $Cryostat_x = $Argon_x + 2*$SteelThickness; # 854.64
150 $Cryostat_y = $Argon_y + 2*$SteelThickness; # 789.84
151 $Cryostat_z = $Argon_z + 2*$SteelThickness; # 854.64
153 ##################################################################
154 ############## Field Cage Parameters ###############
156 $FieldShaperSizeX = 304.9;
157 $FieldShaperSizeY = 5.999;
158 $FieldShaperSizeZ = 4.603;
160 $FieldCageShaperProfileShift=-4.82;
161 $NFieldShapers = 100.0;
162 $FFSSeparation = 6.0;
164 $FieldCageSizeX = $FieldShaperSizeX+0.2;
165 $FieldCageSizeY = $FieldShaperSizeY+0.2;
166 $FieldCageSizeZ = $NFieldShapers*$FFSSeparation;
168 $FFSPositionX = 277.5;
169 $FFSPositionY = 153.521;
170 $FFSPositionZ = 309.593;
172 ##################################################################
173 ############## Parameters for PMTs ###############
175 #pos in cm inside the cryostat
176 #$pmt_pos_y = -300-(5.5 * 2.54)+5.115; just below the active volume
177 #$pmt_pos_y = -300-(5.5 * 2.54)+5.115 + 22 -141.5; just on the top of the cryostat (new version)
178 # $pmt_pos_y = -300+5.115 - 1.27*2.54 + 22 -107.8; #8.8cm from the bottom volTPCActive
181 #pmts not equally spaced:
184 if ( $pmtdist == 0) #new non uniform distribution
186 @pmt_TPB = (2,10,15,21,26,34);
188 ' z="170" x="238" ', #pmt0"
189 ' z="34" x="238" ', #pmt1"
190 ' z="-34" x="238" ', #pmt2TPB"
191 ' z="-170" x="238" ', #pmt3"
192 ' z="102" x="170" ', #pmt4"
193 ' z="-34" x="170" ', #pmt5"
194 ' z="-102" x="170" ', #pmt6"
195 ' z="-238" x="170" ', #pmt7"
196 ' z="170" x="102" ', #pmt8"
197 ' z="34" x="102" ', #pmt9"
198 ' z="-34" x="102" ', #pmt10TPB"
199 ' z="-170" x="102" ', #pmt11"
200 ' z="238" x="34" ', #pmt12"
201 ' z="102" x="34" ', #pmt13"
202 ' z="34" x="34" ', #pmt14"
203 ' z="-34" x="34" ', #pmt15TPB"
204 ' z="-102" x="34" ', #pmt16"
205 ' z="-238" x="34" ', #pmt17"
206 ' z="238" x="-34" ', #pmt18"
207 ' z="102" x="-34" ', #pmt19"
208 ' z="34" x="-34" ', #pmt20"
209 ' z="-34" x="-34" ', #pmt21TPB"
210 ' z="-102" x="-34" ', #pmt22"
211 ' z="-238" x="-34" ', #pmt23"
212 ' z="170" x="-102" ', #pmt24"
213 ' z="34" x="-102" ', #pmt25"
214 ' z="-34" x="-102" ', #pmt26TPB"
215 ' z="-170" x="-102" ', #pmt27"
216 ' z="102" x="-170" ', #pmt28"
217 ' z="-34" x="-170" ', #pmt29"
218 ' z="-102" x="-170" ', #pmt30"
219 ' z="-238" x="-170" ', #pmt31"
220 ' z="170" x="-238" ', #pmt32"
221 ' z="34" x="-238" ', #pmt33"
222 ' z="-34" x="-238" ', #pmt34TPB"
223 ' z="-170" x="-238" '); #pmt35"
225 else #old and deprecated uniform distribution.
228 @pmt_pos = ( ' z="-238" x="-170" ', #pmt35
229 ' z="-238" x="-34" ', #pmt34
230 ' z="-238" x="34" ', #pmt33
231 ' z="-238" x="170" ', #pmt32
232 ' z="-170" x="-238" ', #pmt31
233 ' z="-170" x="-102" ', #pmt30
234 ' z="-170" x="102" ', #pmt29
235 ' z="-170" x="238" ', #pmt28
236 ' z="-102" x="-170" ', #pmt27
237 ' z="-102" x="-34" ', #pmt26
238 ' z="-102" x="34" ', #pmt25
239 ' z="-102" x="170" ', #pmt24
240 ' z="-34" x="-238" ', #pmt23
241 ' z="-34" x="-102" ', #pmt22
242 ' z="-34" x="-34" ', #pmt21
243 ' z="-34" x="34" ', #pmt20
244 ' z="-34" x="102" ', #pmt19
245 ' z="-34" x="238" ', #pmt18
246 ' z="34" x="-238" ', #pmt17
247 ' z="34" x="-102" ', #pmt16
248 ' z="34" x="-34" ', #pmt15
249 ' z="34" x="34" ', #pmt14
250 ' z="34" x="102" ', #pmt13
251 ' z="34" x="238" ', #pmt12
252 ' z="102" x="-170" ', #pmt11
253 ' z="102" x="-34" ', #pmt10
254 ' z="102" x="34" ', #pmt9
255 ' z="102" x="170" ', #pmt8
256 ' z="170" x="-238" ', #pmt7
257 ' z="170" x="-102" ', #pmt6
258 ' z="170" x="102" ', #pmt5
259 ' z="170" x="238" ', #pmt4
260 ' z="238" x="-170" ', #pmt3
261 ' z="238" x="-34" ', #pmt2
262 ' z="238" x="34" ', #pmt1
263 ' z="238" x="170" '); #PMT0
265 ##################################################################
266 ############## DetEnc and World relevant parameters #############
274 $FracMassOfSteel = 0.5; #The steel support is not a solid block, but a mixture of air and steel
275 $FracMassOfAir = 1 - $FracMassOfSteel;
278 $SpaceSteelSupportToWall = 200;
279 $SpaceSteelSupportToCeiling = 200;
281 $DetEncWidth = $Cryostat_x
282 + 2*($SteelSupport_x + $FoamPadding) + 2*$SpaceSteelSupportToWall;
283 $DetEncHeight = $Cryostat_y
284 + 2*($SteelSupport_y + $FoamPadding) + $SpaceSteelSupportToCeiling;
285 $DetEncLength = $Cryostat_z
286 + 2*($SteelSupport_z + $FoamPadding) + 2*$SpaceSteelSupportToWall;
288 $posCryoInDetEnc_y = 0;
289 $posCryoInDetEnc_y2 = - $DetEncHeight/2 + $SteelSupport_y + $FoamPadding + $Cryostat_y/2;
291 $posTopSteelStruct = $Argon_y/2+$FoamPadding+$SteelSupport_y;
292 $posBotSteelStruct = -$Argon_y/2-$FoamPadding-$SteelSupport_y;
293 $posZBackSteelStruct = $Argon_z/2+$FoamPadding+$SteelSupport_z;
294 $posZFrontSteelStruct = -$Argon_z/2-$FoamPadding-$SteelSupport_z;
295 $posLeftSteelStruct = $Argon_x/2+$FoamPadding+$SteelSupport_x;
296 $posRightSteelStruct = -$Argon_x/2-$FoamPadding-$SteelSupport_x;
298 # 2*AirThickness is added to the world volume in x, y and z
299 $AirThickness = 3000;
301 # We want the world origin to be at the very front of the fiducial volume.
302 # move it to the front of the enclosure, then back it up through the concrete/foam,
303 # then through the Cryostat shell, then through the upstream dead LAr (including the
304 # dead LAr on the edge of the TPC)
305 # This is to be added to the z position of every volume in volWorld
307 $OriginZSet = $DetEncLength/2.0
308 - $SpaceSteelSupportToWall
315 # We want the world origin to be vertically centered on active TPC
316 # This is to be added to the y position of every volume in volWorld
318 $OriginYSet = $DetEncHeight/2.0
319 - $SpaceSteelSupportToCeiling/2.0
324 - $driftTPCActive/2.0;
327 $OriginXSet = $DetEncWidth/2.0
328 -$SpaceSteelSupportToWall
333 -$widthTPCActive/2.0;
336 ##################################################################
337 ############### Parameters for det elements ######################
340 #$Cathode_x = $widthTPCActive;
342 #$Cathode_z = $lengthTPCActive;
347 #0.5*$Argon_y-$HeightGaseousAr-0.5-0.5*$ExtractionGridSizeY;
349 #+++++++++++++++++++++++++ End defining variables ++++++++++++++++++++++++++
352 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
353 #+++++++++++++++++++++++++++++++++++++++++ usage +++++++++++++++++++++++++++++++++++++++++
354 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
358 print "Usage: $0 [-h|--help] [-o|--output <fragments-file>] [-s|--suffix <string>]\n";
359 print " if -o is omitted, output goes to STDOUT; <fragments-file> is input to make_gdml.pl\n";
360 print " -s <string> appends the string to the file names; useful for multiple detector versions\n";
361 print " -h prints this message, then quits\n";
366 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
367 #++++++++++++++++++++++++++++++++++++++ gen_Define +++++++++++++++++++++++++++++++++++++++
368 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
373 # Create the <define> fragment file name,
374 # add file to list of fragments,
376 $DEF = $basename."_Def" . $suffix . ".gdml";
377 push (@gdmlFiles, $DEF);
379 open(DEF) or die("Could not open file $DEF for writing");
383 <?xml version='1.0'?>
393 <position name="posCryoInDetEnc" unit="cm" x="$posCryoInDetEnc_x" y="0" z="0"/>
394 <position name="posCenter" unit="cm" x="0" y="0" z="0"/>
395 <rotation name="rPlus90AboutX" unit="deg" x="90" y="0" z="0"/>
396 <rotation name="rPlus90AboutY" unit="deg" x="90" y="90" z="0"/>
397 <rotation name="rMinus90AboutY" unit="deg" x="0" y="270" z="0"/>
398 <rotation name="rMinus90AboutYMinus90AboutX" unit="deg" x="270" y="270" z="0"/>
399 <rotation name="rPlus180AboutX" unit="deg" x="180" y="0" z="0"/>
400 <rotation name="rPlus180AboutY" unit="deg" x="0" y="180" z="0"/>
401 <rotation name="rPlus180AboutXPlus180AboutY" unit="deg" x="180" y="180" z="0"/>
402 <rotation name="rIdentity" unit="deg" x="0" y="0" 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"/>
418 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
419 #+++++++++++++++++++++++++++++++++++++ gen_Materials +++++++++++++++++++++++++++++++++++++
420 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
425 # Create the <materials> fragment file name,
426 # add file to list of output GDML fragments,
428 $MAT = $basename."_Materials" . $suffix . ".gdml";
429 push (@gdmlFiles, $MAT);
432 open(MAT) or die("Could not open file $MAT for writing");
434 # Add any materials special to this geometry by defining a mulitline string
435 # and passing it to the gdmlMaterials::gen_Materials() function.
437 <!-- preliminary values -->
438 <material name="AirSteelMixture" formula="AirSteelMixture">
439 <D value=" @{[0.001205*(1-$FracMassOfSteel) + 7.9300*$FracMassOfSteel]} " unit="g/cm3"/>
440 <fraction n="$FracMassOfSteel" ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
441 <fraction n="$FracMassOfAir" ref="Air"/>
445 # add the general materials used anywere
446 print MAT gdmlMaterials::gen_Materials( $asmix );
452 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
453 #++++++++++++++++++++++++++++++++++++++ gen_ExtractionGrid +++++++++++++++++++++++++++++++++++
454 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
456 sub gen_ExtractionGrid {
458 $ExtractionGrid = $basename."_ExtractionGrid" . $suffix . ".gdml";
459 push (@gdmlFiles, $ExtractionGrid);
460 $ExtractionGrid = ">" . $ExtractionGrid;
461 open(ExtractionGrid) or die("Could not open file $ExtractionGrid for writing");
463 # The standard XML prefix and starting the gdml
464 print ExtractionGrid <<EOF;
465 <?xml version='1.0'?>
471 #ExtractionGrid SOLIDS
473 $ExtractionGridRadious = 0.05;
474 $ExtractionGridPitch = 0.3;
476 $ExtractionGridSizeY = 2*$ExtractionGridRadious;
477 $ExtractionGridSizeX = $widthCRM_active;
478 $ExtractionGridSizeZ = $lengthCRM_active;
480 print ExtractionGrid <<EOF;
483 <tube name="solExtractionGridCable" rmin="0" rmax="$ExtractionGridRadious" z="$ExtractionGridSizeZ" deltaphi="360" startphi="0" aunit="deg" lunit="cm"/>
484 <box name="solExtractionGrid" x="@{[$ExtractionGridSizeX]}" y="@{[$ExtractionGridSizeY]}" z="@{[$ExtractionGridSizeZ]}" lunit="cm"/>
490 print ExtractionGrid <<EOF;
494 <volume name="volExtractionGridCable">
495 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
496 <solidref ref="solExtractionGridCable"/>
499 <volume name="volExtractionGrid">
500 <materialref ref="LAr"/>
501 <solidref ref="solExtractionGrid"/>
504 for($ii=0;$ii<$ExtractionGridSizeZ;$ii=$ii+$ExtractionGridPitch)
506 print ExtractionGrid <<EOF;
508 <volumeref ref="volExtractionGridCable"/>
509 <position name="posExtractionGridCable$ii" unit="cm" x="0" y="0" z="@{[$ii-0.5*$ExtractionGridSizeZ]}"/>
510 <rotation name="GG0rot$ii" unit="deg" x="0" y="90" z="0" />
516 for($jj=0;$jj<$ExtractionGridSizeX;$jj=$jj+$ExtractionGridPitch)
518 print ExtractionGrid <<EOF;
520 <volumeref ref="volExtractionGridCable"/>
521 <position name="posExtractionGridCableLat$jj" unit="cm" x="@{[$jj-0.5*$ExtractionGridSizeX]}" y="0" z="0"/>
522 <rotation name="GG1rotbis$jj" unit="deg" x="0" y="0" z="0" />
528 print ExtractionGrid <<EOF;
534 close(ExtractionGrid);
537 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
538 #++++++++++++++++++++++++++++++++++++++++ gen_TPC ++++++++++++++++++++++++++++++++++++++++
539 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
543 my $TPCActive_y = $driftTPCActive;
544 my $TPCActive_x = $widthCRM_active;
545 my $TPCActive_z = $lengthCRM_active;
548 my $TPC_y = $TPCActive_y + $ReadoutPlane;
549 my $TPC_x = $widthCRM;
550 my $TPC_z = $lengthCRM;
553 $TPC = $basename."_TPC" . $suffix . ".gdml";
554 push (@gdmlFiles, $TPC);
556 open(TPC) or die("Could not open file $TPC for writing");
558 # The standard XML prefix and starting the gdml
560 <?xml version='1.0'?>
565 # All the TPC solids save the wires.
568 <box name="CRM" lunit="cm"
572 <box name="CRMVPlane" lunit="cm"
576 <box name="CRMZPlane" lunit="cm"
580 <box name="CRMActive" lunit="cm"
587 #++++++++++++++++++++++++++++ Wire Solids ++++++++++++++++++++++++++++++
588 # in principle we only need only one wire solid, since CRM is a square
589 # but to be more general ...
593 <tube name="CRMWireV"
594 rmax="@{[0.5*$padWidth]}"
599 <tube name="CRMWireZ"
600 rmax="@{[0.5*$padWidth]}"
610 # Begin structure and create wire logical volumes
613 <volume name="volTPCActive">
614 <materialref ref="LAr"/>
615 <solidref ref="CRMActive"/>
616 <auxiliary auxtype="SensDet" auxvalue="SimEnergyDeposit"/>
617 <auxiliary auxtype="StepLimit" auxunit="cm" auxvalue="0.47625*cm"/>
618 <auxiliary auxtype="Efield" auxunit="V/cm" auxvalue="500*V/cm"/>
625 <volume name="volTPCWireV">
626 <materialref ref="Copper_Beryllium_alloy25"/>
627 <solidref ref="CRMWireV"/>
630 <volume name="volTPCWireZ">
631 <materialref ref="Copper_Beryllium_alloy25"/>
632 <solidref ref="CRMWireZ"/>
639 <volume name="volTPCPlaneV">
640 <materialref ref="LAr"/>
641 <solidref ref="CRMVPlane"/>
644 if ($wires_on==1) # add wires to Z plane
646 for($i=0;$i<$nChannelsViewPerCRM;++$i)
648 my $xpos = -0.5 * $TPCActive_x + ($i+0.5)*$wirePitch + 0.5*$padWidth;
652 <volumeref ref="volTPCWireV"/>
653 <position name="posWireV$i" unit="cm" x="$xpos" y="0" z="0"/>
654 <rotationref ref="rIdentity"/>
663 <volume name="volTPCPlaneZ">
664 <materialref ref="LAr"/>
665 <solidref ref="CRMZPlane"/>
669 if ($wires_on==1) # add wires to X plane
671 for($i=0;$i<$nChannelsViewPerCRM;++$i)
674 my $zpos = -0.5 * $TPCActive_z + ($i+0.5)*$wirePitch + 0.5*$padWidth;
677 <volumeref ref="volTPCWireZ"/>
678 <position name="posWireZ$i" unit="cm" x="0" y="0" z="$zpos"/>
679 <rotationref ref="rPlus90AboutY"/>
692 $posVplane[1] = 0.5*$TPC_y - 1.5*$padWidth;
696 $posZplane[1] = 0.5*$TPC_y - 0.5*$padWidth;
699 $posTPCActive[0] = 0;
700 $posTPCActive[1] = -$ReadoutPlane;
701 $posTPCActive[2] = 0;
705 #wrap up the TPC file
708 <volume name="volTPC">
709 <materialref ref="LAr"/>
710 <solidref ref="CRM"/>
712 <volumeref ref="volTPCPlaneV"/>
713 <position name="posPlaneV" unit="cm"
714 x="$posVplane[0]" y="$posVplane[1]" z="$posVplane[2]"/>
715 <rotationref ref="rIdentity"/>
718 <volumeref ref="volTPCPlaneZ"/>
719 <position name="posPlaneZ" unit="cm"
720 x="$posZplane[0]" y="$posZplane[1]" z="$posZplane[2]"/>
721 <rotationref ref="rIdentity"/>
724 <volumeref ref="volTPCActive"/>
725 <position name="posActive" unit="cm"
726 x="$posTPCActive[0]" y="$posTPCActive[1]" z="$posTPCActive[2]"/>
727 <rotationref ref="rIdentity"/>
730 $ExtractionGridX = 0;
731 $ExtractionGridY = 0.5*$TPC_y-0.5-0.5*$ExtractionGridSizeY;
732 $ExtractionGridZ = 0;
734 if ( $ExtractionGrid_switch eq "on" )
739 <volumeref ref="volExtractionGrid"/>
740 <position name="posExtractionGrid" unit="cm" x="@{[$ExtractionGridX]}" y="@{[$ExtractionGridY]}" z="@{[$ExtractionGridZ]}"/>
755 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
756 #++++++++++++++++++++++++++++++++++++++ gen_FieldCage +++++++++++++++++++++++++++++++++++++
757 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
765 $FieldCage = $basename."_FieldCage" . $suffix . ".gdml";
766 push (@gdmlFiles, $FieldCage);
767 $FieldCage = ">" . $FieldCage;
768 open(FieldCage) or die("Could not open file $FieldCage for writing");
770 # Create the <define> fragment file name,
771 # add file to list of fragments,
777 # The standard XML prefix and starting the gdml
778 print FieldCage <<EOF;
779 <?xml version='1.0'?>
782 # The printing solids used in the Field Cage
783 print FieldCage <<EOF;
787 <xtru name="FIELD_SHAPER-SOL" lunit="mm">
788 <twoDimVertex x="3.174889" y="4.182078"/>
789 <twoDimVertex x="3.287192" y="4.163508"/>
790 <twoDimVertex x="3.392385" y="4.120019"/>
791 <twoDimVertex x="3.485016" y="4.053866"/>
792 <twoDimVertex x="3.560284" y="3.968476"/>
793 <twoDimVertex x="3.614289" y="3.868273"/>
794 <twoDimVertex x="3.640993" y="3.777188"/>
795 <twoDimVertex x="3.650003" y="3.682696"/>
796 <twoDimVertex x="3.650003" y="0.765841000000002"/>
797 <twoDimVertex x="3.635299" y="0.645475999999999"/>
798 <twoDimVertex x="3.59205" y="0.532188999999999"/>
799 <twoDimVertex x="3.522803" y="0.432644"/>
800 <twoDimVertex x="3.431628" y="0.352698"/>
801 <twoDimVertex x="3.323888" y="0.297053000000002"/>
802 <twoDimVertex x="3.226003" y="0.271650999999999"/>
803 <twoDimVertex x="3.125008" y="0.266466999999999"/>
804 <twoDimVertex x="3.044094" y="0.263959"/>
805 <twoDimVertex x="2.964646" y="0.248422999999999"/>
806 <twoDimVertex x="2.852753" y="0.201684"/>
807 <twoDimVertex x="2.755402" y="0.129382"/>
808 <twoDimVertex x="2.67832" y="0.0357690000000019"/>
809 <twoDimVertex x="2.626041" y="-0.0736460000000001"/>
810 <twoDimVertex x="2.60164" y="-0.192428"/>
811 <twoDimVertex x="2.606552" y="-0.313592"/>
812 <twoDimVertex x="2.640488" y="-0.430011"/>
813 <twoDimVertex x="2.701452" y="-0.534835000000001"/>
814 <twoDimVertex x="2.785858" y="-0.6219"/>
815 <twoDimVertex x="2.888742" y="-0.686086"/>
816 <twoDimVertex x="3.004052" y="-0.723614999999999"/>
817 <twoDimVertex x="3.125005" y="-0.732282000000001"/>
818 <twoDimVertex x="3.245956" y="-0.740949000000001"/>
819 <twoDimVertex x="3.361264" y="-0.778479999999998"/>
820 <twoDimVertex x="3.464146" y="-0.842666000000001"/>
821 <twoDimVertex x="3.548551" y="-0.929731"/>
822 <twoDimVertex x="3.609514" y="-1.034553"/>
823 <twoDimVertex x="3.639776" y="-1.131048"/>
824 <twoDimVertex x="3.650003" y="-1.231656"/>
825 <twoDimVertex x="3.650003" y="-4.051359"/>
826 <twoDimVertex x="3.636188" y="-4.168081"/>
827 <twoDimVertex x="3.595506" y="-4.278353"/>
828 <twoDimVertex x="3.530206" y="-4.376082"/>
829 <twoDimVertex x="3.443895" y="-4.455866"/>
830 <twoDimVertex x="3.341345" y="-4.513298"/>
831 <twoDimVertex x="3.247548" y="-4.54175"/>
832 <twoDimVertex x="3.150003" y="-4.551358"/>
833 <twoDimVertex x="2.599999" y="-4.551358"/>
834 <twoDimVertex x="2.521782" y="-4.557514"/>
835 <twoDimVertex x="2.44549" y="-4.57583"/>
836 <twoDimVertex x="2.338749" y="-4.625038"/>
837 <twoDimVertex x="2.246446" y="-4.697805"/>
838 <twoDimVertex x="2.173679" y="-4.790109"/>
839 <twoDimVertex x="2.124471" y="-4.89685"/>
840 <twoDimVertex x="2.10154" y="-5.012128"/>
841 <twoDimVertex x="2.106155" y="-5.129575"/>
842 <twoDimVertex x="2.138059" y="-5.2427"/>
843 <twoDimVertex x="2.19549" y="-5.345251"/>
844 <twoDimVertex x="2.275275" y="-5.431561"/>
845 <twoDimVertex x="2.373003" y="-5.496861"/>
846 <twoDimVertex x="2.483276" y="-5.537543"/>
847 <twoDimVertex x="2.599999" y="-5.551358"/>
848 <twoDimVertex x="4.449998" y="-5.551358"/>
849 <twoDimVertex x="4.547543" y="-5.54175"/>
850 <twoDimVertex x="4.64134" y="-5.513298"/>
851 <twoDimVertex x="4.743891" y="-5.455866"/>
852 <twoDimVertex x="4.830201" y="-5.376082"/>
853 <twoDimVertex x="4.895501" y="-5.278353"/>
854 <twoDimVertex x="4.936183" y="-5.168081"/>
855 <twoDimVertex x="4.949998" y="-5.051358"/>
856 <twoDimVertex x="4.949998" y="3.827153"/>
857 <twoDimVertex x="4.965356" y="3.950123"/>
858 <twoDimVertex x="5.010485" y="4.065541"/>
859 <twoDimVertex x="5.082615" y="4.166314"/>
860 <twoDimVertex x="5.177314" y="4.246251"/>
861 <twoDimVertex x="5.288764" y="4.300442"/>
862 <twoDimVertex x="5.389517" y="4.323481"/>
863 <twoDimVertex x="5.492853" y="4.325318"/>
864 <twoDimVertex x="9.961787" y="3.782179"/>
865 <twoDimVertex x="13.85859" y="2.875176"/>
866 <twoDimVertex x="17.583122" y="1.413806"/>
867 <twoDimVertex x="21.056972" y="-0.571162999999999"/>
868 <twoDimVertex x="21.410387" y="-0.867622000000001"/>
869 <twoDimVertex x="21.693333" y="-1.231946"/>
870 <twoDimVertex x="21.893082" y="-1.647748"/>
871 <twoDimVertex x="22.000649" y="-2.096324"/>
872 <twoDimVertex x="22.011195" y="-2.557496"/>
873 <twoDimVertex x="21.924246" y="-3.01052"/>
874 <twoDimVertex x="21.743713" y="-3.435018"/>
875 <twoDimVertex x="21.477717" y="-3.811897"/>
876 <twoDimVertex x="21.138223" y="-4.124202"/>
877 <twoDimVertex x="20.740501" y="-4.357886"/>
878 <twoDimVertex x="20.302442" y="-4.502438"/>
879 <twoDimVertex x="19.84375" y="-4.551358"/>
880 <twoDimVertex x="14.900003" y="-4.551358"/>
881 <twoDimVertex x="14.821786" y="-4.557514"/>
882 <twoDimVertex x="14.745494" y="-4.57583"/>
883 <twoDimVertex x="14.638754" y="-4.625038"/>
884 <twoDimVertex x="14.54645" y="-4.697805"/>
885 <twoDimVertex x="14.473683" y="-4.790109"/>
886 <twoDimVertex x="14.424475" y="-4.89685"/>
887 <twoDimVertex x="14.401544" y="-5.012128"/>
888 <twoDimVertex x="14.406159" y="-5.129575"/>
889 <twoDimVertex x="14.438063" y="-5.2427"/>
890 <twoDimVertex x="14.495494" y="-5.345251"/>
891 <twoDimVertex x="14.575279" y="-5.431561"/>
892 <twoDimVertex x="14.673007" y="-5.496862"/>
893 <twoDimVertex x="14.78328" y="-5.537543"/>
894 <twoDimVertex x="14.900003" y="-5.551358"/>
895 <twoDimVertex x="19.843727" y="-5.551355"/>
896 <twoDimVertex x="20.513314" y="-5.479951"/>
897 <twoDimVertex x="21.152782" y="-5.268942"/>
898 <twoDimVertex x="21.733367" y="-4.927821"/>
899 <twoDimVertex x="22.228955" y="-4.471929"/>
900 <twoDimVertex x="22.617251" y="-3.921775"/>
901 <twoDimVertex x="22.880791" y="-3.302104"/>
902 <twoDimVertex x="23.007719" y="-2.640792"/>
903 <twoDimVertex x="22.992327" y="-1.967586"/>
904 <twoDimVertex x="22.835306" y="-1.312766"/>
905 <twoDimVertex x="22.543721" y="-0.705788999999999"/>
906 <twoDimVertex x="22.130685" y="-0.173957000000001"/>
907 <twoDimVertex x="21.614779" y="0.258807000000001"/>
908 <twoDimVertex x="18.014949" y="2.315762"/>
909 <twoDimVertex x="14.155346" y="3.830128"/>
910 <twoDimVertex x="10.117223" y="4.770024"/>
911 <twoDimVertex x="4.51123" y="5.404618"/>
912 <twoDimVertex x="-1.128658" y="5.551358"/>
913 <twoDimVertex x="-10.117225" y="4.770024"/>
914 <twoDimVertex x="-14.155346" y="3.830128"/>
915 <twoDimVertex x="-18.014946" y="2.315762"/>
916 <twoDimVertex x="-21.614774" y="0.258808999999999"/>
917 <twoDimVertex x="-22.130682" y="-0.173954999999999"/>
918 <twoDimVertex x="-22.543718" y="-0.705787000000001"/>
919 <twoDimVertex x="-22.835302" y="-1.312765"/>
920 <twoDimVertex x="-22.992326" y="-1.967584"/>
921 <twoDimVertex x="-23.007719" y="-2.64079"/>
922 <twoDimVertex x="-22.880788" y="-3.302103"/>
923 <twoDimVertex x="-22.61725" y="-3.921773"/>
924 <twoDimVertex x="-22.228952" y="-4.471928"/>
925 <twoDimVertex x="-21.733366" y="-4.92782"/>
926 <twoDimVertex x="-21.15278" y="-5.268942"/>
927 <twoDimVertex x="-20.513313" y="-5.479951"/>
928 <twoDimVertex x="-19.843727" y="-5.551358"/>
929 <twoDimVertex x="-14.900001" y="-5.551358"/>
930 <twoDimVertex x="-14.821785" y="-5.545203"/>
931 <twoDimVertex x="-14.745493" y="-5.526886"/>
932 <twoDimVertex x="-14.638752" y="-5.477678"/>
933 <twoDimVertex x="-14.546447" y="-5.404911"/>
934 <twoDimVertex x="-14.47368" y="-5.312607"/>
935 <twoDimVertex x="-14.424472" y="-5.205866"/>
936 <twoDimVertex x="-14.401542" y="-5.090588"/>
937 <twoDimVertex x="-14.406156" y="-4.973141"/>
938 <twoDimVertex x="-14.438062" y="-4.860016"/>
939 <twoDimVertex x="-14.495493" y="-4.757466"/>
940 <twoDimVertex x="-14.575277" y="-4.671155"/>
941 <twoDimVertex x="-14.673006" y="-4.605854"/>
942 <twoDimVertex x="-14.783279" y="-4.565174"/>
943 <twoDimVertex x="-14.900001" y="-4.551358"/>
944 <twoDimVertex x="-19.84375" y="-4.551355"/>
945 <twoDimVertex x="-20.30244" y="-4.502438"/>
946 <twoDimVertex x="-20.740499" y="-4.357886"/>
947 <twoDimVertex x="-21.13822" y="-4.124202"/>
948 <twoDimVertex x="-21.477714" y="-3.811899"/>
949 <twoDimVertex x="-21.743711" y="-3.43502"/>
950 <twoDimVertex x="-21.924244" y="-3.010522"/>
951 <twoDimVertex x="-22.011194" y="-2.557498"/>
952 <twoDimVertex x="-22.000646" y="-2.096328"/>
953 <twoDimVertex x="-21.893081" y="-1.647752"/>
954 <twoDimVertex x="-21.693334" y="-1.23195"/>
955 <twoDimVertex x="-21.410389" y="-0.867626000000001"/>
956 <twoDimVertex x="-21.056972" y="-0.571165999999998"/>
957 <twoDimVertex x="-17.583122" y="1.413806"/>
958 <twoDimVertex x="-13.858589" y="2.875176"/>
959 <twoDimVertex x="-9.961782" y="3.782178"/>
960 <twoDimVertex x="-5.492853" y="4.325312"/>
961 <twoDimVertex x="-5.369017" y="4.320551"/>
962 <twoDimVertex x="-5.250157" y="4.285479"/>
963 <twoDimVertex x="-5.143572" y="4.222252"/>
964 <twoDimVertex x="-5.055813" y="4.134755"/>
965 <twoDimVertex x="-4.992267" y="4.028359"/>
966 <twoDimVertex x="-4.960678" y="3.929951"/>
967 <twoDimVertex x="-4.949997" y="3.827153"/>
968 <twoDimVertex x="-4.949997" y="-5.051358"/>
969 <twoDimVertex x="-4.940388" y="-5.148903"/>
970 <twoDimVertex x="-4.911935" y="-5.2427"/>
971 <twoDimVertex x="-4.854504" y="-5.345251"/>
972 <twoDimVertex x="-4.77472" y="-5.431561"/>
973 <twoDimVertex x="-4.676991" y="-5.496861"/>
974 <twoDimVertex x="-4.566719" y="-5.537543"/>
975 <twoDimVertex x="-4.449997" y="-5.551358"/>
976 <twoDimVertex x="-2.599997" y="-5.551358"/>
977 <twoDimVertex x="-2.52178" y="-5.545203"/>
978 <twoDimVertex x="-2.445489" y="-5.526886"/>
979 <twoDimVertex x="-2.338748" y="-5.477678"/>
980 <twoDimVertex x="-2.246443" y="-5.404911"/>
981 <twoDimVertex x="-2.173677" y="-5.312607"/>
982 <twoDimVertex x="-2.124468" y="-5.205866"/>
983 <twoDimVertex x="-2.101538" y="-5.090588"/>
984 <twoDimVertex x="-2.106153" y="-4.973141"/>
985 <twoDimVertex x="-2.138057" y="-4.860016"/>
986 <twoDimVertex x="-2.195489" y="-4.757466"/>
987 <twoDimVertex x="-2.275273" y="-4.671155"/>
988 <twoDimVertex x="-2.373002" y="-4.605854"/>
989 <twoDimVertex x="-2.483274" y="-4.565174"/>
990 <twoDimVertex x="-2.599997" y="-4.551358"/>
991 <twoDimVertex x="-3.150001" y="-4.551358"/>
992 <twoDimVertex x="-3.266724" y="-4.537543"/>
993 <twoDimVertex x="-3.376997" y="-4.496862"/>
994 <twoDimVertex x="-3.474725" y="-4.431561"/>
995 <twoDimVertex x="-3.55451" y="-4.345251"/>
996 <twoDimVertex x="-3.611941" y="-4.2427"/>
997 <twoDimVertex x="-3.640394" y="-4.148904"/>
998 <twoDimVertex x="-3.650001" y="-4.051359"/>
999 <twoDimVertex x="-3.650001" y="-1.231656"/>
1000 <twoDimVertex x="-3.635296" y="-1.111289"/>
1001 <twoDimVertex x="-3.592049" y="-0.998002"/>
1002 <twoDimVertex x="-3.522801" y="-0.89846"/>
1003 <twoDimVertex x="-3.431626" y="-0.818512999999999"/>
1004 <twoDimVertex x="-3.323887" y="-0.762865999999999"/>
1005 <twoDimVertex x="-3.226001" y="-0.737466000000001"/>
1006 <twoDimVertex x="-3.125007" y="-0.732282000000001"/>
1007 <twoDimVertex x="-3.049645" y="-0.722729999999999"/>
1008 <twoDimVertex x="-2.976599" y="-0.701872999999999"/>
1009 <twoDimVertex x="-2.875039" y="-0.650507999999999"/>
1010 <twoDimVertex x="-2.787724" y="-0.577507999999998"/>
1011 <twoDimVertex x="-2.719181" y="-0.486654000000002"/>
1012 <twoDimVertex x="-2.672959" y="-0.382652"/>
1013 <twoDimVertex x="-2.651454" y="-0.270893000000001"/>
1014 <twoDimVertex x="-2.65578" y="-0.157163000000001"/>
1015 <twoDimVertex x="-2.685712" y="-0.0473590000000002"/>
1016 <twoDimVertex x="-2.739699" y="0.0528300000000002"/>
1017 <twoDimVertex x="-2.814946" y="0.138217000000001"/>
1018 <twoDimVertex x="-2.907552" y="0.204374999999999"/>
1019 <twoDimVertex x="-3.012722" y="0.247876000000002"/>
1020 <twoDimVertex x="-3.125003" y="0.266466999999999"/>
1021 <twoDimVertex x="-3.245954" y="0.275136"/>
1022 <twoDimVertex x="-3.361263" y="0.312666"/>
1023 <twoDimVertex x="-3.464144" y="0.376850999999998"/>
1024 <twoDimVertex x="-3.548549" y="0.463915"/>
1025 <twoDimVertex x="-3.609512" y="0.568739000000001"/>
1026 <twoDimVertex x="-3.639774" y="0.665232"/>
1027 <twoDimVertex x="-3.650001" y="0.765841000000002"/>
1028 <twoDimVertex x="-3.650001" y="3.682696"/>
1029 <twoDimVertex x="-3.637045" y="3.795785"/>
1030 <twoDimVertex x="-3.598845" y="3.903012"/>
1031 <twoDimVertex x="-3.537384" y="3.998822"/>
1032 <twoDimVertex x="-3.455846" y="4.078246"/>
1033 <twoDimVertex x="-3.358455" y="4.137171"/>
1034 <twoDimVertex x="-3.268812" y="4.168376"/>
1035 <twoDimVertex x="-3.174888" y="4.182084"/>
1038 <section zOrder="0" zPosition="-1523.5077" xOffset="0" yOffset="0" scalingFactor="1"/>
1039 <section zOrder="1" zPosition="1431.2323" xOffset="0" yOffset="0" scalingFactor="1"/>
1040 <section zOrder="2" zPosition="1523.5077" xOffset="0" yOffset="@{[10*$FieldCageShaperProfileShift]}" scalingFactor="1"/>
1045 <box name="FieldCageModule" lunit="cm"
1048 z="$FieldCageSizeZ"/>
1054 print FieldCage <<EOF;
1060 <volume name="volFIELDSHAPER">
1061 <materialref ref="ALUMINUM_Al"/>
1062 <solidref ref="FIELD_SHAPER-SOL"/>
1066 <volume name="volFieldCageModule">
1067 <materialref ref="LAr"/>
1068 <solidref ref="FieldCageModule"/>
1071 for ( $i=0; $i<$NFieldShapers; $i=$i+1 ) { # pmts with coating
1073 $Zposition = +0.5*$FieldCageSizeZ-0.5*$FFSSeparation-$i*$FFSSeparation;
1074 print FieldCage <<EOF;
1077 <volumeref ref="volFIELDSHAPER"/>
1078 <position name="posFieldShaper$i" unit="cm" x="0" y="@{[-0.5*$FieldCageShaperProfileShift]}" z="$Zposition"/>
1079 <rotation name="FShaperRot$i" unit="deg" x="0" y="270" z="0"/>
1085 print FieldCage <<EOF;
1095 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1096 #++++++++++++++++++++++++++++++++++++++ gen_GroundGrid +++++++++++++++++++++++++++++++++++
1097 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1099 sub gen_GroundGrid {
1101 $GroundGrid = $basename."_GroundGrid" . $suffix . ".gdml";
1102 push (@gdmlFiles, $GroundGrid);
1103 $GroundGrid = ">" . $GroundGrid;
1104 open(GroundGrid) or die("Could not open file $GroundGrid for writing");
1106 # The standard XML prefix and starting the gdml
1107 print GroundGrid <<EOF;
1108 <?xml version='1.0'?>
1113 $GroundGridTubeLength = 297.5;
1114 $GroundGridInnerRadious = 1.85;
1115 $GroundGridOuterRadious = 2.0;
1116 $GroundGridTorRad = 16;
1118 $GroundGridInnerStructureLength = 313.5;
1119 $GroundGridInnerStructureWidth = 2;
1120 $GroundGridInnerStructureHeight = 4;
1121 $GroundGridInnerStructureSeparation = 63.0;
1122 $GroundGridInnerStructureNumberOfBars = 4;
1124 $GroundGridInnerStructureNumberOfCablesPerInnerSquare = 5.0;
1125 $GroundGridInnerStructureCableRadious = 0.2;
1126 $GroundGridInnerStructureCableSeparation = $GroundGridInnerStructureSeparation/($GroundGridInnerStructureNumberOfCablesPerInnerSquare+1);
1128 print GroundGrid <<EOF;
1131 <torus name="GroundGridCorner" rmin="$GroundGridInnerRadious" rmax="$GroundGridOuterRadious" rtor="$GroundGridTorRad" deltaphi="90" startphi="0" aunit="deg" lunit="cm"/>
1132 <tube name="GroundGridtube" rmin="$GroundGridInnerRadious" rmax="$GroundGridOuterRadious" z="$GroundGridTubeLength" deltaphi="360" startphi="0" aunit="deg" lunit="cm"/>
1133 <box name="GroundGridInnerBoxBorder" x="@{[0.5*$GroundGridInnerStructureWidth]}" y="$GroundGridInnerStructureHeight" z="@{[$GroundGridInnerStructureLength]}" lunit="cm"/>
1134 <box name="GroundGridInnerBox" x="@{[$GroundGridInnerStructureWidth]}" y="$GroundGridInnerStructureHeight" z="@{[$GroundGridInnerStructureLength]}" lunit="cm"/>
1135 <box name="GroundGridModule" x="@{[$GroundGridInnerStructureLength+2+$GroundGridOuterRadious]}" y="$GroundGridInnerStructureHeight" z="@{[$GroundGridInnerStructureLength+2+$GroundGridOuterRadious]}" lunit="cm"/>
1136 <tube name="GroundGridCable" rmin="0" rmax="$GroundGridInnerStructureCableRadious" z="@{[$GroundGridInnerStructureLength]}" deltaphi="360" startphi="0" aunit="deg" lunit="cm"/>
1140 <union name="GGunion1">
1141 <first ref="GroundGridtube"/>
1142 <second ref="GroundGridCorner"/>
1143 <position name="GGcorner1" unit="cm" x="@{[-$GroundGridTorRad]}" y="0" z="@{[0.5*$GroundGridTubeLength]}"/>
1144 <rotation name="GGrot1" unit="deg" x="90" y="0" z="0" />
1147 <union name="GGunion2">
1148 <first ref="GGunion1"/>
1149 <second ref="GroundGridtube"/>
1150 <position name="GGcorner2" unit="cm" x="@{[-0.5*$GroundGridTubeLength-$GroundGridTorRad]}" y="0" z="@{[+0.5*$GroundGridTubeLength+$GroundGridTorRad]}"/>
1151 <rotation name="GGrot2" unit="deg" x="0" y="90" z="0" />
1154 <union name="GGunion3">
1155 <first ref="GGunion2"/>
1156 <second ref="GroundGridInnerBoxBorder"/>
1157 <position name="GGcorner3" unit="cm" x="@{[-$GroundGridTubeLength-$GroundGridTorRad+0.25*$GroundGridInnerStructureWidth]}" y="0" z="@{[$GroundGridTorRad-0.5*($GroundGridInnerStructureLength-$GroundGridTubeLength)]}"/>
1161 <union name="GGunion4">
1162 <first ref="GGunion3"/>
1163 <second ref="GroundGridInnerBoxBorder"/>
1164 <position name="GGcorner4" unit="cm" x="@{[-0.5*$GroundGridTubeLength-$GroundGridTorRad+0.5*($GroundGridInnerStructureLength-$GroundGridTubeLength)]}" y="0" z="@{[-0.5*$GroundGridTubeLength+0.25*$GroundGridInnerStructureWidth]}"/>
1165 <rotation name="GGrot4" unit="deg" x="0" y="90" z="0" />
1172 $xGGorigin=0.5*($GroundGridInnerStructureLength+2+$GroundGridOuterRadious)-$GroundGridOuterRadious-2;
1173 $zGGorigin=-0.5*($GroundGridInnerStructureLength+2+$GroundGridOuterRadious)+0.5*$GroundGridTubeLength;
1176 print GroundGrid <<EOF;
1180 <volume name="volGroundGridCable">
1181 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1182 <solidref ref="GroundGridCable"/>
1185 <volume name="volGroundGridInnerBox">
1186 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1187 <solidref ref="GroundGridInnerBox"/>
1190 <volume name="volGGunion">
1191 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1192 <solidref ref="GGunion4"/>
1195 <volume name="volGroundGrid">
1196 <materialref ref="LAr"/>
1197 <solidref ref="GroundGridModule"/>
1200 <volumeref ref="volGGunion"/>
1201 <position name="posGG18" unit="cm" x="@{[$xGGorigin]}" y="0" z="@{[$zGGorigin]}"/>
1208 for($ii=0;$ii<$GroundGridInnerStructureNumberOfBars;$ii++)
1211 print GroundGrid <<EOF;
1213 <volumeref ref="volGroundGridInnerBox"/>
1214 <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]}"/>
1220 for($ii=0;$ii<=$GroundGridInnerStructureNumberOfBars;$ii++)
1222 for($jj=0;$jj<$GroundGridInnerStructureNumberOfCablesPerInnerSquare;$jj++)
1224 print GroundGrid <<EOF;
1226 <volumeref ref="volGroundGridCable"/>
1227 <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]}"/>
1230 if($ii ==$GroundGridInnerStructureNumberOfBars) { if($jj == 3){ $jj=$GroundGridInnerStructureNumberOfCablesPerInnerSquare;}}
1235 for($ii=0;$ii<$GroundGridInnerStructureNumberOfBars;$ii++)
1238 print GroundGrid <<EOF;
1240 <volumeref ref="volGroundGridInnerBox"/>
1241 <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]}"/>
1242 <rotation name="GG2rot$aux2" unit="deg" x="0" y="90" z="0" />
1247 print GroundGrid <<EOF;
1259 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1260 #++++++++++++++++++++++++++++++++++++++ gen_Cathode +++++++++++++++++++++++++++++++++++++
1261 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1265 $Cathode = $basename."_Cathode" . $suffix . ".gdml";
1266 push (@gdmlFiles, $Cathode);
1267 $Cathode = ">" . $Cathode;
1268 open(Cathode) or die("Could not open file $Cathode for writing");
1270 # The standard XML prefix and starting the gdml
1271 print Cathode <<EOF;
1272 <?xml version='1.0'?>
1277 $CathodeTubeLength = 297.5;
1278 $CathodeInnerRadious = 1.85;
1279 $CathodeOuterRadious = 2.0;
1280 $CathodeTorRad = 16;
1282 $CathodeInnerStructureLength = 313.5;
1283 $CathodeInnerStructureWidth = 2;
1284 $CathodeInnerStructureHeight = 4;
1285 $CathodeInnerStructureSeparation = 65.0;
1286 $CathodeInnerStructureNumberOfBars = 4;
1288 $CathodeInnerStructureNumberOfCablesPerInnerSquare = 5.0;
1289 $CathodeInnerStructureCableRadious = 0.5;
1290 $CathodeInnerStructureCableSeparation = $CathodeInnerStructureSeparation/($CathodeInnerStructureNumberOfCablesPerInnerSquare+1);
1291 $CathodeInnerCableLength = 128.0;
1292 $CathodeInnerCableLengthShort = 47.5;#48.5;
1293 $CathodeInnerSemiCableLength = ($CathodeInnerCableLength-$CathodeInnerStructureWidth)*0.5;
1296 $CathodeSupportTubeLength = 252.0;
1297 $CathodeSupportInnerRadious = 1.85;
1298 $CathodeSupportOuterRadious = 2.0;
1299 $CathodeSupportTorRad = 12;
1301 $CathodeSupportInnerStructureLength = 264.0;
1302 $CathodeSupportInnerStructureWidth = 2;
1303 $CathodeSupportInnerStructureHeight = 4;
1304 $CathodeSupportInnerStructureSeparation = 65.0;
1305 $CathodeSupportInnerStructureNumberOfBars = 3;
1307 $CathodeSupportDistance =20;
1308 $CathodeModuleX =$CathodeInnerStructureLength+2+$CathodeOuterRadious;
1309 $CathodeModuleY =$CathodeInnerStructureHeight + $CathodeSupportDistance;
1310 $CathodeModuleZ =$CathodeInnerStructureLength+2+$CathodeOuterRadious;
1312 $CathodeSupportSeparatorsHeight=$CathodeSupportDistance-$CathodeInnerStructureHeight;
1314 $CathodeSupportSeparatorsBorderLength=33;#53.39;
1315 print Cathode <<EOF;
1318 <torus name="CathodeCorner" rmin="$CathodeInnerRadious" rmax="$CathodeOuterRadious" rtor="$CathodeTorRad" deltaphi="90" startphi="0" aunit="deg" lunit="cm"/>
1319 <tube name="Cathodetube" rmin="$CathodeInnerRadious" rmax="$CathodeOuterRadious" z="$CathodeTubeLength" deltaphi="360" startphi="0" aunit="deg" lunit="cm"/>
1320 <box name="CathodeInnerBoxBorder" x="@{[0.5*$CathodeInnerStructureWidth]}" y="$CathodeInnerStructureHeight" z="@{[$CathodeInnerStructureLength]}" lunit="cm"/>
1321 <box name="CathodeInnerBox" x="@{[$CathodeInnerStructureWidth]}" y="$CathodeInnerStructureHeight" z="@{[$CathodeInnerStructureLength]}" lunit="cm"/>
1322 <box name="CathodeModule" x="@{[$CathodeModuleX]}" y="$CathodeModuleY" z="@{[$CathodeModuleZ]}" lunit="cm"/>
1323 <box name="CathodeSupportSeparators" x="@{[$CathodeSupportInnerStructureWidth]}" y="@{[$CathodeSupportSeparatorsHeight]}" z="@{[$CathodeSupportInnerStructureHeight]}" lunit="cm"/>
1324 <box name="CathodeSupportSeparatorsBorder" x="@{[$CathodeSupportInnerStructureWidth]}" y="$CathodeSupportSeparatorsBorderLength" z="@{[$CathodeSupportInnerStructureHeight]}" lunit="cm"/>
1325 <tube name="CathodeCable" rmin="0" rmax="$CathodeInnerStructureCableRadious" z="@{[$CathodeInnerCableLength]}" deltaphi="360" startphi="0" aunit="deg" lunit="cm"/>
1326 <tube name="CathodeSemiCable" rmin="0" rmax="$CathodeInnerStructureCableRadious" z="@{[$CathodeInnerSemiCableLength]}" deltaphi="360" startphi="0" aunit="deg" lunit="cm"/>
1327 <tube name="CathodeCableShort" rmin="0" rmax="$CathodeInnerStructureCableRadious" z="@{[$CathodeInnerCableLengthShort]}" deltaphi="360" startphi="0" aunit="deg" lunit="cm"/>
1328 <tube name="CathodeCableShortShort" rmin="0" rmax="$CathodeInnerStructureCableRadious" z="@{[$CathodeInnerCableLengthShort-3]}" deltaphi="360" startphi="0" aunit="deg" lunit="cm"/>
1332 <union name="Cathunion1">
1333 <first ref="Cathodetube"/>
1334 <second ref="CathodeCorner"/>
1335 <position name="Cathcorner1" unit="cm" x="@{[-$CathodeTorRad]}" y="0" z="@{[0.5*$CathodeTubeLength]}"/>
1336 <rotation name="Cathrot1" unit="deg" x="90" y="0" z="0" />
1339 <union name="Cathunion2">
1340 <first ref="Cathunion1"/>
1341 <second ref="Cathodetube"/>
1342 <position name="Cathcorner2" unit="cm" x="@{[-0.5*$CathodeTubeLength-$CathodeTorRad]}" y="0" z="@{[+0.5*$CathodeTubeLength+$CathodeTorRad]}"/>
1343 <rotation name="Cathrot2" unit="deg" x="0" y="90" z="0" />
1346 <union name="Cathunion3">
1347 <first ref="Cathunion2"/>
1348 <second ref="CathodeInnerBoxBorder"/>
1349 <position name="Cathcorner3" unit="cm" x="@{[-$CathodeTubeLength-$CathodeTorRad+0.25*$CathodeInnerStructureWidth]}" y="0" z="@{[$CathodeTorRad-0.5*($CathodeInnerStructureLength-$CathodeTubeLength)]}"/>
1353 <union name="Cathunion4">
1354 <first ref="Cathunion3"/>
1355 <second ref="CathodeInnerBoxBorder"/>
1356 <position name="Cathcorner4" unit="cm" x="@{[-0.5*$CathodeTubeLength-$CathodeTorRad+0.5*($CathodeInnerStructureLength-$CathodeTubeLength)]}" y="0" z="@{[-0.5*$CathodeTubeLength+0.25*$CathodeInnerStructureWidth]}"/>
1357 <rotation name="Cathrot4" unit="deg" x="0" y="90" z="0" />
1361 <torus name="CathodeSupportCorner" rmin="$CathodeSupportInnerRadious" rmax="$CathodeSupportOuterRadious" rtor="$CathodeSupportTorRad" deltaphi="90" startphi="0" aunit="deg" lunit="cm"/>
1362 <tube name="CathodeSupporttube" rmin="$CathodeSupportInnerRadious" rmax="$CathodeSupportOuterRadious" z="$CathodeSupportTubeLength" deltaphi="360" startphi="0" aunit="deg" lunit="cm"/>
1363 <box name="CathodeSupportInnerBoxBorder" x="@{[0.5*$CathodeSupportInnerStructureWidth]}" y="$CathodeSupportInnerStructureHeight" z="@{[$CathodeSupportInnerStructureLength]}" lunit="cm"/>
1364 <box name="CathodeSupportInnerBox" x="@{[$CathodeSupportInnerStructureWidth]}" y="$CathodeSupportInnerStructureHeight" z="@{[$CathodeSupportInnerStructureLength]}" lunit="cm"/>
1365 <box name="CathodeSupportModule" x="@{[$CathodeSupportInnerStructureLength+2+$CathodeSupportOuterRadious]}" y="$CathodeSupportInnerStructureHeight" z="@{[$CathodeSupportInnerStructureLength+2+$CathodeSupportOuterRadious]}" lunit="cm"/>
1369 <union name="CathSupunion1">
1370 <first ref="CathodeSupporttube"/>
1371 <second ref="CathodeSupportCorner"/>
1372 <position name="CathSupcorner1" unit="cm" x="@{[-$CathodeSupportTorRad]}" y="0" z="@{[0.5*$CathodeSupportTubeLength]}"/>
1373 <rotation name="CathSuprot1" unit="deg" x="90" y="0" z="0" />
1376 <union name="CathSupunion2">
1377 <first ref="CathSupunion1"/>
1378 <second ref="CathodeSupporttube"/>
1379 <position name="CathSupcorner2" unit="cm" x="@{[-0.5*$CathodeSupportTubeLength-$CathodeSupportTorRad]}" y="0" z="@{[+0.5*$CathodeSupportTubeLength+$CathodeSupportTorRad]}"/>
1380 <rotation name="CathSuprot2" unit="deg" x="0" y="90" z="0" />
1383 <union name="CathSupunion3">
1384 <first ref="CathSupunion2"/>
1385 <second ref="CathodeSupportInnerBoxBorder"/>
1386 <position name="CathSupcorner3" unit="cm" x="@{[-$CathodeSupportTubeLength-$CathodeSupportTorRad+0.25*$CathodeSupportInnerStructureWidth]}" y="0" z="@{[$CathodeSupportTorRad-0.5*($CathodeSupportInnerStructureLength-$CathodeSupportTubeLength)]}"/>
1390 <union name="CathSupunion4">
1391 <first ref="CathSupunion3"/>
1392 <second ref="CathodeSupportInnerBoxBorder"/>
1393 <position name="CathSupcorner4" unit="cm" x="@{[-0.5*$CathodeSupportTubeLength-$CathodeSupportTorRad+0.5*($CathodeSupportInnerStructureLength-$CathodeSupportTubeLength)]}" y="0" z="@{[-0.5*$CathodeSupportTubeLength+0.25*$CathodeSupportInnerStructureWidth]}"/>
1394 <rotation name="CathSuprot4" unit="deg" x="0" y="90" z="0" />
1402 $xCathorigin=0.5*($CathodeModuleX)-$CathodeOuterRadious-2;
1403 $yCathorigin=0.5*$CathodeModuleY - 0.5*$CathodeInnerStructureHeight;
1404 $zCathorigin=-0.5*($CathodeModuleX)+0.5*$CathodeTubeLength;
1405 $xCathSuporigin=$xCathorigin+($CathodeSupportInnerStructureLength-$CathodeInnerStructureLength);
1406 $zCathSuporigin=-$zCathorigin-($CathodeInnerStructureLength+$CathodeOuterRadious-$CathodeSupportInnerStructureLength-$CathodeSupportOuterRadious)+7;
1408 $xCathSuporigin=$xCathorigin+($CathodeSupportInnerStructureLength-$CathodeInnerStructureLength);
1409 $zCathSuporigin=-0.5*($CathodeModuleZ)+0.5*$CathodeSupportTubeLength;
1410 $yCathSuporigin=$yCathorigin-$CathodeSupportDistance;
1413 print Cathode <<EOF;
1419 <volume name="volCathodeSupportSeparators">
1420 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1421 <solidref ref="CathodeSupportSeparators"/>
1424 <volume name="volCathodeSupportSeparatorsBorder">
1425 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1426 <solidref ref="CathodeSupportSeparatorsBorder"/>
1432 <volume name="volCathodeCable">
1433 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1434 <solidref ref="CathodeCable"/>
1436 <volume name="volCathodeSemiCable">
1437 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1438 <solidref ref="CathodeSemiCable"/>
1441 <volume name="volCathodeCableShort">
1442 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1443 <solidref ref="CathodeCableShort"/>
1446 <volume name="volCathodeCableShortShort">
1447 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1448 <solidref ref="CathodeCableShortShort"/>
1451 <volume name="volCathodeInnerBox">
1452 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1453 <solidref ref="CathodeInnerBox"/>
1456 <volume name="volCathodeSupportInnerBox">
1457 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1458 <solidref ref="CathodeSupportInnerBox"/>
1462 <volume name="volCathunion">
1463 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1464 <solidref ref="Cathunion4"/>
1467 <volume name="volCathSupunion">
1468 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
1469 <solidref ref="CathSupunion4"/>
1472 <volume name="volCathode">
1473 <materialref ref="LAr"/>
1474 <solidref ref="CathodeModule"/>
1477 <volumeref ref="volCathunion"/>
1478 <position name="posCath18" unit="cm" x="@{[$xCathorigin]}" y="$yCathorigin" z="@{[$zCathorigin]}"/>
1482 <volumeref ref="volCathSupunion"/>
1483 <position name="posCathSup" unit="cm" x="@{[$xCathSuporigin]}" y="$yCathSuporigin" z="@{[$zCathSuporigin]}"/>
1490 for($ii=0;$ii<$CathodeInnerStructureNumberOfBars;$ii++)
1493 print Cathode <<EOF;
1495 <volumeref ref="volCathodeInnerBox"/>
1496 <position name="posCathInnerBox$ii" unit="cm" x="@{[$xCathorigin-$CathodeTubeLength-$CathodeTorRad+$CathodeInnerStructureWidth+($ii+1)*$CathodeInnerStructureSeparation]}" y="$yCathorigin" z="@{[$CathodeTorRad-0.5*($CathodeInnerStructureLength-$CathodeTubeLength)-0.5*$CathodeTorRad- 0.5*$CathodeOuterRadious]}"/>
1504 for($ii=0;$ii<$CathodeInnerStructureNumberOfBars;$ii++)
1507 print Cathode <<EOF;
1509 <volumeref ref="volCathodeInnerBox"/>
1510 <position name="posCathInnerBoxLat$ii" unit="cm" x="@{[$xCathorigin-0.5*$CathodeTubeLength-$CathodeTorRad+0.5*($CathodeInnerStructureLength-$CathodeTubeLength)]}" y="$yCathorigin" z="@{[-0.5*$CathodeTubeLength+$CathodeInnerStructureWidth +($ii+1)*$CathodeInnerStructureSeparation - 0.5*$CathodeTorRad- 0.5*$CathodeOuterRadious]}"/>
1511 <rotation name="Cathrot$aux2" unit="deg" x="0" y="90" z="0" />
1517 $SemiCableShift= 0.5*($CathodeInnerSemiCableLength+$CathodeInnerStructureWidth);
1519 for($semi=0;$semi<2;$semi=$semi+1)
1521 if($semi==1){$SemiCableShift=-$SemiCableShift;};
1523 for($kk=0;$kk<$CathodeInnerStructureNumberOfBars;$kk=$kk+2)
1525 for($ii=0;$ii<=$CathodeInnerStructureNumberOfBars;$ii=$ii+2)
1527 if ($kk==2) {$ii=$ii+2;};
1529 for($jj=0;$jj<2*$CathodeInnerStructureNumberOfCablesPerInnerSquare+1;$jj++)
1531 print Cathode <<EOF;
1533 <volumeref ref="volCathodeSemiCable"/>
1534 <position name="posCathCable$ii$jj$kk$semi" unit="cm" x="@{[($xCathorigin-$CathodeTubeLength-$CathodeTorRad+$CathodeInnerStructureWidth+($ii)*$CathodeInnerStructureSeparation+($jj+1)*$CathodeInnerStructureCableSeparation)]}" y="$yCathorigin" z="@{[$SemiCableShift-0.5*$CathodeTubeLength+$CathodeInnerStructureWidth +($kk+1)*$CathodeInnerStructureSeparation - 0.5*$CathodeTorRad- 0.5*$CathodeOuterRadious]}"/>
1537 if($ii ==$CathodeInnerStructureNumberOfCablesPerInnerSquare-1 && $jj ==$CathodeInnerStructureNumberOfCablesPerInnerSquare-2) {$jj=2*$CathodeInnerStructureNumberOfCablesPerInnerSquare+1;}
1538 if($jj ==$CathodeInnerStructureNumberOfCablesPerInnerSquare-1) {$jj++;}
1541 if ($kk==2) {$ii=$ii+2;};
1542 if ($kk==0) {$ii=$ii+2;};
1549 for($ii=0;$ii<=$CathodeInnerStructureNumberOfBars;$ii=$ii+4)
1551 for($jj=0;$jj<2*$CathodeInnerStructureNumberOfCablesPerInnerSquare+1;$jj++)
1553 print Cathode <<EOF;
1555 <volumeref ref="volCathodeCableShort"/>
1556 <position name="posCathCableShort$ii$jj$kk" unit="cm" x="@{[($xCathorigin-$CathodeTubeLength-$CathodeTorRad+$CathodeInnerStructureWidth+($ii)*$CathodeInnerStructureSeparation+($jj+1)*$CathodeInnerStructureCableSeparation)]}" y="$yCathorigin" z="@{[-0.5*$CathodeTubeLength+$CathodeInnerStructureWidth +($kk)*$CathodeInnerStructureSeparation - 0.5*$CathodeTorRad- 0.5*$CathodeOuterRadious+0.5*$CathodeInnerCableLengthShort+1]}"/>
1559 if($ii ==$CathodeInnerStructureNumberOfCablesPerInnerSquare-1 && $jj ==$CathodeInnerStructureNumberOfCablesPerInnerSquare-3) {$jj=2*$CathodeInnerStructureNumberOfCablesPerInnerSquare+1;}
1560 if($jj ==$CathodeInnerStructureNumberOfCablesPerInnerSquare-1) {$jj++;}
1561 #Falta el $ii 4 $jj 2 that needs to be shorter to not overlap.
1563 #print "$ii $jj \n";
1571 print Cathode <<EOF;
1573 <volumeref ref="volCathodeCableShortShort"/>
1574 <position name="posCathCableShort$ii$jj$kk" unit="cm" x="@{[($xCathorigin-$CathodeTubeLength-$CathodeTorRad+$CathodeInnerStructureWidth+($ii)*$CathodeInnerStructureSeparation+($jj+1)*$CathodeInnerStructureCableSeparation)]}" y="$yCathorigin" z="@{[-0.5*$CathodeTubeLength+$CathodeInnerStructureWidth +($kk)*$CathodeInnerStructureSeparation - 0.5*$CathodeTorRad- 0.5*$CathodeOuterRadious+0.5*$CathodeInnerCableLengthShort+1-1]}"/>
1578 $SemiCableShift= 0.5*($CathodeInnerSemiCableLength+$CathodeInnerStructureWidth);
1580 for($semi=0;$semi<2;$semi=$semi+1)
1582 if($semi==1){$SemiCableShift=-$SemiCableShift;};
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="volCathodeSemiCable"/>
1595 <position name="posCathCable2$ii$jj$kk$semi" unit="cm" x="@{[$SemiCableShift+$xCathorigin-$CathodeTubeLength-$CathodeTorRad+$CathodeInnerStructureWidth+($ii+1)*$CathodeInnerStructureSeparation]}" y="$yCathorigin" z="@{[-0.5*$CathodeTubeLength+$CathodeInnerStructureWidth +($kk)*$CathodeInnerStructureSeparation - 0.5*$CathodeTorRad- 0.5*$CathodeOuterRadious +($jj+1)*$CathodeInnerStructureCableSeparation]}"/>
1596 <rotation name="rotCathCable2$ii$jj$kk$semi" 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;};
1612 for($jj=0;$jj<2*$CathodeInnerStructureNumberOfCablesPerInnerSquare+1;$jj++)
1614 print Cathode <<EOF;
1616 <volumeref ref="volCathodeCableShort"/>
1617 <position name="posCathCableShort$ii$jj$kk" unit="cm" x="@{[$xCathorigin-$CathodeTubeLength-$CathodeTorRad+$CathodeInnerStructureWidth+($ii)*$CathodeInnerStructureSeparation+0.5*$CathodeInnerCableLengthShort+1]}" y="$yCathorigin" z="@{[-0.5*$CathodeTubeLength+$CathodeInnerStructureWidth +($kk)*$CathodeInnerStructureSeparation - 0.5*$CathodeTorRad- 0.5*$CathodeOuterRadious +($jj+1)*$CathodeInnerStructureCableSeparation]}"/>
1618 <rotation name="rotCathCableShort$ii$jj$kk" unit="deg" x="0" y="90" z="0" />
1622 if($jj ==$CathodeInnerStructureNumberOfCablesPerInnerSquare-1) {$jj++;}
1626 for($ii=0;$ii<$CathodeSupportInnerStructureNumberOfBars;$ii++)
1628 print Cathode <<EOF;
1630 <volumeref ref="volCathodeSupportInnerBox"/>
1631 <position name="posCathSupInnerBoxLat$ii" unit="cm" x="@{[$xCathSuporigin-0.5*$CathodeSupportTubeLength-$CathodeSupportTorRad+0.5*($CathodeSupportInnerStructureLength-$CathodeSupportTubeLength)]}" y="$yCathSuporigin" z="@{[-0.5*$CathodeTubeLength+$CathodeInnerStructureWidth +($ii+1)*$CathodeInnerStructureSeparation - 0.5*$CathodeTorRad- 0.5*$CathodeOuterRadious]}"/>
1632 <rotation name="CathSupInnerBoxLatrot$ii" unit="deg" x="0" y="90" z="0" />
1637 for($ii=0;$ii<$CathodeSupportInnerStructureNumberOfBars;$ii++)
1640 print Cathode <<EOF;
1642 <volumeref ref="volCathodeSupportInnerBox"/>
1643 <position name="posCathSupInnerBox$ii" unit="cm" x="@{[$xCathSuporigin-$CathodeSupportTubeLength-$CathodeSupportTorRad+$CathodeSupportInnerStructureWidth+($ii+1)*$CathodeSupportInnerStructureSeparation]}" y="$yCathSuporigin" z="@{[$zCathSuporigin+$CathodeSupportTorRad-$CathodeSupportOuterRadious-4]}"/>
1649 for($ii=0;$ii<=$CathodeSupportInnerStructureNumberOfBars+1;$ii++)
1651 for($jj=0;$jj<=$CathodeSupportInnerStructureNumberOfBars+1;$jj++)
1652 { print Cathode <<EOF;
1654 <volumeref ref="volCathodeSupportSeparators"/>
1655 <position name="posCathodeSupportSeparators$ii$jj" unit="cm" x="@{[$xCathSuporigin-$CathodeSupportTubeLength-$CathodeSupportTorRad+$CathodeSupportInnerStructureWidth+($ii)*$CathodeSupportInnerStructureSeparation]}" y="@{[0.5*$CathodeSupportSeparatorsHeight+$yCathSuporigin+2]}" z="@{[-0.5*$CathodeTubeLength+$CathodeInnerStructureWidth +($jj)*$CathodeInnerStructureSeparation - 0.5*$CathodeTorRad- 0.5*$CathodeOuterRadious]}"/>
1658 if(($jj==$CathodeSupportInnerStructureNumberOfBars+1 )&& $jj!=$ii)
1661 print Cathode <<EOF;
1663 <volumeref ref="volCathodeSupportSeparatorsBorder"/>
1664 <position name="posCathodeSupportSeparatorsBorder$ii$jj" unit="cm" x="@{[$xCathSuporigin-$CathodeSupportTubeLength-$CathodeSupportTorRad+$CathodeSupportInnerStructureWidth+($ii)*$CathodeSupportInnerStructureSeparation]}" y="@{[0.5*$CathodeSupportDistance+$yCathSuporigin]}" z="@{[-0.5*$CathodeTubeLength+$CathodeInnerStructureWidth +($jj)*$CathodeInnerStructureSeparation - 0.5*$CathodeTorRad- 0.5*$CathodeOuterRadious+0.5*49.5]}"/>
1665 <rotation name="CathSupSepRot$ii$jj" unit="deg" x="292" y="0" z="0" />
1671 if(($ii==$CathodeSupportInnerStructureNumberOfBars+1)&& $jj!=$ii)
1674 print Cathode <<EOF;
1676 <volumeref ref="volCathodeSupportSeparatorsBorder"/>
1677 <position name="posCathodeSupportSeparatorsBorder$ii$jj" unit="cm" x="@{[$xCathSuporigin-$CathodeSupportTubeLength-$CathodeSupportTorRad+$CathodeSupportInnerStructureWidth+($ii)*$CathodeSupportInnerStructureSeparation+0.5*49.5]}" y="@{[0.5*$CathodeSupportDistance+$yCathSuporigin]}" z="@{[-0.5*$CathodeTubeLength+$CathodeInnerStructureWidth +($jj)*$CathodeInnerStructureSeparation - 0.5*$CathodeTorRad- 0.5*$CathodeOuterRadious]}"/>
1678 <rotation name="CathSupSepRot$ii$jj" unit="deg" x="0" y="0" z="68" />
1686 if($ii==$CathodeSupportInnerStructureNumberOfBars+1){if($jj==$CathodeSupportInnerStructureNumberOfBars) {$j++;}}
1690 print Cathode <<EOF;
1700 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1701 #++++++++++++++++++++++++++++++++++++++ gen_LEMs +++++++++++++++++++++++++++++++++++++
1702 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1707 $LEMs = $basename."_LEMs" . $suffix . ".gdml";
1708 push (@gdmlFiles, $LEMs);
1709 $LEMs = ">" . $LEMs;
1710 open(LEMs) or die("Could not open file $LEMs for writing");
1712 # The standard XML prefix and starting the gdml
1714 <?xml version='1.0'?>
1725 <box name="solLEMs" x="@{[$LEMsSizeX]}" y="$LEMsSizeY" z="@{[$LEMsSizeZ]}" lunit="cm"/>
1734 <volume name="volLEMs">
1735 <materialref ref="Copper_Beryllium_alloy25"/>
1736 <solidref ref="solLEMs"/>
1744 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1745 #++++++++++++++++++++++++++++++++++++++ gen_pmt +++++++++++++++++++++++++++++++++++++
1746 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1753 #$PMT_COATING_THICKNESS=0.2;#
1754 #$PMT_PLATE_THICKNESS=0.4;
1755 #$PMT_GLASS_THICKNESS=0.2;
1757 $PMT = $basename."_PMT" . $suffix . ".gdml";
1758 push (@gdmlFiles, $PMT);
1760 open(PMT) or die("Could not open file $PMT for writing");
1766 <tube name="PMT_PENPlate"
1773 <tube name="PMTVolume"
1774 rmax="@{[(6.5*2.54)]}"
1775 z="@{[(11.1*2.54)]}"
1780 <tube aunit="deg" deltaphi="360" lunit="mm" name="pmtMiddleCylinder" rmax="102.351822048586" rmin="100.351822048586" startphi="0" z="54"/>
1781 <sphere aunit="deg" deltaphi="360" deltatheta="50" lunit="mm" name="sphPartTop" rmax="133" rmin="131" startphi="0" starttheta="0"/>
1782 <union name="pmt0x7fb8f489dfe0">
1783 <first ref="pmtMiddleCylinder"/>
1784 <second ref="sphPartTop"/>
1785 <position name="pmt0x7fb8f489dfe0_pos" unit="mm" x="0" y="0" z="-57.2051768689367"/>
1787 <sphere aunit="deg" deltaphi="360" deltatheta="31.477975238527" lunit="mm" name="sphPartBtm" rmax="133" rmin="131" startphi="0" starttheta="130"/>
1788 <union name="pmt0x7fb8f48a0d50">
1789 <first ref="pmt0x7fb8f489dfe0"/>
1790 <second ref="sphPartBtm"/>
1791 <position name="pmt0x7fb8f48a0d50_pos" unit="mm" x="0" y="0" z="57.2051768689367"/>
1793 <tube aunit="deg" deltaphi="360" lunit="mm" name="pmtBtmTube" rmax="44.25" rmin="42.25" startphi="0" z="72"/>
1794 <union name="solidpmt">
1795 <first ref="pmt0x7fb8f48a0d50"/>
1796 <second ref="pmtBtmTube"/>
1797 <position name="solidpmt_pos" unit="mm" x="0" y="0" z="-104.905637496842"/>
1799 <sphere aunit="deg" deltaphi="360" deltatheta="50" lunit="mm" name="pmt0x7fb8f48a1eb0" rmax="133.2" rmin="133" startphi="0" starttheta="0"/>
1800 <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="posOpDetSensitive0" unit="cm" x="0" y="0" z="@{[1.27*2.54 - (2.23*2.54)]}"/>
1834 <volume name="pmtFoilVol">
1835 <materialref ref="LAr"/>
1836 <solidref ref="PMT_PENPlate"/>
1837 <auxiliary auxtype="SensDet" auxvalue="PhotonDetector"/>
1840 <volume name="volPMT_foil">
1841 <materialref ref="LAr"/>
1842 <solidref ref="PMTVolume"/>
1845 <volumeref ref="allpmt"/>
1846 <position name="posallpmt2" unit="cm" x="0" y="0" z="@{[1.27*2.54]}"/>
1849 <physvol name="volOpDetSensitive">
1850 <volumeref ref="pmtFoilVol"/>
1851 <position name="posOpDetSensitive1" unit="cm" x="0" y="0" z="@{[1.27*2.54+7.9]}"/>
1859 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1860 #++++++++++++++++++++++++++++++++++++++ gen_Cryostat +++++++++++++++++++++++++++++++++++++
1861 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1866 # Create the cryostat fragment file name,
1867 # add file to list of output GDML fragments,
1869 $CRYO = $basename."_Cryostat" . $suffix . ".gdml";
1870 push (@gdmlFiles, $CRYO);
1871 $CRYO = ">" . $CRYO;
1872 open(CRYO) or die("Could not open file $CRYO for writing");
1875 # The standard XML prefix and starting the gdml
1877 <?xml version='1.0'?>
1881 # All the cryostat solids.
1884 <box name="Cryostat" lunit="cm"
1889 <box name="ArgonInterior" lunit="cm"
1894 <box name="GaseousArgon" lunit="cm"
1896 y="$HeightGaseousAr"
1899 <subtraction name="SteelShell">
1900 <first ref="Cryostat"/>
1901 <second ref="ArgonInterior"/>
1907 # Cryostat structure
1910 <volume name="volSteelShell">
1911 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni" />
1912 <solidref ref="SteelShell" />
1914 <volume name="volGaseousArgon">
1915 <materialref ref="ArGas"/>
1916 <solidref ref="GaseousArgon"/>
1918 if ( $LEMs_switch eq "on" )
1922 $posLEMsY = -0.5*$HeightGaseousAr+0.5+0.5*$LEMsSizeY;
1927 <volumeref ref="volLEMs"/>
1928 <position name="posLEMs" unit="cm" x="$posLEMsX" y="$posLEMsY" z="$posLEMsZ"/>
1937 <volume name="volCryostat">
1938 <materialref ref="LAr" />
1939 <solidref ref="Cryostat" />
1940 <auxiliary auxtype="SensDet" auxvalue="SimEnergyDeposit"/>
1941 <auxiliary auxtype="StepLimit" auxunit="cm" auxvalue="0.47625*cm"/>
1942 <auxiliary auxtype="Efield" auxunit="V/cm" auxvalue="0*V/cm"/>
1944 <volumeref ref="volGaseousArgon"/>
1945 <position name="posGaseousArgon" unit="cm" x="0" y="@{[$Argon_y/2-$HeightGaseousAr/2]}" z="0"/>
1948 <volumeref ref="volSteelShell"/>
1949 <position name="posSteelShell" unit="cm" x="0" y="0" z="0"/>
1954 if ($tpc_on==1) # place TPC inside croysotat
1957 $posY = $Argon_y/2 - $HeightGaseousAr - 0.5*($driftTPCActive + $ReadoutPlane);
1958 $posZ = -0.5*$Argon_z + $zLArBuffer;
1959 $posX = -0.5*$Argon_x + $xLArBuffer;
1961 @crp_posx = ( $posX+1.5*$lengthCRM, $posX+1.5*$lengthCRM, $posX+0.5*$lengthCRM, $posX+0.5*$lengthCRM );
1962 @crp_posz = ( $posZ+1.5*$lengthCRM, $posZ+0.5*$lengthCRM, $posZ+0.5*$lengthCRM, $posZ+1.5*$lengthCRM );
1965 foreach $posZ (@crp_posz) {
1966 $posX = @crp_posx[$idx];
1969 <volumeref ref="volTPC"/>
1970 <position name="posTPC\-$idx" unit="cm"
1971 x="$posX" y="$posY" z="$posZ"/>
1980 if ( $pmt_switch eq "on" ) {
1981 $pmt_pos_y = -$Argon_y/2 + 0.5*($HeightPMT);
1983 for ( $i=0; $i<36; $i=$i+1 ) { # pmts with coating
1985 if ( @pmt_TPB[$jj] eq $i ) {
1989 <volumeref ref="volPMT_coated"/>
1990 <position name="posPMT$i" unit="cm" y="$pmt_pos_y" @pmt_pos[$i]/>
1991 <rotationref ref="rPlus90AboutX"/>
1999 <volumeref ref="volPMT_foil"/>
2000 <position name="posPMT$i" unit="cm" y="$pmt_pos_y" @pmt_pos[$i]/>
2001 <rotationref ref="rPlus90AboutX"/>
2011 $GroundGridPosDriftPos=-$Argon_y/2 + 47.5;
2012 $GroundGridPosTransversalPos=0.5*($GroundGridInnerStructureLength+2+$GroundGridOuterRadious);
2014 if ( $GroundGrid_switch eq "on" )
2018 <volumeref ref="volGroundGrid"/>
2019 <position name="posGroundGrid01" unit="cm" x="@{[$GroundGridPosTransversalPos]}" y="@{[$GroundGridPosDriftPos]}" z="@{[$GroundGridPosTransversalPos]}"/>
2020 <rotation name="rotGG01" unit="deg" x="0" y="0" z="0" />
2024 <volumeref ref="volGroundGrid"/>
2025 <position name="posGroundGrid02" unit="cm" x="@{[-$GroundGridPosTransversalPos]}" y="@{[$GroundGridPosDriftPos]}" z="@{[-$GroundGridPosTransversalPos]}"/>
2026 <rotation name="rotGG02" unit="deg" y="180" />
2030 <volumeref ref="volGroundGrid"/>
2031 <position name="posGroundGrid03" unit="cm" x="@{[$GroundGridPosTransversalPos]}" y="@{[$GroundGridPosDriftPos]}" z="@{[-$GroundGridPosTransversalPos]}"/>
2032 <rotation name="rotGG03" unit="deg" y="270" />
2036 <volumeref ref="volGroundGrid"/>
2037 <position name="posGroundGrid04" unit="cm" x="@{[-$GroundGridPosTransversalPos]}" y="@{[$GroundGridPosDriftPos]}" z="@{[$GroundGridPosTransversalPos]}"/>
2038 <rotation name="rotGG04" unit="deg" y="90"/>
2044 $CathodePosDriftfPos=-$Argon_y/2 + 47.5 + 94.0 - 0.5*$CathodeSupportDistance-5.1;
2045 $CathodePosTransversalPos=0.5*($CathodeInnerStructureLength+2+$CathodeOuterRadious);
2047 # <rotation name="rotCath01" unit="deg" x="0" y="0" z="90" />
2048 #<rotation name="rotaa" unit="deg" x="0" y="0" z="90"/>
2049 if ( $Cathode_switch eq "on" )
2053 <volumeref ref="volCathode"/>
2054 <position name="posCathode01" unit="cm" x="@{[$CathodePosTransversalPos]}" y="@{[$CathodePosDriftfPos]}" z="@{[$CathodePosTransversalPos]}"/>
2058 <volumeref ref="volCathode"/>
2059 <position name="posCathode02" unit="cm" x="@{[-$CathodePosTransversalPos]}" y="@{[$CathodePosDriftfPos]}" z="@{[$CathodePosTransversalPos]}"/>
2060 <rotation name="rotCath02" unit="deg" y="90" />
2064 <volumeref ref="volCathode"/>
2065 <position name="posCathode03" unit="cm" x="@{[$CathodePosTransversalPos]}" y="@{[$CathodePosDriftfPos]}" z="@{[-$CathodePosTransversalPos]}"/>
2066 <rotation name="rotCath03" unit="deg" y="270" />
2069 <volumeref ref="volCathode"/>
2070 <position name="posCathode04" unit="cm" x="@{[-$CathodePosTransversalPos]}" y="@{[$CathodePosDriftfPos]}" z="@{[-$CathodePosTransversalPos]}"/>
2071 <rotation name="rotCath04" unit="deg" y="180"/>
2077 if ( $FieldCage_switch eq "on" )
2080 $FFSPositionY = -$OriginYSet-1.5;
2081 $FFSPositionZ = -309.593;
2082 $FFSPositionX = 153.521;
2085 <volumeref ref="volFieldCageModule"/>
2086 <position name="posFieldCageModule01" unit="cm" x="$FFSPositionX" y="$FFSPositionY" z="$FFSPositionZ"/>
2087 <rotation name="rotFC01" unit="deg" x="90" y="0" z="0"/>
2090 $FFSPositionY = -$OriginYSet-1.5;
2091 $FFSPositionZ = 309.593;
2092 $FFSPositionX = 153.521;
2095 <volumeref ref="volFieldCageModule"/>
2096 <position name="posFieldCageModule02" unit="cm" x="$FFSPositionX" y="$FFSPositionY" z="$FFSPositionZ"/>
2097 <rotation name="rotFC02" unit="deg" x="270" y="0" z="0"/>
2101 $FFSPositionY = -$OriginYSet-1.5;
2102 $FFSPositionX = 309.593;
2103 $FFSPositionZ = 153.521;
2106 <volumeref ref="volFieldCageModule"/>
2107 <position name="posFieldCageModule05" unit="cm" x="$FFSPositionX" y="$FFSPositionY" z="$FFSPositionZ"/>
2108 <rotation name="rotFC05" unit="deg" x="90" y="0" z="90"/>
2112 $FFSPositionY = -$OriginYSet-1.5;
2113 $FFSPositionX = 309.593;
2114 $FFSPositionZ = -153.521;
2117 <volumeref ref="volFieldCageModule"/>
2118 <position name="posFieldCageModule06" unit="cm" x="$FFSPositionX" y="$FFSPositionY" z="$FFSPositionZ"/>
2119 <rotation name="rotFC06" unit="deg" x="270" y="0" z="90"/>
2123 $FFSPositionY = -$OriginYSet-1.5;
2124 $FFSPositionZ = -153.521;
2125 $FFSPositionX = -309.593;
2128 <volumeref ref="volFieldCageModule"/>
2129 <position name="posFieldCageModule03" unit="cm" x="$FFSPositionX" y="$FFSPositionY" z="$FFSPositionZ"/>
2130 <rotation name="rotFC03" unit="deg" x="90" y="0" z="270"/>
2133 $FFSPositionY = -$OriginYSet-1.5;
2134 $FFSPositionZ = 153.521;
2135 $FFSPositionX = -309.593;
2138 <volumeref ref="volFieldCageModule"/>
2139 <position name="posFieldCageModule04" unit="cm" x="$FFSPositionX" y="$FFSPositionY" z="$FFSPositionZ"/>
2140 <rotation name="rotFC04" unit="deg" x="270" y="0" z="270"/>
2144 $FFSPositionY = -$OriginYSet-1.5;
2145 $FFSPositionZ = 309.593;
2146 $FFSPositionX = -153.521;
2150 <volumeref ref="volFieldCageModule"/>
2151 <position name="posFieldCageModule07" unit="cm" x="$FFSPositionX" y="$FFSPositionY" z="$FFSPositionZ"/>
2152 <rotation name="rotFC07" unit="deg" x="90" y="0" z="180"/>
2156 $FFSPositionY = -$OriginYSet-1.5;
2157 $FFSPositionZ = -309.593;
2158 $FFSPositionX = -153.521;
2162 <volumeref ref="volFieldCageModule"/>
2163 <position name="posFieldCageModule08" unit="cm" x="$FFSPositionX" y="$FFSPositionY" z="$FFSPositionZ"/>
2164 <rotation name="rotFC08" unit="deg" x="270" y="0" z="180"/>
2181 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2182 #+++++++++++++++++++++++++++++++++++++ gen_Enclosure +++++++++++++++++++++++++++++++++++++
2183 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2188 # Create the detector enclosure fragment file name,
2189 # add file to list of output GDML fragments,
2191 $ENCL = $basename."_DetEnclosure" . $suffix . ".gdml";
2192 push (@gdmlFiles, $ENCL);
2193 $ENCL = ">" . $ENCL;
2194 open(ENCL) or die("Could not open file $ENCL for writing");
2197 # The standard XML prefix and starting the gdml
2199 <?xml version='1.0'?>
2204 # All the detector enclosure solids.
2208 <box name="FoamPadBlock" lunit="cm"
2209 x="@{[$Cryostat_x + 2*$FoamPadding]}"
2210 y="@{[$Cryostat_y + 2*$FoamPadding]}"
2211 z="@{[$Cryostat_z + 2*$FoamPadding]}" />
2213 <subtraction name="FoamPadding">
2214 <first ref="FoamPadBlock"/>
2215 <second ref="Cryostat"/>
2216 <positionref ref="posCenter"/>
2219 <box name="SteelSupportBlock" lunit="cm"
2220 x="@{[$Cryostat_x + 2*$FoamPadding + 2*$SteelSupport_x]}"
2221 y="@{[$Cryostat_y + 2*$FoamPadding + 2*$SteelSupport_y]}"
2222 z="@{[$Cryostat_z + 2*$FoamPadding + 2*$SteelSupport_z]}" />
2224 <subtraction name="SteelSupport">
2225 <first ref="SteelSupportBlock"/>
2226 <second ref="FoamPadBlock"/>
2227 <positionref ref="posCenter"/>
2230 <box name="DetEnclosure" lunit="cm"
2235 <box name="boxCryoTop" x="1016.8" y="1016.8" z="61.8" lunit="cm"/>
2236 <box name="boxCryoWallLg" x="1140.4" y="1075.6" z="61.8" lunit="cm"/>
2237 <box name="boxCryoWallSm" x="1016.8" y="1075.6" z="61.8" lunit="cm"/>
2238 <box name="box1" x="160" y="160" z="61.8" lunit="cm"/>
2239 <box name="box2" x="158.2" y="158.2" z="56.2" lunit="cm"/>
2240 <box name="box3" x="137.2" y="137.2" z="61.801" lunit="cm"/>
2241 <box name="box4" x="158.2" y="13.6" z="27.4" lunit="cm"/>
2242 <box name="box5" x="158.2" y="6.425" z="24.96" lunit="cm"/>
2243 <box name="box11" x="108.4" y="160" z="61.8" lunit="cm"/>
2244 <box name="box12" x="107.5" y="158.2" z="56.2" lunit="cm"/>
2245 <box name="box13" x="97" y="137.2" z="61.81" lunit="cm"/>
2246 <box name="box16" x="107.5" y="13.6" z="27.4" lunit="cm"/>
2247 <box name="box17" x="107.5" y="6.425" z="24.96" lunit="cm"/>
2248 <box name="box21" x="137.8" y="160" z="61.8" lunit="cm"/>
2249 <box name="box22" x="136.9" y="158.2" z="56.2" lunit="cm"/>
2250 <box name="box23" x="126.4" y="137.2" z="61.801" lunit="cm"/>
2251 <box name="box26" x="102.5" y="13.6" z="27.4" lunit="cm"/>
2252 <box name="box27" x="102.5" y="6.425" z="24.96" lunit="cm"/>
2253 <box name="box31" x="170.2" y="160" z="61.8" lunit="cm"/>
2254 <box name="box32" x="169.3" y="158.2" z="56.2" lunit="cm"/>
2255 <box name="box33" x="158.8" y="137.2" z="61.801" lunit="cm"/>
2256 <box name="box36" x="135.8" y="13.6" z="27.4" lunit="cm"/>
2257 <box name="box37" x="135.8" y="6.425" z="24.96" lunit="cm"/>
2260 <subtraction name="boxHoll">
2262 <second ref="box2"/>
2264 <subtraction name="boxLargeCent">
2265 <first ref="boxHoll"/>
2266 <second ref="box3"/>
2268 <subtraction name="boxBarI">
2270 <second ref="box5"/>
2271 <position name="posBoxBarI" x="0" y="3.5876" z="0" unit="cm"/>
2273 <subtraction name="boxBarCent">
2274 <first ref="boxBarI"/>
2275 <second ref="box5"/>
2276 <position name="posBoxBarCent" x="0" y="-3.5876" z="0" unit="cm"/>
2278 <union name="boxUniCent">
2279 <first ref="boxLargeCent"/>
2280 <second ref="boxBarCent"/>
2281 <position name="posBoxUniCent" x="0" y="0" z="-17.2" unit="cm"/>
2283 <union name="UnitCent">
2284 <first ref="boxUniCent"/>
2285 <second ref="boxBarCent"/>
2286 <position name="posUnitCent" x="0" y="0" z="-17.2" unit="cm"/>
2287 <rotation name="rotUnitCent" x="0" y="0" z="90" unit="deg"/>
2290 <subtraction name="boxTopHoll">
2291 <first ref="box11"/>
2292 <second ref="box12"/>
2293 <position name="posboxTopHoll" x="0.451" y="0" z="0" unit="cm"/>
2295 <subtraction name="boxLargeTop">
2296 <first ref="boxTopHoll"/>
2297 <second ref="box13"/>
2298 <position name="posboxLargeTop" x="5.701" y="0" z="0" unit="cm"/>
2300 <subtraction name="boxBarTopI">
2301 <first ref="box16"/>
2302 <second ref="box17"/>
2303 <position name="posboxBarTopI" x="0" y="3.5876" z="0" unit="cm"/>
2305 <subtraction name="boxBarTop">
2306 <first ref="boxBarTopI"/>
2307 <second ref="box17"/>
2308 <position name="posboxBarTop" x="0" y="-3.5876" z="0" unit="cm"/>
2310 <union name="boxUniTop">
2311 <first ref="boxLargeTop"/>
2312 <second ref="boxBarCent"/>
2313 <position name="posboxUni1" x="5.6" y="0" z="-17.2" unit="cm"/>
2314 <rotation name="rotUni1" x="0" y="0" z="90" unit="deg"/>
2316 <union name="UnitTop">
2317 <first ref="boxUniTop"/>
2318 <second ref="boxBarTop"/>
2319 <position name="posUniTop" x="0.45" y="0" z="-17.2" unit="cm"/>
2323 <subtraction name="boxCryoWallSmUS">
2324 <first ref="boxCryoWallSm"/>
2325 <second ref="BeamWindowStSu"/>
2326 <position name="posBWCryoWallUS" x="-34.5198845542345" y="131.897988017573" z="0." unit="cm"/>
2327 < rotationref ref="rBeamW3"/>
2331 <subtraction name="boxWallUHoll">
2332 <first ref="box21"/>
2333 <second ref="box22"/>
2334 <position name="posboxWallUHoll" x="0.451" y="0" z="0" unit="cm"/>
2336 <subtraction name="boxLargeWallU">
2337 <first ref="boxWallUHoll"/>
2338 <second ref="box23"/>
2339 <position name="posboxLargeWallU" x="5.701" y="0" z="0" unit="cm"/>
2341 <subtraction name="boxBarWallUI">
2342 <first ref="box26"/>
2343 <second ref="box27"/>
2344 <position name="posboxBarWallUI" x="0" y="3.5876" z="0" unit="cm"/>
2346 <subtraction name="boxBarWallU">
2347 <first ref="boxBarWallUI"/>
2348 <second ref="box27"/>
2349 <position name="posboxBarWallU" x="0" y="-3.5876" z="0" unit="cm"/>
2351 <union name="boxUniWallU">
2352 <first ref="boxLargeWallU"/>
2353 <second ref="boxBarCent"/>
2354 <position name="posboxUni2" x="-9.1" y="0" z="-17.2" unit="cm"/>
2355 <rotation name="rotUni2" x="0" y="0" z="90" unit="deg"/>
2357 <union name="UnitWallU">
2358 <first ref="boxUniWallU"/>
2359 <second ref="boxBarWallU"/>
2360 <position name="posUniWallU" x="-16.75" y="0" z="-17.2" unit="cm"/>
2363 <subtraction name="boxWallLHoll">
2364 <first ref="box31"/>
2365 <second ref="box32"/>
2366 <position name="posboxWallLHoll" x="0.451" y="0" z="0" unit="cm"/>
2368 <subtraction name="boxLargeWallL">
2369 <first ref="boxWallLHoll"/>
2370 <second ref="box33"/>
2371 <position name="posboxLargeWallL" x="5.701" y="0" z="0" unit="cm"/>
2373 <subtraction name="boxBarWallLI">
2374 <first ref="box36"/>
2375 <second ref="box37"/>
2376 <position name="posboxBarWallLI" x="0" y="3.5876" z="0" unit="cm"/>
2378 <subtraction name="boxBarWallL">
2379 <first ref="boxBarWallLI"/>
2380 <second ref="box37"/>
2381 <position name="posboxBarWallL" x="0" y="-3.5876" z="0" unit="cm"/>
2383 <union name="boxUniWallL">
2384 <first ref="boxLargeWallL"/>
2385 <second ref="boxBarCent"/>
2386 <position name="posboxUni3" x="-25.3" y="0" z="-17.2" unit="cm"/>
2387 <rotation name="rotUni3" x="0" y="0" z="90" unit="deg"/>
2389 <union name="UnitWallL">
2390 <first ref="boxUniWallL"/>
2391 <second ref="boxBarWallL"/>
2392 <position name="posUniWallL" x="-16.3" y="0" z="-17.2" unit="cm"/>
2400 # Detector enclosure structure
2403 <volume name="volFoamPadding">
2404 <materialref ref="foam_protoDUNEdp"/>
2405 <solidref ref="FoamPadding"/>
2408 <volume name="volSteelSupport">
2409 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
2410 <solidref ref="SteelSupport"/>
2414 <volume name="volUnitCent">
2415 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
2416 <solidref ref="UnitCent"/>
2418 <volume name="volUnitTop">
2419 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
2420 <solidref ref="UnitTop"/>
2422 <volume name="volUnitWallS">
2423 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
2424 <solidref ref="UnitWallU"/>
2426 <volume name="volUnitWallL">
2427 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni"/>
2428 <solidref ref="UnitWallL"/>
2431 <volume name="volSteelSupport_TB">
2432 <materialref ref="Air"/>
2433 <solidref ref="boxCryoTop"/>
2434 <physvol name="volUnitTBCent_0-0">
2435 <volumeref ref="volUnitCent"/>
2436 <position name="posUnitTBCent_0-0" x="-320" y="-320" z="0" unit="cm"/>
2438 <physvol name="volUnitTBCent_0-1">
2439 <volumeref ref="volUnitCent"/>
2440 <position name="posUnitTBCent_0-1" x="-320" y="-160" z="0" unit="cm"/>
2442 <physvol name="volUnitTBCent_0-2">
2443 <volumeref ref="volUnitCent"/>
2444 <position name="posUnitTBCent_0-2" x="-320" y="0" z="0" unit="cm"/>
2446 <physvol name="volUnitTBCent_0-3">
2447 <volumeref ref="volUnitCent"/>
2448 <position name="posUnitTBCent_0-3" x="-320" y="160" z="0" unit="cm"/>
2450 <physvol name="volUnitTBCent_0-4">
2451 <volumeref ref="volUnitCent"/>
2452 <position name="posUnitTBCent_0-4" x="-320" y="320" z="0" unit="cm"/>
2454 <physvol name="volUnitTBE_0">
2455 <volumeref ref="volUnitTop"/>
2456 <position name="posUnitTBE_0" x="454.2" y="-320" z="0" unit="cm"/>
2458 <physvol name="volUnitTBS_0">
2459 <volumeref ref="volUnitTop"/>
2460 <position name="posUnitTBS_0" x="-320" y="454.2" z="0" unit="cm"/>
2461 <rotation name="rotUnitTBS_0" x="0" y="0" z="-90" unit="deg"/>
2463 <physvol name="volUnitTBW_0">
2464 <volumeref ref="volUnitTop"/>
2465 <position name="posUnitTBW_0" x="-454.2" y="-320" z="0" unit="cm"/>
2466 <rotation name="rotUnitTBW_0" x="0" y="0" z="-180" unit="deg"/>
2468 <physvol name="volUnitTBN_0">
2469 <volumeref ref="volUnitTop"/>
2470 <position name="posUnitTBN_0" x="-320" y="-454.2" z="0" unit="cm"/>
2471 <rotation name="rotUnitTBN_0" x="0" y="0" z="-270" unit="deg"/>
2473 <physvol name="volUnitTBCent_1-0">
2474 <volumeref ref="volUnitCent"/>
2475 <position name="posUnitTBCent_1-0" x="-160" y="-320" z="0" unit="cm"/>
2477 <physvol name="volUnitTBCent_1-1">
2478 <volumeref ref="volUnitCent"/>
2479 <position name="posUnitTBCent_1-1" x="-160" y="-160" z="0" unit="cm"/>
2481 <physvol name="volUnitTBCent_1-2">
2482 <volumeref ref="volUnitCent"/>
2483 <position name="posUnitTBCent_1-2" x="-160" y="0" z="0" unit="cm"/>
2485 <physvol name="volUnitTBCent_1-3">
2486 <volumeref ref="volUnitCent"/>
2487 <position name="posUnitTBCent_1-3" x="-160" y="160" z="0" unit="cm"/>
2489 <physvol name="volUnitTBCent_1-4">
2490 <volumeref ref="volUnitCent"/>
2491 <position name="posUnitTBCent_1-4" x="-160" y="320" z="0" unit="cm"/>
2493 <physvol name="volUnitTBE_1">
2494 <volumeref ref="volUnitTop"/>
2495 <position name="posUnitTBE_1" x="454.2" y="-160" z="0" unit="cm"/>
2497 <physvol name="volUnitTBS_1">
2498 <volumeref ref="volUnitTop"/>
2499 <position name="posUnitTBS_1" x="-160" y="454.2" z="0" unit="cm"/>
2500 <rotation name="rotUnitTBS_1" x="0" y="0" z="-90" unit="deg"/>
2502 <physvol name="volUnitTBW_1">
2503 <volumeref ref="volUnitTop"/>
2504 <position name="posUnitTBW_1" x="-454.2" y="-160" z="0" unit="cm"/>
2505 <rotation name="rotUnitTBW_1" x="0" y="0" z="-180" unit="deg"/>
2507 <physvol name="volUnitTBN_1">
2508 <volumeref ref="volUnitTop"/>
2509 <position name="posUnitTBN_1" x="-160" y="-454.2" z="0" unit="cm"/>
2510 <rotation name="rotUnitTBN_1" x="0" y="0" z="-270" unit="deg"/>
2512 <physvol name="volUnitTBCent_2-0">
2513 <volumeref ref="volUnitCent"/>
2514 <position name="posUnitTBCent_2-0" x="0" y="-320" z="0" unit="cm"/>
2516 <physvol name="volUnitTBCent_2-1">
2517 <volumeref ref="volUnitCent"/>
2518 <position name="posUnitTBCent_2-1" x="0" y="-160" z="0" unit="cm"/>
2520 <physvol name="volUnitTBCent_2-2">
2521 <volumeref ref="volUnitCent"/>
2522 <position name="posUnitTBCent_2-2" x="0" y="0" z="0" unit="cm"/>
2524 <physvol name="volUnitTBCent_2-3">
2525 <volumeref ref="volUnitCent"/>
2526 <position name="posUnitTBCent_2-3" x="0" y="160" z="0" unit="cm"/>
2528 <physvol name="volUnitTBCent_2-4">
2529 <volumeref ref="volUnitCent"/>
2530 <position name="posUnitTBCent_2-4" x="0" y="320" z="0" unit="cm"/>
2532 <physvol name="volUnitTBE_2">
2533 <volumeref ref="volUnitTop"/>
2534 <position name="posUnitTBE_2" x="454.2" y="0" z="0" unit="cm"/>
2536 <physvol name="volUnitTBS_2">
2537 <volumeref ref="volUnitTop"/>
2538 <position name="posUnitTBS_2" x="0" y="454.2" z="0" unit="cm"/>
2539 <rotation name="rotUnitTBS_2" x="0" y="0" z="-90" unit="deg"/>
2541 <physvol name="volUnitTBW_2">
2542 <volumeref ref="volUnitTop"/>
2543 <position name="posUnitTBW_2" x="-454.2" y="0" z="0" unit="cm"/>
2544 <rotation name="rotUnitTBW_2" x="0" y="0" z="-180" unit="deg"/>
2546 <physvol name="volUnitTBN_2">
2547 <volumeref ref="volUnitTop"/>
2548 <position name="posUnitTBN_2" x="0" y="-454.2" z="0" unit="cm"/>
2549 <rotation name="rotUnitTBN_2" x="0" y="0" z="-270" unit="deg"/>
2551 <physvol name="volUnitTBCent_3-0">
2552 <volumeref ref="volUnitCent"/>
2553 <position name="posUnitTBCent_3-0" x="160" y="-320" z="0" unit="cm"/>
2555 <physvol name="volUnitTBCent_3-1">
2556 <volumeref ref="volUnitCent"/>
2557 <position name="posUnitTBCent_3-1" x="160" y="-160" z="0" unit="cm"/>
2559 <physvol name="volUnitTBCent_3-2">
2560 <volumeref ref="volUnitCent"/>
2561 <position name="posUnitTBCent_3-2" x="160" y="0" z="0" unit="cm"/>
2563 <physvol name="volUnitTBCent_3-3">
2564 <volumeref ref="volUnitCent"/>
2565 <position name="posUnitTBCent_3-3" x="160" y="160" z="0" unit="cm"/>
2567 <physvol name="volUnitTBCent_3-4">
2568 <volumeref ref="volUnitCent"/>
2569 <position name="posUnitTBCent_3-4" x="160" y="320" z="0" unit="cm"/>
2571 <physvol name="volUnitTBE_3">
2572 <volumeref ref="volUnitTop"/>
2573 <position name="posUnitTBE_3" x="454.2" y="160" z="0" unit="cm"/>
2575 <physvol name="volUnitTBS_3">
2576 <volumeref ref="volUnitTop"/>
2577 <position name="posUnitTBS_3" x="160" y="454.2" z="0" unit="cm"/>
2578 <rotation name="rotUnitTBS_3" x="0" y="0" z="-90" unit="deg"/>
2580 <physvol name="volUnitTBW_3">
2581 <volumeref ref="volUnitTop"/>
2582 <position name="posUnitTBW_3" x="-454.2" y="160" z="0" unit="cm"/>
2583 <rotation name="rotUnitTBW_3" x="0" y="0" z="-180" unit="deg"/>
2585 <physvol name="volUnitTBN_3">
2586 <volumeref ref="volUnitTop"/>
2587 <position name="posUnitTBN_3" x="160" y="-454.2" z="0" unit="cm"/>
2588 <rotation name="rotUnitTBN_3" x="0" y="0" z="-270" unit="deg"/>
2590 <physvol name="volUnitTBCent_4-0">
2591 <volumeref ref="volUnitCent"/>
2592 <position name="posUnitTBCent_4-0" x="320" y="-320" z="0" unit="cm"/>
2594 <physvol name="volUnitTBCent_4-1">
2595 <volumeref ref="volUnitCent"/>
2596 <position name="posUnitTBCent_4-1" x="320" y="-160" z="0" unit="cm"/>
2598 <physvol name="volUnitTBCent_4-2">
2599 <volumeref ref="volUnitCent"/>
2600 <position name="posUnitTBCent_4-2" x="320" y="0" z="0" unit="cm"/>
2602 <physvol name="volUnitTBCent_4-3">
2603 <volumeref ref="volUnitCent"/>
2604 <position name="posUnitTBCent_4-3" x="320" y="160" z="0" unit="cm"/>
2606 <physvol name="volUnitTBCent_4-4">
2607 <volumeref ref="volUnitCent"/>
2608 <position name="posUnitTBCent_4-4" x="320" y="320" z="0" unit="cm"/>
2610 <physvol name="volUnitTBE_4">
2611 <volumeref ref="volUnitTop"/>
2612 <position name="posUnitTBE_4" x="454.2" y="320" z="0" unit="cm"/>
2614 <physvol name="volUnitTBS_4">
2615 <volumeref ref="volUnitTop"/>
2616 <position name="posUnitTBS_4" x="320" y="454.2" z="0" unit="cm"/>
2617 <rotation name="rotUnitTBS_4" x="0" y="0" z="-90" unit="deg"/>
2619 <physvol name="volUnitTBW_4">
2620 <volumeref ref="volUnitTop"/>
2621 <position name="posUnitTBW_4" x="-454.2" y="320" z="0" unit="cm"/>
2622 <rotation name="rotUnitTBW_4" x="0" y="0" z="-180" unit="deg"/>
2624 <physvol name="volUnitTBN_4">
2625 <volumeref ref="volUnitTop"/>
2626 <position name="posUnitTBN_4" x="320" y="-454.2" z="0" unit="cm"/>
2627 <rotation name="rotUnitTBN_4" x="0" y="0" z="-270" unit="deg"/>
2632 <volume name="volSteelSupport_US">
2633 <materialref ref="Air"/>
2634 <solidref ref="boxCryoWallSm"/>
2636 <physvol name="volUnitUSCent_0-0">
2637 <volumeref ref="volUnitCent"/>
2638 <position name="posUnitUSCent_0-0" x="-320" y="-320" z="0" unit="cm"/>
2639 <rotationref ref="rPlus180AboutY"/>
2642 <physvol name="volUnitUSCent_0-1">
2643 <volumeref ref="volUnitCent"/>
2644 <position name="posUnitUSCent_0-1" x="-320" y="-160" z="0" unit="cm"/>
2645 <rotationref ref="rPlus180AboutY"/>
2648 <physvol name="volUnitUSCent_0-2">
2649 <volumeref ref="volUnitCent"/>
2650 <position name="posUnitUSCent_0-2" x="-320" y="0" z="0" unit="cm"/>
2651 <rotationref ref="rPlus180AboutY"/>
2654 <physvol name="volUnitUSCent_0-3">
2655 <volumeref ref="volUnitCent"/>
2656 <position name="posUnitUSCent_0-3" x="-320" y="160" z="0" unit="cm"/>
2657 <rotationref ref="rPlus180AboutY"/>
2660 <physvol name="volUnitUSCent_0-4">
2661 <volumeref ref="volUnitCent"/>
2662 <position name="posUnitUSCent_0-4" x="-320" y="320" z="0" unit="cm"/>
2663 <rotationref ref="rPlus180AboutY"/>
2665 <physvol name="volUnitUSE_0">
2666 <volumeref ref="volUnitTop"/>
2667 <position name="posUnitUSE_0" x="454.2" y="-320" z="0" unit="cm"/>
2668 <rotationref ref="rPlus180AboutX"/>
2670 <physvol name="volUnitUSS_0">
2671 <volumeref ref="volUnitWallS"/>
2672 <position name="posUnitUSS_0" x="-320" y="468.9" z="0" unit="cm"/>
2673 <rotation name="rotUnitUSS_0" x="0" y="180" z="-90" unit="deg"/>
2675 <physvol name="volUnitUSW_0">
2676 <volumeref ref="volUnitTop"/>
2677 <position name="posUnitUSW_0" x="-454.2" y="-320" z="0" unit="cm"/>
2678 <rotation name="rotUnitUSW_0" x="180" y="0" z="-180" unit="deg"/>
2680 <physvol name="volUnitUSN_0">
2681 <volumeref ref="volUnitWallS"/>
2682 <position name="posUnitUSN_0" x="-320" y="-468.9" z="0" unit="cm"/>
2683 <rotation name="rotUnitUSN_0" x="0" y="180" z="-270" unit="deg"/>
2687 <physvol name="volUnitUSCent_1-0">
2688 <volumeref ref="volUnitCent"/>
2689 <position name="posUnitUSCent_1-0" x="-160" y="-320" z="0" unit="cm"/>
2690 <rotationref ref="rPlus180AboutY"/>
2693 <physvol name="volUnitUSCent_1-1">
2694 <volumeref ref="volUnitCent"/>
2695 <position name="posUnitUSCent_1-1" x="-160" y="-160" z="0" unit="cm"/>
2696 <rotationref ref="rPlus180AboutY"/>
2699 <physvol name="volUnitUSCent_1-2">
2700 <volumeref ref="volUnitCent"/>
2701 <position name="posUnitUSCent_1-2" x="-160" y="0" z="0" unit="cm"/>
2702 <rotationref ref="rPlus180AboutY"/>
2705 <physvol name="volUnitUSCent_1-3">
2706 <volumeref ref="volUnitCent"/>
2707 <position name="posUnitUSCent_1-3" x="-160" y="160" z="0" unit="cm"/>
2708 <rotationref ref="rPlus180AboutY"/>
2711 <physvol name="volUnitUSCent_1-4">
2712 <volumeref ref="volUnitCent"/>
2713 <position name="posUnitUSCent_1-4" x="-160" y="320" z="0" unit="cm"/>
2714 <rotationref ref="rPlus180AboutY"/>
2716 <physvol name="volUnitUSE_1">
2717 <volumeref ref="volUnitTop"/>
2718 <position name="posUnitUSE_1" x="454.2" y="-160" z="0" unit="cm"/>
2719 <rotationref ref="rPlus180AboutX"/>
2721 <physvol name="volUnitUSS_1">
2722 <volumeref ref="volUnitWallS"/>
2723 <position name="posUnitUSS_1" x="-160" y="468.9" z="0" unit="cm"/>
2724 <rotation name="rotUnitUSS_1" x="0" y="180" z="-90" unit="deg"/>
2726 <physvol name="volUnitUSW_1">
2727 <volumeref ref="volUnitTop"/>
2728 <position name="posUnitUSW_1" x="-454.2" y="-160" z="0" unit="cm"/>
2729 <rotation name="rotUnitUSW_1" x="180" y="0" z="-180" unit="deg"/>
2731 <physvol name="volUnitUSN_1">
2732 <volumeref ref="volUnitWallS"/>
2733 <position name="posUnitUSN_1" x="-160" y="-468.9" z="0" unit="cm"/>
2734 <rotation name="rotUnitUSN_1" x="0" y="180" z="-270" unit="deg"/>
2738 <physvol name="volUnitUSCent_2-0">
2739 <volumeref ref="volUnitCent"/>
2740 <position name="posUnitUSCent_2-0" x="0" y="-320" z="0" unit="cm"/>
2741 <rotationref ref="rPlus180AboutY"/>
2744 <physvol name="volUnitUSCent_2-1">
2745 <volumeref ref="volUnitCent"/>
2746 <position name="posUnitUSCent_2-1" x="0" y="-160" z="0" unit="cm"/>
2747 <rotationref ref="rPlus180AboutY"/>
2750 <physvol name="volUnitUSCent_2-2">
2751 <volumeref ref="volUnitCent"/>
2752 <position name="posUnitUSCent_2-2" x="0" y="0" z="0" unit="cm"/>
2753 <rotationref ref="rPlus180AboutY"/>
2756 <physvol name="volUnitUSCent_2-3">
2757 <volumeref ref="volUnitCent"/>
2758 <position name="posUnitUSCent_2-3" x="0" y="160" z="0" unit="cm"/>
2759 <rotationref ref="rPlus180AboutY"/>
2762 <physvol name="volUnitUSCent_2-4">
2763 <volumeref ref="volUnitCent"/>
2764 <position name="posUnitUSCent_2-4" x="0" y="320" z="0" unit="cm"/>
2765 <rotationref ref="rPlus180AboutY"/>
2767 <physvol name="volUnitUSE_2">
2768 <volumeref ref="volUnitTop"/>
2769 <position name="posUnitUSE_2" x="454.2" y="0" z="0" unit="cm"/>
2770 <rotationref ref="rPlus180AboutX"/>
2772 <physvol name="volUnitUSS_2">
2773 <volumeref ref="volUnitWallS"/>
2774 <position name="posUnitUSS_2" x="0" y="468.9" z="0" unit="cm"/>
2775 <rotation name="rotUnitUSS_2" x="0" y="180" z="-90" unit="deg"/>
2777 <physvol name="volUnitUSW_2">
2778 <volumeref ref="volUnitTop"/>
2779 <position name="posUnitUSW_2" x="-454.2" y="0" z="0" unit="cm"/>
2780 <rotation name="rotUnitUSW_2" x="180" y="0" z="-180" unit="deg"/>
2782 <physvol name="volUnitUSN_2">
2783 <volumeref ref="volUnitWallS"/>
2784 <position name="posUnitUSN_2" x="0" y="-468.9" z="0" unit="cm"/>
2785 <rotation name="rotUnitUSN_2" x="0" y="180" z="-270" unit="deg"/>
2789 <physvol name="volUnitUSCent_3-0">
2790 <volumeref ref="volUnitCent"/>
2791 <position name="posUnitUSCent_3-0" x="160" y="-320" z="0" unit="cm"/>
2792 <rotationref ref="rPlus180AboutY"/>
2795 <physvol name="volUnitUSCent_3-1">
2796 <volumeref ref="volUnitCent"/>
2797 <position name="posUnitUSCent_3-1" x="160" y="-160" z="0" unit="cm"/>
2798 <rotationref ref="rPlus180AboutY"/>
2801 <physvol name="volUnitUSCent_3-2">
2802 <volumeref ref="volUnitCent"/>
2803 <position name="posUnitUSCent_3-2" x="160" y="0" z="0" unit="cm"/>
2804 <rotationref ref="rPlus180AboutY"/>
2807 <physvol name="volUnitUSCent_3-3">
2808 <volumeref ref="volUnitCent"/>
2809 <position name="posUnitUSCent_3-3" x="160" y="160" z="0" unit="cm"/>
2810 <rotationref ref="rPlus180AboutY"/>
2813 <physvol name="volUnitUSCent_3-4">
2814 <volumeref ref="volUnitCent"/>
2815 <position name="posUnitUSCent_3-4" x="160" y="320" z="0" unit="cm"/>
2816 <rotationref ref="rPlus180AboutY"/>
2818 <physvol name="volUnitUSE_3">
2819 <volumeref ref="volUnitTop"/>
2820 <position name="posUnitUSE_3" x="454.2" y="160" z="0" unit="cm"/>
2821 <rotationref ref="rPlus180AboutX"/>
2823 <physvol name="volUnitUSS_3">
2824 <volumeref ref="volUnitWallS"/>
2825 <position name="posUnitUSS_3" x="160" y="468.9" z="0" unit="cm"/>
2826 <rotation name="rotUnitUSS_3" x="0" y="180" z="-90" unit="deg"/>
2828 <physvol name="volUnitUSW_3">
2829 <volumeref ref="volUnitTop"/>
2830 <position name="posUnitUSW_3" x="-454.2" y="160" z="0" unit="cm"/>
2831 <rotation name="rotUnitUSW_3" x="180" y="0" z="-180" unit="deg"/>
2833 <physvol name="volUnitUSN_3">
2834 <volumeref ref="volUnitWallS"/>
2835 <position name="posUnitUSN_3" x="160" y="-468.9" z="0" unit="cm"/>
2836 <rotation name="rotUnitUSN_3" x="0" y="180" z="-270" unit="deg"/>
2840 <physvol name="volUnitUSCent_4-0">
2841 <volumeref ref="volUnitCent"/>
2842 <position name="posUnitUSCent_4-0" x="320" y="-320" z="0" unit="cm"/>
2843 <rotationref ref="rPlus180AboutY"/>
2846 <physvol name="volUnitUSCent_4-1">
2847 <volumeref ref="volUnitCent"/>
2848 <position name="posUnitUSCent_4-1" x="320" y="-160" z="0" unit="cm"/>
2849 <rotationref ref="rPlus180AboutY"/>
2852 <physvol name="volUnitUSCent_4-2">
2853 <volumeref ref="volUnitCent"/>
2854 <position name="posUnitUSCent_4-2" x="320" y="0" z="0" unit="cm"/>
2855 <rotationref ref="rPlus180AboutY"/>
2858 <physvol name="volUnitUSCent_4-3">
2859 <volumeref ref="volUnitCent"/>
2860 <position name="posUnitUSCent_4-3" x="320" y="160" z="0" unit="cm"/>
2861 <rotationref ref="rPlus180AboutY"/>
2864 <physvol name="volUnitUSCent_4-4">
2865 <volumeref ref="volUnitCent"/>
2866 <position name="posUnitUSCent_4-4" x="320" y="320" z="0" unit="cm"/>
2867 <rotationref ref="rPlus180AboutY"/>
2869 <physvol name="volUnitUSE_4">
2870 <volumeref ref="volUnitTop"/>
2871 <position name="posUnitUSE_4" x="454.2" y="320" z="0" unit="cm"/>
2872 <rotationref ref="rPlus180AboutX"/>
2874 <physvol name="volUnitUSS_4">
2875 <volumeref ref="volUnitWallS"/>
2876 <position name="posUnitUSS_4" x="320" y="468.9" z="0" unit="cm"/>
2877 <rotation name="rotUnitUSS_4" x="0" y="180" z="-90" unit="deg"/>
2879 <physvol name="volUnitUSW_4">
2880 <volumeref ref="volUnitTop"/>
2881 <position name="posUnitUSW_4" x="-454.2" y="320" z="0" unit="cm"/>
2882 <rotation name="rotUnitUSW_4" x="180" y="0" z="-180" unit="deg"/>
2884 <physvol name="volUnitUSN_4">
2885 <volumeref ref="volUnitWallS"/>
2886 <position name="posUnitUSN_4" x="320" y="-468.9" z="0" unit="cm"/>
2887 <rotation name="rotUnitUSN_4" x="0" y="180" z="-270" unit="deg"/>
2893 <volume name="volSteelSupport_WS">
2894 <materialref ref="Air"/>
2895 <solidref ref="boxCryoWallSm"/>
2896 <physvol name="volUnitWSCent_0-0">
2897 <volumeref ref="volUnitCent"/>
2898 <position name="posUnitWSCent_0-0" x="-320" y="-320" z="0" unit="cm"/>
2900 <physvol name="volUnitWSCent_0-1">
2901 <volumeref ref="volUnitCent"/>
2902 <position name="posUnitWSCent_0-1" x="-320" y="-160" z="0" unit="cm"/>
2904 <physvol name="volUnitWSCent_0-2">
2905 <volumeref ref="volUnitCent"/>
2906 <position name="posUnitWSCent_0-2" x="-320" y="0" z="0" unit="cm"/>
2908 <physvol name="volUnitWSCent_0-3">
2909 <volumeref ref="volUnitCent"/>
2910 <position name="posUnitWSCent_0-3" x="-320" y="160" z="0" unit="cm"/>
2912 <physvol name="volUnitWSCent_0-4">
2913 <volumeref ref="volUnitCent"/>
2914 <position name="posUnitWSCent_0-4" x="-320" y="320" z="0" unit="cm"/>
2916 <physvol name="volUnitWSE_0">
2917 <volumeref ref="volUnitTop"/>
2918 <position name="posUnitWSE_0" x="454.2" y="-320" z="0" unit="cm"/>
2920 <physvol name="volUnitWSS_0">
2921 <volumeref ref="volUnitWallS"/>
2922 <position name="posUnitWSS_0" x="-320" y="468.9" z="0" unit="cm"/>
2923 <rotation name="rotUnitWSS_0" x="0" y="0" z="-90" unit="deg"/>
2925 <physvol name="volUnitWSW_0">
2926 <volumeref ref="volUnitTop"/>
2927 <position name="posUnitWSW_0" x="-454.2" y="-320" z="0" unit="cm"/>
2928 <rotation name="rotUnitWSW_0" x="0" y="0" z="-180" unit="deg"/>
2930 <physvol name="volUnitWSN_0">
2931 <volumeref ref="volUnitWallS"/>
2932 <position name="posUnitWSN_0" x="-320" y="-468.9" z="0" unit="cm"/>
2933 <rotation name="rotUnitWSN_0" x="0" y="0" z="-270" unit="deg"/>
2935 <physvol name="volUnitWSCent_1-0">
2936 <volumeref ref="volUnitCent"/>
2937 <position name="posUnitWSCent_1-0" x="-160" y="-320" z="0" unit="cm"/>
2939 <physvol name="volUnitWSCent_1-1">
2940 <volumeref ref="volUnitCent"/>
2941 <position name="posUnitWSCent_1-1" x="-160" y="-160" z="0" unit="cm"/>
2943 <physvol name="volUnitWSCent_1-2">
2944 <volumeref ref="volUnitCent"/>
2945 <position name="posUnitWSCent_1-2" x="-160" y="0" z="0" unit="cm"/>
2947 <physvol name="volUnitWSCent_1-3">
2948 <volumeref ref="volUnitCent"/>
2949 <position name="posUnitWSCent_1-3" x="-160" y="160" z="0" unit="cm"/>
2951 <physvol name="volUnitWSCent_1-4">
2952 <volumeref ref="volUnitCent"/>
2953 <position name="posUnitWSCent_1-4" x="-160" y="320" z="0" unit="cm"/>
2955 <physvol name="volUnitWSE_1">
2956 <volumeref ref="volUnitTop"/>
2957 <position name="posUnitWSE_1" x="454.2" y="-160" z="0" unit="cm"/>
2959 <physvol name="volUnitWSS_1">
2960 <volumeref ref="volUnitWallS"/>
2961 <position name="posUnitWSS_1" x="-160" y="468.9" z="0" unit="cm"/>
2962 <rotation name="rotUnitWSS_1" x="0" y="0" z="-90" unit="deg"/>
2964 <physvol name="volUnitWSW_1">
2965 <volumeref ref="volUnitTop"/>
2966 <position name="posUnitWSW_1" x="-454.2" y="-160" z="0" unit="cm"/>
2967 <rotation name="rotUnitWSW_1" x="0" y="0" z="-180" unit="deg"/>
2969 <physvol name="volUnitWSN_1">
2970 <volumeref ref="volUnitWallS"/>
2971 <position name="posUnitWSN_1" x="-160" y="-468.9" z="0" unit="cm"/>
2972 <rotation name="rotUnitWSN_1" x="0" y="0" z="-270" unit="deg"/>
2974 <physvol name="volUnitWSCent_2-0">
2975 <volumeref ref="volUnitCent"/>
2976 <position name="posUnitWSCent_2-0" x="0" y="-320" z="0" unit="cm"/>
2978 <physvol name="volUnitWSCent_2-1">
2979 <volumeref ref="volUnitCent"/>
2980 <position name="posUnitWSCent_2-1" x="0" y="-160" z="0" unit="cm"/>
2982 <physvol name="volUnitWSCent_2-2">
2983 <volumeref ref="volUnitCent"/>
2984 <position name="posUnitWSCent_2-2" x="0" y="0" z="0" unit="cm"/>
2986 <physvol name="volUnitWSCent_2-3">
2987 <volumeref ref="volUnitCent"/>
2988 <position name="posUnitWSCent_2-3" x="0" y="160" z="0" unit="cm"/>
2990 <physvol name="volUnitWSCent_2-4">
2991 <volumeref ref="volUnitCent"/>
2992 <position name="posUnitWSCent_2-4" x="0" y="320" z="0" unit="cm"/>
2994 <physvol name="volUnitWSE_2">
2995 <volumeref ref="volUnitTop"/>
2996 <position name="posUnitWSE_2" x="454.2" y="0" z="0" unit="cm"/>
2998 <physvol name="volUnitWSS_2">
2999 <volumeref ref="volUnitWallS"/>
3000 <position name="posUnitWSS_2" x="0" y="468.9" z="0" unit="cm"/>
3001 <rotation name="rotUnitWSS_2" x="0" y="0" z="-90" unit="deg"/>
3003 <physvol name="volUnitWSW_2">
3004 <volumeref ref="volUnitTop"/>
3005 <position name="posUnitWSW_2" x="-454.2" y="0" z="0" unit="cm"/>
3006 <rotation name="rotUnitWSW_2" x="0" y="0" z="-180" unit="deg"/>
3008 <physvol name="volUnitWSN_2">
3009 <volumeref ref="volUnitWallS"/>
3010 <position name="posUnitWSN_2" x="0" y="-468.9" z="0" unit="cm"/>
3011 <rotation name="rotUnitWSN_2" x="0" y="0" z="-270" unit="deg"/>
3013 <physvol name="volUnitWSCent_3-0">
3014 <volumeref ref="volUnitCent"/>
3015 <position name="posUnitWSCent_3-0" x="160" y="-320" z="0" unit="cm"/>
3017 <physvol name="volUnitWSCent_3-1">
3018 <volumeref ref="volUnitCent"/>
3019 <position name="posUnitWSCent_3-1" x="160" y="-160" z="0" unit="cm"/>
3021 <physvol name="volUnitWSCent_3-2">
3022 <volumeref ref="volUnitCent"/>
3023 <position name="posUnitWSCent_3-2" x="160" y="0" z="0" unit="cm"/>
3025 <physvol name="volUnitWSCent_3-3">
3026 <volumeref ref="volUnitCent"/>
3027 <position name="posUnitWSCent_3-3" x="160" y="160" z="0" unit="cm"/>
3029 <physvol name="volUnitWSCent_3-4">
3030 <volumeref ref="volUnitCent"/>
3031 <position name="posUnitWSCent_3-4" x="160" y="320" z="0" unit="cm"/>
3033 <physvol name="volUnitWSE_3">
3034 <volumeref ref="volUnitTop"/>
3035 <position name="posUnitWSE_3" x="454.2" y="160" z="0" unit="cm"/>
3037 <physvol name="volUnitWSS_3">
3038 <volumeref ref="volUnitWallS"/>
3039 <position name="posUnitWSS_3" x="160" y="468.9" z="0" unit="cm"/>
3040 <rotation name="rotUnitWSS_3" x="0" y="0" z="-90" unit="deg"/>
3042 <physvol name="volUnitWSW_3">
3043 <volumeref ref="volUnitTop"/>
3044 <position name="posUnitWSW_3" x="-454.2" y="160" z="0" unit="cm"/>
3045 <rotation name="rotUnitWSW_3" x="0" y="0" z="-180" unit="deg"/>
3047 <physvol name="volUnitWSN_3">
3048 <volumeref ref="volUnitWallS"/>
3049 <position name="posUnitWSN_3" x="160" y="-468.9" z="0" unit="cm"/>
3050 <rotation name="rotUnitWSN_3" x="0" y="0" z="-270" unit="deg"/>
3052 <physvol name="volUnitWSCent_4-0">
3053 <volumeref ref="volUnitCent"/>
3054 <position name="posUnitWSCent_4-0" x="320" y="-320" z="0" unit="cm"/>
3056 <physvol name="volUnitWSCent_4-1">
3057 <volumeref ref="volUnitCent"/>
3058 <position name="posUnitWSCent_4-1" x="320" y="-160" z="0" unit="cm"/>
3060 <physvol name="volUnitWSCent_4-2">
3061 <volumeref ref="volUnitCent"/>
3062 <position name="posUnitWSCent_4-2" x="320" y="0" z="0" unit="cm"/>
3064 <physvol name="volUnitWSCent_4-3">
3065 <volumeref ref="volUnitCent"/>
3066 <position name="posUnitWSCent_4-3" x="320" y="160" z="0" unit="cm"/>
3068 <physvol name="volUnitWSCent_4-4">
3069 <volumeref ref="volUnitCent"/>
3070 <position name="posUnitWSCent_4-4" x="320" y="320" z="0" unit="cm"/>
3072 <physvol name="volUnitWSE_4">
3073 <volumeref ref="volUnitTop"/>
3074 <position name="posUnitWSE_4" x="454.2" y="320" z="0" unit="cm"/>
3076 <physvol name="volUnitWSS_4">
3077 <volumeref ref="volUnitWallS"/>
3078 <position name="posUnitWSS_4" x="320" y="468.9" z="0" unit="cm"/>
3079 <rotation name="rotUnitWSS_4" x="0" y="0" z="-90" unit="deg"/>
3081 <physvol name="volUnitWSW_4">
3082 <volumeref ref="volUnitTop"/>
3083 <position name="posUnitWSW_4" x="-454.2" y="320" z="0" unit="cm"/>
3084 <rotation name="rotUnitWSW_4" x="0" y="0" z="-180" unit="deg"/>
3086 <physvol name="volUnitWSN_4">
3087 <volumeref ref="volUnitWallS"/>
3088 <position name="posUnitWSN_4" x="320" y="-468.9" z="0" unit="cm"/>
3089 <rotation name="rotUnitWSN_4" x="0" y="0" z="-270" unit="deg"/>
3094 <volume name="volSteelSupport_LR">
3095 <materialref ref="Air"/>
3096 <solidref ref="boxCryoWallLg"/>
3097 <physvol name="volUnitLRCent_0-0">
3098 <volumeref ref="volUnitCent"/>
3099 <position name="posUnitLRCent_0-0" x="-320" y="-320" z="0" unit="cm"/>
3101 <physvol name="volUnitLRCent_0-1">
3102 <volumeref ref="volUnitCent"/>
3103 <position name="posUnitLRCent_0-1" x="-320" y="-160" z="0" unit="cm"/>
3105 <physvol name="volUnitLRCent_0-2">
3106 <volumeref ref="volUnitCent"/>
3107 <position name="posUnitLRCent_0-2" x="-320" y="0" z="0" unit="cm"/>
3109 <physvol name="volUnitLRCent_0-3">
3110 <volumeref ref="volUnitCent"/>
3111 <position name="posUnitLRCent_0-3" x="-320" y="160" z="0" unit="cm"/>
3113 <physvol name="volUnitLRCent_0-4">
3114 <volumeref ref="volUnitCent"/>
3115 <position name="posUnitLRCent_0-4" x="-320" y="320" z="0" unit="cm"/>
3117 <physvol name="volUnitLRE_0">
3118 <volumeref ref="volUnitWallL"/>
3119 <position name="posUnitLRE_0" x="485.1" y="-320" z="0" unit="cm"/>
3121 <physvol name="volUnitLRS_0">
3122 <volumeref ref="volUnitWallS"/>
3123 <position name="posUnitLRS_0" x="-320" y="468.9" z="0" unit="cm"/>
3124 <rotation name="rotUnitLRS_0" x="0" y="0" z="-90" unit="deg"/>
3126 <physvol name="volUnitLRW_0">
3127 <volumeref ref="volUnitWallL"/>
3128 <position name="posUnitLRW_0" x="-485.1" y="-320" z="0" unit="cm"/>
3129 <rotation name="rotUnitLRW_0" x="0" y="0" z="-180" unit="deg"/>
3131 <physvol name="volUnitLRN_0">
3132 <volumeref ref="volUnitWallS"/>
3133 <position name="posUnitLRN_0" x="-320" y="-468.9" z="0" unit="cm"/>
3134 <rotation name="rotUnitLRN_0" x="0" y="0" z="-270" unit="deg"/>
3136 <physvol name="volUnitLRCent_1-0">
3137 <volumeref ref="volUnitCent"/>
3138 <position name="posUnitLRCent_1-0" x="-160" y="-320" z="0" unit="cm"/>
3140 <physvol name="volUnitLRCent_1-1">
3141 <volumeref ref="volUnitCent"/>
3142 <position name="posUnitLRCent_1-1" x="-160" y="-160" z="0" unit="cm"/>
3144 <physvol name="volUnitLRCent_1-2">
3145 <volumeref ref="volUnitCent"/>
3146 <position name="posUnitLRCent_1-2" x="-160" y="0" z="0" unit="cm"/>
3148 <physvol name="volUnitLRCent_1-3">
3149 <volumeref ref="volUnitCent"/>
3150 <position name="posUnitLRCent_1-3" x="-160" y="160" z="0" unit="cm"/>
3152 <physvol name="volUnitLRCent_1-4">
3153 <volumeref ref="volUnitCent"/>
3154 <position name="posUnitLRCent_1-4" x="-160" y="320" z="0" unit="cm"/>
3156 <physvol name="volUnitLRE_1">
3157 <volumeref ref="volUnitWallL"/>
3158 <position name="posUnitLRE_1" x="485.1" y="-160" z="0" unit="cm"/>
3160 <physvol name="volUnitLRS_1">
3161 <volumeref ref="volUnitWallS"/>
3162 <position name="posUnitLRS_1" x="-160" y="468.9" z="0" unit="cm"/>
3163 <rotation name="rotUnitLRS_1" x="0" y="0" z="-90" unit="deg"/>
3165 <physvol name="volUnitLRW_1">
3166 <volumeref ref="volUnitWallL"/>
3167 <position name="posUnitLRW_1" x="-485.1" y="-160" z="0" unit="cm"/>
3168 <rotation name="rotUnitLRW_1" x="0" y="0" z="-180" unit="deg"/>
3170 <physvol name="volUnitLRN_1">
3171 <volumeref ref="volUnitWallS"/>
3172 <position name="posUnitLRN_1" x="-160" y="-468.9" z="0" unit="cm"/>
3173 <rotation name="rotUnitLRN_1" x="0" y="0" z="-270" unit="deg"/>
3175 <physvol name="volUnitLRCent_2-0">
3176 <volumeref ref="volUnitCent"/>
3177 <position name="posUnitLRCent_2-0" x="0" y="-320" z="0" unit="cm"/>
3179 <physvol name="volUnitLRCent_2-1">
3180 <volumeref ref="volUnitCent"/>
3181 <position name="posUnitLRCent_2-1" x="0" y="-160" z="0" unit="cm"/>
3183 <physvol name="volUnitLRCent_2-2">
3184 <volumeref ref="volUnitCent"/>
3185 <position name="posUnitLRCent_2-2" x="0" y="0" z="0" unit="cm"/>
3187 <physvol name="volUnitLRCent_2-3">
3188 <volumeref ref="volUnitCent"/>
3189 <position name="posUnitLRCent_2-3" x="0" y="160" z="0" unit="cm"/>
3191 <physvol name="volUnitLRCent_2-4">
3192 <volumeref ref="volUnitCent"/>
3193 <position name="posUnitLRCent_2-4" x="0" y="320" z="0" unit="cm"/>
3195 <physvol name="volUnitLRE_2">
3196 <volumeref ref="volUnitWallL"/>
3197 <position name="posUnitLRE_2" x="485.1" y="0" z="0" unit="cm"/>
3199 <physvol name="volUnitLRS_2">
3200 <volumeref ref="volUnitWallS"/>
3201 <position name="posUnitLRS_2" x="0" y="468.9" z="0" unit="cm"/>
3202 <rotation name="rotUnitLRS_2" x="0" y="0" z="-90" unit="deg"/>
3204 <physvol name="volUnitLRW_2">
3205 <volumeref ref="volUnitWallL"/>
3206 <position name="posUnitLRW_2" x="-485.1" y="0" z="0" unit="cm"/>
3207 <rotation name="rotUnitLRW_2" x="0" y="0" z="-180" unit="deg"/>
3209 <physvol name="volUnitLRN_2">
3210 <volumeref ref="volUnitWallS"/>
3211 <position name="posUnitLRN_2" x="0" y="-468.9" z="0" unit="cm"/>
3212 <rotation name="rotUnitLRN_2" x="0" y="0" z="-270" unit="deg"/>
3214 <physvol name="volUnitLRCent_3-0">
3215 <volumeref ref="volUnitCent"/>
3216 <position name="posUnitLRCent_3-0" x="160" y="-320" z="0" unit="cm"/>
3218 <physvol name="volUnitLRCent_3-1">
3219 <volumeref ref="volUnitCent"/>
3220 <position name="posUnitLRCent_3-1" x="160" y="-160" z="0" unit="cm"/>
3222 <physvol name="volUnitLRCent_3-2">
3223 <volumeref ref="volUnitCent"/>
3224 <position name="posUnitLRCent_3-2" x="160" y="0" z="0" unit="cm"/>
3226 <physvol name="volUnitLRCent_3-3">
3227 <volumeref ref="volUnitCent"/>
3228 <position name="posUnitLRCent_3-3" x="160" y="160" z="0" unit="cm"/>
3230 <physvol name="volUnitLRCent_3-4">
3231 <volumeref ref="volUnitCent"/>
3232 <position name="posUnitLRCent_3-4" x="160" y="320" z="0" unit="cm"/>
3234 <physvol name="volUnitLRE_3">
3235 <volumeref ref="volUnitWallL"/>
3236 <position name="posUnitLRE_3" x="485.1" y="160" z="0" unit="cm"/>
3238 <physvol name="volUnitLRS_3">
3239 <volumeref ref="volUnitWallS"/>
3240 <position name="posUnitLRS_3" x="160" y="468.9" z="0" unit="cm"/>
3241 <rotation name="rotUnitLRS_3" x="0" y="0" z="-90" unit="deg"/>
3243 <physvol name="volUnitLRW_3">
3244 <volumeref ref="volUnitWallL"/>
3245 <position name="posUnitLRW_3" x="-485.1" y="160" z="0" unit="cm"/>
3246 <rotation name="rotUnitLRW_3" x="0" y="0" z="-180" unit="deg"/>
3248 <physvol name="volUnitLRN_3">
3249 <volumeref ref="volUnitWallS"/>
3250 <position name="posUnitLRN_3" x="160" y="-468.9" z="0" unit="cm"/>
3251 <rotation name="rotUnitLRN_3" x="0" y="0" z="-270" unit="deg"/>
3253 <physvol name="volUnitLRCent_4-0">
3254 <volumeref ref="volUnitCent"/>
3255 <position name="posUnitLRCent_4-0" x="320" y="-320" z="0" unit="cm"/>
3257 <physvol name="volUnitLRCent_4-1">
3258 <volumeref ref="volUnitCent"/>
3259 <position name="posUnitLRCent_4-1" x="320" y="-160" z="0" unit="cm"/>
3261 <physvol name="volUnitLRCent_4-2">
3262 <volumeref ref="volUnitCent"/>
3263 <position name="posUnitLRCent_4-2" x="320" y="0" z="0" unit="cm"/>
3265 <physvol name="volUnitLRCent_4-3">
3266 <volumeref ref="volUnitCent"/>
3267 <position name="posUnitLRCent_4-3" x="320" y="160" z="0" unit="cm"/>
3269 <physvol name="volUnitLRCent_4-4">
3270 <volumeref ref="volUnitCent"/>
3271 <position name="posUnitLRCent_4-4" x="320" y="320" z="0" unit="cm"/>
3273 <physvol name="volUnitLRE_4">
3274 <volumeref ref="volUnitWallL"/>
3275 <position name="posUnitLRE_4" x="485.1" y="320" z="0" unit="cm"/>
3277 <physvol name="volUnitLRS_4">
3278 <volumeref ref="volUnitWallS"/>
3279 <position name="posUnitLRS_4" x="320" y="468.9" z="0" unit="cm"/>
3280 <rotation name="rotUnitLRS_4" x="0" y="0" z="-90" unit="deg"/>
3282 <physvol name="volUnitLRW_4">
3283 <volumeref ref="volUnitWallL"/>
3284 <position name="posUnitLRW_4" x="-485.1" y="320" z="0" unit="cm"/>
3285 <rotation name="rotUnitLRW_4" x="0" y="0" z="-180" unit="deg"/>
3287 <physvol name="volUnitLRN_4">
3288 <volumeref ref="volUnitWallS"/>
3289 <position name="posUnitLRN_4" x="320" y="-468.9" z="0" unit="cm"/>
3290 <rotation name="rotUnitLRN_4" x="0" y="0" z="-270" unit="deg"/>
3294 <volume name="volDetEnclosure">
3295 <materialref ref="Air"/>
3296 <solidref ref="DetEnclosure"/>
3299 <volumeref ref="volFoamPadding"/>
3300 <positionref ref="posCryoInDetEnc"/>
3303 <physvol name="volSteelSupport_Top">
3304 <volumeref ref="volSteelSupport_TB"/>
3305 <position name="posSteelSupport_Top" x="0" y="@{[$posTopSteelStruct+31.1]}" z="0" unit="cm"/>
3306 <rotation name="rotSteelSupport_Top" x="90" y="0" z="0" unit="deg"/>
3311 <physvol name="volSteelSupport_Bottom">
3312 <volumeref ref="volSteelSupport_TB"/>
3313 <position name="posSteelSupport_Bottom" x="0" y="@{[$posBotSteelStruct-31.1]}" z="0" unit="cm"/>
3314 <rotation name="rotSteelSupport_Bottom" x="-90" y="0" z="0" unit="deg"/>
3319 <volumeref ref="volSteelSupport_US"/>
3320 <position name="posSteelSupport_US" x="0" y="0" z="@{[$posZFrontSteelStruct-31.1]}" unit="cm"/>
3321 <rotation name="rotSteelSupport_Front" x="0" y="0" z="0" unit="deg"/>
3325 <physvol name="volSteelSupport_DS">
3326 <volumeref ref="volSteelSupport_WS"/>
3327 <position name="posSteelSupport_DS" x="0" y="0" z="@{[$posZBackSteelStruct+31.1]}" unit="cm"/>
3328 <rotation name="rotSteelSupport_Back" x="0" y="0" z="" unit="deg"/>
3332 <physvol name="volSteelSupport_LS">
3333 <volumeref ref="volSteelSupport_LR"/>
3334 <position name="posSteelSupport_LS" x="@{[$posLeftSteelStruct+31.1]}" y="0" z="0" unit="cm"/>
3335 <rotation name="rotSteelSupport_LS" x="0" y="-90" z="0" unit="deg"/>
3339 <physvol name="volSteelSupport_RS">
3340 <volumeref ref="volSteelSupport_LR"/>
3341 <position name="posSteelSupport_RS" x="@{[$posRightSteelStruct-31.1]}" y="0" z="0" unit="cm"/>
3342 <rotation name="rotSteelSupport_RS" x="0" y="90" z="0" unit="deg"/>
3347 <volumeref ref="volSteelSupport"/>
3348 <positionref ref="posCryoInDetEnc"/>
3352 <volumeref ref="volCryostat"/>
3353 <positionref ref="posCryoInDetEnc"/>
3372 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3373 #+++++++++++++++++++++++++++++++++++++++ gen_World +++++++++++++++++++++++++++++++++++++++
3374 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3379 # Create the WORLD fragment file name,
3380 # add file to list of output GDML fragments,
3382 $WORLD = $basename."_World" . $suffix . ".gdml";
3383 push (@gdmlFiles, $WORLD);
3384 $WORLD = ">" . $WORLD;
3385 open(WORLD) or die("Could not open file $WORLD for writing");
3388 # The standard XML prefix and starting the gdml
3390 <?xml version='1.0'?>
3395 # All the World solids.
3398 <box name="World" lunit="cm"
3399 x="@{[$DetEncWidth+2*$AirThickness]}"
3400 y="@{[$DetEncHeight+2*$AirThickness]}"
3401 z="@{[$DetEncLength+2*$AirThickness]}"/>
3408 <volume name="volWorld" >
3409 <materialref ref="Air"/>
3410 <solidref ref="World"/>
3413 <volumeref ref="volDetEnclosure"/>
3414 <position name="posDetEnclosure" unit="cm" x="$OriginXSet" y="$OriginYSet" z="$OriginZSet"/>
3422 # make_gdml.pl will take care of <setup/>
3429 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3430 #++++++++++++++++++++++++++++++++++++ write_fragments ++++++++++++++++++++++++++++++++++++
3431 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3433 sub write_fragments()
3435 # This subroutine creates an XML file that summarizes the the subfiles output
3436 # by the other sub routines - it is the input file for make_gdml.pl which will
3437 # give the final desired GDML file. Specify its name with the output option.
3438 # (you can change the name when running make_gdml)
3440 # This code is taken straigh from the similar MicroBooNE generate script, Thank you.
3442 if ( ! defined $output )
3444 $output = "-"; # write to STDOUT
3447 # Set up the output file.
3448 $OUTPUT = ">" . $output;
3449 open(OUTPUT) or die("Could not open file $OUTPUT");
3452 <?xml version='1.0'?>
3454 <!-- Input to Geometry/gdml/make_gdml.pl; define the GDML fragments
3455 that will be zipped together to create a detector description.
3462 <!-- These files contain GDML <constant></constant>
3463 blocks. They are read in separately, so they can be
3464 interpreted into the remaining GDML. See make_gdml.pl for
3470 foreach $filename (@defFiles)
3473 <filename> $filename </filename>
3483 <!-- The GDML file fragments to be zipped together. -->
3487 foreach $filename (@gdmlFiles)
3490 <filename> $filename </filename>
3505 print "Some key parameters for dual-phase LAr TPC (unit cm unless noted otherwise)\n";
3506 print "CRM active area : $widthCRM_active x $lengthCRM_active\n";
3507 print "CRM total area : $widthCRM x $lengthCRM\n";
3508 print "TPC active volume : $driftTPCActive x $widthTPCActive x $lengthTPCActive\n";
3509 print "Argon buffer : ($xLArBuffer, $yLArBuffer, $zLArBuffer) \n";
3510 print "Detector enclosure : $DetEncWidth x $DetEncHeight x $DetEncLength\n";
3511 print "TPC Origin : ($OriginXSet, $OriginYSet, $OriginZSet) \n";
3512 print "Field Cage : $FieldCage_switch \n";
3513 print "Cathode : $Cathode_switch \n";;
3514 print "GroundGrid : $GroundGrid_switch \n";
3515 print "ExtractionGrid : $ExtractionGrid_switch \n";
3516 print "LEMs : $LEMs_switch \n";
3517 print "PMTs : $pmt_switch \n";
3519 # run the sub routines that generate the fragments
3521 gen_Define(); # generates definitions at beginning of GDML
3522 gen_Materials(); # generates materials to be used
3524 if ( $pmt_switch eq "on" ) { gen_pmt(); }
3525 if ( $FieldCage_switch eq "on" ) { gen_FieldCage(); }
3526 if ( $GroundGrid_switch eq "on" ) { gen_GroundGrid(); }
3527 if ( $Cathode_switch eq "on" ) { gen_Cathode(); }
3528 if ( $ExtractionGrid_switch eq "on" ) { gen_ExtractionGrid(); }
3529 if ( $LEMs_switch eq "on" ) { gen_LEMs(); }
3531 gen_TPC(); # generate TPC for a given unit CRM
3534 gen_World(); # places the enclosure among DUSEL Rock
3537 write_fragments(); # writes the XML input for make_gdml.pl
3538 # which zips together the final GDML