HOWTO to generate electromagnetic background

From GlueXWiki
Jump to: navigation, search

This page explains how to generate MC samples with electromagnetic background. There are several parameters which have to be set in the file to handle the simulation:

  • BEAM Emax Epeak Emin
Emax  - end-point energy of the electron peak (GeV).
Epeak - upper edge energy of the coherent Bremsstrahlung peak (GeV).
Emin  - minimum energy of the coherent bremsstrahlung beam (GeV)
Fig. 1. Scale factor for the EM background rate as function of the energy threshold of generated bremsstrahlung photons. The scale factor equals to 1 at E_gamma = 0.12 GeV, the default threshold used in the simulation.

If Emin is omitted, the default photon-energy threshold of 0.12 GeV is used. If Emin is set, the rate of generated background photons is automatically scaled as follows:

     Rate(E_gamma > Thr)  =  Rate(E_gamma = 0.12 Gev) *K( E_gamma = Thr),

where K is a calibration coefficient which depends on a photon energy threshold, Thr (see Fig.1)

      K = 1 for Thr = 0.12 GeV,
      K > 1 for Thr < 0.12 GeV. 

Note, K is calculated assuming the beam energies Emax = 12, Epeak = 9. Note, Rate(E_gamma = 0.12 Gev) can be set by the BGRATE parameter as will be explained below.

  • BGRATE 11.0
The rate of generated background photons in GHz in the Tagger region ( before the collimator). 
This parameter should be set either to 1.1 or 11.0 corresponding to intensities of a tagged photon 
beam of 10^7 and 10^8 photons/sec on target, respectively. To simulate the rate for high-luminosity 
runs (10^8 photons/sec) one should use 11.0.
  • BGGATE min max
Time interval in ns, the earliest (min) and the latest (max) time, where the background photons are  
produced. This parameters is used for the simulation of electromagnetic pile-up events.

To detector responses for electromagnetic background can be studied using three typical types of MC events, which can be generated as follows:

Example 1

MC sample containing a single photon per event

The following parameters have to be set in the file

  • BEAM 12. 9. THR

where THR is the optional parameter defining a threshold on the minimal bremsstrahlung photon energy. If not specified, the default value of 0.12 GeV is used.

Note, bremsstrahlung photons are generated prio to the collimator, i.,e., a photon is NOT required to pass throught the collimator into a detector area - in most cases it gets stuck in collimator volumes. Therefore, in most MC generated events, you don't see the photon in the target region; the number of photons which pass throught the collimator is, on average, about a factor of seven less than that produced in the entire energy spectrum.

Example 2

Electromagnetic interaction superimposed on top of hadronic decays of interest (event pile-up)

Every hadronic event in this MC is mixed with ( several ) electromagnetic interactions. The background beam photons are generated within the time window given by BGGATE parameter. The following parameters should be used in the file:

  • INFILE 'dir/file_name.hddm'

Input file with hadronic events (which will be mixed with the EM background)

  • BEAM 12. 9. THR
  • BGGATE min max
  • BGRATE rate (use 11 for the luminosity of 10^8 photons/sec)

Example 3

Pile-up of pure electromagnetic interactions

This MC contains event pile-up of electromagnetic interactions only. Similar to the Example 2, multiple photons are generated within a time interval given by the parameter BGGATE. In the file one should use the same parameters as that explained in the Example 2, except for the INFILE. For the input events specified in the INFILE one can use events with 'dummy' photons (one photon per event), which energy is so small that they cannot be seen in the detector. These photon events can be generated using 'genphoton' program as follows (this procedure should be changed in the future).

genphoton -M numEvents -Pmax 0.00001 -Pmin 0.000005 -Thetamin 0. -Thetamax 0.001 -o file_out.ascii

Here, 'genphoton' generates the total number of 'numEvents' events, each event contains a photon in the momentum range between Pmin and Pmax (GeV/c). The output file 'file_out.ascii' should subsequently be converted into an hddm file using

genr8_2_hddm file_out.ascii.

The resulting hddm file should be used as the input parameter for INFILE.

If you want to use the EBREMS_MIN parameter, you have to make sure that you have updated the latest HDGeant svn version, in particular beamgen.F, uginit.F, and files.

Depending on the studies you want to do, sometimes it is practical to enable/disable some physics processes in

GEANT by setting corresponding cards in the file. For example

 MULS [imuls] 

Controls multiple scattering

  • IMULS = 0 no multiple scattering
  • IMULS = 1 Moliere or Coulomb scattering (default)
 BREM [ibrem]

Controls bremsstrahlung

  • IBREM = 0 no bremsstrahlung
  • IBREM = 1 bremsstrahlung (default)
  • IBREM = 2 bremsstrahlung, no photon stored
 COMP [icomp]

Controls Compton scattering

  • ICOMP = 0 no Compton
  • ICOMP = 1 Compton scattering (defauls)
  • ICOMP = 2 Compton scattering, no electron stored
 PAIR [ipair]

Controls e+/e- pair production

  • IPAIR = 0 no pair production
  • IPAIR = 1 pair production (default)
  • IPAIR = 2 pair production, no secondaries stored
LOSS [iloss]

Controls energy losses

  • ILOSS = 0 no energy loss
  • ILOSS = 1 delta-rays are produced above the threshold (DCUTE). Reduced fluctuations from delta-rays below

the threshold are added to the energy losses

  • ILOSS = 2 no delta-rays are produced. Complete fluctuations are calculated (default)

Note, if you want to produce delta-electrons in your simulation, you have to set ILOSS to 1. The threshold energies for delta-ray production can be set using the CUTS card in the file. The fields 'dcute' and 'dcutm' in the CUTS card correspond to energy thresholds for electron and muon delta-rays, respectively. The default energy threshold value (for ILOSS = 1) is 100 keV.