Dear colleagues, As I have announced today's meeting, I have taken Heidi Schellman's code and made some changes for easier and more efficient running of the beam MC, including the converting the original code to CWN form. The gzipped tar file of the entire code repository can be downloaded from my web page: http://www-e815.fnal.gov/~yu/jaeyu.html. In order to expand the file you need to do: 1) gunzip nufactory.tar.gz 2) tar -xvf nufactory.tar These two steps will make a directory called nufactory. In that directory you will find; 1) mycode.f : The program that generates beam and makes CWN. 2) cmpl: A shell script that compiles and links the program. The synopsis for using this script is: cmpl mycode You will need to make the appropriate changes in the cmpl script to correctly set the pointer to the cernlib. 3) clg-cwn: A shell script that takes the beam parameter file and runs the executable (mycode.exe hard coded). The synopsis is: clg-cwn muminus-50gev-10m You need to have a parameter file muminus-50gev-10m.param in the area for generation. This script results in muminus-50gev-10m.hbk and muminus-50gev-10m.log. I have two parameter files (muminus and muplus) as examples. These two files generates 500k mu decays of 50GeV muons from a 10m long straight section. 4) mycode.exe: This is an executable generated on a Debian linux. The executables linked on linux crashes at the end of the job so that the ntuples are not correctly closed. Until this problem is solved, you will need to recover the ntuple in your paw session. This crash does not occur on IRIX. I have tested out the download, expansion, compilation, linkage, and run on an IRIX 6.5 operating system. It worked fine. Please let me know if you have problems. I have attached, for your information, the list of ntuple entries and the content of the muminus-50gev-10m.param file at the end of this message. Regards, Jae Yu ================= CWN Entries ============= ****************************************************************** * Ntuple ID = 1 Entries = 49392 two body ****************************************************************** * Var numb * Type * Packing * Range * Block * Name * ****************************************************************** * 1 * I*4 * * * TWOBODY * event * 2 * R*4 * * * TWOBODY * pe(4) * 3 * R*4 * * * TWOBODY * eecm * 4 * R*4 * * * TWOBODY * pnue(4) * 5 * R*4 * * * TWOBODY * enuecm * 6 * R*4 * * * TWOBODY * rnue * 7 * R*4 * * * TWOBODY * signue * 8 * R*4 * * * TWOBODY * pnum(4) * 9 * R*4 * * * TWOBODY * enumcm * 10 * R*4 * * * TWOBODY * rnum * 11 * R*4 * * * TWOBODY * signum * 12 * R*4 * * * TWOBODY * emudet * 13 * R*4 * * * TWOBODY * eedet * 14 * R*4 * * * TWOBODY * zdecay * 15 * R*4 * * * TWOBODY * pbeam * 16 * R*4 * * * TWOBODY * coscmnue * 17 * R*4 * * * TWOBODY * emaxnue * 18 * R*4 * * * TWOBODY * coscmnum * 19 * R*4 * * * TWOBODY * emaxnum ****************************************************************** * Block * Entries * Unpacked * Packed * Packing Factor * ****************************************************************** * TWOBODY * 49392 * 112 * 112 * 1.000 * * Total * --- * 112 * 112 * 1.000 * ****************************************************************** * Blocks = 1 Variables = 19 Columns = 28 * ****************************************************************** ================= muminus-50gev-10m.param ========== 1000 !Length of the straight section (cm) 500 !Number of muon decays .false. !Output flag. 0.0 !Polarization !1 -> Spin along momentum vector -1. !Muon charge 50. !Muon beam momentum 0. !Horizontal beam divergence (radians) 0. !Vertical beam divergence (radians) 1.0 !Detector mass (g) .. 1tonne = 10**6g 1.67E+20 !Muon beam intensity