Instructions for Generating Simulations

From GlueXWiki
Jump to: navigation, search

It is useful to think about the production of MC as broken into 4 distinct but related parts: 1) Generation 2) Geant 3) Smearing 4) Reconstruction

The Generation step is devoted to producing the four-vectors of the desired channel. There are many generators with varying degrees of complexity; Some, such as genr8, use only mono-energetic beam photons with uniform distributions with minimal constraints (e.g. E conservation). Others, such as gen_2pi_amp, have the ability to put in amplitudes of the reaction and use a coherent bremsstrahlung distribution for the energy of the beam photon. At the end of the day generators start by taking in the desired decay(s) and other parameters needed and generates sets of four-vectors defining the kinematics of the reaction in hddm format for input into Geant.

Geant then takes in these four vectors and pushes them through the actual detector. It is in this step that the geometry of the hall is needed. Geant calculates the interactions of the particles generated and attempts to measure the detector response (e.g. hits are determined and recorded). Currently, hdgeant and hdgeant4 exist to handle this task and are based on geant3 and geant4 respectively. In either case an hddm format file is produced for input either into smearing or reconstruction.

The Smearing step is technically optional and functions to make the pristine hits from Geant and make them look like real data. In a perfect world completion of this step would yield output that was indistinguishable from data; in reality this step tunes the output from geant to better approximate the data. Mcsmear exists to handle this step. The output of this step is hddm and can be used for reconstruction.

Finally, Reconstruction is performed. Reconstruction takes the lower level objects present in Geant/mcsmear output and forms higher level objects for analysis. hd_root exists to handle this step and uses a plugin system to process the input. These plugins can have arbitrary output (more or less) and some, such as danarest, strip out the low level hit information in favour of leaving only high level objects (e.g. tracks). Other examples include DReaction plugins which can produce trees and histograms of your reaction.

To actually accomplish all of this one may create their own production mechanism(s) or one may turn to MCwrapper to handle much of the nuance of each step automatically.

An overview of this process can also be found in this presentation.