Material Balance (script)
The following script allows one to create profiles of the material balance in the detector for the desired set of parameters such as
- z-position of the vertex
- a range of the radial coordinate for the calculation
- a range of pseudorapidity ro consider
The first argument is the number of triggers, which simply effects the statistics. The way the script works is using the built-in functionality of starsim to integrate vlaues along the path of the particle; ntrig particles are shot at the detector within the specified phase space and the results come out as histograms. Assuming the script below is placed in a file with the name "material.kumac", a starsim session can looks like this:
> detp geom y2008
> make geometry
> glose all
> exec material 10000 0.0 1.0 0.0 25.0 1.2 1.3
> h/pl 3001
Attention should be paid when specifying parameters. There have been cases when the user was inluding the concrete surroundings of the STAR detector (as modeled in GEANT) in this calculation, resulting in strange result. The text of the script is given below:
macro material ntrig=1000 z1=0. z2=5. rmin=0. rmax=38. emin=0. emax=2.0
debug off
gclos all
Call HERMES(0)
* Particle Emin-max EtaMin-max PhiMin-max Zlow Zhigh
gkine 1 48 10 10 [emin] [emax] 0 6.28318 [z1] [z2]
1D 3000 'Number of geantinos vs rapidity' 100 [emin] [emax]
2D 3001 'Material in rad.len vs rapidity' 100 [emin] [emax] 50 [rmin] [rmax]
2D 3003 'Material in abs.len vs rapidity' 100 [emin] [emax] 50 [rmin] [rmax]
1D 4000 'Number of geantinos vs phi' 100 -3.14 3.14
2D 4001 'Material in rad.len vs phi' 100 -3.14 3.14 50 [rmin] [rmax]
2D 4003 'Material in abs.len vs phi' 100 -3.14 3.14 50 [rmin] [rmax]
trig [ntrig]
zone 2 2
option nsta
option nbox
call agpmater([rmin],[rmax])
return
