Simulating data - ATTPC/ATTPCROOTv2 Wiki

A perquisite to simulating data is having a detector geometry to use, see Preparing the detector geometry and a proper parameter file for the simulation, see Parameter files.

Generating physics

Each "event" is split into two phases, the beam phase and the reaction phase. Internally these are different events. What that means is that events 0 and 1 in the code constitute a full, physical beam induced event. Likewise events 2 and 3 are the next beam induced event, etc.

Particles are tracked by an internal counter fTrackID. fTrackID = 0 is the beam. The value these have determine how the TPC detector handles adding the track.

The folder macro/Simulation holds all of the ROOT macros for physics simulations. These produce two ROOT files, one is the actual output file that holds track information. The other is a parameter file generated by the process. These simulations can be run using either the Geant4 or Geant3 monte-carlo engine.

For every simulation, the detector must be created, and a geometry file set. A FairPrimaryGenerator must also exist. This is responsible for managing all of the other generators.(True?)

Typically, an ATTPCIonGenerator is used to create the beam. It creates an ion within some beamspot and adds a track to the primary generator. It also generates a random number between 0 and the nominal beam energy (or some other specified value) that is stored in the global instance of ATVertexPropagator (gATVP). When the beam particle (TrackID = 0) looses energy equal to this random number, the simulation stops the track. Due to the tracking of the TrackID and aATVP's tracking of the current track number, tracks from the beam/reaction generator are only added when it is the right type of event (even = beam, odd = reaction).


This class takes two input files. One is a space seperated file that contains a list of every ion used by that fission simulation so they can be registered for the run. The other is root file containing a tree with the simulation data for the fission fragments int he CM frame. It has the structure:

trEvents ->

  • nTracks /I
  • Aout[nTracks] /I
  • Zout[nTracks] /I
  • pX[nTracks] /D in units MeV/c
  • pY[nTracks] /D in units MeV/c
  • pZ[nTracks] /D in units MeV/c
  • pT[nTracks] /D in units MeV/c

During a run, the generator will boost the fragments before generating the particles to the beam momentum. It pulls the beam momentum from the global vertex propogator.

There is a macro for generating these input files in macro/Simulation/E12014.