All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions | Variables
generate_voltpc.pl File Reference

Go to the source code of this file.

Functions

 gen_header ()
 
 gen_materials ()
 
 gen_voltpc ()
 

Variables

 $CryostatWidth =200
 
 $CryostatHeight =200
 
 $CryostatLength =1000
 
 $SteelThickness =0.5*2.54
 
 $ArgonWidth =$CryostatWidth-2*$SteelThickness
 
 $ArgonHeight =$CryostatHeight-2*$SteelThickness
 
 $ArgonLength =$CryostatLength-2*$SteelThickness
 
 $RockThickness =200
 
 $ConcretePadding =50
 
 $GlassFoamPadding =100
 
 $TotalPadding =$ConcretePadding+$GlassFoamPadding+$SteelThickness
 
 $CavernWidth =$ArgonWidth+2*$TotalPadding
 
 $CavernHeight =$ArgonHeight+$TotalPadding
 
 $CavernLength =$ArgonLength+2*$TotalPadding
 
 $TPCWidth =$CryostatWidth
 
 $TPCHeight =$CryostatHeight
 
 $TPCLength =$CryostatLength
 
 $TPCWireThickness =0.015
 
 exit
 

Function Documentation

sub gen_header ( )

Definition at line 149 of file generate_voltpc.pl.

150 {
151 
152  $volTPC = "voltpc.gdml";
153  $volTPC = ">" . $volTPC;
154  open(volTPC) or die("Could not open file $volTPC for writing");
155  print volTPC <<EOF;
156 <?xml version="1.0" encoding="UTF-8" ?>
157 <gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML"
158  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
159  xsi:noNamespaceSchemaLocation="GDMLSchema/gdml.xsd">
160 EOF
161 }
process_name can override from command line with o or output proton mvapid_weights muon_all_BDT weights xml
Definition: runPID.fcl:28
* file
Definition: file_to_url.sh:69
do one_file $F done echo for F in find $TOP name CMakeLists txt print
for($it=0;$it< $RaceTrack_number;$it++)
open(RACETRACK) or die("Could not open file $RACETRACK for writing")
gen_materials ( )
sub gen_voltpc ( )

Definition at line 41 of file generate_voltpc.pl.

