Difference between revisions of "HOWTO use hdgeant4 as a beam Monte Carlo generator"

From GlueXWiki
Jump to: navigation, search
(GENBEAM 'precol')
Line 12: Line 12:
 
===GENBEAM 'precol'===
 
===GENBEAM 'precol'===
 
This is the simplest GENBEAM option. There are no detector hits in the output hddm file. The only content in the output events is the <reaction> tag, as illustrated in the example below.
 
This is the simplest GENBEAM option. There are no detector hits in the output hddm file. The only content in the output events is the <reaction> tag, as illustrated in the example below.
<code><pre>
+
<pre>
 
     <reaction type="0" weight="0">
 
     <reaction type="0" weight="0">
 
       <beam type="Photon">
 
       <beam type="Photon">
Line 35: Line 35:
 
       <random seed1="691877422" seed2="281623319" seed3="709975947" seed4="912931183" />
 
       <random seed1="691877422" seed2="281623319" seed3="709975947" seed4="912931183" />
 
     </reaction>
 
     </reaction>
</pre></code>
+
</pre>
  
 
==Monte Carlo beam generation in hdgeant4==
 
==Monte Carlo beam generation in hdgeant4==

Revision as of 21:17, 21 May 2021

Internal beam generator in hdgeant

In HOWTO to generate electromagnetic background the use of the BEAM card in control.in to activate the built-in coherent photon beam generator was described. One use case for this internal beam generator is to model beam-related scattering background that overlays the signals from hadronic reactions produced by the beam interacting in the GlueX target. Now that we have large samples of random and PS triggers to provide a more accurate representation of these backgrounds, that functionality is no longer widely used for physics simulations. However, there are other use cases for the built-in coherent beam generator that remain relevant, including the following.

  1. simulation of the PS acceptance
  2. simulation of the beam transverse intensity and polarization profile
  3. simulation of the TPOL trigger, acceptance, and analyzing power
  4. simulation of Compton and Bethe Heitler reactions in the GlueX target
  5. any other process whose acceptance might be sensitive to the transverse beam position and momentum profile

In order to support the full range of possible applications listed above, I decided to introduce a new feature to control.in, in addition to the BEAM card. This new feature is enabled by the GENBEAM card. When the GENBEAM feature is active, hdgeant switches from functioning primarily as a particle track simulator that follows particles and induces interactions as they traverse the setup geometry to a Monte Carlo generator that generates output records consisting not of detector hits, but either a single beam particle or an interaction vertex with final state positions and momenta to be simulated later. In this way, GENBEAM transforms hdgeant from a simulation to an event generator, with the one proviso that the results of the generator are dependent in a significant way on the beamline geometry and the specific beam properties from the conditions database for the run number specified in the control.in file.

GENBEAM 'precol'

This is the simplest GENBEAM option. There are no detector hits in the output hddm file. The only content in the output events is the <reaction> tag, as illustrated in the example below.

    <reaction type="0" weight="0">
      <beam type="Photon">
        <momentum E="8.8443" px="-2.36241e-05" py="-0.000160787" pz="8.8443" />
        <polarization Px="2.98534e-17" Py="0.487544" Pz="8.86341e-06" />
      </beam>
      <vertex>
        <product decayVertex="0" id="1" mech="0" parentid="0" pdgtype="11" type="Electron">
          <momentum E="12.0003" px="-0.000104861" py="2.44356e-05" pz="12.0003" />
        </product>
        <origin t="-78.2157" vx="0.0370969" vy="0.0463277" vz="-2400" />
      </vertex>
      <vertex>
        <product decayVertex="1" id="2" mech="1447972675" parentid="1" pdgtype="-11" type="Positron">
          <momentum E="8.13388" px="0.000199175" py="3.44537e-05" pz="8.13388" />
        </product>
        <product decayVertex="1" id="3" mech="1447972675" parentid="1" pdgtype="11" type="Electron">
          <momentum E="0.710417" px="-0.000240677" py="-0.000208066" pz="0.710417" />
        </product>
        <origin t="-48.7982" vx="0.0808514" vy="-0.123347" vz="-1518.09" />
      </vertex>
      <random seed1="691877422" seed2="281623319" seed3="709975947" seed4="912931183" />
    </reaction>

Monte Carlo beam generation in hdgeant4