Difference between revisions of "HOWTO to generate electromagnetic background"

From GlueXWiki
Jump to: navigation, search
(small corrections)
Line 2: Line 2:
 
to be set in the '''control.in''' file to handle the simulation:
 
to be set in the '''control.in''' file to handle the simulation:
  
*  BEAM  12. 9.
+
*  BEAM  Emax Epeak Emin
  Electron beam energy and an upper edge of the coherent Bremsstrahlung peak.
+
  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)
 +
 
 +
[[Image:scale_em_rate.jpg|thumb|right|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  
 
*  BGRATE  11.0  
Line 15: Line 30:
 
  produced. This parameters is used for the simulation of electromagnetic pile-up events.
 
  produced. This parameters is used for the simulation of electromagnetic pile-up events.
  
*  EBREMS_MIN  Thr
+
 
The low energy of generated Bremsstrahlung photons, Thr. If EBREMS_MIN is commented, or set to 0,
+
the default photon-energy threshold of 0.12 GeV is used. If EBREM_MIN 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. The value
+
of K as function of the energy threshold is shown in Fig. 1. Note, Rate(E_gamma = 0.12 Gev) can be set
+
by the BGRATE parameter as has been explained in the previous paragraph.
+
[[Image:scale_em_rate.jpg|thumb|right|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. ]]
+
  
 
To detector responses for electromagnetic background can be studied using three typical types of MC events,  
 
To detector responses for electromagnetic background can be studied using three typical types of MC events,  
Line 33: Line 38:
 
'''MC sample containing a single photon per event'''
 
'''MC sample containing a single photon per event'''
  
The following parameters have to be set in the control.in file
+
The following parameters have to be set in the control.in file
* BEAM 12. 9.
+
* BEAM 12. 9. THR
Optional
+
where THR is the optional parameter defining a threshold on the minimal bremsstrahlung photon energy.  
* EBREMS_MIN    THR
+
If not specified, the default value of 0.12 GeV is used.
where THR is a threshold on the minimal bremsstrahlung photon energy. The default value is 0.12 GeV.
+
  
 
Note, bremsstrahlung photons are generated prio to  the collimator, i.,e., a photon is NOT required to pass  
 
Note, bremsstrahlung photons are generated prio to  the collimator, i.,e., a photon is NOT required to pass  
Line 55: Line 59:
 
Input file with hadronic events (which will be mixed with the EM background)
 
Input file with hadronic events (which will be mixed with the EM background)
  
*  BEAM 12. 9.
+
*  BEAM 12. 9. THR
  
 
*  BGGATE  min  max
 
*  BGGATE  min  max
Line 61: Line 65:
 
*  BGRATE  rate  (use 11 for the luminosity of 10^8 photons/sec)
 
*  BGRATE  rate  (use 11 for the luminosity of 10^8 photons/sec)
  
Optional
 
 
* EBREMS_MIN    THR  ( The default value is 0.12 GeV if this parameter is commented or set to 0)
 
  
 
== Example 3 ==  
 
== Example 3 ==  

Revision as of 10:13, 20 May 2008

This page explains how to generate MC samples with electromagnetic background. There are several parameters which have to be set in the control.in 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 control.in 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 control.in 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 control.in 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 control.in files.