42 {
43  # Set up the output file.
44  $volTPC = "voltpc.gdml";
45  $volTPC = ">>" . $volTPC;
46  open(volTPC) or die("Could not open file $volTPC for writing");
47 
48  print volTPC <<EOF;
49  <solids>
50  <box name="World" lunit="cm"
51  x="5*$CryostatWidth"
52  y="5*$CryostatHeight"
53  z="5*$CryostatLength"/>
54  <box name="DetEnclosure" lunit="cm"
55  x="$CryostatWidth+10"
56  y="$CryostatHeight+10"
57  z="$CryostatLength+10"/>
58  <box name="Cryostat" lunit="cm"
59  x="$CryostatWidth"
61  z="$CryostatLength"/>
62  <box name="TPC" lunit="cm"
63  x="$TPCWidth"
64  y="$TPCHeight"
65  z="$TPCLength"/>
66  <box name="TPCPlane" lunit="cm"
67  x="0.1"
68  y="0.9*$TPCHeight"
69  z="0.9*$TPCLength"/>
70  <tube name="TPCWire"
71  rmax="0.5*$TPCWireThickness"
72  z="0.89*$TPCHeight"
73  deltaphi="2*3.14159"
74  aunit="rad"
75  lunit="cm"/>
76 
77  </solids>
78  <structure>
79  <volume name="volTPCWire">
80  <materialref ref="STEEL_STAINLESS_Fe7Cr2Ni" />
81  <solidref ref="TPCWire" />
82  </volume>
83  <volume name="volTPCPlane">
84  <materialref ref="LAr"/>
85  <solidref ref="TPCPlane"/>
86 EOF
87 
88 for ( $i=-0.3*$TPCLength ; $i < 0.3*$TPCLength ; $i+=100 ) {
89  $wire_zpos=$i;
90  print volTPC <<EOF;
91  <physvol>
92  <volumeref ref="volTPCWire"/>
93  <position name="posTPCWire$i" unit="cm" x="0" y="0" z="$wire_zpos"/>
94  <rotation name="rTPCWire$i" unit="deg" x="60" y="0" z="0"/>
95  </physvol>
96 EOF
97 }
98  print volTPC <<EOF;
99  </volume>
100  <volume name="volTPC">
101  <materialref ref="LAr" />
102  <solidref ref="TPC" />
103  <physvol>
104  <volumeref ref="volTPCPlane"/>
105  <position name="posTPCPlane1" unit="cm" x="-0.45*$TPCWidth" y="0" z="0"/>
106  </physvol>
107  <physvol>
108  <volumeref ref="volTPCPlane"/>
109  <position name="posTPCPlane2" unit="cm" x="-0.475*$TPCWidth" y="0" z="0"/>
110  <rotation name="rTPCPlane2" unit="deg" x="0" y="180" z="0"/>
111  </physvol>
112  </volume>
113  <volume name="volCryostat">
114  <materialref ref="LAr" />
115  <solidref ref="Cryostat" />
116  <physvol>
117  <volumeref ref="volTPC"/>
118  <position name="posTPC" unit="cm" x="0" y="0" z="0"/>
119  </physvol>
120  </volume>
121  <volume name="volDetEnclosure">
122  <materialref ref="Air"/>
123  <solidref ref="DetEnclosure"/>
124  <physvol>
125  <volumeref ref="volCryostat"/>
126  <position name="posCryostat" unit="cm" x="0" y="0" z="0"/>
127  </physvol>
128  </volume>
129  <volume name="volWorld" >
130  <materialref ref="Air"/>
131  <solidref ref="World"/>
132  <physvol>
133  <volumeref ref="volDetEnclosure"/>
134  <position name="posDetEnclosure" unit="cm" x="0.5*$TPCWidth" y="0" z="0.5*$TPCLength"/>
135  </physvol>
136  </volume>
137  </structure>
138 
139  <setup name="Default" version="1.0">
140  <world ref="volWorld" />
141  </setup>
142 </gdml>
143 EOF
144  close(volTPC);
145 }
process_name opflash particleana ie ie ie z
then source grid fermiapp products dune setup_dune_fermiapp sh exit else echo No setup file found exit fi setup
$CryostatWidth
process_name opflash particleana ie x
* file
Definition: file_to_url.sh:69
$CryostatLength
$TPCWidth
do one_file $F done echo for F in find $TOP name CMakeLists txt print
$TPCHeight
$TPCLength
BEGIN_PROLOG TPC
process_name opflash particleana ie ie y
for($it=0;$it< $RaceTrack_number;$it++)
do echo $i
Definition: TrainMVA.sh:30
then echo fcl name
print OUTPUT<< EOF;< setup name="Default"version="1.0">< worldref="volWorld"/></setup ></gdml > EOF close(OUTPUT)
$CryostatHeight
open(RACETRACK) or die("Could not open file $RACETRACK for writing")

Variable Documentation

$ArgonHeight =$CryostatHeight-2*$SteelThickness

Definition at line 16 of file generate_voltpc.pl.

$ArgonLength =$CryostatLength-2*$SteelThickness

Definition at line 17 of file generate_voltpc.pl.

$ArgonWidth =$CryostatWidth-2*$SteelThickness

Definition at line 15 of file generate_voltpc.pl.

$CavernHeight =$ArgonHeight+$TotalPadding

Definition at line 23 of file generate_voltpc.pl.

$CavernLength =$ArgonLength+2*$TotalPadding

Definition at line 24 of file generate_voltpc.pl.

$CavernWidth =$ArgonWidth+2*$TotalPadding

Definition at line 22 of file generate_voltpc.pl.

$ConcretePadding =50

Definition at line 19 of file generate_voltpc.pl.

$CryostatHeight =200

Definition at line 10 of file generate_voltpc.pl.

$CryostatLength =1000

Definition at line 11 of file generate_voltpc.pl.

$CryostatWidth =200

Definition at line 9 of file generate_voltpc.pl.

$GlassFoamPadding =100

Definition at line 20 of file generate_voltpc.pl.

$RockThickness =200

Definition at line 18 of file generate_voltpc.pl.

$SteelThickness =0.5*2.54

Definition at line 14 of file generate_voltpc.pl.

$TotalPadding =$ConcretePadding+$GlassFoamPadding+$SteelThickness

Definition at line 21 of file generate_voltpc.pl.

$TPCHeight =$CryostatHeight

Definition at line 26 of file generate_voltpc.pl.

$TPCLength =$CryostatLength

Definition at line 27 of file generate_voltpc.pl.

$TPCWidth =$CryostatWidth

Definition at line 25 of file generate_voltpc.pl.

$TPCWireThickness =0.015

Definition at line 28 of file generate_voltpc.pl.

exit

Definition at line 34 of file generate_voltpc.pl.