GLG4VertexGen_HEPEvt Class Reference

Ratpac-two: GLG4VertexGen_HEPEvt Class Reference
Ratpac-two

#include <GLG4VertexGen.hh>

Inheritance diagram for GLG4VertexGen_HEPEvt:
GLG4VertexGen

Public Types

enum  {
  kIonCodeOffset = 9800000 , kPDGcodeModulus = 10000000 , kISTHEP_ParticleForTracking = 1 , kISTHEP_InformatonMin = 100 ,
  kISTHEP_Max = 213
}
 

Public Member Functions

 GLG4VertexGen_HEPEvt (const char *arg_dbname="external")
 
virtual void GeneratePrimaryVertex (G4Event *argEvent, G4ThreeVector &dx, G4double dt)
 
virtual void SetState (G4String newValues)
 
virtual G4String GetState ()
 
void Open (const char *argFilename)
 
void GetDataLine (char *buffer, size_t size)
 
void Close ()
 
void SetUseExternalPos (bool val)
 
bool GetUseExternalPos ()
 
- Public Member Functions inherited from GLG4VertexGen
 GLG4VertexGen (const char *arg_dbname="vertex")
 
virtual bool ELimitable ()
 
virtual void LimitEnergies (double, double)
 
virtual double EMaximum ()
 
virtual double EMinimum ()
 

Protected Attributes

G4String _filename
 
FILE * _file
 
bool _isPipe
 
bool _useExternalPos
 
- Protected Attributes inherited from GLG4VertexGen
G4String _dbname
 

Detailed Description

vertex generator that generates a primary vertex based on information from an ASCII stream. The ASCII stream contains information in a HEPEVT-like style.

Member Function Documentation

◆ GeneratePrimaryVertex()

void GLG4VertexGen_HEPEvt::GeneratePrimaryVertex ( G4Event *  argEvent,
G4ThreeVector &  dx,
G4double  dt 
)
virtual

Generates one or more particles with type, momentum, and optional time offset, spatial offset, and polarization, based on lines read from file via SetState().

The file has the standard HEPEVT foramt. Below is the documentation for this format, described in the MARLEY documentation:

NEVHEP NHEP

where NEVHEP is the event number and NHEP is the number of particles in the event. The header is followed by NHEP lines, each representing a single particle. These have the format:

ISTHEP IDHEP JMOHEP1 JMOHEP2 JDAHEP1 JDAHEP2 PHEP1 PHEP2 PHEP3 PHEP4 PHEP5 VHEP1 VHEP2 VHEP3 VHEP4

where ISTHEP is an integer code identifying the particle status and IDHEP is the particle’s PDG code. In agreement with the HEPEVT standard, MARLEY uses status code 1 for the final-state particles and 3 for the initial-state particles. The JMOHEP1, JMOHEP2, JDAHEP1, and JDAHEP2 entries record the indices (between 1 and NHEP, inclusive) of particles in the event record that correspond to the first mother, second mother, first daughter, and last daughter of the current particle, respectively. These indices are set to zero in cases where they do not apply (e.g., a particle with no daughters will have JDAHEP1 = JDAHEP2 = 0). Entries PHEP1 through PHEP3 record the x-, y-, and z-components of the particle 3-momentum, while PHEP4 gives the total energy and PHEP5 gives the particle mass (all in GeV). Entries VHEP1 through VHEP3 store the x, y, and z positions of the particle production vertex (mm), and VHEP4 gives the production time (mm/c). Additional References: https://doi.org/10.5170/CERN-1989-008-V-3

Implements GLG4VertexGen.

◆ SetState()

void GLG4VertexGen_HEPEvt::SetState ( G4String  newValues)
virtual

Set source of HEPEVT ascii data for this generator, or print current source and help. Format of string: either "filename" or "shell_command (arguments) |".

Implements GLG4VertexGen.


The documentation for this class was generated from the following files:
  • /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/gen/include/RAT/GLG4VertexGen.hh
  • /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/gen/src/GLG4VertexGen.cc