Posted by Peter Gumplinger (gum@triumf.ca) , Tuesday Jun 08, 2004 15:58 https://twist.phys.ualberta.ca/forum/view.php?site=twist&bn=twist_montecarlo&key=1086737316 In preperation for a Pmuxi measurement with TWIST, and with the advent of WestGrid, the time may be ripe to revive simulation tools which were created early in the history of this experiment but required amounts of CPU to produce statistically meaningful results in excess of what was then available. Since this forum is newer than the development of these tools, I hereby post information regarding the T1MONTE program first, followed by info about M13GEANT as soon as I get to it. T1MONTE is built on Geant3, its hadronic process implementation GHEISHA, but with substantial modifications made by Dennis Wright to simulate the production of pions in carbon by protons at TRIUMF energies based on measured data sets. By default, the simulation starts with a 500MeV kin. energy proton beam with 0MeV energy spread. The beam has a profile with horizontal sigma 0.127cm and vertical sigma of 0.3cm. All these numbers can be changed with FFCARDs. The carbon production target is 90deg to the proton beam and 45deg to the M13 beam line (may also be changed with FFCARDs). The distance of the proton beam centroid from the edge of the target is by default 1mm (another FFCARD). Since the actual acceptance of M13 is simulated in great detail with M13GEANT, it is enough at this stage to define only a sufficiently wider acceptance region: 29.3MeV/c to 29.9MeV/c momentum and 33mrad horizontally to 110mrad vertically. Muons from pion decay which fall within the above limits (changeable by FFCARDs) are written to a file. In order to help the program along generating surface muons for M13GEANT, the following baising technique was developed: For a pi+ which stops within 2mm of the surface of the target, it will be 'forced' (moved even closer to) within 50um of the surface. Then, one hundred (100) pi+ decays for every such pi+ are simulated. Surface muons are 'evaporated' uniformly into a rectangular aperture which subtends +-33mrad in x and +-110mrad in y. These muons are written to file if they have a momentum between 29.3 and 29.9MeV/c when they leave the target. The output REVMOC format is: vect(1) == x [cm] theta == dx/x [mrad] vect(2) == y [cm] phi == dy/y [mrad] vect(7) == p[GeV/c] (momentum) amass == muon mass in [GeV/c**2] vect(3)/100 == z [in meters!] nout == ray counter label == 'TARGET' The point where the muon rays are written to file is a plane perpendicular to the M13 beam axis at z = 3.75cm; z=0 is the surface of the producation target. M13GEANT has the beam line origin x=y=z=0 in the center of the 1cm square production target, while T1MONTE's simulation mother volume is centered on the middle of the T1 side face. To correct this mismatch M13GEANT immediately modifies the coordinates apon reading the file by: subtracting 0.5/sqrt(2.) from x adding 0.5/sqrt(2.) to z y is unchanged The files run21.dat through run26.dat in /m13geant/run are such output files.