E.Chudakov Jan 17, 2008 This directory contains the code and tools to generate the photoproduction of hadronic events in a wide energy range of E>0.15 GeV, matching the total photoproduction cross section. It can be used to calculate the hadronic background for GLUEX etc. The photon beam spectrum is calculated using the code from R.Jones for the coherent bremsstrahlung. There are two effective energy ranges: 1) E>3 GeV : PYTHIA is used 2) 0.15 PYTHIA particle codes - particle.dat - a list of particle properties used for the low energy mode (2) One file is used to control the job and to set the number of events to simulate, the energy range etc. - fort.15 linked to run.ffr - list of commands and definitions in the FFREAD format An example of the file is attached: ------------------------------------------------------------------- LIST C C === INPUT file for BGGEN C TRIG 395000 number of events to simulate C We expect 395kHz of hadronic rate at high luminosity C -- writing out events C HDDM simple ntuple WROUT 1 1 1 NPRIEV 100 number of events to print EPHLIM 0.15 12. energy range in GeV RNDMSEQ 0 random number sequence integer values EELEC 12. electron beam energy EPEAK 9. coherent peak energy ZCOLLIM 7600. distance to the collimator in cm EPYTHMIN 3. minimal energy for PYTHIA simulation STOP ------------------------------------------------------------------- Compilation: > cd code > make makes ./.bin/bggen Running: > cd ../run/ > ../code/.bin/*/bggen > log Output files: bggen.his - histograms 1) bggen.hddm - HDDM file with events 2) bggen.dat - sequential file with events 3) bggen.nt - CW-ntuple with events See the flag WROUT. In order to study the output one can use the ntuple: > cd ../paw/ PAW> exec example_1 - plots several variables of interest A code to read the output file bggen.dat: > cd ../paw/ > make > ./bgg_read.exe An example of the event printout is attached. The first 2 lines describe the beam and the target particles: 1) GEANT code 2) Particle Data Group code (PDG) = KF (PYTHIA) 3) mass 4)-6) - 3-momentum The next lines are the secondary particles: 1) # 2) GEANT code 3)-7) PYTHIA-type codes: - k1 =1 - final particle, <>1 - intermediate particle (not to be used with GEANT) - k2 =KF=PDG code - k3 >0 - reference to the origin particle #=k3 - k4 >0 - the first # of the decay product - k5 >0 - the last # of the decay product 8) mass 9)-11) - 3-momentum Event 95 Process= 0 PYTHIA GEANT PDG mass Px Py Pz beam 1 22 0.0000 0.000 0.000 11.896 target 14 2212 0.9383 0.000 0.000 0.000 # GEANT k1 kf=PDG origin decay pr mass Px Py Pz 1 0 12 -2 0 5 5 0.3300 -0.098 0.112 2.564 2 0 11 2 0 5 5 0.3300 0.104 -0.043 0.364 3 0 12 2 0 8 8 0.3300 0.098 -0.112 9.123 4 0 11 2101 0 8 8 0.5793 -0.104 0.043 -0.156 5 0 11 91 1 6 7 0.9954 0.006 0.069 2.929 6 9 1 -211 5 0 0 0.1396 0.060 0.212 1.116 7 0 11 213 5 13 14 0.6969 -0.054 -0.143 1.813 8 0 11 92 3 9 12 3.8021 -0.006 -0.069 8.968 9 17 1 221 8 0 0 0.5475 0.226 0.286 1.786 10 8 1 211 8 0 0 0.1396 0.157 -0.346 4.118 11 0 11 331 8 15 17 0.9579 0.101 0.016 1.864 12 13 1 2112 8 0 0 0.9396 -0.491 -0.025 1.199 13 8 1 211 7 0 0 0.1396 -0.009 -0.169 1.788 14 7 1 111 7 0 0 0.1350 -0.045 0.026 0.025 15 7 1 111 11 0 0 0.1350 0.105 0.085 0.225 16 7 1 111 11 0 0 0.1350 0.117 -0.065 0.373 17 17 1 221 11 0 0 0.5475 -0.120 -0.004 1.266 Event 96 Process= 1 p pi0 beam 1 22 0.0000 0.000 0.000 0.267 target 14 2212 0.9383 0.000 0.000 0.000 1 14 1 2212 0 0 0 0.9383 0.067 -0.114 0.334 2 7 1 111 0 0 0 0.1350 -0.067 0.114 -0.067 Event 97 Process= 4 p rho0 beam 1 22 0.0000 0.000 0.000 1.387 target 14 2212 0.9383 0.000 0.000 0.000 1 14 1 2212 0 0 0 0.9383 0.363 0.120 0.715 2 0 10 113 0 3 4 0.7616 -0.363 -0.120 0.673 3 8 1 211 2 0 0 0.1396 -0.063 0.245 0.473 4 9 1 -211 2 0 0 0.1396 -0.300 -0.365 0.200 The output printout contains: ==================================================================================================== Events Simulated: 10000 Reference interaction rate: 394.67 kHz process events fraction range ---------------------------------------------------------------------------------------------------- 0 PYTHIA 2161 21.6 % 3.00