7 $outfile = "dune.gdml";
8 $nCryos = 2; # can get rid of this later, 1 corresponds to 1st gdml iteration
13 #Specific H,W,L of DUNE
14 $CryostatWidth = 2400;
15 $CryostatHeight = 1500;
16 $CryostatLength = 4500;
19 $SteelThickness = 0.5*2.54;
20 $ArgonWidth = $CryostatWidth-2*$SteelThickness;
21 $ArgonHeight = $CryostatHeight-2*$SteelThickness;
22 $ArgonLength = $CryostatLength-2*$SteelThickness;
25 # 1000 for normal 10m thickness
27 $RockThickness = 1000;
28 $MiddleRockThickness = 1500;
30 $ConcretePadding = 50;
31 $GlassFoamPadding = 100;
32 $TotalPadding = $ConcretePadding+$GlassFoamPadding+$SteelThickness;
33 $CavernWidth = $ArgonWidth+2*$TotalPadding;
34 $CavernHeight = $ArgonHeight+$TotalPadding;
35 $CavernLength = $nCryos*($CryostatLength+2*$TotalPadding)+$MiddleRockThickness;
37 $CryoZ = 0.5*($MiddleRockThickness+2*$TotalPadding+$CryostatLength);
40 $UpstreamLArPadding = 50;
41 $DownstreamLArPadding = 250;
42 $VerticalLArPadding = 50;
44 $FiducialWidth = $CryostatWidth-2*$SideLArPadding;
45 $FiducialHeight = $CryostatHeight-2*$VerticalLArPadding;
46 $FiducialLength = $CryostatLength-$UpstreamLArPadding-$DownstreamLArPadding;
48 $APAWidth = $FiducialWidth/$nAPAWide;
49 $APAHeight = $FiducialHeight/$nAPAHigh;
50 $APALength = $FiducialLength/$nAPALong;
52 $TPCWidth = $APAWidth/2 - 10.001;
53 $TPCHeight = $APAHeight - 0.001;
54 $TPCLength = $APALength - 0.001 ;
56 $TPCWireThickness=0.015;
73 # Set up the output file.
74 $DUNE = ">>" . $outfile;
75 open(DUNE) or die("Could not open file $DUNE for writing");
79 <box name="World" lunit="cm"
80 x="2*$CryostatWidth+2*($RockThickness+$TotalPadding)+$TPCWidth"
81 y="$CryostatHeight+2*($RockThickness+$TotalPadding)"
82 z="2*$CavernLength+2*$RockThickness+$TPCLength"/>
83 <box name="LowerRock" lunit="cm"
84 x="$CryostatWidth+2*($RockThickness+$TotalPadding)"
85 y="$CryostatHeight+$RockThickness+$TotalPadding"
86 z="$CavernLength+2*$RockThickness"/>
87 <box name="RockBottom" lunit="cm"
88 x="$CryostatWidth+2*$TotalPadding"
91 <box name="LowerCavern" lunit="cm"
92 x="$CryostatWidth+2*$TotalPadding"
93 y="$CryostatHeight+$RockThickness+$TotalPadding+2"
95 <subtraction name="LowerRockWithCavern">
96 <first ref="LowerRock"/>
97 <second ref="LowerCavern"/>
99 <box name="UpperRock" lunit="cm"
100 x="$CryostatWidth+2*($RockThickness+$TotalPadding)"
102 z="$CavernLength+2*$RockThickness"/>
103 <box name="UpperCavern" lunit="cm"
104 x="$CryostatWidth+2*$TotalPadding+1000"
105 y="$RockThickness+20"
106 z="$CavernLength+1000"/>
107 <box name="RockTop" lunit="cm"
108 x="$CryostatWidth+2*$TotalPadding+1000"
109 y="$RockThickness-500"
110 z="$CavernLength+1000"/>
111 <subtraction name="UpperRockWithCavern">
112 <first ref="UpperRock"/>
113 <second ref="UpperCavern"/>
115 <box name="MiddleRock" lunit="cm"
116 x="$CryostatWidth+2*$TotalPadding"
117 y="$CryostatHeight+$TotalPadding+2"
118 z="$MiddleRockThickness"/>
119 <box name="DetEnclosure" lunit="cm"
120 x="$CryostatWidth+2*$TotalPadding"
121 y="$CryostatHeight+2*$TotalPadding"
123 <box name="ConcreteBlock" lunit="cm"
124 x="$CryostatWidth+2*$TotalPadding"
125 y="$CryostatHeight+$TotalPadding"
126 z="$CryostatLength+2*$TotalPadding"/>
127 <box name="ConcreteBottom" lunit="cm"
128 x="$CryostatWidth+2*($TotalPadding-$ConcretePadding)"
130 z="$CryostatLength-2*$ConcretePadding"/>
131 <box name="ConcreteCavern" lunit="cm"
132 x="$CryostatWidth+2*($TotalPadding-$ConcretePadding)"
133 y="$CryostatHeight+$TotalPadding+2"
134 z="$CryostatLength+2*($TotalPadding-$ConcretePadding)"/>
135 <subtraction name="ConcreteWithCavern">
136 <first ref="ConcreteBlock"/>
137 <second ref="ConcreteCavern"/>
139 <box name="Cryostat" lunit="cm"
142 z="$CryostatLength"/>
143 <box name="ArgonInterior" lunit="cm"
147 <subtraction name="SteelShell">
148 <first ref="Cryostat"/>
149 <second ref="ArgonInterior"/>
151 <box name="APA" lunit="cm"
155 <box name="TPC" lunit="cm"
159 <box name="TPCPlane" lunit="cm"
164 rmax="0.5*$TPCWireThickness"
165 z="0.89*0.9*$TPCLength"
169 <box name="Cathode" lunit="cm"
175 <volume name="volSteelShell">
176 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni" />
177 <solidref ref="SteelShell" />
179 <volume name="volTPCWire">
180 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni" />
181 <solidref ref="TPCWire" />
183 <volume name="volTPCPlane">
184 <materialref ref="LAr"/>
185 <solidref ref="TPCPlane"/>
188 $rt2=1.414213562373095;
190 for ( $i=-0.3*$TPCLength ; $i < 0.3*$TPCLength ; $i+=$rt2*$TPC_WireSpacing ) {
194 <volumeref ref="volTPCWire"/>
195 <position name="posTPCWire$count" unit="cm" x="0" y="$wire_ypos" z="0"/>
196 <rotation name="rTPCWire$count" unit="deg" x="45" y="0" z="0"/>
203 <volume name="volCathode">
204 <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni" />
205 <solidref ref="Cathode" />
207 <volume name="volTPC">
208 <materialref ref="LAr" />
209 <solidref ref="TPC" />
211 <volumeref ref="volTPCPlane"/>
212 <position name="posTPCPlane1" unit="cm" x="(-$TPCWidth/2)+0.051+0.3" y="0" z="0"/>
215 <volumeref ref="volTPCPlane"/>
216 <position name="posTPCPlane2" unit="cm" x="(-$TPCWidth/2)+0.051" y="0" z="0"/>
217 <rotation name="rTPCPlane2" unit="deg" x="0" y="180" z="0"/>
220 <volumeref ref="volCathode"/>
221 <position name="posCathode" unit="cm" x="($TPCWidth/2)-0.5" y="0" z="0"/>
224 <volume name="volAPA">
225 <materialref ref="LAr"/>
226 <solidref ref="APA"/>
228 <volumeref ref="volTPC"/>
229 <position name="posTPC1" unit="cm" x="-($TPCWidth/2 + 5)" y="0" z="0"/>
230 <rotation name="rTPC" unit="deg" x="0" y="180" z="0"/>
233 <volumeref ref="volTPC"/>
234 <position name="posTPC2" unit="cm" x="($TPCWidth/2 + 5)" y="0" z="0"/>
237 <volume name="volCryostat">
238 <materialref ref="LAr" />
239 <solidref ref="Cryostat" />
241 <volumeref ref="volSteelShell"/>
242 <position name="posSteelShell" unit="cm" x="0" y="0" z="0"/>
246 for($k=0 ; $k<$nAPALong ; $k++)
249 $TPC_Z = ( $k - ( ( $nAPALong - 1 ) / 2 ) ) * $FiducialLength/$nAPALong + ( $UpstreamLArPadding - $DownstreamLArPadding ) / 2;
250 for($i=0 ; $i<$nAPAWide ; $i++)
253 $TPC_X = ( $i - ( ( $nAPAWide - 1 ) / 2 ) ) * $FiducialWidth/$nAPAWide;
254 for($j=0 ; $j<$nAPAHigh ; $j++)
257 $TPC_Y = ( $j - ( ( $nAPAHigh - 1 ) / 2 ) ) * $FiducialHeight/$nAPAHigh;
260 <volumeref ref="volAPA"/>
261 <position name="posAPA$i\-$j\-$k" unit="cm" x="$TPC_X" y="$TPC_Y" z="$TPC_Z"/>
271 <volume name="volConcreteWithCavern">
272 <materialref ref="Concrete"/>
273 <solidref ref="ConcreteWithCavern"/>
275 <volume name="volConcreteBottom">
276 <materialref ref="Concrete"/>
277 <solidref ref="ConcreteBottom"/>
279 <volume name="volMiddleRock">
280 <materialref ref="DUSEL_Rock"/>
281 <solidref ref="MiddleRock"/>
283 <volume name="volDetEnclosure">
284 <materialref ref="Air"/>
285 <solidref ref="DetEnclosure"/>
291 <volumeref ref="volCryostat"/>
292 <position name="posCryostat" unit="cm" x="0" y="0" z="0"/>
298 <volumeref ref="volCryostat"/>
299 <position name="posCryostatDownstream" unit="cm" x="0" y="0" z="$CryoZ"/>
302 <volumeref ref="volCryostat"/>
303 <position name="posCryostatUpstream" unit="cm" x="0" y="0" z="-$CryoZ"/>
311 <volumeref ref="volConcreteWithCavern"/>
312 <position name="posConcreteWithCavernUpstream" unit="cm" x="0" y="-0.5*($TotalPadding-$ConcretePadding)" z="-$CryoZ"/>
315 <volumeref ref="volConcreteBottom"/>
316 <position name="posConcreteBottomUpstream" unit="cm" x="0" y="-0.5*($CryostatHeight+$TotalPadding)" z="-$CryoZ"/>
319 <volumeref ref="volConcreteWithCavern"/>
320 <position name="posConcreteWithCavernDownstream" unit="cm" x="0" y="-0.5*($TotalPadding-$ConcretePadding)" z="$CryoZ"/>
323 <volumeref ref="volConcreteBottom"/>
324 <position name="posConcreteBottomDownstream" unit="cm" x="0" y="-0.5*($CryostatHeight+$TotalPadding)" z="$CryoZ"/>
327 <volumeref ref="volMiddleRock"/>
328 <position name="posMiddleRock" unit="cm" x="0" y="0" z="0" />
331 <volume name="volLowerRockWithCavern">
332 <materialref ref="DUSEL_Rock"/>
333 <solidref ref="LowerRockWithCavern"/>
335 <volume name="volRockTop">
336 <materialref ref="DUSEL_Rock"/>
337 <solidref ref="RockTop"/>
339 <volume name="volUpperRockWithCavern">
340 <materialref ref="DUSEL_Rock"/>
341 <solidref ref="UpperRockWithCavern"/>
343 <volume name="volRockBottom">
344 <materialref ref="DUSEL_Rock"/>
345 <solidref ref="RockBottom"/>
347 <volume name="volWorld" >
348 <materialref ref="Air"/>
349 <solidref ref="World"/>
351 <volumeref ref="volDetEnclosure"/>
352 <position name="posDetEnclosure" unit="cm" x="0.5*$CryostatWidth" y="0" z="0.5*$CavernLength-$TotalPadding"/>
355 <volumeref ref="volLowerRockWithCavern"/>
356 <position name="posLowerRockWithCavern" unit="cm" x="0.5*$CryostatWidth" y="-0.5*$RockThickness" z="0.5*$CavernLength-$TotalPadding"/>
359 <volumeref ref="volRockBottom"/>
360 <position name="posRockBottom" unit="cm" x="0.5*$CryostatWidth" y="-0.5*($RockThickness+$CryostatHeight+$TotalPadding)" z="0.5*$CavernLength-$TotalPadding"/>
363 <volumeref ref="volUpperRockWithCavern"/>
364 <position name="posUpperRockWithCavern" unit="cm" x="0.5*$CryostatWidth" y="0.5*($RockThickness+$CryostatHeight)" z="0.5*$CavernLength-$TotalPadding"/>
367 <volumeref ref="volRockTop"/>
368 <position name="posRockTop" unit="cm" x="0.5*$CryostatWidth" y="0.5*($RockThickness-500+$CryostatHeight)+500" z="0.5*$CavernLength-$TotalPadding"/>
372 <setup name="Default" version="1.0">
373 <world ref="volWorld" />
381 #generates necessary gd/xml header
385 $DUNE = ">" . $outfile;
386 open(DUNE) or die("Could not open file $DUNE for writing");
388 <?xml version="1.0" encoding="UTF-8" ?>
389 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML"
390 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
391 xsi:noNamespaceSchemaLocation="GDMLSchema/gdml.xsd">
399 $DUNE = ">>" . $outfile;
400 open(DUNE) or die("Could not open file $DUNE for writing");
403 <element name="videRef" formula="VACUUM" Z="1"> <atom value="1"/> </element>
404 <element name="bromine" formula="Br" Z="35"> <atom value="79.904"/> </element>
405 <element name="hydrogen" formula="H" Z="1"> <atom value="1.0079"/> </element>
406 <element name="nitrogen" formula="N" Z="7"> <atom value="14.0067"/> </element>
407 <element name="oxygen" formula="O" Z="8"> <atom value="15.999"/> </element>
408 <element name="aluminum" formula="Al" Z="13"> <atom value="26.9815"/> </element>
409 <element name="silicon" formula="Si" Z="14"> <atom value="28.0855"/> </element>
410 <element name="carbon" formula="C" Z="6"> <atom value="12.0107"/> </element>
411 <element name="potassium" formula="K" Z="19"> <atom value="39.0983"/> </element>
412 <element name="chromium" formula="Cr" Z="24"> <atom value="51.9961"/> </element>
413 <element name="iron" formula="Fe" Z="26"> <atom value="55.8450"/> </element>
414 <element name="nickel" formula="Ni" Z="28"> <atom value="58.6934"/> </element>
415 <element name="calcium" formula="Ca" Z="20"> <atom value="40.078"/> </element>
416 <element name="magnesium" formula="Mg" Z="12"> <atom value="24.305"/> </element>
417 <element name="sodium" formula="Na" Z="11"> <atom value="22.99"/> </element>
418 <element name="titanium" formula="Ti" Z="22"> <atom value="47.867"/> </element>
419 <element name="argon" formula="Ar" Z="18"> <atom value="39.9480"/> </element>
420 <element name="sulphur" formula="S" Z="16"> <atom value="32.065"/> </element>
421 <element name="phosphorus" formula="P" Z="15"> <atom value="30.973"/> </element>
423 <material name="Vacuum" formula="Vacuum">
424 <D value="1.e-25" unit="g/cm3"/>
425 <fraction n="1.0" ref="videRef"/>
428 <material name="ALUMINUM_Al" formula="ALUMINUM_Al">
429 <D value="2.6990" unit="g/cm3"/>
430 <fraction n="1.0000" ref="aluminum"/>
433 <material name="SILICON_Si" formula="SILICON_Si">
434 <D value="2.3300" unit="g/cm3"/>
435 <fraction n="1.0000" ref="silicon"/>
438 <material name="epoxy_resin" formula="C38H40O6Br4">
439 <D value="1.1250" unit="g/cm3"/>
440 <composite n="38" ref="carbon"/>
441 <composite n="40" ref="hydrogen"/>
442 <composite n="6" ref="oxygen"/>
443 <composite n="4" ref="bromine"/>
446 <material name="SiO2" formula="SiO2">
447 <D value="2.2" unit="g/cm3"/>
448 <composite n="1" ref="silicon"/>
449 <composite n="2" ref="oxygen"/>
452 <material name="Al2O3" formula="Al2O3">
453 <D value="3.97" unit="g/cm3"/>
454 <composite n="2" ref="aluminum"/>
455 <composite n="3" ref="oxygen"/>
458 <material name="Fe2O3" formula="Fe2O3">
459 <D value="5.24" unit="g/cm3"/>
460 <composite n="2" ref="iron"/>
461 <composite n="3" ref="oxygen"/>
464 <material name="CaO" formula="CaO">
465 <D value="3.35" unit="g/cm3"/>
466 <composite n="1" ref="calcium"/>
467 <composite n="1" ref="oxygen"/>
470 <material name="MgO" formula="MgO">
471 <D value="3.58" unit="g/cm3"/>
472 <composite n="1" ref="magnesium"/>
473 <composite n="1" ref="oxygen"/>
476 <material name="Na2O" formula="Na2O">
477 <D value="2.27" unit="g/cm3"/>
478 <composite n="2" ref="sodium"/>
479 <composite n="1" ref="oxygen"/>
482 <material name="TiO2" formula="TiO2">
483 <D value="4.23" unit="g/cm3"/>
484 <composite n="1" ref="titanium"/>
485 <composite n="2" ref="oxygen"/>
488 <material name="FeO" formula="FeO">
489 <D value="5.745" unit="g/cm3"/>
490 <composite n="1" ref="iron"/>
491 <composite n="1" ref="oxygen"/>
494 <material name="CO2" formula="CO2">
495 <D value="1.562" unit="g/cm3"/>
496 <composite n="1" ref="iron"/>
497 <composite n="2" ref="oxygen"/>
500 <material name="P2O5" formula="P2O5">
501 <D value="1.562" unit="g/cm3"/>
502 <composite n="2" ref="phosphorus"/>
503 <composite n="5" ref="oxygen"/>
506 <material formula=" " name="DUSEL_Rock">
507 <D value="2.82" unit="g/cm3"/>
508 <fraction n="0.5267" ref="SiO2"/>
509 <fraction n="0.1174" ref="FeO"/>
510 <fraction n="0.1025" ref="Al2O3"/>
511 <fraction n="0.0473" ref="MgO"/>
512 <fraction n="0.0422" ref="CO2"/>
513 <fraction n="0.0382" ref="CaO"/>
514 <fraction n="0.0240" ref="carbon"/>
515 <fraction n="0.0186" ref="sulphur"/>
516 <fraction n="0.0053" ref="Na2O"/>
517 <fraction n="0.00070" ref="P2O5"/>
518 <fraction n="0.0771" ref="oxygen"/>
521 <material name="fibrous_glass">
522 <D value="2.74351" unit="g/cm3"/>
523 <fraction n="0.600" ref="SiO2"/>
524 <fraction n="0.118" ref="Al2O3"/>
525 <fraction n="0.001" ref="Fe2O3"/>
526 <fraction n="0.224" ref="CaO"/>
527 <fraction n="0.034" ref="MgO"/>
528 <fraction n="0.010" ref="Na2O"/>
529 <fraction n="0.013" ref="TiO2"/>
532 <material name="FR4">
533 <D value="1.98281" unit="g/cm3"/>
534 <fraction n="0.47" ref="epoxy_resin"/>
535 <fraction n="0.53" ref="fibrous_glass"/>
538 <material name="STEEL_STAINLESS_Fe7Cr2Ni" formula="STEEL_STAINLESS_Fe7Cr2Ni">
539 <D value="7.9300" unit="g/cm3"/>
540 <fraction n="0.0010" ref="carbon"/>
541 <fraction n="0.1792" ref="chromium"/>
542 <fraction n="0.7298" ref="iron"/>
543 <fraction n="0.0900" ref="nickel"/>
546 <material name="LAr" formula="LAr">
547 <D value="1.40" unit="g/cm3"/>
548 <fraction n="1.0000" ref="argon"/>
551 <material formula=" " name="Air">
552 <D value="0.001205" unit="g/cm3"/>
553 <fraction n="0.781154" ref="nitrogen"/>
554 <fraction n="0.209476" ref="oxygen"/>
555 <fraction n="0.00934" ref="argon"/>
558 <material formula=" " name="G10">
559 <D value="1.7" unit="g/cm3"/>
560 <fraction n="0.2805" ref="silicon"/>
561 <fraction n="0.3954" ref="oxygen"/>
562 <fraction n="0.2990" ref="carbon"/>
563 <fraction n="0.0251" ref="hydrogen"/>
566 <material formula=" " name="Granite">
567 <D value="2.7" unit="g/cm3"/>
568 <fraction n="0.438" ref="oxygen"/>
569 <fraction n="0.257" ref="silicon"/>
570 <fraction n="0.222" ref="sodium"/>
571 <fraction n="0.049" ref="aluminum"/>
572 <fraction n="0.019" ref="iron"/>
573 <fraction n="0.015" ref="potassium"/>
576 <material formula=" " name="ShotRock">
577 <D value="2.7*0.6" unit="g/cm3"/>
578 <fraction n="0.438" ref="oxygen"/>
579 <fraction n="0.257" ref="silicon"/>
580 <fraction n="0.222" ref="sodium"/>
581 <fraction n="0.049" ref="aluminum"/>
582 <fraction n="0.019" ref="iron"/>
583 <fraction n="0.015" ref="potassium"/>
586 <material formula=" " name="Dirt">
587 <D value="1.7" unit="g/cm3"/>
588 <fraction n="0.438" ref="oxygen"/>
589 <fraction n="0.257" ref="silicon"/>
590 <fraction n="0.222" ref="sodium"/>
591 <fraction n="0.049" ref="aluminum"/>
592 <fraction n="0.019" ref="iron"/>
593 <fraction n="0.015" ref="potassium"/>
596 <material formula=" " name="Concrete">
597 <D value="2.3" unit="g/cm3"/>
598 <fraction n="0.530" ref="oxygen"/>
599 <fraction n="0.335" ref="silicon"/>
600 <fraction n="0.060" ref="calcium"/>
601 <fraction n="0.015" ref="sodium"/>
602 <fraction n="0.020" ref="iron"/>
603 <fraction n="0.040" ref="aluminum"/>
606 <material formula="H2O" name="Water">
607 <D value="1.0" unit="g/cm3"/>
608 <fraction n="0.1119" ref="hydrogen"/>
609 <fraction n="0.8881" ref="oxygen"/>
612 <material formula="Ti" name="Titanium">
613 <D value="4.506" unit="g/cm3"/>
614 <fraction n="1." ref="titanium"/>
617 <material name="TPB" formula="TPB">
618 <D value="1.40" unit="g/cm3"/>
619 <fraction n="1.0000" ref="argon"/>
622 <material name="Glass">
623 <D value="2.74351" unit="g/cm3"/>
624 <fraction n="0.600" ref="SiO2"/>
625 <fraction n="0.118" ref="Al2O3"/>
626 <fraction n="0.001" ref="Fe2O3"/>
627 <fraction n="0.224" ref="CaO"/>
628 <fraction n="0.034" ref="MgO"/>
629 <fraction n="0.010" ref="Na2O"/>
630 <fraction n="0.013" ref="TiO2"/>
633 <material name="Acrylic">
634 <D value="1.19" unit="g/cm3"/>
635 <fraction n="0.600" ref="carbon"/>
636 <fraction n="0.320" ref="oxygen"/>
637 <fraction n="0.080" ref="hydrogen"/>