Difference between revisions of "HOWTO to generate electromagnetic background"
(small corrections) |
|||
Line 1: | Line 1: | ||
This page explains how to generate MC samples with electromagnetic background. There are several parameters which have | 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: | + | to be set in the '''control.in''' file to handle the simulation: |
* BEAM 12. 9. | * BEAM 12. 9. | ||
− | Electron beam energy and | + | Electron beam energy and an upper edge of the coherent Bremsstrahlung peak. |
* BGRATE 11.0 | * BGRATE 11.0 | ||
− | The rate of generated 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 corresponding to intensities | + | 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 | * BGGATE min max | ||
− | Time interval in | + | 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. | |
* EBREMS_MIN Thr | * EBREMS_MIN Thr | ||
The low energy of generated Bremsstrahlung photons, Thr. 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: | |
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 a photon energy threshold, Thr. The value | where K is a calibration coefficient which depends on a photon energy threshold, Thr. The value | ||
Line 24: | Line 24: | ||
by the BGRATE 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 | + | 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 types of MC 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 == | == Example 1 == | ||
Line 35: | Line 37: | ||
Optional | Optional | ||
* EBREMS_MIN THR | * EBREMS_MIN THR | ||
− | THR is a threshold on the | + | where THR is a threshold on the minimal bremsstrahlung photon energy. The default value is 0.12 GeV. |
− | Note, | + | 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. | 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 | + | which pass throught the collimator is, on average, about a factor of seven less than that produced in the |
− | entire energy spectrum | + | entire energy spectrum. |
== Example 2 == | == Example 2 == | ||
− | '''Electromagnetic interaction superimposed | + | '''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 | |
− | generated within the time window given by BGGATE parameter. The following parameters should be used in the | + | photons are generated within the time window given by BGGATE parameter. The following parameters should be |
− | control.in file | + | used in the control.in file: |
* INFILE 'dir/file_name.hddm' | * INFILE 'dir/file_name.hddm' | ||
− | Input file with hadronic | + | Input file with hadronic events (which will be mixed with the EM background) |
* BEAM 12. 9. | * BEAM 12. 9. | ||
Line 66: | Line 68: | ||
'''Pile-up of pure electromagnetic interactions''' | '''Pile-up of pure electromagnetic interactions''' | ||
− | This MC | + | This MC contains event pile-up of electromagnetic interactions only. |
− | Similar to the Example 2, photons are generated within a time interval given by parameter BGGATE. | + | 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 | |
− | for the INFILE. For the input events one can use events | + | 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). | (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 | + | '''genphoton -M numEvents -Pmax 0.00001 -Pmin 0.000005 -Thetamin 0. -Thetamax 0.001 -o file_out.ascii''' |
− | Here, 'genphoton' generates | + | Here, 'genphoton' generates the total number of 'numEvents' events, each event contains a |
− | photon in the | + | photon in the momentum range between Pmin and Pmax (GeV/c). The output file 'file_out.ascii' should |
− | be converted into an hddm file using | + | subsequently be converted into an hddm file using |
− | genr8_2_hddm file_out.ascii | + | '''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 | + | 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. | svn version, in particular beamgen.F, uginit.F, and control.in files. |
Revision as of 18:13, 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 file to handle the simulation:
- BEAM 12. 9.
Electron beam energy and an upper edge 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 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.
- 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.
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.
Optional
- EBREMS_MIN THR
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 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.
- 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 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.