Welcome to your very own pbeam directory. This file gives instructions for running pbeam, and how to change various input files. Checking out pbeam and installing it: first you have to setup CVS: type "setup CVS" and follow instructions on http://www-numi.fnal.gov:8875/fnal_minos/computing/cvs-rep.html#SetUpCVS but in summary, you can type in the following commands: setenv CVS_RSH ssh setenv CVSROOT :ext:minoscvs@minos1.fnal.gov:/cvs/minoscvs/rep1 then type CVS checkout pbeam and you will get a bunch of files (including this one, hopefully): all you need to run pbeam are the following files, though pbeam.f (every piece of this code lives in one file) linkit (the executable which compiles pbeam) file.dat (the input file which pbeam reads) horn_file.dat (the horn geometry file which is specified in file.dat) where the latest and greatest geometry and horn files are called: ph2al_oafar_h.dat (this is file.dat above) horn_ph2alh.dat (this is horn_file.dat above) To compile pbeam, you just type linkit pbeam and to run pbeam you need to type the following commands: setenv DATFILE ph2al_oafar_h.dat (or whatever input file you want) setenv PRTFILE output.prt setenv NTPFILE output.hst (these three commands are also in setupu.sh) and then: pbeam > file.out & file.dat is the input file which gives information about the beamline, the proton beam itself, and what kinds of options you might want for the histograms. output.prt is a text file which has all the information about the job: the beamline and horn geometry, the proton beam information, the weights it uses for the secondary mesons, etc. (plus any offsets you might have told the job to do). output.hst is the histogram file that gets written--this file has very different things in it, depending out what you specify in the file.dat. In the "standard" (i.e. committed) input file, you will see in particular, histograms 3 and 10, which are the near and far detector flux (at the centers of each detector). If you specify pbeam to write out an ntuple (either a meson or a muon ntuple, see nhopts(7) later in this file) then it will also appear in this histogram file, causing it to get very large very quickly. Beware! Don't set nhopts(7) unless you're only generating a million or two protons on target. Another thing to be warned about, the output histogram file in pbeam has a record length of 4096, so when you read them in during a paw session, you have to type: hi/file 1 output.hst 4096 or hi/file 1 output.hst 0 Pbeam description: Pbeam started as a simple tracking monte carlo, but then decay weighting was added and now it works as a tool to generate neutrino fluxes for near and far detectors for a user-defined input beamline geometry. Things that can be specified in the input file: (note: units are meters, and amps. Density is specified as g/cm^3) Target: z position length radius (or x direction if nhopts()=6) density A and Z number of segments material Decay Region: Distance from 0(horn 1) to downstream end of decay pipe Differing radii due to shielding (chase, decay pipe, etc.) Detector: There exists a transverse grid histogram (100), for which you can specify the distance of that detector, and the transverse size. Proton beam: momentum spot size ( depending on nhopts() the spot size in x and y can be different) minimum meson energy that is tracked number of mesons generated per proton on target (appropriately weighted) You can specify which neutrinos you want to keep track of: NuType=1 is numu only NuType=0 is all neutrinos (numu,nubarmu,nue,nubare) Warning: pbeam does not follow muons once they decay, and therefore does not calculate the nue background due to muon decays! Horn Geometry: There is an input horn file which defines the horn and chase geometry. Horns are specified as a series of many cones to approximate a parabola: the input file has many lines in it, where each line represents a cone horn, as defined by 10 numbers, not all of which are used. The 10 numbers are, in order: z beginning of cone z end of cone radius at upstream end of cone radius at downstream end of cone thickness at upstream end of cone thickness at downstream end of cone radius of outer conductor number which is not used function of current mu0 * current /( 2. * pi), where mu0/2*pi = 2.0E-7 Tesla-m/amp current (in amps) The b field is calculated from the "function of the current" specified, rather than the current specified. Details of the chase geometry are also specified in the "input horn file": they are horns with 0 or negative "outer radius". If the outer radius is negative, it's a pipe aperture (with that radius absolute value), if the outer radius is 0, then the 4 numbers preceeding that are the x and y limits. So, currently, the chase is described by this line: 13.0000 32.280 0.58420 -.58420 0.36830 -.95250 0.0000 0.0000 0.0000 0.00000 and the decay pipe is described by this one: 45.2800 678.21 0.00000 0.00000 0.00000 0.00000 -0.9906 0.0000 0.0000 0.00000 (which both are in the horn_ph2alh.dat file).