19#ifndef BDSPRIMARYGENERATORACTION_H
20#define BDSPRIMARYGENERATORACTION_H
22#include "BDSExtent.hh"
25#include "G4VUserPrimaryGeneratorAction.hh"
The base class for bunch distribution generators.
Holder for +- extents in 3 dimensions.
Loader to use any HepMC3 compatible file.
Loader of ROOT Event output for recreating events.
Class to load and use PTC 1 turn map.
Generates primary particle vertices using BDSBunch.
G4bool recreate
Whether to load seed state at start of event from rootevent file.
G4ParticleGun * particleGun
Geant4 particle gun that creates single particles.
G4int eventOffset
The offset in the file to read events from when setting the seed.
G4bool useASCIISeedState
Whether to use the ascii seed state each time.
G4bool ionPrimary
The primary particle will be an ion.
BDSPrimaryGeneratorAction(BDSBunch *bunchIn, const GMAD::Beam &beam)
Bunch must have a valid particle definition (ie not nullptr).
G4bool useEventGeneratorFile
Whether to use event generator file.
void RegisterPTCOneTurnMap(BDSPTCOneTurnMap *otmIn)
void SetWorldExtent(const BDSExtent worldExtentIn)
Set the world extent that particle coordinates will be checked against.
BDSExtent worldExtent
World extent that particle coordinates are checked against to ensure they're inside it.
G4bool useSamplerLoader
Whether to use a sampler loader.
BDSBunch * bunch
BDSIM particle generator.
virtual void GeneratePrimaries(G4Event *)
Main interface for Geant4. Prepare primary(ies) for the event.
BDSHepMC3Reader * hepMC3Reader
Event generator file loader.
BDSPTCOneTurnMap * oneTurnMap
Cached OTM for setting first turn primary coords.
G4bool writeASCIISeedState
Cache of whether to write seed state as ASCII per event.
BDSOutputLoader * recreateFile
Optional output handler for restoring seed state.
Loader to read a specific sampler from a BDSIM ROOT output file.
Parser namespace for GMAD language. Combination of Geant4 and MAD.