4 # Each subroutine generates a fragment GDML file, and the last subroutine
5 # creates an XML file that make_gdml.pl will use to appropriately arrange
6 # the fragment GDML files to create the final desired ICARUS GDML file,
7 # to be named by make_gdml output command
9 # If you are playing with different geometries, you can use the
10 # suffix command to help organize your work.
15 Math::BigFloat->precision(-16);
16 #Math::BigFloat->accuracy(16);
19 "suffix|s:s" => \$suffix,
20 "output|o:s" => \$output,
21 "concrete|c:s" => \$thickness_over,
22 "wires|w:s" => \$wires,
23 "vetocrt|v:s" => \$crt);
27 # If the user requested help, print the usage notes and exit.
34 # The user didn't supply a suffix, so append nothing to the file
40 # Otherwise, stick a "-" before the suffix, so that a suffix of
41 # "test" applied to filename.gdml becomes "filename-test.gdml".
42 $suffix =
"-" . $suffix;
45 #++++++++++++++++++++++++ Begin defining variables +++++++++++++++++++++++++
47 # set wires on to be the default, unless given an input by the user: 1=on, 0=off
57 #set crt on or off: 1=on, 0=off
63 else { $crt_on = 1;} # 1=on, 0=off
65 #set thickness of the concrete overburden. Remmeber: the dafaul value is 300 cm and 0 means no everburden
68 $concrete_on = $thickness_over;
71 else { $concrete_on = 300;}
74 #-------Definitions of all variables: unit= cm
78 ##################################################################
79 ##################### wire plane parameters ######################
85 #respect to the z axes
98 #$UWireCornerInt_y = $UWirePitch * $CosUAngle;
99 #$UWireCornerInt_z = $UWirePitch * $SinUAngle;
103 #$VWireCornerInt_y = $VWirePitch * $CosVAngle;
104 #$VWireCornerInt_z = $VWirePitch * $SinVAngle;
113 #print("CommonWireLength: $CommonWireLength \n");
115 ###########################################################################
116 ########################### spacing parameters ############################
123 #Cryostat space with LAr outside of entire fiducial volume
126 #$SpaceTPCToFloor = 37; # from the article
127 #$SpaceTPCToTopLAr = 30.5;
130 #$UpstreamLArPadding = 82.50; # from the article
131 #$DownstreamLArPadding = 82.50; # from the article
135 ##########################################################
136 ######## Other Cathode relevant parameters ###############
140 $CPA_z = 1800; #Cathode length.
142 $CPAStrip_y = 2.1; #Cathode
strip height.
143 $CPAStrip_pitch = 5; #Cathode
strip pitch.
145 ##############################################################
146 ############## Cryo and TPC relevant dimensions #############
151 #$TPCActive_z = 1795.5;
153 #print("TPCActive_x: $TPCActive_x, TPCActive_y: $TPCActive_y, TPCActive_z: $TPCActive_z ");
155 #Reset the active length and the common wire length
159 #print(" - change with wire pitch: $UWire_zpitch to $TPCActive_z \n");
161 # TPCWirePlane dimensions
167 #print("TPCWirePlane_x: $TPCWirePlane_x, TPCWirePlane_y: $TPCWirePlane_y, TPCWirePlane_z: $TPCWirePlane_z \n");
169 ##################################################################
170 #Dimension of the TPC (active+passive volume)
177 #print(" ******** DELTA CORENR ***** \n");
178 #print(" $DeltaLUCorner $DeltaLVCorner \n");
190 #$TPC_y = 388.0; #From official drawings
191 #$TPC_z = 1969.9; #From official drawings
201 #$Cryostat_y = $LAr_y + 2*$AlumThickness + $GaseousAr_y ;
202 #$Cryostat_z = $LAr_z + 2*$AlumThickness ;
203 #$Cryostat_y = $TPC_y + 2*$AlumThickness ;
207 #$LAr_x_orig = 4*($TPC_x) + 2*($CPA_x + $SpaceWirePlToWall) + $SpaceWirePlToWirePl;
215 #$TPCinCryo_x[1] = - $LAr_x/2 + $SpaceWirePlToWall + 1.5*($TPC_x) + $CPA_x ;
216 #$TPCinCryo_x[2] = $LAr_x/2 - $SpaceWirePlToWall - 1.5*($TPC_x) - $CPA_x ;
221 #$posRightCat_x = - $Cryostat_x/2 + 1.0*($TPC_x) + $SpaceWirePlToWall + $CPA_x/2 ;
222 #$posLeftCat_x = $Cryostat_x/2 - 1.0*($TPC_x) - $SpaceWirePlToWall - $CPA_x/2 ;
224 #$TPCinCryo_y = - $Cryostat_y/2 + $TPC_y/2 + $SpaceTPCToFloor;
225 #$TPCinCryo_z = - $Cryostat_z/2 + $TPC_z/2 + $UpstreamLArPadding;
229 #$TPCinCryo_zneg = (-$TPCHalf_z/2 + $UpstreamLArPadding/2);
230 #$TPCinCryo_zpos = ( $TPCHalf_z/2 - $UpstreamLArPadding/2);
236 #$posTPCActive1_x = -0.570000000000007;
240 ##################################################################
241 #am ########## Steel Mechanical Structure Parameters ############
242 ##################################################################
252 ##################################################################
253 ############## PMTs relevant parameters #########################
262 #$PMTtube_x = 10.3; #length of the glass tube
266 #$PMTxCut = ($PMTx*$PMTx - $PMTtubeRmax*$PMTtubeRmax)^0.5;
268 #$PMTPlane_y = $TPCActive_y ;
270 #$PMTPlane_z = $TPCActive_z ;
274 ##################################################################
275 ######################### CRT parameters ########################
277 #defined in seperate python script "gen_crt_frags.py"
278 #N.B. warm vessel origin, size currently hardcoded - changes
279 # in these values here need to be copied over (will fix eventually..)
281 ##################################################################
282 ############## DetEnc and World relevant parameters #############
284 #Foam thickness and Warm vessel thickness
293 #Thermal insulation surrounding the two cryostats
298 #$InDetEncl_y = -154.995; #0; #-$WarmVessel_y/6; #-($WarmVessel_y + $CRT_tot_y)/6; original value
299 #$InDetEncl_y = -154.995; #0; #-$WarmVessel_y/6; #-($WarmVessel_y + $CRT_tot_y)/6; +15cm
302 #$ThermInsInDetEncl_y = $InDetEncl_y;
305 #Warm Vessel surrounding the thermal insulation
306 #$WarmVessel_x = $ThermIns_x+2*$WarmVesselThickness;
312 #$WarmVesselInDetEncl_y = $InDetEncl_y;
315 #$MoreDetEnc_y = 60.0; # More space in height to cope with few extrusions
316 #Big detector Enclosure to contain detector + CRT.
317 #$DetEnc_x = 1235.96;#$WarmVessel_x + $CRT_tot_x;
318 #$DetEnc_y = 963.37 + $MoreDetEnc_y;#$WarmVessel_y + $CRT_tot_y;
319 #$DetEnc_z = 2709.56;#$WarmVessel_z + $CRT_tot_z;
322 #Cryostat respect to the warm vessel
325 #$CryoInWarmVessel_y = -$WarmVessel_y/2 + $ConcretePadding + $Cryostat_y/2; #in original way
326 #$CryoInWarmVessel_y = -$WarmVessel_y/2 + $FoamPadding + $WarmVesselThickness + $Cryostat_y/2 -154.995; #(-$WarmVessel_y/2 + $TotalPadding + $Cryostat_y/2)- ($WarmVessel_y)/6 ;
329 #Original Origin point found in the Larsoft perl script
330 # We want the world origin to be at the very front of the fiducial volume.
331 # move it to the front of the enclosure, then back it up through the concrete/foam,
332 # then through the Cryostat shell, then through the upstream dead LAr (including the
333 # dead LAr on the edge of the TPC, but this is covered in $UpstreamLArPadding).
334 # This is to be added to the z position of every volume in volWorld
336 #$OriginZSet = $WarmVessel_z/2 - $TotalPadding - $SteelThickness - $UpstreamLArPadding;
337 #$OriginYSet = $DetEnWarmVessel_y/2 - $TotalPadding - $SteelThickness - $SpaceTPCToFloor - $TPC_y/2;
338 ##$OriginXSet = $LAr_x_orig/2 - $SpaceWirePlToWall - 3*$WirePlaneSpacing - $TPCWirePlane_x;
339 #$OriginXSet = $WarmVessel_x/2- $TotalPadding - $SteelThickness;
341 #Marta: I would like that the origin is in the middle of the two cryostats. It corresponds to the world center. It do not correspond to the experimental hall centre.
358 #True overburden dimensions
359 #$Overburden_x = 1830;
360 #$Overburden_y = $concrete_on;
361 #$Overburden_z = 2930;
363 #Overburden dimensions to include also the floor
371 #$posOverburden_y = $WarmVessel_y/2 + $Overburden_yDefault/2 + (820 - $WarmVessel_y/2) ; #warm vessel_y + overburden_y + distance between overburden and warm vessel 820 (taken from the drawings)
374 #DetectorEnclosure (centered between expHall walls, between expHall floor and bottom of overburden)
383 #$DetEncl_yOffset = $ExpHall_VertSpace/2 - $WarmVessel_CenterToFloor;
384 #$ThermInsInDetEncl_y = -1*$DetEncl_yOffset;
385 #$WarmVesselInDetEncl_y = $ThermInsInDetEncl_y;
395 #$Ground_y = -$World_y/4+$ExpHall_y/2-$Overburden_y/6 + 0.5*($World_y/2 + $ExpHall_y - $Overburden_y/3);
396 #$Ground_y = $ExpHall_y - $Overburden_y/3 ;
402 #$CryoInWarmVessel_y = $WarmVesselInDetEncl_y -$WarmVessel_y/2 + $FoamPadding + $WarmVesselThickness + $Cryostat_y/2 + $GaseousAr_y/2;
403 #+++++++++++++++++++++++++ End defining variables ++++++++++++++++++++++++++
405 # run the sub routines that generate the fragments
407 gen_Define(); # generates definitions at beginning of GDML
413 # This is the bulk of the code, and has zero wires option
421 # half rotated 180 about Y
422 if ($crt_on==1) {
gen_CRT();} # places CRT: CERN modules
top, eves; MINOS modules sides, DC
bottom
429 # which zips together the final GDML
432 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
433 #+++++++++++++++++++++++++++++++++++++++++ usage +++++++++++++++++++++++++++++++++++++++++
434 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
438 print "Usage: $0 [-h|--help] [-o|--output <fragments-file>] [-s|--suffix <string>]";
439 print " [-c|--concrete <double>] [-w|--wires <wire or no wire geometry>] [-v <crt or no crt geometry>] \n";
440 print " if -o is omitted, output goes to STDOUT; <fragments-file.xml> is input to make_gdml.pl\n";
441 print " -s <string> appends the string to the file names; useful for multiple detector versions\n";
442 print " -c <double> set the thickness in cm of the concrete overburden\n";
443 print " (default is 300 and 0 means no overburden)\n";
444 print " -w <1> geometry with wires, <0> geometry with no wires\n";
445 print " -v <1> geometry with CRT, <0> geometry with no CRT \n";
446 print " -h prints this message, then quits\n";
447 print "Remind: the file without wires has to be <filename_nowires.gdml> \n";
450 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
451 #++++++++++++++++++++++++++++++++++++++ gen_Define +++++++++++++++++++++++++++++++++++++++
452 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
457 # Create the <define> fragment file name,
458 # add file to list of fragments,
460 $DEF =
"icarus_Def" . $suffix .
".gdml";
463 open(DEF) or die(
"Could not open file $DEF for writing");
473 <position
name=
"PMTtube" unit=
"cm" x=
"0" y=
"0" z=
"@{[1.5*$PMTtube_x]}"/>
474 <position name=
"posActiveInTPC0" unit=
"cm" x=
"$posTPCActive0_x" y=
"$posTPCActive_y" z=
"$posTPCActive_z"/>
475 <position name=
"posTPC00inCryo" unit=
"cm" x=
"$TPCinCryo_x[0]" y=
"$TPCinCryo_y" z=
"$TPCinCryo_zneg" />
476 <position name=
"posTPC01inCryo" unit=
"cm" x=
"$TPCinCryo_x[0]" y=
"$TPCinCryo_y" z=
"$TPCinCryo_zpos" />
477 <position name=
"posTPC10inCryo" unit=
"cm" x=
"$TPCinCryo_x[1]" y=
"$TPCinCryo_y" z=
"$TPCinCryo_zneg" />
478 <position name=
"posTPC11inCryo" unit=
"cm" x=
"$TPCinCryo_x[1]" y=
"$TPCinCryo_y" z=
"$TPCinCryo_zpos" />
479 <position name=
"posCathode" unit=
"cm" x=
"$posCat_x" y=
"$TPCinCryo_y" z=
"$TPCinCryo_z" />
480 <position name=
"posCryo1InWarmVessel" unit=
"cm" x=
"$Cryo1InWarmVessel_x" y=
"$CryoInWarmVessel_y" z=
"$CryoInWarmVessel_z" />
481 <position name=
"posCryo2InWarmVessel" unit=
"cm" x=
"$Cryo2InWarmVessel_x" y=
"$CryoInWarmVessel_y" z=
"$CryoInWarmVessel_z" />
482 <position name=
"posDetEncInWorld" unit=
"cm" x=
"$OriginXSet" y=
"$DetEncl_yOffset" z=
"$OriginZSet"/>
483 <position name=
"posCenter" unit=
"cm" x=
"0" y=
"0" z=
"0"/>
484 <position name=
"posThermInsInDetEncl" unit=
"cm" x=
"$ThermInsInDetEncl_x" y=
"$ThermInsInDetEncl_y" z=
"$ThermInsInDetEncl_z"/>
485 <position name=
"posWarmVesselInDetEncl" unit=
"cm" x=
"$WarmVesselInDetEncl_x" y=
"$WarmVesselInDetEncl_y" z=
"$WarmVesselInDetEncl_z"/>
486 <position name=
"posCRTShellInDetEncl" unit=
"cm" x=
"0" y=
"$CRTSHELL_WV_OFFSET_Y" z=
"$CRTSHELL_WV_OFFSET_Z"/>
487 <position name=
"posBuildingInWorld" unit=
"cm" x=
"0" y=
"@{[$Ground_y + $Building_y/2]}" z=
"0"/>
488 <position name=
"posExpHallInWorld" unit=
"cm" x=
"0" y=
"@{[$Ground_y - $ExpHall_y/2 ]}" z=
"0"/>
489 <rotation name=
"rPlus90AboutZPlus90AboutY" unit=
"deg" x=
"0" y=
"90" z=
"90"/>
490 <rotation name=
"rPlus90AboutX" unit=
"deg" x=
"90" y=
"0" z=
"0"/>
491 <rotation name=
"rMinus90AboutX" unit=
"deg" x=
"-90" y=
"0" z=
"0"/>
492 <rotation name=
"rPlus90AboutY" unit=
"deg" x=
"0" y=
"90" z=
"0"/>
493 <rotation name=
"rPlus90AboutZ" unit=
"deg" x=
"0" y=
"0" z=
"90"/>
494 <rotation name=
"rMinus90AboutZ" unit=
"deg" x=
"0" y=
"0" z=
"-90"/>
495 <rotation name=
"rMinus90AboutY" unit=
"deg" x=
"0" y=
"270" z=
"0"/>
496 <rotation name=
"rMinus90AboutYMinus90AboutX" unit=
"deg" x=
"270" y=
"270" z=
"0"/>
497 <rotation name=
"rPlus90VAngleAboutX" unit=
"deg" x=
"@{[90-$VAngle]}" y=
"0" z=
"0"/>
498 <rotation name=
"rPlus90UAngleAboutX" unit=
"deg" x=
"@{[90+$UAngle]}" y=
"0" z=
"0"/>
499 <rotation name=
"rPlus180AboutX" unit=
"deg" x=
"180" y=
"0" z=
"0"/>
500 <rotation name=
"rPlus180AboutY" unit=
"deg" x=
"0" y=
"180" z=
"0"/>
501 <rotation name=
"rPlus180AboutZ" unit=
"deg" x=
"0" y=
"0" z=
"180"/>
502 <rotation name=
"rPlus180AboutXZ" unit=
"deg" x=
"180" y=
"0" z=
"180"/>
503 <rotation name=
"rIdentity" unit=
"deg" x=
"0" y=
"0" z=
"0"/>
504 <rotation name=
"rPlusUAngleAboutX" unit=
"deg" x=
"$UAngle" y=
"0" z=
"0"/>
505 <rotation name=
"rMinusVAngleAboutX" unit=
"deg" x=
"300" y=
"0" z=
"0"/>
513 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
514 #+++++++++++++++++++++++++++++++++++++ gen_Materials +++++++++++++++++++++++++++++++++++++
515 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
520 # Create the <materials> fragment file name,
521 # add file to list of output GDML fragments,
523 $MAT =
"icarus_Materials" . $suffix .
".gdml";
526 open(MAT) or die(
"Could not open file $MAT for writing");
532 <
element name=
"bromine" formula=
"Br" Z=
"35"> <atom value=
"79.904"/> </
element>
533 <
element name=
"hydrogen" formula=
"H" Z=
"1"> <atom value=
"1.0079"/> </
element>
534 <
element name=
"nitrogen" formula=
"N" Z=
"7"> <atom value=
"14.0067"/> </
element>
535 <
element name=
"oxygen" formula=
"O" Z=
"8"> <atom value=
"15.999"/> </
element>
536 <
element name=
"aluminum" formula=
"Al" Z=
"13"> <atom value=
"26.9815"/> </
element>
537 <
element name=
"silicon" formula=
"Si" Z=
"14"> <atom value=
"28.0855"/> </
element>
538 <
element name=
"carbon" formula=
"C" Z=
"6"> <atom value=
"12.0107"/> </
element>
539 <
element name=
"potassium" formula=
"K" Z=
"19"> <atom value=
"39.0983"/> </
element>
540 <
element name=
"chromium" formula=
"Cr" Z=
"24"> <atom value=
"51.9961"/> </
element>
541 <
element name=
"iron" formula=
"Fe" Z=
"26"> <atom value=
"55.8450"/> </
element>
542 <
element name=
"nickel" formula=
"Ni" Z=
"28"> <atom value=
"58.6934"/> </
element>
543 <
element name=
"calcium" formula=
"Ca" Z=
"20"> <atom value=
"40.078"/> </
element>
544 <
element name=
"magnesium" formula=
"Mg" Z=
"12"> <atom value=
"24.305"/> </
element>
545 <
element name=
"sodium" formula=
"Na" Z=
"11"> <atom value=
"22.99"/> </
element>
546 <
element name=
"titanium" formula=
"Ti" Z=
"22"> <atom value=
"47.867"/> </
element>
547 <
element name=
"argon" formula=
"Ar" Z=
"18"> <atom value=
"39.9480"/> </
element>
548 <
element name=
"sulphur" formula=
"S" Z=
"16"> <atom value=
"32.065"/> </
element>
549 <
element name=
"phosphorus" formula=
"P" Z=
"15"> <atom value=
"30.973"/> </
element>
550 <
element name=
"copper" formula=
"Cu" Z=
"29"> <atom value=
"63.5463"/> </
element>
551 <
element name=
"manganese" formula=
"Mn" Z=
"25"> <atom value=
"54.938043"/> </
element>
552 <
element name=
"vanadium" formula=
"V" Z=
"23"> <atom value=
"50.94151"/> </
element>
554 <material name=
"Vacuum" formula=
"Vacuum">
555 <D value=
"1.e-25" unit=
"g/cm3"/>
556 <fraction
n=
"1.0" ref=
"videRef"/>
559 <material name=
"ALUMINUM_Al" formula=
"ALUMINUM_Al">
560 <D value=
"2.6990" unit=
"g/cm3"/>
561 <fraction n=
"1.0000" ref=
"aluminum"/>
564 <material name=
"ALUMINUM_CRYO" formula=
"ALUMINUM_CRYO">
565 <D value=
"0.5991" unit=
"g/cm3"/>
566 <fraction n=
"1.0000" ref=
"aluminum"/>
569 <material name=
"SILICON_Si" formula=
"SILICON_Si">
570 <D value=
"2.3300" unit=
"g/cm3"/>
571 <fraction n=
"1.0000" ref=
"silicon"/>
574 <material name=
"epoxy_resin" formula=
"C38H40O6Br4">
575 <D value=
"1.1250" unit=
"g/cm3"/>
576 <composite n=
"38" ref=
"carbon"/>
577 <composite n=
"40" ref=
"hydrogen"/>
578 <composite n=
"6" ref=
"oxygen"/>
579 <composite n=
"4" ref=
"bromine"/>
582 <material name=
"SiO2" formula=
"SiO2">
583 <D value=
"2.2" unit=
"g/cm3"/>
584 <composite n=
"1" ref=
"silicon"/>
585 <composite n=
"2" ref=
"oxygen"/>
588 <material name=
"Al2O3" formula=
"Al2O3">
589 <D value=
"3.97" unit=
"g/cm3"/>
590 <composite n=
"2" ref=
"aluminum"/>
591 <composite n=
"3" ref=
"oxygen"/>
594 <material name=
"Fe2O3" formula=
"Fe2O3">
595 <D value=
"5.24" unit=
"g/cm3"/>
596 <composite n=
"2" ref=
"iron"/>
597 <composite n=
"3" ref=
"oxygen"/>
600 <material name=
"CaO" formula=
"CaO">
601 <D value=
"3.35" unit=
"g/cm3"/>
602 <composite n=
"1" ref=
"calcium"/>
603 <composite n=
"1" ref=
"oxygen"/>
606 <material name=
"MgO" formula=
"MgO">
607 <D value=
"3.58" unit=
"g/cm3"/>
608 <composite n=
"1" ref=
"magnesium"/>
609 <composite n=
"1" ref=
"oxygen"/>
612 <material name=
"Na2O" formula=
"Na2O">
613 <D value=
"2.27" unit=
"g/cm3"/>
614 <composite n=
"2" ref=
"sodium"/>
615 <composite n=
"1" ref=
"oxygen"/>
618 <material name=
"TiO2" formula=
"TiO2">
619 <D value=
"4.23" unit=
"g/cm3"/>
620 <composite n=
"1" ref=
"titanium"/>
621 <composite n=
"2" ref=
"oxygen"/>
624 <material name=
"FeO" formula=
"FeO">
625 <D value=
"5.745" unit=
"g/cm3"/>
626 <composite n=
"1" ref=
"iron"/>
627 <composite n=
"1" ref=
"oxygen"/>
630 <material name=
"CO2" formula=
"CO2">
631 <D value=
"1.562" unit=
"g/cm3"/>
632 <composite n=
"1" ref=
"iron"/>
633 <composite n=
"2" ref=
"oxygen"/>
636 <material name=
"P2O5" formula=
"P2O5">
637 <D value=
"1.562" unit=
"g/cm3"/>
638 <composite n=
"2" ref=
"phosphorus"/>
639 <composite n=
"5" ref=
"oxygen"/>
642 <material formula=
" " name=
"DUSEL_Rock">
643 <D value=
"2.82" unit=
"g/cm3"/>
644 <fraction n=
"0.5267" ref=
"SiO2"/>
645 <fraction n=
"0.1174" ref=
"FeO"/>
646 <fraction n=
"0.1025" ref=
"Al2O3"/>
647 <fraction n=
"0.0473" ref=
"MgO"/>
648 <fraction n=
"0.0422" ref=
"CO2"/>
649 <fraction n=
"0.0382" ref=
"CaO"/>
650 <fraction n=
"0.0240" ref=
"carbon"/>
651 <fraction n=
"0.0186" ref=
"sulphur"/>
652 <fraction n=
"0.0053" ref=
"Na2O"/>
653 <fraction n=
"0.00070" ref=
"P2O5"/>
654 <fraction n=
"0.0771" ref=
"oxygen"/>
657 <material name=
"fibrous_glass">
658 <D value=
"2.74351" unit=
"g/cm3"/>
659 <fraction n=
"0.600" ref=
"SiO2"/>
660 <fraction n=
"0.118" ref=
"Al2O3"/>
661 <fraction n=
"0.001" ref=
"Fe2O3"/>
662 <fraction n=
"0.224" ref=
"CaO"/>
663 <fraction n=
"0.034" ref=
"MgO"/>
664 <fraction n=
"0.010" ref=
"Na2O"/>
665 <fraction n=
"0.013" ref=
"TiO2"/>
668 <material name=
"FR4">
669 <D value=
"1.98281" unit=
"g/cm3"/>
670 <fraction n=
"0.47" ref=
"epoxy_resin"/>
671 <fraction n=
"0.53" ref=
"fibrous_glass"/>
674 <material name=
"STEEL_STAINLESS_Fe7Cr2Ni" formula=
"STEEL_STAINLESS_Fe7Cr2Ni">
675 <D value=
"7.9300" unit=
"g/cm3"/>
676 <fraction n=
"0.0010" ref=
"carbon"/>
677 <fraction n=
"0.1792" ref=
"chromium"/>
678 <fraction n=
"0.7298" ref=
"iron"/>
679 <fraction n=
"0.0900" ref=
"nickel"/>
682 <material name=
"STEEL_STAINLESS_Fe7Cr2Ni_WV" formula=
"STEEL_STAINLESS_Fe7Cr2Ni_WV">
683 <!-- <D value=
"0.3844" unit=
"g/cm3"/> -->
684 <D value=
"0.38897" unit=
"g/cm3"/>
685 <fraction n=
"0.0010" ref=
"carbon"/>
686 <fraction n=
"0.1792" ref=
"chromium"/>
687 <fraction n=
"0.7298" ref=
"iron"/>
688 <fraction n=
"0.0900" ref=
"nickel"/>
691 <material name=
"LAr" formula=
"LAr">
692 <D value=
"1.40" unit=
"g/cm3"/>
693 <fraction n=
"1.0000" ref=
"argon"/>
696 <material name=
"ArGas" formula=
"ArGas">
697 <D value=
"0.00166" unit=
"g/cm3"/>
698 <fraction n=
"1.0" ref=
"argon"/>
701 <material formula=
" " name=
"Air">
702 <D value=
"0.001205" unit=
"g/cm3"/>
703 <fraction n=
"0.781154" ref=
"nitrogen"/>
704 <fraction n=
"0.209476" ref=
"oxygen"/>
705 <fraction n=
"0.00934" ref=
"argon"/>
708 <material formula=
" " name=
"G10">
709 <D value=
"1.7" unit=
"g/cm3"/>
710 <fraction n=
"0.2805" ref=
"silicon"/>
711 <fraction n=
"0.3954" ref=
"oxygen"/>
712 <fraction n=
"0.2990" ref=
"carbon"/>
713 <fraction n=
"0.0251" ref=
"hydrogen"/>
716 <material formula=
" " name=
"Granite">
717 <D value=
"2.7" unit=
"g/cm3"/>
718 <fraction n=
"0.438" ref=
"oxygen"/>
719 <fraction n=
"0.257" ref=
"silicon"/>
720 <fraction n=
"0.222" ref=
"sodium"/>
721 <fraction n=
"0.049" ref=
"aluminum"/>
722 <fraction n=
"0.019" ref=
"iron"/>
723 <fraction n=
"0.015" ref=
"potassium"/>
726 <material formula=
" " name=
"ShotRock">
727 <D value=
"@{[2.7*0.6]}" unit=
"g/cm3"/>
728 <fraction n=
"0.438" ref=
"oxygen"/>
729 <fraction n=
"0.257" ref=
"silicon"/>
730 <fraction n=
"0.222" ref=
"sodium"/>
731 <fraction n=
"0.049" ref=
"aluminum"/>
732 <fraction n=
"0.019" ref=
"iron"/>
733 <fraction n=
"0.015" ref=
"potassium"/>
736 <material formula=
" " name=
"Dirt">
737 <D value=
"1.7" unit=
"g/cm3"/>
738 <fraction n=
"0.438" ref=
"oxygen"/>
739 <fraction n=
"0.257" ref=
"silicon"/>
740 <fraction n=
"0.222" ref=
"sodium"/>
741 <fraction n=
"0.049" ref=
"aluminum"/>
742 <fraction n=
"0.019" ref=
"iron"/>
743 <fraction n=
"0.015" ref=
"potassium"/>
746 <material formula=
" " name=
"Concrete">
747 <D value=
"2.3" unit=
"g/cm3"/>
748 <fraction n=
"0.530" ref=
"oxygen"/>
749 <fraction n=
"0.335" ref=
"silicon"/>
750 <fraction n=
"0.060" ref=
"calcium"/>
751 <fraction n=
"0.015" ref=
"sodium"/>
752 <fraction n=
"0.020" ref=
"iron"/>
753 <fraction n=
"0.040" ref=
"aluminum"/>
756 <material formula=
"H2O" name=
"Water">
757 <D value=
"1.0" unit=
"g/cm3"/>
758 <fraction n=
"0.1119" ref=
"hydrogen"/>
759 <fraction n=
"0.8881" ref=
"oxygen"/>
762 <material formula=
"Ti" name=
"Titanium">
763 <D value=
"4.506" unit=
"g/cm3"/>
764 <fraction n=
"1." ref=
"titanium"/>
767 <material name=
"TPB" formula=
"TPB">
768 <D value=
"1.40" unit=
"g/cm3"/>
769 <fraction n=
"1.0000" ref=
"argon"/>
772 <material name=
"Glass">
773 <D value=
"2.74351" unit=
"g/cm3"/>
774 <fraction n=
"0.600" ref=
"SiO2"/>
775 <fraction n=
"0.118" ref=
"Al2O3"/>
776 <fraction n=
"0.001" ref=
"Fe2O3"/>
777 <fraction n=
"0.224" ref=
"CaO"/>
778 <fraction n=
"0.034" ref=
"MgO"/>
779 <fraction n=
"0.010" ref=
"Na2O"/>
780 <fraction n=
"0.013" ref=
"TiO2"/>
783 <material name=
"Acrylic">
784 <D value=
"1.19" unit=
"g/cm3"/>
785 <fraction n=
"0.600" ref=
"carbon"/>
786 <fraction n=
"0.320" ref=
"oxygen"/>
787 <fraction n=
"0.080" ref=
"hydrogen"/>
790 <material name=
"Polystyrene">
791 <D unit=
"g/cm3" value=
"1.06"/>
792 <fraction n=
"0.077418" ref=
"hydrogen"/>
793 <fraction n=
"0.922582" ref=
"carbon"/>
796 <material name=
"Polyurethane" formula=
"C27H36N2O10" >
797 <D value=
"0.9" unit=
"g/cm3"/>
798 <composite n=
"27" ref=
"carbon"/>
799 <composite n=
"36" ref=
"hydrogen"/>
800 <composite n=
"2" ref=
"nitrogen"/>
801 <composite n=
"10" ref=
"oxygen"/>
804 <material name=
"STEEL_A992">
805 <D unit=
"g/cm3" value=
"7.85"/>
806 <fraction n=
"0.0022" ref=
"carbon"/>
807 <fraction n=
"0.005" ref=
"copper"/>
808 <fraction n=
"0.01" ref=
"manganese"/>
809 <fraction n=
"0.0044" ref=
"nickel"/>
810 <fraction n=
"0.00034" ref=
"phosphorus"/>
811 <fraction n=
"0.0039" ref=
"silicon"/>
812 <fraction n=
"0.00044" ref=
"sulphur"/>
813 <fraction n=
"0.001" ref=
"vanadium"/>
814 <fraction n=
"0.97272" ref=
"iron" />
825 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
826 #++++++++++++++++++++++++++++++++++++++++ gen_TPC ++++++++++++++++++++++++++++++++++++++++
827 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
832 # Create the TPC fragment file name,
833 # add file to list of output GDML fragments,
835 $TPC =
"icarus_TPC" . $suffix .
".gdml";
838 open(
TPC) or die(
"Could not open file $TPC for writing");
841 # The standard XML prefix and starting the gdml
848 # All the TPC solids save the wires.
851 <box
name=
"TPC" lunit=
"cm"
855 <box name=
"TPCPlane" lunit=
"cm"
858 z=
"$TPCWirePlaneHalf_z"/>
859 <box name=
"TPCActive" lunit=
"cm"
862 z=
"$TPCActiveHalf_z"/>
866 #++++++++++++++++++++++++++++ Wire Solids ++++++++++++++++++++++++++++++
868 # Set number of wires to default to zero, when $wires_on = 0, for a low memory
869 # version. But if $wires_on = 1, calculate the number of wires on each side of each
870 # plane to be used in the for loops
872 my $NumberHorizontalWires = 0;
873 my $NumberCornerUWires = 0;
874 my $NumberCommonUWires = 0;
875 my $NumberCornerVWires = 0;
876 my $NumberCommonVWires = 0;
881 # Number of wires in one corner
882 #$NumberCornerVWires = int( $TPCWirePlane_y/$VWire_ypitch );
883 #$NumberCornerWWires = int( $TPCWirePlane_y/$WWire_ypitch );
884 $NumberCornerUWires = 480;
885 $NumberCornerVWires = 480;
887 # Number of wires in one corner + the number to cover the whole corner.
888 $NumberCornerExtUWires = 528;
889 $NumberCornerExtVWires = 528;
891 # Total number of wires touching one vertical (longer) side
892 # Note that the total number of wires per plane is this + another set of corner wires
893 # $NumberSideUWires = int( $TPCWirePlane_z/$UWire_zpitch );
894 # $NumberSideVWires = int( $TPCWirePlane_z/$VWire_zpitch );
895 # $NumberSideWWires = int( $TPCWirePlane_z/$WWire_zpitch );
897 # Number of wires per side that aren't cut off by the corner
898 # $NumberCommonUWires = $NumberSideUWires - $NumberCornerUWires;
899 # $NumberCommonVWires = $NumberSideVWires - $NumberCornerVWires;
900 #$NumberCommonWWires = $NumberSideWWires - $NumberCornerWWires;
901 #$NumberCommonUWires = 4640;
902 #$NumberCommonVWires = 4640;
903 $NumberCommonUWires = 2056;
904 $NumberCommonVWires = 2056;
906 # number of wires on the vertical plane
907 #$NumberHorizontalWires = int( ($TPCWirePlane_y-$TPCWireThickness)/$UWirePitch );
908 #Number of wires inthe Y plane-->Horizontal plane Induction I
909 $NumberHorizontalWires = 1056;
913 # These XML comments throughout make the GDML file easier to navigate
916 <!--+++++++++++++++++++ Y Wire Solids ++++++++++++++++++++++-->
923 #CommonWire = wires with same length
926 <tube name=
"TPCWireYCommon"
927 rmax=
"$TPCWireRadius"
928 z=
"$TPCWirePlaneHalf_z"
938 <!-- This GDML version has no wires
and uses much
less memory -->
947 <!--+++++++++++++++++++ U Wire Solids ++++++++++++++++++++++-->
952 # The corner wires for the U plane
958 for (
$i = 0;
$i < $NumberCornerExtUWires; ++
$i)
963 <tube name=
"TPCWireU$i"
964 rmax=
"$TPCWireRadius"
971 #print(" $i $length \n");
978 for (
$i = 0;
$i < $NumberCornerUWires; ++
$i)
983 <tube name=
"TPCWireCornerU$i"
984 rmax=
"$TPCWireRadius"
991 #print(" $i $length \n");
996 <tube name=
"TPCWireUCommon"
997 rmax=
"$TPCWireRadius"
998 z=
"$CommonWireLength"
1008 <!-- no wires
in this GDML -->
1018 <!--+++++++++++++++++++
V Wire Solids ++++++++++++++++++++++-->
1023 # The corner wires for the V plane
1029 for (
$i = 0;
$i < $NumberCornerExtVWires; ++
$i)
1035 <tube name=
"TPCWireV$i"
1036 rmax=
"$TPCWireRadius"
1043 #print(" $i $length \n");
1050 for (
$i = 0;
$i < $NumberCornerVWires; ++
$i)
1056 <tube name=
"TPCWireCornerV$i"
1057 rmax=
"$TPCWireRadius"
1064 #print(" $i $length \n");
1070 <tube name=
"TPCWireVCommon"
1071 rmax=
"$TPCWireRadius"
1072 z=
"$CommonWireLength"
1082 <!-- no wires
in this GDML -->
1088 # Begin structure and create the vertical wire logical volume
1092 <volume name=
"volTPCActive">
1093 <materialref ref=
"LAr"/>
1094 <solidref ref=
"TPCActive"/>
1097 <!--+++++++++++++++++ Wire Logical Volumes ++++++++++++++++++++-->
1105 # Common Y wire logical volume, referenced many times
1107 <volume name=
"volTPCWireYCommon">
1108 <materialref ref=
"STEEL_STAINLESS_Fe7Cr2Ni" />
1109 <solidref ref=
"TPCWireYCommon" />
1113 # Fake Corner U wires logical volumes
1114 for (
$i = 0;
$i < $NumberCornerExtUWires; ++
$i)
1117 <volume name=
"volTPCWireU$i">
1118 <materialref ref=
"STEEL_STAINLESS_Fe7Cr2Ni" />
1119 <solidref ref=
"TPCWireU$i" />
1125 # Real Corner U wires logical volumes
1126 for (
$i = 0;
$i < $NumberCornerUWires; ++
$i)
1129 <volume name=
"volTPCWireCornerU$i">
1130 <materialref ref=
"STEEL_STAINLESS_Fe7Cr2Ni" />
1131 <solidref ref=
"TPCWireCornerU$i" />
1137 # Common U wire logical volume, referenced many times
1139 <volume name=
"volTPCWireUCommon">
1140 <materialref ref=
"STEEL_STAINLESS_Fe7Cr2Ni" />
1141 <solidref ref=
"TPCWireUCommon" />
1145 # Fake Corner V wires logical volumes
1146 for (
$i = 0;
$i < $NumberCornerExtVWires; ++
$i)
1149 <volume name=
"volTPCWireV$i">
1150 <materialref ref=
"STEEL_STAINLESS_Fe7Cr2Ni" />
1151 <solidref ref=
"TPCWireV$i" />
1157 # Real Corner V wires logical volumes
1158 for (
$i = 0;
$i < $NumberCornerVWires; ++
$i)
1161 <volume name=
"volTPCWireCornerV$i">
1162 <materialref ref=
"STEEL_STAINLESS_Fe7Cr2Ni" />
1163 <solidref ref=
"TPCWireCornerV$i" />
1168 # Common V wire logical volume, referenced many times
1170 <volume name=
"volTPCWireVCommon">
1171 <materialref ref=
"STEEL_STAINLESS_Fe7Cr2Ni" />
1172 <solidref ref=
"TPCWireVCommon" />
1181 <!-- This GDML version has no wires
and uses much
less memory -->
1188 #+++++++++++++++++++++++++ Position physical wires ++++++++++++++++++++++++++
1190 # ++++++++++++++++++++++ Y Plane +++++++++++++++++++++++
1192 # Create Y plane logical volume
1196 <!--+++++++++++++++++++++ Y
Plane ++++++++++++++++++++++++-->
1199 <volume name=
"volTPCPlaneY">
1200 <materialref ref=
"LAr"/>
1201 <solidref ref=
"TPCPlane"/>
1216 for (
$i = 0;
$i < $NumberHorizontalWires; ++
$i)
1223 <volumeref ref=
"volTPCWireYCommon"/>
1224 <position name=
"posTPCWireY$i" unit=
"cm" x=
"0" y=
"$ypos " z=
"0"/>
1225 <rotationref ref=
"rIdentity"/>
1229 #print("0 $ypos \n");
1231 #$ypos -= $YWirePitch;
1238 # ++++++++++++++++++++++ U Plane +++++++++++++++++++++++
1240 # End U plane and create U plane logical volume
1245 <!--+++++++++++++++++++++ U
Plane ++++++++++++++++++++++++-->
1248 <volume name=
"volTPCPlaneU">
1249 <materialref ref=
"LAr"/>
1250 <solidref ref=
"TPCPlane"/>
1271 #Positioning of 480 real U corner wires.
1272 for (
$i = 0;
$i < $NumberCornerUWires; ++
$i)
1277 $ypos = ($ypos1+$ypos2)/2;
1278 $zpos = ($zpos1+$zpos2)/2;
1280 #print("U Corner wires: $i $zpos $ypos , ");
1284 <volumeref ref=
"volTPCWireCornerU$i"/>
1285 <position name=
"posTPCWireU$i" unit=
"cm" x=
"0" y=
"$ypos " z=
"$zpos"/>
1286 <rotationref ref=
"rPlusUAngleAboutX"/>
1297 #Positioning of 528 fake U corners wires.
1298 for (
$i = 0;
$i < $NumberCornerExtUWires; ++
$i)
1303 $ypos = ($ypos1+$ypos2)/2;
1304 $zpos = ($zpos1+$zpos2)/2;
1311 <volumeref ref=
"volTPCWireU$i"/>
1312 <position name=
"posTPCWireU@{[$i+$NumberCommonUWires+$NumberCornerUWires]}" unit=
"cm" x=
"0" y=
"$ypos " z=
"$zpos"/>
1313 <rotationref ref=
"rPlusUAngleAboutX"/>
1322 #print("common wires $zpos \n");
1324 for (
$i = 0;
$i < $NumberCommonUWires; ++
$i)
1329 <volumeref ref=
"volTPCWireUCommon"/>
1330 <position name=
"posTPCWireU@{[$i+$NumberCornerUWires]}" unit=
"cm" x=
"0" y=
"0 " z=
"$zpos"/>
1331 <rotationref ref=
"rPlusUAngleAboutX"/>
1335 #print("U wires $i $zpos 0 \n");
1343 # ++++++++++++++++++++++ V Plane +++++++++++++++++++++++
1345 # End V plane and create V plane logical volume
1349 <!--+++++++++++++++++++++
V Plane ++++++++++++++++++++++++-->
1352 <volume name=
"volTPCPlaneV">
1353 <materialref ref=
"LAr"/>
1354 <solidref ref=
"TPCPlane"/>
1375 #Positioning of 480 real V corners wires.
1377 for (
$i = 0;
$i < $NumberCornerVWires; ++
$i)
1382 $ypos = ($ypos1+$ypos2)/2;
1383 $zpos = ($zpos1+$zpos2)/2;
1385 #print("V Corner wires: $i $zpos $ypos , ");
1390 <volumeref ref=
"volTPCWireCornerV$i"/>
1391 <position name=
"posTPCWireV$i" unit=
"cm" x=
"0" y=
"$ypos " z=
"$zpos"/>
1392 <rotationref ref=
"rMinusVAngleAboutX"/>
1403 #Positioning of 528 fake V corners wires.
1404 for (
$i = 0;
$i < $NumberCornerExtVWires; ++
$i)
1409 $ypos = ($ypos1+$ypos2)/2;
1410 $zpos = ($zpos1+$zpos2)/2;
1417 <volumeref ref=
"volTPCWireV$i"/>
1418 <position name=
"posTPCWireV@{[$i+$NumberCommonVWires+$NumberCornerVWires]}" unit=
"cm" x=
"0" y=
"$ypos " z=
"$zpos"/>
1419 <rotationref ref=
"rMinusVAngleAboutX"/>
1423 #print(" $zpos $ypos \n");
1431 for (
$i = 0;
$i < $NumberCommonVWires; ++
$i)
1436 <volumeref ref=
"volTPCWireVCommon"/>
1437 <position name=
"posTPCWireV@{[$i+$NumberCornerVWires]}" unit=
"cm" x=
"0" y=
"0 " z=
"$zpos"/>
1438 <rotationref ref=
"rMinusVAngleAboutX"/>
1442 #print("V wires: $i $zpos 0 \n");
1454 #+++++++++++++++++++++ Position physical wires Above +++++++++++++++++++++
1461 #wrap up the TPC file
1464 <volume name=
"volTPC0">
1465 <materialref ref=
"LAr" />
1466 <solidref ref=
"TPC" />
1468 <volumeref ref=
"volTPCPlaneY" />
1469 <position name=
"posTPCPlaneY" unit=
"cm" x=
"$VolY_x" y=
"0" z=
"@{[$UpstreamLArPadding/2]}" />
1472 <volumeref ref=
"volTPCPlaneU" />
1473 <position name=
"posTPCPlaneU" unit=
"cm" x=
"$VolU_x" y=
"0" z=
"@{[$UpstreamLArPadding/2]}" />
1476 <volumeref ref=
"volTPCPlaneV" />
1477 <position name=
"posTPCPlaneV" unit=
"cm" x=
"$VolV_x" y=
"0" z=
"@{[$UpstreamLArPadding/2]}" />
1480 <volumeref ref=
"volTPCActive"/>
1481 <positionref ref=
"posActiveInTPC0"/>
1484 <volumeref ref=
"volRaceTrackTVolume"/>
1485 <positionref ref=
"posRaceTrackTInTPC"/>
1486 <rotationref ref=
"rIdentity"/>
1489 <volumeref ref=
"volRaceTrackBVolume"/>
1490 <positionref ref=
"posRaceTrackBInTPC"/>
1491 <rotationref ref=
"rIdentity"/>
1494 <volumeref ref=
"volRaceTrackUVolume"/>
1495 <positionref ref=
"posRaceTrackUInTPC"/>
1496 <rotationref ref=
"rPlus90AboutX"/>
1508 ##################################################################
1509 #dg ########## Race Tracks Parameters ###########################
1510 ##################################################################
1513 # from "Design, construction and tests of the ICARUS T600 detector",
1514 # ICARUS Collaboration (S. Amerio et al.). Jul 2004. 82 pp.
1515 # Nucl.Instrum.Meth. A527 (2004) 329-410
1517 # 4 parts: Top (T) Bottom (B) Upstream (U) Downstream (D)
1518 $RT_epsilon = .0001 ;# extra safety space;
1519 $RaceTrack_d = 3.4; # cm race
track tube diameter
1520 $RaceTrack_TubeThick = 0.08; #cm race
track tube thick
1521 # $RaceTrack_lz = 1810.0; #cm length of race track structure
1522 $RaceTrack_lz = 905; #cm length of race
track structure (half to accommodate
for split wire
TPC)
1523 # $RaceTrack_ly = 320.0 - 2*$RT_epsilon; #cm length of race track tubes
1524 $RaceTrack_ly = 323.6201 ; #cm height of race
track structure (modified to be external to TPCActive_y
1525 $RaceTrack_number = 29; #number of race
tracks
1526 $RaceTrack_pitch = 4.96; #
distance between each race
track tube
1527 $RaceTrack_ExternalRadius = $RaceTrack_d * 0.5; # cm external race
track tube radius
1528 $RaceTrack_InnerRadius = $RaceTrack_d * 0.5-$RaceTrack_TubeThick; # cm
internal race
track tube radius
1529 $RaceTrack_width = ($RaceTrack_pitch +$RT_epsilon) * $RaceTrack_number;
1530 $RaceTrackT_length = $RaceTrack_lz + $RT_epsilon; # guess about Horizontal length
1531 $RaceTrackTTube_length = $RaceTrackT_length - $RT_epsilon; # guess about Horizontal length
1532 $RaceTrackB_length = $RaceTrack_lz + $RT_epsilon; # guess about Horizontal length
1533 $RaceTrackBTube_length = $RaceTrackB_length - $RT_epsilon; # guess about Horizontal length
1534 $RaceTrackU_length = $RaceTrack_ly - 2* $RaceTrack_d; # guess of vertical length
1535 $RaceTrackUTube_length = $RaceTrackU_length - $RT_epsilon; # guess of vertical length
1536 $RaceTrack_thickness=$RaceTrack_d+2*$RT_epsilon; #
1539 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1540 #dg +++++++++++++++++++++++++++++++++++ gen_RaceTracks +++++++++++++++++++++++++++++++++++
1541 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1545 # 4 parts: Top (T) Bottom (B) Upstream (U) Downstream (D)
1546 # define the racetrack geometrical parameters
1554 # The standard XML prefix and starting the gdml
1555 print RACETRACK <<EOF;
1560 #Create the RACETRACK volumes:
1563 $RTy_T= ($RaceTrack_ly - $RaceTrack_thickness )/2. + $RT_epsilon ;
1564 $RTy_B=-($RaceTrack_ly - $RaceTrack_thickness )/2. + $RT_epsilon ;
1575 print RACETRACK <<EOF;
1578 <position
name=
"posRaceTrackTInTPC" unit=
"cm" x=
"$RTx_T" y=
"$RTy_T" z=
"$RTz_T"/>
1579 <position name=
"posRaceTrackBInTPC" unit=
"cm" x=
"$RTx_B" y=
"$RTy_B" z=
"$RTz_B"/>
1580 <position name=
"posRaceTrackUInTPC" unit=
"cm" x=
"$RTx_U" y=
"0" z=
"$RTz_U"/>
1581 <position name=
"posRaceTrackDInTPC" unit=
"cm" x=
"$RTx_D" y=
"0" z=
"$RTz_D"/>
1584 <!--+++++++++++++++++++ RACETRACK Solids +++++++++++++++++++-->
1588 print RACETRACK <<EOF;
1592 <box name=
"RaceTrackTVolume"
1593 x=
"$RaceTrack_width"
1594 y=
"$RaceTrack_thickness"
1595 z=
"$RaceTrackT_length"
1597 <box name=
"RaceTrackBVolume"
1598 x=
"$RaceTrack_width"
1599 y=
"$RaceTrack_thickness"
1600 z=
"$RaceTrackB_length"
1602 <box name=
"RaceTrackUVolume"
1603 x=
"$RaceTrack_width"
1604 y=
"$RaceTrack_thickness"
1605 z=
"$RaceTrackU_length"
1607 <tube name=
"RaceTrackTTubeVolume"
1608 rmax=
"$RaceTrack_ExternalRadius"
1609 rmin=
"$RaceTrack_InnerRadius"
1610 z=
"$RaceTrackTTube_length"
1614 <tube name=
"RaceTrackBTubeVolume"
1615 rmax=
"$RaceTrack_ExternalRadius"
1616 rmin=
"$RaceTrack_InnerRadius"
1617 z=
"$RaceTrackBTube_length"
1621 <tube name=
"RaceTrackUTubeVolume"
1622 rmax=
"$RaceTrack_ExternalRadius"
1623 rmin=
"$RaceTrack_InnerRadius"
1624 z=
"$RaceTrackUTube_length"
1633 # assume Upstream identical to Downstream part
1634 # First define RaceTrack tubes
1636 print RACETRACK <<EOF;
1639 <!--+++++++++++++++++ RACETRACK Logical Volumes ++++++++++++++++++++-->
1641 <volume name=
"volRaceTrackTTubeVolume">
1642 <materialref ref=
"STEEL_STAINLESS_Fe7Cr2Ni"/>
1643 <solidref ref=
"RaceTrackTTubeVolume"/>
1645 <volume name=
"volRaceTrackBTubeVolume">
1646 <materialref ref=
"STEEL_STAINLESS_Fe7Cr2Ni"/>
1647 <solidref ref=
"RaceTrackBTubeVolume"/>
1649 <volume name=
"volRaceTrackUTubeVolume">
1650 <materialref ref=
"STEEL_STAINLESS_Fe7Cr2Ni"/>
1651 <solidref ref=
"RaceTrackUTubeVolume"/>
1655 # Define Upper part of RaceTrack
1656 print RACETRACK <<EOF;
1658 <!--+++++++++++++++++ RACETRACK Top Volume ++++++++++++++++++++-->
1660 <volume name=
"volRaceTrackTVolume">
1661 <materialref ref=
"LAr"/>
1662 <solidref ref=
"RaceTrackTVolume"/>
1668 # Here it would be better to divide the volume into slices and then embedding tubes
1669 # at the moment simply replicate each tube
1670 $xTpos=-($RaceTrack_width - $RaceTrack_pitch - $RT_epsilon )/2.;
1671 for ($it = 0; $it < $RaceTrack_number; $it++)
1673 print RACETRACK <<EOF;
1675 <volumeref ref=
"volRaceTrackTTubeVolume"/>
1676 <position name=
"posRTkTTube$it" unit=
"cm" x=
"$xTpos" y=
"0" z=
"0" />
1677 <rotationref ref=
"rIdentity" />
1680 $xTpos+= $RaceTrack_pitch ;
1682 print RACETRACK <<EOF;
1687 # Define Lower part of RaceTrack
1688 print RACETRACK <<EOF;
1690 <!--+++++++++++++++++ RACETRACK Bottom Volume ++++++++++++++++++++-->
1692 <volume name=
"volRaceTrackBVolume">
1693 <materialref ref=
"LAr"/>
1694 <solidref ref=
"RaceTrackBVolume"/>
1698 # Here it would be better to divide the volume into slices and then embedding tubes
1699 # at the moment simply replicate each tube
1700 $xTpos=-($RaceTrack_width - $RaceTrack_pitch - $RT_epsilon )/2.;
1701 for ($it = 0; $it < $RaceTrack_number; $it++)
1703 print RACETRACK <<EOF;
1705 <volumeref ref=
"volRaceTrackBTubeVolume"/>
1706 <position name=
"posRTkBTube$it" unit=
"cm" x=
"$xTpos" y=
"0" z=
"0" />
1707 <rotationref ref=
"rIdentity" />
1710 $xTpos+= $RaceTrack_pitch ;
1712 print RACETRACK <<EOF;
1717 # Define Upstream part of RaceTrack
1718 print RACETRACK <<EOF;
1720 <!--+++++++++++++++++ RACETRACK Upstream Volume ++++++++++++++++++++-->
1722 <volume name=
"volRaceTrackUVolume">
1723 <materialref ref=
"LAr"/>
1724 <solidref ref=
"RaceTrackUVolume"/>
1727 # Here it would be better to divide the volume into slices and then embedding tubes
1728 # at the moment simply replicate each tube
1729 $xTpos=-($RaceTrack_width - $RaceTrack_pitch - $RT_epsilon )/2.;
1730 for ($it = 0; $it < $RaceTrack_number; $it++)
1732 print RACETRACK <<EOF;
1734 <volumeref ref=
"volRaceTrackUTubeVolume"/>
1735 <position name=
"posRTkUTube$it" unit=
"cm" x=
"$xTpos" y=
"0" z=
"0" />
1736 <rotationref ref=
"rIdentity" />
1739 $xTpos+= $RaceTrack_pitch ;
1741 print RACETRACK <<EOF;
1746 # close the RaceTrack structure
1747 print RACETRACK <<EOF;
1749 <!--+++++++++++++++++ RACETRACK
end structure +++++++++++++++++++-->
1753 #Close standard XML file
1754 print RACETRACK <<EOF;
1759 #ends gen_RaceTracks
1761 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1762 #++++++++++++++++++++++++++++++++++++++ gen_PMTs +++++++++++++++++++++++++++++++++++++++++
1763 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1767 $PMT =
"icarus_pmt" . $suffix .
".gdml";
1772 # The standard XML prefix and starting the gdml
1774 <?
xml version=
'1.0'?>
1778 #Create the PMT volume original z=2.54
1781 <!--+++++++++++++++++++
PMT Solids ++++++++++++++++++++++-->
1784 #<position name="PMTtube" unit="cm" x="30" y="0" z="0"/>
1785 #was after print PMT <<EOF; line
1786 #moved here to comment out for moving to position defs
1790 <sphere name=
"PMTVolume"
1791 rmin=
"$PMTradiusInner"
1792 rmax=
"$PMTradiusOuter"
1797 <sphere name=
"PMTPassSphere"
1798 rmin=
"$PMTradiusInner"
1799 rmax=
"$PMTradiusOuter"
1804 <tube name=
"PMTPassTube"
1811 <
union name=
"PMTPassVolume">
1812 <
first ref=
"PMTPassSphere"/>
1813 <
second ref=
"PMTPassTube"/>
1814 <positionref ref=
"PMTtube"/>
1815 <rotationref ref=
"rMinus90AboutZ"/>
1820 #For some reasons, the Optical Sensitive Volume for PMT has to be LAr ... I found this info both in SBND and MicroBoone geometries
1824 <!--+++++++++++++++++
PMT Logical Volumes ++++++++++++++++++++-->
1826 <volume name=
"volOpDetSensitive">
1827 <materialref ref=
"LAr"/>
1828 <solidref ref=
"PMTVolume"/>
1830 <volume name=
"volNotOpDetSensitive">
1831 <materialref ref=
"Glass"/>
1832 <solidref ref=
"PMTPassVolume"/>
1838 #Close standard XML file
1846 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1847 #am+++++++++++++++++++++++ gen_structure +++++++++++++++++++++++++
1848 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1852 $MECH =
"icarus_Mech_Structure" . $suffix .
".gdml";
1857 # The standard XML prefix and starting the gdml
1859 <?
xml version=
'1.0'?>
1863 #All the steel structure solids
1866 <!--+++++++++++++++++++ Structure Solids ++++++++++++++++++++++-->
1871 <box name=
"LatExtMechBox"
1876 <box name=
"LatIntMechBox"
1877 x=
"@{[0.1+$int_struct_x]}"
1886 <subtraction name=
"LatIntMechShell">
1887 <
first ref=
"LatIntMechBox"/>
1890 <subtraction name=
"LatMechShell">
1891 <
first ref=
"LatExtMechBox"/>
1892 <
second ref=
"LatIntMechShell"/>
1900 <!--+++++++++++++++++ Structure Logical Volumes ++++++++++++++++++++-->
1902 <volume name=
"volLatMech">
1903 <materialref ref=
"STEEL_STAINLESS_Fe7Cr2Ni"/>
1904 <solidref ref=
"LatMechShell"/>
1910 #Close standard XML file
1916 #ends gen mechanical structure
1918 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1919 #++++++++++++++++++++++++++++++++++++++ gen_Cryostat +++++++++++++++++++++++++++++++++++++
1920 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1925 # Create the cryostat fragment file name,
1926 # add file to list of output GDML fragments,
1928 $CRYO =
"icarus_Cryostat" . $suffix .
".gdml";
1930 $CRYO =
">" . $CRYO;
1931 open(CRYO) or die(
"Could not open file $CRYO for writing");
1934 # The standard XML prefix and starting the gdml
1936 <?
xml version=
'1.0'?>
1941 # All the cryostat solids.
1945 <box name=
"Cryostat" lunit=
"cm"
1949 <box name=
"ArgonInterior" lunit=
"cm"
1951 y=
"@{[$LAr_y + $GaseousAr_y]}"
1953 <box name=
"GaseousArgon" lunit=
"cm"
1957 <subtraction name=
"AlumShell">
1958 <
first ref=
"Cryostat"/>
1959 <
second ref=
"ArgonInterior"/>
1962 <box name=
"PMTPlane" lunit=
"cm"
1967 <box name=
"Cathode" lunit=
"cm"
1972 <box name=
"CathodeStrip" lunit=
"cm"
1980 # Cryostat structure
1985 <volume name=
"volAlumShell">
1986 <materialref ref=
"ALUMINUM_CRYO" />
1987 <solidref ref=
"AlumShell" />
1989 <volume name=
"volGaseousArgon">
1990 <materialref ref=
"ArGas"/>
1991 <solidref ref=
"GaseousArgon"/>
1993 <volume name=
"volCathodeStrip">
1994 <materialref ref=
"STEEL_STAINLESS_Fe7Cr2Ni"/>
1995 <solidref ref=
"CathodeStrip"/>
1997 <volume name=
"volCathode">
1998 <materialref ref=
"LAr" />
1999 <solidref ref=
"Cathode" />
2002 ############################################################################################
2003 #Positioning 64 cathode strips, 2.1 cm high.
2008 for ( $j=0; $j<$Num_CStrips; ++$j ){
2011 <volumeref ref=
"volCathodeStrip"/>
2012 <position name=
"posCStrip$j" unit=
"cm" x=
"0" y=
"$yCSpos" z=
"0"/>
2020 ############################################################################################
2022 <volume name=
"volPMTPlane">
2023 <materialref ref=
"LAr"/>
2024 <solidref ref=
"PMTPlane"/>
2027 ############################################################################################
2028 #Positioning PMTs: positions from a file
2033 @pmt_pos0 = read_pmt_pos(
"dispositionPMT.txt", $PMT_x0);
2034 @pmt_pos1 = read_pmt_pos(
"dispositionPMT.txt", $PMT_x1);
2035 $Num_PMTs0 = @pmt_pos0;
2037 for (
$i=0;
$i<$Num_PMTs0; ++
$i ){
2040 <volumeref ref=
"volOpDetSensitive"/>
2041 <position name=
"posPMT0$i" unit=
"cm" @pmt_pos0[
$i]/>
2042 <rotationref ref=
"rPlus90AboutY"/>
2045 <volumeref ref=
"volNotOpDetSensitive"/>
2046 <position name=
"posPMT1$i" unit=
"cm" @pmt_pos1[
$i]/>
2047 <rotationref ref=
"rMinus90AboutY"/>
2052 ############################################################################################
2053 #Positioning Mechanical Structure elements:
2059 for ($im = 0; $im < $mech_number; $im++)
2063 <volumeref ref=
"volLatMech"/>
2064 <position name=
"posLatMech$im" unit=
"cm" x=
"0" y=
"0" z=
"$zMpos" />
2065 <!-- <rotationref ref=
"rIdentity" /> -->
2074 ############################################################################################
2076 <volume name=
"volCryostat">
2077 <materialref ref=
"LAr" />
2078 <solidref ref=
"Cryostat" />
2080 <volumeref ref=
"volGaseousArgon"/>
2081 <position name=
"posGaseousArgon" unit=
"cm" x=
"0" y=
"@{[$LAr_y/2]}" z=
"0" />
2084 <volumeref ref=
"volAlumShell"/>
2085 <position name=
"posAlumShell" unit=
"cm" x=
"0" y=
"0" z=
"0"/>
2089 <volumeref ref=
"volPMTPlane" />
2090 <position name=
"posPMTPlane0" unit=
"cm" x=
"@{[-$TPC_x - $PMTPlane_x/2 - $PMTWiresOffset ]}" y=
"$TPCinCryo_y" z=
"0" />
2091 <rotationref ref=
"rPlus180AboutY"/>
2095 <volumeref ref=
"volTPC0"/>
2096 <positionref ref=
"posTPC00inCryo"/>
2097 <rotationref ref=
"rIdentity"/>
2101 <volumeref ref=
"volTPC0"/>
2102 <positionref ref=
"posTPC01inCryo"/>
2103 <rotationref ref=
"rPlus180AboutX"/>
2107 <volumeref ref=
"volCathode" />
2108 <positionref ref=
"posCathode"/>
2112 <volumeref ref=
"volTPC0"/>
2113 <positionref ref=
"posTPC10inCryo"/>
2114 <rotationref ref=
"rPlus180AboutZ"/>
2118 <volumeref ref=
"volTPC0"/>
2119 <positionref ref=
"posTPC11inCryo"/>
2120 <rotationref ref=
"rPlus180AboutXZ"/>
2125 <volumeref ref=
"volPMTPlane" />
2126 <position name=
"posPMTPlane1" unit=
"cm" x=
"@{[$TPC_x + $PMTPlane_x/2 + $PMTWiresOffset ]}" y=
"$TPCinCryo_y" z=
"0" />
2141 ##############################################################################################################
2142 ##############################################################################################################
2143 ##############################################################################################################
2144 ##############################################################################################################
2145 ##############################################################################################################
2146 ##############################################################################################################
2149 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2150 #++++++++++++++++++++++++++++++++++++++ gen_CRT ++++++++++++++++++++++++++++++++++++++++++
2151 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2155 # Create the CRT fragment file name,
2156 # add file to list of output GDML fragments,
2159 # using a python script to generate the CRT geometry
2160 $CRTPYTHON=
"gen_crt_frags.py";
2161 my $ret=`python $CRTPYTHON `;
2164 $CRT =
"icarus_crt" . $suffix .
".gdml";
2166 # expecting the python script to generate a file "icarus_crt_test.gdml"
2167 # $CRT = ">" . $CRT;
2168 # open(CRT) or die("Could not open file $CRT for writing");
2171 # The standard XML prefix and starting the gdml
2173 #<?xml version='1.0'?>
2181 ##############################################################################################################
2182 ##############################################################################################################
2183 ##############################################################################################################
2184 ##############################################################################################################
2185 ##############################################################################################################
2186 ##############################################################################################################
2188 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2189 #+++++++++++++++++++++++++++++++++++++ gen_Enclosure +++++++++++++++++++++++++++++++++++++
2190 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2195 # Create the detector enclosure fragment file name,
2196 # add file to list of output GDML fragments,
2198 $ENCL =
"icarus_DetEnclosure" . $suffix .
".gdml";
2200 $ENCL =
">" . $ENCL;
2201 open(ENCL) or die(
"Could not open file $ENCL for writing");
2204 # The standard XML prefix and starting the gdml
2206 <?
xml version=
'1.0'?>
2210 # All the detector enclosure solids.
2214 <box name=
"DetEnclosure" lunit=
"cm"
2219 <box name=
"ThermIns" lunit=
"cm"
2224 <box name=
"WarmVessel" lunit=
"cm"
2229 <box name=
"ThermInsInterior" lunit=
"cm"
2230 x=
"@{[$ThermIns_x - 2*$FoamPadding]}"
2231 y=
"@{[$ThermIns_y - 2*$FoamPadding]}"
2232 z=
"@{[$ThermIns_z - 2*$FoamPadding]}"/>
2234 <box name=
"WarmVesselInterior" lunit=
"cm"
2235 x=
"@{[$WarmVessel_x - 2*$WarmVesselThickness_x]}"
2236 y=
"@{[$WarmVessel_y - 2*$WarmVesselThickness]}"
2237 z=
"@{[$WarmVessel_z - 2*$WarmVesselThickness]}"/>
2239 <subtraction name=
"ThermInsShell">
2240 <
first ref=
"ThermIns"/>
2241 <
second ref=
"ThermInsInterior"/>
2244 <subtraction name=
"WarmVesselShell">
2245 <
first ref=
"WarmVessel"/>
2246 <
second ref=
"WarmVesselInterior"/>
2253 # Detector enclosure structure
2257 <volume name=
"volThermIns">
2258 <materialref ref=
"Polyurethane"/>
2259 <solidref ref=
"ThermInsShell"/>
2262 <volume name=
"volWarmVessel">
2263 <materialref ref=
"STEEL_STAINLESS_Fe7Cr2Ni_WV"/>
2264 <solidref ref=
"WarmVesselShell"/>
2267 <volume name=
"volDetEnclosure">
2268 <materialref ref=
"Air"/>
2269 <solidref ref=
"DetEnclosure"/>
2272 <volumeref ref=
"volThermIns"/>
2273 <positionref ref=
"posThermInsInDetEncl"/>
2277 <volumeref ref=
"volCRT_Shell"/>
2278 <positionref ref=
"posCRTShellInDetEncl"/>
2282 <volumeref ref=
"volWarmVessel"/>
2283 <positionref ref=
"posWarmVesselInDetEncl"/>
2287 <volumeref ref=
"volCryostat"/>
2288 <positionref ref=
"posCryo1InWarmVessel"/>
2292 <volumeref ref=
"volCryostat"/>
2293 <positionref ref=
"posCryo2InWarmVessel"/>
2299 #+++++++++++++++++++++++++ Position CRT modules ++++++++++++++++++++++++++
2300 #$YPosMINOSSide = $Cryostat_y/2+$MINOSModWidth/2;
2309 <!-- This GDML version has no
crt and uses much
less memory -->
2328 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2329 #+++++++++++++++++++++++++++++++++++++++ gen_World +++++++++++++++++++++++++++++++++++++++
2330 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2335 # Create the WORLD fragment file name,
2336 # add file to list of output GDML fragments,
2338 $WORLD =
"icarus_World" . $suffix .
".gdml";
2340 $WORLD =
">" . $WORLD;
2341 open(WORLD) or die(
"Could not open file $WORLD for writing");
2344 # The standard XML prefix and starting the gdml
2346 <?
xml version=
'1.0'?>
2351 # <box name="DirtWorld" lunit="cm"
2353 # y="@{[$World_y/2 + $Ground_y]}"
2356 # All the World solids.
2359 <box name=
"World" lunit=
"cm"
2364 <box name=
"BoxDirtAlongX" lunit=
"cm"
2365 x=
"@{[$Hall_x-0.1]}"
2366 y=
"@{[$ExpHall_y-0.1]}"
2367 z=
"@{[$World_z/2-$Hall_z/2-0.1]}"/>
2369 <box name=
"BoxDirtAlongZ" lunit=
"cm"
2370 x=
"@{[$World_x/2-$Hall_x/2-0.1]}"
2371 y=
"@{[$ExpHall_y-0.1]}"
2372 z=
"@{[$World_z-0.1]}"/>
2374 <box name=
"BoxDirtBottom" lunit=
"cm"
2375 x=
"@{[$World_x-0.1]}"
2376 y=
"@{[$World_y/2+$Ground_y-$ExpHall_y]}"
2377 z=
"@{[$World_z-0.1]}"/>
2381 if ($concrete_on != 0)
2384 #part of the overburden above the dirt
2386 <box name=
"OverburdenUp" lunit=
"cm"
2388 y=
"@{[2*$Overburden_y/3]}"
2391 <box name=
"OverburdenDown" lunit=
"cm"
2393 y=
"@{[$Overburden_y/3]}"
2400 <!-- This GDML version has no overburden-->
2406 <box name=
"Building" lunit=
"cm"
2411 <box name=
"AirBuilding" lunit=
"cm"
2412 x=
"@{[$Hall_x - $HallWallThicnekss]}"
2413 y=
"@{[$Building_y - $HallWallThicnekss/2]} "
2414 z=
"@{[$Hall_z - $HallWallThicnekss]}"/>
2416 <subtraction name=
"WallBuilding">
2417 <
first ref=
"Building"/>
2418 <
second ref=
"AirBuilding"/>
2419 <position name=
"posAirBuilding" unit=
"cm" x=
"0" y=
"@{[-$HallWallThicnekss/4]}" z=
"0"/>
2422 <box name=
"ExpHall" lunit=
"cm"
2427 <box name=
"AirExpHall" lunit=
"cm"
2428 x=
"@{[$Hall_x - $HallWallThicnekss]}"
2429 y=
"@{[$ExpHall_y - $HallWallThicnekss/2]}"
2430 z=
"@{[$Hall_z - $HallWallThicnekss]}"/>
2432 <subtraction name=
"WallExpHall">
2433 <
first ref=
"ExpHall"/>
2434 <
second ref=
"AirExpHall"/>
2435 <position name=
"posAirExpHall" unit=
"cm" x=
"0" y=
"@{[$HallWallThicnekss/4]}" z=
"0"/>
2441 # World structure: Building + underground experimental hall + detector
2447 #Building: building + upper part of the overburden
2449 if ( $concrete_on != 0) {
2451 <volume name=
"volOverburdenUp" >
2452 <materialref ref=
"Concrete"/>
2453 <solidref ref=
"OverburdenUp"/>
2460 <volume name=
"volBuilding" >
2461 <materialref ref=
"Air"/>
2462 <solidref ref=
"AirBuilding"/>
2465 <volume name=
"volWallBuilding" >
2466 <materialref ref=
"Concrete"/>
2467 <solidref ref=
"WallBuilding"/>
2471 #if ($concrete_on !=0) {
2476 # <volumeref ref="volOverburdenUp"/>
2477 # <position name="posOverburdenUp" unit="cm" x="$posOverburden_x" y="@{[-$Building_y/2 + $Overburden_y/6 ]}" z="$posOverburden_z" />
2483 #Experimental hall: experimental hall + overburden
2487 <volume name=
"volExpHall" >
2488 <materialref ref=
"Air"/>
2489 <solidref ref=
"AirExpHall"/>
2494 if ( $concrete_on != 0) {
2496 <volume name=
"volOverburdenDown" >
2497 <materialref ref=
"Concrete"/>
2498 <solidref ref=
"OverburdenDown"/>
2505 <volume name=
"volWallExpHall" >
2506 <materialref ref=
"Concrete"/>
2507 <solidref ref=
"WallExpHall"/>
2511 #if ( $concrete_on != 0) {
2514 # <volumeref ref="volOverburdenDown"/>
2515 # <position name="posOverburdenDown" unit="cm" x="$posOverburden_x" y="@{[$ExpHall_y/2 - $Overburden_y/3]}" z="$posOverburden_z" />
2522 #Complete world: building + underground parts + detector
2527 <volume name=
"volBoxDirtAlongX" >
2528 <materialref ref=
"Dirt"/>
2529 <solidref ref=
"BoxDirtAlongX"/>
2532 <volume name=
"volBoxDirtAlongZ" >
2533 <materialref ref=
"Dirt"/>
2534 <solidref ref=
"BoxDirtAlongZ"/>
2537 <volume name=
"volBoxDirtBottom" >
2538 <materialref ref=
"Dirt"/>
2539 <solidref ref=
"BoxDirtBottom"/>
2542 <volume name=
"volWorld" >
2543 <materialref ref=
"Air"/>
2544 <solidref ref=
"World"/>
2547 <volumeref ref=
"volWallBuilding"/>
2548 <positionref ref=
"posBuildingInWorld"/>
2552 <volumeref ref=
"volWallExpHall"/>
2553 <positionref ref=
"posExpHallInWorld"/>
2557 <volumeref ref=
"volOverburdenUp"/>
2558 <position name=
"posOverburdenUp" unit=
"cm" x=
"$posOverburden_x" y=
"@{[$Ground_y + $Overburden_y/3 ]}" z=
"$posOverburden_z" />
2562 <volumeref ref=
"volOverburdenDown"/>
2563 <position name=
"posOverburdenDown" unit=
"cm" x=
"$posOverburden_x" y=
"@{[$Ground_y - $Overburden_y/6]}" z=
"$posOverburden_z" />
2567 <volumeref ref=
"volBoxDirtAlongX"/>
2568 <position name=
"posBoxDirtAlongX1" unit=
"cm" x=
"$posOverburden_x" y=
"@{[$Ground_y-0.5*($ExpHall_y-0.1)]}" z=
"@{[$World_z/2-0.5*($World_z/2-$Hall_z/2)]}"/>
2572 <volumeref ref=
"volBoxDirtAlongX"/>
2573 <position name=
"posBoxDirtAlongX2" unit=
"cm" x=
"$posOverburden_x" y=
"@{[$Ground_y-0.5*($ExpHall_y-0.1)]}" z=
"@{[-$World_z/2+0.5*($World_z/2-$Hall_z/2)]}"/>
2577 <volumeref ref=
"volBoxDirtAlongZ"/>
2578 <position name=
"posBoxDirtAlongZ1" unit=
"cm" x=
"@{[$World_x/2- 0.5*($World_x/2-$Hall_x/2)]}" y=
"@{[$Ground_y-0.5*($ExpHall_y-0.1)]}" z=
"$posOverburden_z"/>
2582 <volumeref ref=
"volBoxDirtAlongZ"/>
2583 <position name=
"posBoxDirtAlongZ2" unit=
"cm" x=
"@{[-$World_x/2+0.5*($World_x/2-$Hall_x/2)]}" y=
"@{[$Ground_y-0.5*($ExpHall_y-0.1)]}" z=
"$posOverburden_z"/>
2587 <volumeref ref=
"volBoxDirtBottom"/>
2588 <position name=
"posBoxDirtBottom" unit=
"cm" x=
"$posOverburden_x" y=
"@{[-$World_y/2+0.5*($World_y/2+$Ground_y-$ExpHall_y)]}" z=
"$posOverburden_z"/>
2592 <volumeref ref=
"volDetEnclosure"/>
2593 <positionref ref=
"posDetEncInWorld"/>
2603 #<volumeref ref="volDirtWorld"/>
2604 #<position name="posDirtWorld" unit="cm" x="$posOverburden_x" y="@{[-$World_y/4 + $Ground_y/2]}" z="$posOverburden_z"/>
2607 # make_gdml.pl will take care of <setup/>
2612 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2613 #++++++++++++++++++++++++++++++++++++ write_fragments ++++++++++++++++++++++++++++++++++++
2614 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2617 # Create the TPC fragment file name,
2618 # add file to list of output GDML fragments,
2620 # $CRT = "crt.gdml";
2621 # push (@gdmlFiles, $CRT);
2626 # This subroutine creates an XML file that summarizes the the subfiles output
2627 # by the other sub routines - it is the input file for make_gdml.pl which will
2628 # give the final desired GDML file. Specify its name with the output option.
2629 # (you can change the name when running make_gdml)
2631 # This code is taken straigh from the similar MicroBooNE generate script, Thank you.
2635 $output =
"-"; #
write to STDOUT
2638 # Set up the output file.
2643 <?
xml version='1.0'?>
2645 <!-- Input to Geometry/
gdml/make_gdml.pl; define
the GDML fragments
2646 that will be zipped together to create
a detector description.
2653 <!-- These files contain GDML <constant></constant>
2654 blocks. They
are read
in separately, so they can be
2655 interpreted into
the remaining GDML. See make_gdml.pl
for
2674 <!-- The GDML
file fragments to be zipped together. -->
2695 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2700 $PMT_pos_file = $_[0];
2701 open(PMTPOS, $PMT_pos_file) or die("Could not
open file $PMT_pos_file.");
2705 foreach
$line (<PMTPOS>) {
2709 $string =
" x=\" $pmt_x\" y=\"$coord[1]\" z=\"$coord[0]\"";
2710 push(@pmt_pos, $string);
process_name opflash particleana ie ie ie z
BEGIN_PROLOG true icarus_rawdigitfilter FilterTools FilterPlane1 Plane
ClusterModuleLabel join with tracks
const geo::GeometryCore * geometry
process_name opflash particleana ie x
foreach $filename(@defFiles)
process_name can override from command line with o or output proton mvapid_weights muon_all_BDT weights xml
esac done echo Signal files are
auto coord(Vector &v, unsigned int n) noexcept
Returns an object to manage the coordinate n of a vector.
GetOptions("help|h"=>\$help,"suffix|s:s"=>\$suffix,"output|o:s"=>\$output,"concrete|c:s"=>\$thickness_over,"wires|w:s"=>\$wires,"vetocrt|v:s"=>\$crt)
BEGIN_PROLOG could also be dds filename
do one_file $F done echo for F in find $TOP name CMakeLists txt print
process_name use argoneut_mc_hitfinder track
print RACETRACK<< EOF;<?xml version='1.0'?>< gdml > EOF $RTy_T
my($xml, $fcl, $workdir, $check, $merge)
BEGIN_PROLOG KDIF from and KDAR from beamline(this option orthogonal to"KDAROnly") Beam2DetectorRotation
print RACETRACK<< EOF;< define >< positionname="posRaceTrackTInTPC"unit="cm"x="$RTx_T"y="$RTy_T"z="$RTz_T"/>< positionname="posRaceTrackBInTPC"unit="cm"x="$RTx_B"y="$RTy_B"z="$RTz_B"/>< positionname="posRaceTrackUInTPC"unit="cm"x="$RTx_U"y="0"z="$RTz_U"/>< positionname="posRaceTrackDInTPC"unit="cm"x="$RTx_D"y="0"z="$RTz_D"/></define ><!--+++++++++++++++++++RACETRACKSolids+++++++++++++++++++--> EOF print RACETRACK<< EOF;< solids >< boxname="RaceTrackTVolume"x="$RaceTrack_width"y="$RaceTrack_thickness"z="$RaceTrackT_length"lunit="cm"/>< boxname="RaceTrackBVolume"x="$RaceTrack_width"y="$RaceTrack_thickness"z="$RaceTrackB_length"lunit="cm"/>< boxname="RaceTrackUVolume"x="$RaceTrack_width"y="$RaceTrack_thickness"z="$RaceTrackU_length"lunit="cm"/>< tubename="RaceTrackTTubeVolume"rmax="$RaceTrack_ExternalRadius"rmin="$RaceTrack_InnerRadius"z="$RaceTrackTTube_length"deltaphi="360"aunit="deg"lunit="cm"/>< tubename="RaceTrackBTubeVolume"rmax="$RaceTrack_ExternalRadius"rmin="$RaceTrack_InnerRadius"z="$RaceTrackBTube_length"deltaphi="360"aunit="deg"lunit="cm"/>< tubename="RaceTrackUTubeVolume"rmax="$RaceTrack_ExternalRadius"rmin="$RaceTrack_InnerRadius"z="$RaceTrackUTube_length"deltaphi="360"aunit="deg"lunit="cm"/></solids > EOF print RACETRACK<< EOF;< structure ><!--+++++++++++++++++RACETRACKLogicalVolumes++++++++++++++++++++-->< volumename="volRaceTrackTTubeVolume">< materialrefref="STEEL_STAINLESS_Fe7Cr2Ni"/>< solidrefref="RaceTrackTTubeVolume"/></volume >< volumename="volRaceTrackBTubeVolume">< materialrefref="STEEL_STAINLESS_Fe7Cr2Ni"/>< solidrefref="RaceTrackBTubeVolume"/></volume >< volumename="volRaceTrackUTubeVolume">< materialrefref="STEEL_STAINLESS_Fe7Cr2Ni"/>< solidrefref="RaceTrackUTubeVolume"/></volume > EOF print RACETRACK<< EOF;<!--+++++++++++++++++RACETRACK Top Volume++++++++++++++++++++-->< volumename="volRaceTrackTVolume">< materialrefref="LAr"/>< solidrefref="RaceTrackTVolume"/> EOF $xTpos
process_name opflash particleana ie ie y
double distance(geo::Point_t const &point, CathodeDesc_t const &cathode)
Returns the distance of a point from the cathode.
then if echo $newprj grep q dirt
print PMT<< EOF;<?xml version='1.0'?>< gdml > EOF print PMT<< EOF;<!--+++++++++++++++++++PMT Solids++++++++++++++++++++++--> EOF print PMT<< EOF;< solids >< spherename="PMTVolume"rmin="$PMTradiusInner"rmax="$PMTradiusOuter"deltaphi="360"deltatheta="90"aunit="deg"lunit="cm"/>< spherename="PMTPassSphere"rmin="$PMTradiusInner"rmax="$PMTradiusOuter"deltaphi="360"deltatheta="90"aunit="deg"lunit="cm"/>< tubename="PMTPassTube"rmax="$PMTtubeRmax"rmin="$PMTtubeRmin"z="$PMTtube_x"deltaphi="360"aunit="deg"lunit="cm"/>< unionname="PMTPassVolume">< firstref="PMTPassSphere"/>< secondref="PMTPassTube"/>< positionrefref="PMTtube"/>< rotationrefref="rMinus90AboutZ"/></union ></solids > EOF print PMT<< EOF;< structure ><!--+++++++++++++++++PMTLogicalVolumes++++++++++++++++++++-->< volumename="volOpDetSensitive">< materialrefref="LAr"/>< solidrefref="PMTVolume"/></volume >< volumename="volNotOpDetSensitive">< materialrefref="Glass"/>< solidrefref="PMTPassVolume"/></volume ></structure > EOF print PMT<< EOF;</gdml > EOF sub gen_Mech_Structure
for($it=0;$it< $RaceTrack_number;$it++)
auto end(FixedBins< T, C > const &) noexcept
return match has_match and(match.match_pdg==11 or match.match_pdg==-11)
then echo echo For and will not be changed by echo further linking echo echo B echo The symbol is in the uninitialized data multiple common symbols may appear with the echo same name If the symbol is defined the common echo symbols are treated as undefined references For more echo details on common see the discussion of warn common echo in *Note Linker see the discussion of warn common echo in *Note Linker such as a global int variable echo as opposed to a large global array echo echo I echo The symbol is an indirect reference to another symbol This echo is a GNU extension to the a out object file format which is echo rarely used echo echo N echo The symbol is a debugging symbol echo echo R echo The symbol is in a read only data section echo echo S echo The symbol is in an uninitialized data section for small echo objects echo echo T echo The symbol is in the the normal defined echo symbol is used with no error When a weak undefined symbol echo is linked and the symbol is not the value of the echo weak symbol becomes zero with no error echo echo W echo The symbol is a weak symbol that has not been specifically echo tagged as a weak object symbol When a weak defined symbol echo is linked with a normal defined the normal defined echo symbol is used with no error When a weak undefined symbol echo is linked and the symbol is not the value of the echo weak symbol becomes zero with no error echo echo echo The symbol is a stabs symbol in an a out object file In echo this the next values printed are the stabs other echo the stabs desc and the stab type Stabs symbols are echo used to hold debugging information For more information
print RACETRACK<< EOF;</volume > EOF print RACETRACK<< EOF;<!--+++++++++++++++++RACETRACK end structure+++++++++++++++++++--></structure > EOF print RACETRACK<< EOF;</gdml > EOF sub gen_PMT
then echo echo For and will not be changed by echo further linking echo echo B echo The symbol is in the uninitialized data multiple common symbols may appear with the echo same name If the symbol is defined the common echo symbols are treated as undefined references For more echo details on common see the discussion of warn common echo in *Note Linker see the discussion of warn common echo in *Note Linker such as a global int variable echo as opposed to a large global array echo echo I echo The symbol is an indirect reference to another symbol This echo is a GNU extension to the a out object file format which is echo rarely used echo echo N echo The symbol is a debugging symbol echo echo R echo The symbol is in a read only data section echo echo S echo The symbol is in an uninitialized data section for small echo objects echo echo T echo The symbol is in the the normal defined echo symbol is used with no error When a weak undefined symbol echo is linked and the symbol is not defined
if &&[-z"$BASH_VERSION"] then echo Attempting to switch to bash bash shellSwitch exit fi &&["$1"= 'shellSwitch'] shift declare a IncludeDirectives for Dir in
then echo File list $list not found else cat $list while read file do echo $file sed s
print OUTPUT<< EOF;< setup name="Default"version="1.0">< worldref="volWorld"/></setup ></gdml > EOF close(OUTPUT)
$WarmVessel_CenterToFloor
push(@gdmlFiles, $RACETRACK)
std::string sub(const std::string &a, const std::string &b)
open(RACETRACK) or die("Could not open file $RACETRACK for writing")