c This is the control file for the GEANT simulation. Parameters defined c in this file control the kind and extent of simulation that is performed. c This format and many of the parameters are derived from the control.in c file used by the GEANT3 simulation program hdgeant. c c Number of triggers TRIG 20000 c Number of threads (only if GEANT4 built with MT support) NTHREADS 1 c Set run number (B-field map will be derived from this) RUNG 30000 c Generated events come from one of 3 places (in order of precedence): c 1. Input from Monte Carlo generator (card INFILE) c 2. Built-in coherent bremsstrahlung source (card BEAM ,not yet implemented) c 3. Built-in single-track event generator (card KINE) c INFILE 'gen_2mu.hddm' c Output filename OUTFILE 'CPPsim.hddm' c The meaning of the arguments to KINE are as follows. c - particle = GEANT particle type of primary track + 100 c - momentum = initial track momentum, central value (GeV/c) c - theta = initial track polar angle, central value (degrees) c - phi = initial track azimuthal angle, central value (degrees) c - delta_momentum = spread in initial track momentum, full width (GeV/c) c - delta_theta = spread in initial track polar angle, full width (degrees) c - delta_phi = spread in initial track azimuthal angle, full width (degrees) c particle momentum theta phi delta_momentum delta_theta delta_phi KINE 108 3.0 5. 0. 0. 0. 360. c The SCAP card determines the vertex position for the particle gun. It c supports the following three arguments, all of which default to 0. c c vertex_x vertex_y vertex_z SCAP 0. 0. 1. c The BEAM card configures the built-in coherent bremsstralung photon c beam generator in HDGeant. If the INFILE card is not present and BEAM c is specified, the internal coherent bremsstralung generator is the primary c source of events for the simulation. If INFILE is specified, the primary c event source is the external Monte Carlo generator that produced the file, c but the BEAM card may still be present, and it is needed if beam-related c backgrounds are being superimposed on top of the primary event signals, c as requested with the BGRATE card (see below). The beam card accepts c the following five parameters. c Emax - end-point energy of the electron beam (GeV) c Epeak - energy of the primary coherent peak edge (GeV) c Emin - minimum energy of the coherent bremsstrahlung beam (GeV) c collz - z position of collimator in m c colld - diameter of collimator in m c Eemit - electron beam emittance in m.rad c radthick - dimaond radiator thickneess in m BEAM 11.668 6.0 0.200 76.00 0.005 2.5e-9 58.e-6 c The following lines control the rate (GHz) of background beam photons c that are overlayed on each event in the simulation, in addition to the c particles produced by the standard generation mechanism. BGGATE expects c two values in ns, which define the window around the trigger time that c background beam photons are overlaid on the simulation. The value you c should enter for BGRATE depends on many details of the photon beam: the c endpoint energy, the low-energy cutoff to be used in generating beam c photons, the location of coherent edge, the electron beam spot size and c emittance at the primary collimator, the electron beam current, etc. To c find the setting that is right for you, follow these steps in order. c 1) Check the BEAM card above that it has correct values for the electron c beam energy (field 1) and the low-energy cutoff that you want to use c in your simulation (field 3). Remember these values. c 2) Open a new tab in a web browser and enter the following URL, c http://zeus.phys.uconn.edu/halld/cobrems/ratetool.cgi which displays c a form containing many fields describing the electron beam and the c photon beamline. Enter the correct values in all fields in the c left-most column of parameters. The right column of parameters c defines the windows over which the tool will compute integrals of c the beam rate. Set the "end-point" window to span the full range c from your beamEmin (see step 1 above) to the electron beam endpoint, c Then click the Plot Spectrum button. After a few seconds, the form will c respond with a few plots and rate numbers in bold text. Record the c value given for the "end-point rate". This is your BGRATE value. c 3) Enter your BGRATE value found in step 2 after BGRATE in the line c below, and remove any characters before the BGRATE keyword. You are c now ready to go. If you ever change anything in the beamline geometry c eg. the collimator diameter, the coherent edge position, or the value c of beamEmin, do not forget to come back and change your BGRATE. c c CPP -------------------- c According to the proposal we were going to run 50nA on a 20um diamond c with a 3.4mm collimator. The coherent peak was defined as 5.5-6.0GeV c This was stated as corresponding to 1x10^7 gamma/sec in the coherent c peak. This is consistent with the online calculator. The "endpoint" c (which actually corresponds to the full energy spectrum) comes out c to 0.0787GHz when all nominal values are used. c c To better match recent GlueX running conditions, the parameters c from the above BEAM (defaults) were used. Namely: c Eelectron = 11.668GeV c Ibeam = 100nA c Radiator thickness = 58um c Coherent peak = 6GeV c Collimator diameter = 5mm c Coherent region = 5.5GeV-6GeV c Low edge = 0.200GeV c c This gives a total rate of 0.459GHz. (Note that if *only* the c peak position is changed to 9GeV then the total rate is c 0.323GHz. This means we might expect the detector occupancy c to be about 42% larger than 100nA running in Spring 2017 data. c c The time window for the background events is based on when a c particle from the target (t=0) would arrive at the FMWPC and c making a 200ns window centered on that to accomodate a 100ns c drift time. Actually, the window is 265ns to accomodate 2sigma c on either side assuming 10ns sigma in time smearing. An additional c 25ns is added to the total width. Since beam particles are generated c 1001cm upstream of the target, a shift of 33.4ns is needed in c addition to the 31.1ns flight time from the target to the FMWPC. c There is also a about 6.3ns difference between the first and c last chamber. Note that this does NOT currently include width c to accomodate FDC drift times! c cBGGATE -165. 100. cBGRATE 0.459 c The following flags can be used to change the default settings for compressing c and including information for CRC integrity checks in the output HDDM file. c For HDDM_USE_COMPRESSION : 0=none, 1=bz2, 2=x (default is 2) c For HDDM_USE_INTEGRITY_CHECKS : 0=no checks, 1=do checks (default is 1) c HDDM_USE_COMPRESSION 2 c HDDM_USE_INTEGRITY_CHECKS 1 c GDML geometry file. By default it looks for this here: c $HDDS_HOME/$BMS_OSNAME/src/cpproot.gdml c c GEOMFILE 'main_HDDS.gdml' c The following can be used to turn off GEANT4 geometry optimization c at program start up. This will speed up the program startup significantly c but will reduce the processing rate by a lot too. c GEOMOPT 0 c The magnetic field map is accessed through the HDGEOMETRY library c so that the same map can be used for both simulation and reconstruction. c Note that normally, one will set the RUNG value above corresponding c to a run whose conditions you wish to simulate and the map will be chosen c automatically. The following allows you to specifiy the map explicitly. c To specify the values to the reconstruction code used here, use c -PBFIELD_MAP=Magents/Solenoid/solenoid_1300A_poisson_20150330 c BFIELDMAP 'Magnets/Solenoid/solenoid_1300A_poisson_20150330' c Use the GEANT4_MACRO tag to specify macros to be run automatically c upon program startup. This can be added multiple times and the macros c will all be run in the order they appear here. If macros are also c specified via command line parameters to CPPsim then those are run c first and any macros specified here are run second. c c n.b. If a file named "vis.mac" exists in the working directory it is c automatically executed prior to running any other macro. c c GEANT4_MACRO tmp.mac c By default hadronic interactions are on, but you can use this to c turn them off. c HADR 0 no hadronic interactions c HADR 1 default hadronic interactions c The following cards allow one to switch on/off some physics processes in GEANT: c MULS 0 no multiple scattering c 1 default multiple scattering c c LOSS 0 (controls energy losses) no energy loss c 1 default enegy loss c 2 default enegy loss (same as 1) c 4 energy loss without fluctuations c c DCAY 0 no decay in flight c 1 default decays c END