Difference between revisions of "HOWTO to generate electromagnetic background"

From GlueXWiki
Jump to: navigation, search
(Headline text)
Line 1: Line 1:
This page contains some general descriptions of the generation procedures
+
This page explains how to generate MC samples with electromagnetic background. There are several parameters which have
of electromagnetic background. There are several parameters which has to be
+
to be set in the '''control.in''' to handle the simulation:
set up in the control.in to handle the simulation:
+
  
 
*  BEAM  12. 9.  
 
*  BEAM  12. 9.  
Line 7: Line 6:
  
 
*  BGRATE  11.0  
 
*  BGRATE  11.0  
  The rate of background photons in GHz (in the Tagger region before the collimator).  
+
  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 which would correspond to intensities
+
  This parameter should be set either to 1.1 or 11.0 corresponding to intensities
  of the tagged photon beam of 10^7 and 10^8 photons/sec on target, respectively. For
+
  of a tagged photon beam of 10^7 and 10^8 photons/sec on target, respectively. To simulate
 
  high-luminosity runs one should use 11.0.
 
  high-luminosity runs one should use 11.0.
  
*  BGGATE  -50.   50.
+
*  BGGATE  min   max
  Time interval in the ns, the earliest and the latest time, where the background photons are  
+
  Time interval in the ns, the earliest (min) and the latest (max) time, where the background  
  produced. This parameters is used to simulate electromagnetic pile-up events.
+
photons are  produced. This parameters is used for simulation of electromagnetic pile-up events.
  
*  EBREMS_MIN 0.12
+
*  EBREMS_MIN Thr
  The low energy of generated Bremsstrahlung photons. If EBREMS_MIN is commented, or set to 0,  
+
  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  
 
  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:
 
  generated background photons is automatically scaled as follows:
 
       Rate(E_gamma > Thr)  =  Rate(E_gamma = 0.12 Gev) *K( E_gamma = Thr),
 
       Rate(E_gamma > Thr)  =  Rate(E_gamma = 0.12 Gev) *K( E_gamma = Thr),
  where K is a calibration coefficient which depends on the photon energy threshold, Thr. The dependence
+
  where K is a calibration coefficient which depends on a photon energy threshold, Thr. The value
  of K on the energy threshold is shown in Fig. 1. Note, Rate(E_gamma = 0.12 Gev) is set by the BGRATE  
+
  of K as function of the energy threshold is shown in Fig. 1. Note, Rate(E_gamma = 0.12 Gev) can be set  
parameter as has been explained in the previous paragraph.
+
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  
 
[[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]]
 
energy threshold of generated Bremsstrahlung photons. The scale factor equals to 1 at E_gamma = 0.12 GeV]]
  
 +
To detector responses for electromagnetic background can be studied using three types of MC events:
  
== Examples ==
+
== Example 1 ==  
 +
'''MC sample containing a single photon per event'''
  
To study detector responses for electromagnetic background the following MC samples
+
The following parameters have to be set in the control.in file
can be used:
+
* BEAM 12. 9.
 +
Optional
 +
* EBREMS_MIN    THR
 +
THR is a threshold on the min  Bremsstrahlung photon  energy. The default value is 0.12 GeV.
  
# MC sample containing a single photon per event.
+
Note, Bremsstrahlung photons are generated befor the collimator, i.,e., a photon is NOT required to pass  
Note, the photon is NOT required to pass throught the collimator into a detector area,
+
throught the collimator into a detector area - in most cases it gets stuck in collimator volumes
i.e., in most cases it will get stuck in the collimator volumes (the number of photons which
+
Therfore, in most MC generated events, you don't see the photon in the target region (the number of photons  
pass throught the collimator is, on average, about a factor of seven less than that produced  
+
which pass throught the collimator is, on average, about a factor of seven less than that produced for the  
for the entire energy spectrum). The following parameters has to be set in the control.in file
+
entire energy spectrum).
  
* BEAM 12. 9.
+
== Example 2 ==
 +
'''Electromagnetic interaction superimposed with hadronic decays of interest (event pile-up),'''
  
 +
i.e., every hadronic event is mixed with 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 interactions (which will be mixed with the EM background)
 +
 
 +
*  BEAM 12. 9.
 +
 
 +
*  BGGATE  min  max
 +
 
 +
*  BGRATE  rate  (use 11 for the luminosity of 10^8 photons/sec)
  
 
Optional
 
Optional
  
* EBREMS_MIN    THR
+
* EBREMS_MIN    THR  ( The default value is 0.12 GeV if this parameter is commented or set to 0)
THR is a threshold on the min Bremsstrahlung photon  energy. The default value is 0.12 GeV.
+
 
 +
== Example 3 ==
 +
'''Pile-up of pure electromagnetic interactions'''
 +
 
 +
This MC samples contain event pile-up for electromagnetic interactions only.  
 +
Similar to the Example 2, photons are generated within a time interval given by parameter BGGATE.
 +
The same parameters in the control.in file as that from Example 2 should be used except,
 +
for the INFILE. For the input events one can use events containig 'dummy' low-energy photons which
 +
are not seen in the detector. These 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 a MC sample with the number of events numEvents, each event contains a
 +
photon in the energy range Pmax and Pmin (GeV). The output file 'file_out.ascii' should subsequently
 +
be converted into an hddm file using
 +
 
 +
genr8_2_hddm file_out.ascii
 +
 
 +
Produced hddm file should be used as the input file in INFILE.
 +
 
 +
 
 +
----
  
# Pile-up of electromagnetic background. MC sample with electromagnetic interactions superimposed
+
If you want to use the EBREMS_MIN parameter, you have to make sure that you are using the latest HDGeant
in a specific time interval. The time interval might correspond to the trigger or readout integration
+
svn version, in particular beamgen.F, uginit.F, and control.in files.
gates
+

Revision as of 16:54, 15 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 to handle the simulation:

  • BEAM 12. 9.
Electron beam energy and position of the coherent Bremsstrahlung peak.
  • 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 
high-luminosity runs one should use 11.0.
  • BGGATE min max
Time interval in the ns, the earliest (min) and the latest (max) time, where the background 
photons are  produced. This parameters is used for 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.
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

To detector responses for electromagnetic background can be studied using three types of MC events:

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.

Optional

  • EBREMS_MIN THR

THR is a threshold on the min Bremsstrahlung photon energy. The default value is 0.12 GeV.

Note, Bremsstrahlung photons are generated befor 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. Therfore, 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 for the entire energy spectrum).

Example 2

Electromagnetic interaction superimposed with hadronic decays of interest (event pile-up),

i.e., every hadronic event is mixed with 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 interactions (which will be mixed with the EM background)

  • BEAM 12. 9.
  • BGGATE min max
  • 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

Pile-up of pure electromagnetic interactions

This MC samples contain event pile-up for electromagnetic interactions only. Similar to the Example 2, photons are generated within a time interval given by parameter BGGATE. The same parameters in the control.in file as that from Example 2 should be used except, for the INFILE. For the input events one can use events containig 'dummy' low-energy photons which are not seen in the detector. These 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 a MC sample with the number of events numEvents, each event contains a photon in the energy range Pmax and Pmin (GeV). The output file 'file_out.ascii' should subsequently be converted into an hddm file using

genr8_2_hddm file_out.ascii

Produced hddm file should be used as the input file in INFILE.



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