Go to the source code of this file.
|
#define | the solids |
|
#define | the solids |
|
foreach $parameter |
( |
|
$xmldata->'/parameters/geometry/parameter' | ) |
|
Definition at line 48 of file generate_gdml_test.pl.
50 # Get the name and value attributes for that parameter:
54 # Here's the clever part: The following eval creates a variable
55 # with the same name as $name. For example, if $name eq "TPCDepth",
56 # then the following statement assigns the value to $TPCDepth. The
57 # value is in quotes, because some of the parameters have text
58 # strings in them (like "kInch").
60 eval
"\$$name = '$value'";
foreach $parameter($xmldata->findnodes('/parameters/geometry/parameter'))
Definition at line 343 of file generate_gdml_test.pl.
347 $GDML =
"micro-plane" . $suffix .
".gdml";
352 # Calculate the number of wire ends on a given y-edge of the plane.
354 my $NumberWiresPerEdge = int(
$TPCLength / $TPCYWirePitch );
356 # How many side wires will be "cut off" by the lower or higher
360 # The number of full-length "center" wires.
361 my $NumberCenterWires = $NumberWiresPerEdge - $NumberSideWires;
370 # wires on either end of the tpc
371 for(
$i = 0;
$i < $NumberSideWires; ++
$i)
374 <tube
name=
"TPCWire$i"
375 rmax=
"0.5*kTPCWireThickness"
376 z=
"kTPCWireXPitch*($i+1)/kSinUVAngle"
383 # The solids for the middle wire and the TPC wire plane, and start off the structures.
385 <tube
name=
"TPCWireCommon"
386 rmax=
"0.5*kTPCWireThickness"
387 z=
"kTPCWidth/kCosUVAngle"
392 x=
"kTPCWirePlaneThickness"
400 # the wires at either end of the plane
401 for (
$i = 0;
$i < $NumberSideWires; ++
$i)
404 <volume name=
"volTPCWire$i">
405 <materialref ref=
"Titanium"/>
406 <solidref ref=
"TPCWire$i"/>
412 # The wires in the middle of the plane, and the plane itself.
414 <volume name=
"volTPCWireCommon">
415 <materialref ref=
"Titanium"/>
416 <solidref ref=
"TPCWireCommon"/>
418 <volume name=
"volTPCPlane">
419 <materialref ref=
"LAr"/>
420 <solidref ref=
"TPCPlane"/>
423 # the wires at the -z end
424 for (
$i = 0;
$i < $NumberSideWires; ++
$i)
428 <volumeref ref=
"volTPCWire$i"/>
429 <position name=
"posTPCWire$i" unit=
"cm" y=
"-0.5*kTPCWidth+0.5*($i+1)*kTPCWireXPitch/kTanUVAngle" z=
"0.5*(-kTPCLength+($i+1)*kTPCWireXPitch)" x=
"0"/>
430 <rotationref ref=
"rPlusUVAngleAboutX"/>
435 # The wires in the middle.
436 for (
$i = 0;
$i < $NumberCenterWires; ++
$i)
438 my $j = $NumberSideWires+
$i;
441 <volumeref ref=
"volTPCWireCommon"/>
442 <position name=
"posTPCWire$j" unit=
"cm" y=
"0" z=
"-0.5*kTPCWirePlaneLength+kTPCWireXPitch*(0.5*$NumberSideWires + $i+1)" x=
"0"/>
443 <rotationref ref=
"rPlusUVAngleAboutX"/>
448 # the wires at the +z end
449 for (
$i = 0;
$i < $NumberSideWires; ++
$i)
451 my $j = $NumberSideWires-
$i-1;
452 my $k = $NumberCenterWires+$NumberSideWires+
$i;
456 <volumeref ref=
"volTPCWire$j"/>
457 <position name=
"posTPCWire$k" unit=
"cm" y=
"0.5*kTPCWidth-0.5*($j+1)*kTPCWireXPitch/kTanUVAngle" z=
"0.5*kTPCWirePlaneLength-0.5*kTPCWireXPitch*($j+1)" x=
"0"/>
458 <rotationref ref=
"rPlusUVAngleAboutX"/>
process_name opflash particleana ie ie ie z
process_name opflash particleana ie x
process_name can override from command line with o or output proton mvapid_weights muon_all_BDT weights xml
do one_file $F done echo for F in find $TOP name CMakeLists txt print
my($xml, $fcl, $workdir, $check, $merge)
process_name opflash particleana ie ie y
for($it=0;$it< $RaceTrack_number;$it++)
print OUTPUT<< EOF;< setup name="Default"version="1.0">< worldref="volWorld"/></setup ></gdml > EOF close(OUTPUT)
push(@gdmlFiles, $RACETRACK)
open(RACETRACK) or die("Could not open file $RACETRACK for writing")
sub gen_microvertplane |
( |
| ) |
|
Definition at line 282 of file generate_gdml_test.pl.
284 my $NumberWires = int(
$TPCLength / $TPCWirePitch ) - 1;
286 $GDML =
"micro-vertplane" . $suffix .
".gdml";
291 # Define the solids and structures: the wires and the TPC wire plane.
296 <tube
name=
"TPCWireVert"
297 rmax=
"0.5*kTPCWireThickness"
302 <box name=
"TPCPlaneVert"
303 x=
"kTPCWirePlaneThickness"
309 <volume name=
"volTPCWireVert">
310 <materialref ref=
"Titanium"/>
311 <solidref ref=
"TPCWireVert"/>
313 <volume name=
"volTPCPlaneVert">
314 <materialref ref=
"LAr"/>
315 <solidref ref=
"TPCPlaneVert"/>
319 for (
$i = 0;
$i < $NumberWires; ++
$i)
323 <volumeref ref=
"volTPCWireVert"/>
324 <position name=
"posTPCWireVert$i" unit=
"cm" z=
"(-0.5*kTPCLength)+(($i+1)*kTPCWirePitch)" x=
"0" y=
"0"/>
325 <rotationref ref=
"rPlus90AboutX"/>
process_name opflash particleana ie ie ie z
process_name opflash particleana ie x
process_name can override from command line with o or output proton mvapid_weights muon_all_BDT weights xml
do one_file $F done echo for F in find $TOP name CMakeLists txt print
my($xml, $fcl, $workdir, $check, $merge)
process_name opflash particleana ie ie y
for($it=0;$it< $RaceTrack_number;$it++)
print OUTPUT<< EOF;< setup name="Default"version="1.0">< worldref="volWorld"/></setup ></gdml > EOF close(OUTPUT)
push(@gdmlFiles, $RACETRACK)
open(RACETRACK) or die("Could not open file $RACETRACK for writing")
Definition at line 547 of file generate_gdml_test.pl.
552 $GDML =
"microboone/micro-plane" . $suffix .
".gdml";
557 # Calculate the number of wire ends on a given y-edge of the plane.
559 my $NumberWiresPerEdge = int(
$TPCLength / $TPCYWirePitch );
560 #my $NumberWiresPerEdge = int( ( $wires_plength ) / $TPCYWirePitch );
562 # How many side wires will be "cut off" by the lower or higher
564 #my $NumberSideWires = int( $TanUVAngle * ( $wires_pwidth ) / $TPCYWirePitch );
568 # The number of full-length "center" wires.
569 my $NumberCenterWires = $NumberWiresPerEdge - $NumberSideWires;
578 # wires on either end of the tpc
579 for (
$i = 0;
$i < $NumberSideWires; ++
$i)
582 <tube
name=
"TPCWire$i"
583 rmax=
"0.5*kTPCWireThickness"
584 z=
"kTPCWireXPitch*($i+1)/kSinUVAngle"
591 # The solids for the middle wire and the TPC wire plane, and start off the structures.
593 <tube
name=
"TPCWireCommon"
594 rmax=
"0.5*kTPCWireThickness"
595 z=
"kTPCWidth/kCosUVAngle"
600 x=
"kTPCWirePlaneThickness"
608 # the wires at either end of the plane
609 for (
$i = 0;
$i < $NumberSideWires; ++
$i)
612 <volume name=
"volTPCWire$i">
613 <materialref ref=
"Titanium"/>
614 <solidref ref=
"TPCWire$i"/>
620 # The wires in the middle of the plane, and the plane itself.
622 <volume name=
"volTPCWireCommon">
623 <materialref ref=
"Titanium"/>
624 <solidref ref=
"TPCWireCommon"/>
626 <volume name=
"volTPCPlane">
627 <materialref ref=
"LAr"/>
628 <solidref ref=
"TPCPlane"/>
631 # the wires at the -z end
632 for (
$i = 0;
$i < $NumberSideWires; ++
$i)
636 <volumeref ref=
"volTPCWire$i"/>
637 <position name=
"posTPCWire$i" unit=
"cm" y=
"(-0.5*kTPCWirePlaneWidth)+0.5*($i+1)*kTPCWireXPitch/kTanUVAngle" z=
"-0.5*kTPCWirePlaneLength+0.5*kTPCWireXPitch*($i+1)" x=
"0"/>
638 <rotationref ref=
"rPlusUVAngleAboutX"/>
643 # The wires in the middle.
644 for (
$i = 0;
$i < $NumberCenterWires - 1 ; ++
$i)
646 my $j = $NumberSideWires+
$i;
649 <volumeref ref=
"volTPCWireCommon"/>
650 <position name=
"posTPCWire$j" unit=
"cm" y=
"0" z=
"(-0.5*kTPCWirePlaneLength)+kTPCWireXPitch*(0.5*$NumberSideWires + $i+1)" x=
"0"/>
651 <rotationref ref=
"rPlusUVAngleAboutX"/>
656 # the wires at the +z end
657 for (
$i = 0;
$i < $NumberSideWires ; ++
$i)
659 my $j = $NumberSideWires-
$i-1;
660 my $k = $NumberCenterWires+$NumberSideWires+
$i;
664 <volumeref ref=
"volTPCWire$j"/>
665 <position name=
"posTPCWire$k" unit=
"cm" y=
"0.5*kTPCWirePlaneWidth-0.5*($j+1)*kTPCWireXPitch/kTanUVAngle" z=
"0.5*kTPCWirePlaneLength-0.5*kTPCWireXPitch*($j+1)" x=
"0"/>
666 <rotationref ref=
"rPlusUVAngleAboutX"/>
process_name opflash particleana ie ie ie z
process_name opflash particleana ie x
process_name can override from command line with o or output proton mvapid_weights muon_all_BDT weights xml
do one_file $F done echo for F in find $TOP name CMakeLists txt print
my($xml, $fcl, $workdir, $check, $merge)
process_name opflash particleana ie ie y
for($it=0;$it< $RaceTrack_number;$it++)
print OUTPUT<< EOF;< setup name="Default"version="1.0">< worldref="volWorld"/></setup ></gdml > EOF close(OUTPUT)
push(@gdmlFiles, $RACETRACK)
open(RACETRACK) or die("Could not open file $RACETRACK for writing")
sub gen_tpcplanevert_bad |
( |
| ) |
|
Definition at line 476 of file generate_gdml_test.pl.
480 ##### temporary edits:
481 ##### - TPCPlaneVert y="TPCWidth" z="kTPCLength"
482 ##### - TPCWireVert y="TPCWidth"
483 ##### - (above)my $NumberWires = int($TPCLength / $TPCWirePitch ) - 1
489 $GDML =
"microboone/micro-vertplane" . $suffix .
".gdml";
494 # Define the solids and structures: the wires and the TPC wire plane.
500 <tube
name=
"TPCWireVert"
501 rmax=
"0.5*kTPCWireThickness"
506 <box name=
"TPCPlaneVert"
507 x=
"kTPCWirePlaneThickness"
513 <volume name=
"volTPCWireVert">
514 <materialref ref=
"Titanium"/>
515 <solidref ref=
"TPCWireVert"/>
517 <volume name=
"volTPCPlaneVert">
518 <materialref ref=
"LAr"/>
519 <solidref ref=
"TPCPlaneVert"/>
528 <volumeref ref=
"volTPCWireVert"/>
529 <position name=
"posTPCWireVert$i" unit=
"cm" z=
"(-0.5*kTPCWirePlaneLength)+kTPCWirePitch*($j+1)" x=
"0" y=
"0"/>
530 <rotationref ref=
"rPlus90AboutX"/>
process_name opflash particleana ie ie ie z
process_name opflash particleana ie x
process_name can override from command line with o or output proton mvapid_weights muon_all_BDT weights xml
do one_file $F done echo for F in find $TOP name CMakeLists txt print
my($xml, $fcl, $workdir, $check, $merge)
process_name opflash particleana ie ie y
for($it=0;$it< $RaceTrack_number;$it++)
print OUTPUT<< EOF;< setup name="Default"version="1.0">< worldref="volWorld"/></setup ></gdml > EOF close(OUTPUT)
push(@gdmlFiles, $RACETRACK)
open(RACETRACK) or die("Could not open file $RACETRACK for writing")
GetOptions |
( |
"input|i:s" |
, |
|
|
\ |
$input, |
|
|
"help|h" |
, |
|
|
\ |
$help, |
|
|
"suffix|s:s" |
, |
|
|
\ |
$suffix, |
|
|
"output|o:s" |
, |
|
|
\ |
$output |
|
) |
| |
Definition at line 20 of file generate_gdml_test.pl.
22 # If the user requested help, print the usage notes and exit.
Definition at line 27 of file generate_gdml_test.pl.
29 # The user didn't supply a suffix, so append nothing to the file
Definition at line 105 of file generate_gdml_test.pl.
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
push |
( |
@ |
gdmlFiles, |
|
|
|
$PMT |
|
) |
| |
Definition at line 116 of file generate_gdml_test.pl.
118 print "Usage: $0 [-h|--help] -i|--input <parameters-file> [-o|--output <fragments-file>] [-s|--suffix <string>]\n";
119 print " -i/--input can be omitted; <parameters-file> contains geometry and material parameters\n";
120 print " if -o is omitted, output goes to STDOUT; <fragments-file> is input to make_gdml.pl\n";
121 print " -s <string> appends the string to the file names; useful for multiple detector versions\n";
122 print " -h prints this message, then quits\n";
do one_file $F done echo for F in find $TOP name CMakeLists txt print
Definition at line 1168 of file generate_gdml_simple.pl.
1170 # The output file is a list of the GDML sub-files created by this
1175 $output =
"-"; #
write to STDOUT
1178 # Set up the output file.
1185 <!-- Input to Geometry/
gdml/make_gdml.pl; define
the GDML fragments
1186 that will be zipped together to create
a detector description.
1193 <!-- These files contain GDML <constant></constant>
1194 blocks. They
are read
in separately, so they can be
1195 interpreted into
the remaining GDML. See make_gdml.pl
for
1214 <!-- The GDML
file fragments to be zipped together. -->
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
BEGIN_PROLOG could also be dds filename
do one_file $F done echo for F in find $TOP name CMakeLists txt print
for($it=0;$it< $RaceTrack_number;$it++)
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
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
print OUTPUT<< EOF;< setup name="Default"version="1.0">< worldref="volWorld"/></setup ></gdml > EOF close(OUTPUT)
open(RACETRACK) or die("Could not open file $RACETRACK for writing")
$CosUVAngle = cos( deg2rad($UVAngle) ) |
$field_cage_cross_length = sqrt(($field_cage_width)**2+($field_cage_height-50)**2) |
$field_cage_length = 1000 |
$field_cage_loop_interval = 1 |
$parser = new XML::LibXML |
$SinUVAngle = sin( deg2rad($UVAngle) ) |
$TanUVAngle = tan( deg2rad($UVAngle) ) |
$wires_plength =($wire_plane_length - 2*$wire_frame_width) |
$wires_pwidth =($wire_plane_height - 2*$wire_frame_width) |
$xmldata = $parser->parse_file($input) |