-
<Document file="StarVMC/Geometry/BbcmGeo/BbcmGeo.xml">
-
<!--
-
Every AgML document begins with a Document tag, which takes a single "file"
-
attribute as its arguement.
-
-
-->
-
-
-
<Module name="BbcmGeo" comment=" is the Beam Beam Counter Modules GEOmetry " >
-
<!--
-
The Module tag declares an AgML module. The name should consist of a four
-
letter acronym, followed by the word "geo" and possibly a version number.
-
-
e.g. BbcmGeo, EcalGeo6, TpceGeo3a, etc...
-
-
A mandatory comment attribute provides a short description of which detector
-
is implemented by the module.
-
-
-->
-
-
<Created date="15 march 2002" />
-
<Author name="Yiqun Wang" />
-
<!-- The Created and Author tags accept a free-form date and author, for the
-
purposes of documentation. -->
-
-
-
<CDE>AGECOM,GCONST,GCUNIT</CDE>
-
<!-- The CDE tag provides some backwards compatability features with starsim.
-
AGECOM,GCCONST and GCUNIT are fine for most modules. -->
-
-
<Content>BBCM,BBCA,THXM,SHXT,BPOL,CLAD</Content>
-
<!-- The Content tag should declare the names of all volumes which are
-
declared in the detector module. A comma-separated list. -->
-
-
<Structure name="BBCG" >
-
<var name="version" />
-
<var name="onoff(3)" />
-
<var name="zdis(2)" />
-
</Structure>
-
<!-- The structure tag declares an AgML structure. It is similar to a c-
-
struct, but has some important differences which will be illustrated
-
later. The members of a Structure are declared using the var tag. By
-
default, the type of a var will be a float.
-
-
Arrays are declared by enclosing the dimensions of the array in
-
parentheses. Only 1D and 2D arrayes are supported. e.g.
-
-
<var name="x(3)" /> allowed
-
<var name="y(3,3)" /> allowed
-
<var name="z(4,4,4)" /> not allowed
-
-
Types may be declared explicitly using the type parameter as below.
-
Valid types are int, float and char. char variables should be limited
-
to four-character strings for backwards compatability with starsim.
-
Arrays of chars are allowed, in which case you may treat the variable
-
as a string of length Nx4, where N is the dimension of the array.
-
-
-->
-
-
<Structure name="HEXG">
-
<var name="type" type="float" />
-
<var name="irad" type="float" />
-
<var name="clad" type="float" />
-
<var name="thick" type="float" />
-
<var name="zoffset" type="float" />
-
<var name="xoffset" type="float" />
-
<var name="yoffset" type="float" />
-
</Structure>
-
-
<varlist type="float">
-
actr,srad,lrad,ztotal,x0,y0,theta0,phi0,xtrip,ytrip,rtrip,thetrip,rsing,thesing
-
</varlist>
-
<!-- The varlist tag allows you to declare a list of variables of a stated type.
-
The variables will be in scope for all volumes declared in the module.
-
-
Variables may be initialized using the syntax
-
var1/value1/ , var2/value2/, var3, var4/value4/ ...
-
-
Arrays of 1 or 2 dimensions may also be declared. The Assign tag may
-
be used to assign values to the arrays:
-
-
<Assign var="ARRAY" value="{1,2,3,4}" />
-
-->
-
-
<varlist type="int">I_trip/0/,J_sing/0/</varlist>
-
-
<Fill name="BBCG" comment="BBC geometry">
-
<var name="Version" value="1.0" comment=" Geometry version " />
-
<var name="Onoff" value="{3,3,3}" comment=" 0 off, 1 west on, 2 east on, 3 both on: for BBC,Small tiles,Large tiles " />
-
<var name="zdis" value="{374.24,-374.24}" comment=" z-coord from center in STAR (715/2+6*2.54+1=373.8) " />
-
</Fill>
-
<!-- The members of a structure are filled inside of a Fill block. The Fill
-
tag specifies the name of the structure being filled, and accepts a
-
mandatory comment for documentation purposes.
-
-
The var tag is used to fill the members of the structure. In this
-
context, it accepts three arguements: The name of the structure member,
-
the value which should be filled, and a mandatory comment for
-
documentation purposes.
-
-
The names of variables, structures and structure members are case-
-
insensitive.
-
-
1D Arrays are filled using a comma separated list of values contained in
-
curly brackets...
-
-
e.g. value="{1,2,3,4,5}"
-
-
2D Arrays are filled using a comma and semi-colon separated list of values
-
-
e.g. value="{11,12,13,14,15; This fills an array dimensioned
-
21,22,23,24,25; as A(3,5)
-
31,32,33,34,35;}"
-
-
-->
-
-
-
<Fill name="HEXG" comment="hexagon tile geometry" >
-
<var name="Type" value="1" comment="1 for small hex tile, 2 for large tile " />
-
<var name="irad" value="4.174" comment="inscribing circle radius =9.64/2*sin(60)=4.174 " />
-
<var name="clad" value="0.1" comment="cladding thickness " />
-
<var name="thick" value="1.0" comment="thickness of tile " />
-
<var name="zoffset" value="1.5" comment="z-offset from center of BBCW (1), or BBCE (2) " />
-
<var name="xoffset" value="0.0" comment="x-offset center from beam for BBCW (1), or BBCE (2) " />
-
<var name="yoffset" value="0.0" comment="y-offset center from beam for BBCW (1), or BBCE (2) " />
-
</Fill>
-
-
<Fill name="HEXG" comment="hexagon tile geometry" >
-
<var name="Type" value="2" comment="1 for small hex tile, 2 for large tile " />
-
<var name="irad" value="16.697" comment="inscribing circle radius (4x that of small one) " />
-
<var name="clad" value="0.1" comment="cladding of tile " />
-
<var name="thick" value="1.0" comment="thickness of tile " />
-
<var name="zoffset" value="-1.5" comment="z-offset from center of BBCW (1), or BBCE (2) " />
-
<var name="xoffset" value="0.0" comment="x-offset center from beam for BBCW (1), or BBCE (2) " />
-
<var name="yoffset" value="0.0" comment="y-offset center from beam for BBCW (1), or BBCE (2) " />
-
</Fill>
-
-
<Use struct="BBCG"/>
-
<!-- An important difference between AgML structures and c-structs is that
-
only one instance of an AgML structure is allowed in a geometry module,
-
and there is no need for the user to create it... it is automatically
-
generated. The Fill blocks store multiple versions of this structure
-
in an external name space. In order to access the different versions
-
of a structure, the Use tag is invoked.
-
-
Use takes one mandatory attribute: the name of the structure to use.
-
By default, the first set of values declared in the Fill block will
-
be loaded, as above.
-
-
The Use tag may also be used to select the version of the structure
-
which is loaded.
-
-
Example:
-
<Use struct="hexg" select="type" value="2" />
-
-
The above example loads the second version of the HEXG structure
-
declared above.
-
-
NOTE: The behavior of a structure is not well defined before the
-
Use operator is applied.
-
-
-->
-
-
-
<Print level="1" fmt="'BBCMGEO version ', F4.2" >
-
bbcg_version
-
</Print>
-
<!-- The Print statement takes a print "level" and a format descriptor "fmt". The
-
format descriptor follows the Fortran formatting convention
-
-
(n.b. Print statements have not been implemented in ROOT export
-
as they utilize fortran format descriptors)
-
-->
-
-
-
<!-- small kludge x10000 because ROOT will cast these to (int) before computing properties -->
-
<Mixture name="ALKAP" dens="1.432" >
-
<Component name="C5" a="12" z="6" w="5 *10000" />
-
<Component name="H4" a="1" z="1" w="4 *10000" />
-
<Component name="O2" a="16" z="8" w="2 *10000" />
-
<Component name="Al" a="27" z="13" w="0.2302 *10000" />
-
</Mixture>
-
<!-- Mixtures and Materials may be declared within the module... this one is not
-
a good example, as there is a workaround being used to avoid some issues
-
with ROOT vs GEANT compatability. -->
-
-
-
<Use struct="HEXG" select="type" value="1 " />
-
srad = hexg_irad*6.0;
-
ztotal = hexg_thick+2*abs(hexg_zoffset);
-
-
<Use struct="HEXG" select="type" value="2 " />
-
lrad = hexg_irad*6.0;
-
ztotal = ztotal+hexg_thick+2*abs(hexg_zoffset); <!-- hexg_zoffset is negative for Large (type=2) -->
-
-
<!-- AgML has limited support for expressions, in the sense that anyhing which
-
is not an XML tag is passed (with minimal parsing) directly to the c++
-
or mortran compiler. A few things are notable in the above lines.
-
-
(1) Lines may be optionally terminated by a ";", but...
-
(2) There is no mechanism to break long lines across multiple lines.
-
(3) The members of a structure are accessed using an "_", i.e.
-
-
hexg_irad above refers to the IRAD member of the HEXG structure
-
loaded by the Use tag.
-
-
(4) Several intrinsic functions are available: abs, cos, sin, etc...
-
-->
-
-
<Create block="BBCM" />
-
<!-- The Create operator creates the volume specified in the "block"
-
parameter. When the Create operator is invoked, execution branches
-
to the block of code for the specified volume. In this case, the
-
Volume named BBCM below. -->
-
-
<If expr="bbcg_OnOff(1)==1|bbcg_OnOff(1)==3">
-
-
<Placement block="BBCM" in="CAVE"
-
x="0"
-
y="0"
-
z="bbcg_zdis(1)"/>
-
<!-- After the volume has been Created, it is positioned within another
-
volume in the STAR detector. The mother volume may be specified
-
explicitly with the "in" attribute.
-
-
The position of the volume is specified using x, y and z attributes.
-
-
An additional attribute, konly, is used to indicate whether or
-
not the volume is expected to overlap another volume at the same
-
level in the geometry tree. konly="ONLY" indicates no overlap and
-
is the default value. konly="MANY" indicates overlap is possible.
-
-
For more info on ONLY vs MANY, consult the geant 3 manual.
-
-->
-
-
</If>
-
-
<If expr="bbcg_OnOff(1)==2|bbcg_OnOff(1)==3" >
-
<Placement block="BBCM" in="CAVE"
-
x="0"
-
y="0"
-
z="bbcg_zdis(2)">
-
<Rotation alphay="180" />
-
</Placement>
-
<!-- Rotations are specified as additional tags contained withn a
-
Placement block of code. The translation of the volume will
-
be performed first, followed by any rotations, evaluated in
-
the order given. -->
-
-
-
</If>
-
-
<Print level="1" fmt="'BBCMGEO finished'"></Print>
-
-
-
<!--
-
-
Volumes are the basic building blocks in AgML. The represent the un-
-
positioned elements of a detector setup. They are characterized by
-
a material, medium, a set of attributes, and a shape.
-
-
-->
-
-
-
-
<!-- === V o l u m e B B C M === -->
-
<Volume name="BBCM" comment="is one BBC East or West module">
-
-
<Material name="Air" />
-
<Medium name="standard" />
-
<Attribute for="BBCM" seen="0" colo="7" />
-
<!-- The material, medium and attributes should be specified first. If
-
ommitted, the volume will inherit the properties of the volume which
-
created it.
-
-
NOTE: Be careful when you reorganize a detector module. If you change
-
where a volume is created, you potentially change the properties
-
which that volume inherits.
-
-
-->
-
-
<Shape type="tube"
-
rmin="0"
-
rmax="lrad"
-
dz="ztotal/2" />
-
<!-- After specifying the material, medium and/or attributes of a volume,
-
the shape is specified. The Shape is the only property of a volume
-
which *must* be declared. Further, it must be declared *after* the
-
material, medium and attributes.
-
-
Shapes may be any one of the basic 16 shapes in geant 3. A future
-
release will add extrusions and composite shares to AgMl.
-
-
The actual volume (geant3, geant4, TGeo, etc...) will be created at
-
this point.
-
-->
-
-
<Use struct="HEXG" select="type" value="1 " />
-
-
<If expr="bbcg_OnOff(2)==1|bbcg_OnOff(2)==3" >
-
<Create block="BBCA" />
-
<Placement block="BBCA" in="BBCM"
-
x="hexg_xoffset"
-
y="hexg_yoffset"
-
z="hexg_zoffset"/>
-
</If>
-
-
<Use struct="HEXG" select="type" value="2 " />
-
-
<If expr="bbcg_OnOff(3)==1|bbcg_OnOff(3)==3" >
-
-
<Create block="BBCA"/>
-
<Placement block="BBCA" in="BBCM"
-
x="hexg_xoffset"
-
y="hexg_yoffset"
-
z="hexg_zoffset"/>
-
-
</If>
-
-
</Volume>
-
-
<!-- === V o l u m e B B C A === -->
-
<Volume name="BBCA" comment="is one BBC Annulus module" >
-
<Material name="Air" />
-
<Medium name="standard" />
-
<Attribute for="BBCA" seen="0" colo="3" />
-
<Shape type="tube" dz="hexg_thick/2" rmin="hexg_irad" rmax="hexg_irad*6.0" />
-
-
x0=hexg_irad*tan(pi/6.0)
-
y0=hexg_irad*3.0
-
rtrip = sqrt(x0*x0+y0*y0)
-
theta0 = atan(y0/x0)
-
-
<Do var="I_trip" from="0" to="5" >
-
-
phi0 = I_trip*60
-
thetrip = theta0+I_trip*pi/3.0
-
xtrip = rtrip*cos(thetrip)
-
ytrip = rtrip*sin(thetrip)
-
-
<Create block="THXM" />
-
<Placement in="BBCA" y="ytrip" x="xtrip" z="0" konly="'MANY'" block="THXM" >
-
<Rotation thetaz="0" thetax="90" phiz="0" phiy="90+phi0" phix="phi0" />
-
</Placement>
-
-
-
</Do>
-
-
-
</Volume>
-
-
<!-- === V o l u m e T H X M === -->
-
<Volume name="THXM" comment="is on Triple HeXagonal Module" >
-
<Material name="Air" />
-
<Medium name="standard" />
-
<Attribute for="THXM" seen="0" colo="2" />
-
<Shape type="tube" dz="hexg_thick/2" rmin="0" rmax="hexg_irad*2.0/sin(pi/3.0)" />
-
-
<Do var="J_sing" from="0" to="2" >
-
-
rsing=hexg_irad/sin(pi/3.0)
-
thesing=J_sing*pi*2.0/3.0
-
<Create block="SHXT" />
-
<Placement y="rsing*sin(thesing)" x="rsing*cos(thesing)" z="0" block="SHXT" in="THXM" >
-
</Placement>
-
-
-
</Do>
-
-
</Volume>
-
-
-
<!-- === V o l u m e S H X T === -->
-
<Volume name="SHXT" comment="is one Single HeXagonal Tile" >
-
<Material name="Air" />
-
<Medium name="standard" />
-
<Attribute for="SHXT" seen="1" colo="6" />
-
<Shape type="PGON" phi1="0" rmn="{0,0}" rmx="{hexg_irad,hexg_irad}" nz="2" npdiv="6" dphi="360" zi="{-hexg_thick/2,hexg_thick/2}" />
-
-
actr = hexg_irad-hexg_clad
-
-
<Create block="CLAD" />
-
<Placement y="0" x="0" z="0" block="CLAD" in="SHXT" >
-
</Placement>
-
-
<Create block="BPOL" />
-
<Placement y="0" x="0" z="0" block="BPOL" in="SHXT" >
-
</Placement>
-
-
-
</Volume>
-
-
-
<!-- === V o l u m e C L A D === -->
-
<Volume name="CLAD" comment="is one CLADding of BPOL active region" >
-
<Material name="ALKAP" />
-
<Attribute for="CLAD" seen="1" colo="3" />
-
<Shape type="PGON" phi1="0" rmn="{actr,actr}" rmx="{hexg_irad,hexg_irad}" nz="2" npdiv="6" dphi="360" zi="{-hexg_thick/2,hexg_thick/2}" />
-
-
</Volume>
-
-
-
<!-- === V o l u m e B P O L === -->
-
<Volume name="BPOL" comment="is one Bbc POLystyren active scintillator layer" >
-
-
<Material name="POLYSTYREN" />
-
<!-- Reference the predefined material polystyrene -->
-
-
<Material name="Cpolystyren" isvol="1" />
-
<!-- By specifying isvol="1", polystyrene is copied into a new material
-
named Cpolystyrene. A new material is introduced here in order to
-
force the creation of a new medium, which we change with parameters
-
below. -->
-
-
<Attribute for="BPOL" seen="1" colo="4" />
-
<Shape type="PGON" phi1="0" rmn="{0,0}" rmx="{actr,actr}" nz="2" npdiv="6" dphi="360" zi="{-hexg_thick/2,hexg_thick/2}" />
-
-
<Par name="CUTGAM" value="0.00008" />
-
<Par name="CUTELE" value="0.001" />
-
<Par name="BCUTE" value="0.0001" />
-
<Par name="CUTNEU" value="0.001" />
-
<Par name="CUTHAD" value="0.001" />
-
<Par name="CUTMUO" value="0.001" />
-
<Par name="BIRK1" value="1.000" />
-
<Par name="BIRK2" value="0.013" />
-
<Par name="BIRK3" value="9.6E-6" />
-
<!--
-
Parameters are the Geant3 paramters which may be set via a call to
-
GSTPar.
-
-->
-
-
<Instrument block="BPOL">
-
<Hit meas="tof" nbits="16" opts="C" min="0" max="1.0E-6" />
-
<Hit meas="birk" nbits="0" opts="C" min="0" max="10" />
-
</Instrument>
-
<!-- The instrument block indicates what information should be saved
-
for this volume, and how the information should be packed. -->
-
-
</Volume>
-
-
-
</Module>
-
</Document>
-
-