19#ifndef BDSPRIMARYGENERATORFILE_H
20#define BDSPRIMARYGENERATORFILE_H
22#include "G4ThreeVector.hh"
24#include "G4VPrimaryGenerator.hh"
103 G4bool endOfFileReached;
104 G4bool vertexGeneratedSuccessfully;
105 G4long currentFileEventIndex;
106 G4long nEventsInFile;
107 G4long nEventsReadThatPassedFilters;
108 G4long nEventsSkipped;
109 mutable G4VSolid* worldSolid;
A wrapper of BDSBunch to include a filter for the events loaded by an event generator.
The base class for bunch distribution generators.
Common interface for any primary generators that are file based.
G4long NEventsReadThatPassedFilters() const
Accessor.
G4bool DistributionIsFinished() const
Report whether the distribution is finished generating.
G4bool GeneratePrimaryVertexSafe(G4Event *event)
Return false if not able to generate a primary vertex.
void ThrowExceptionIfRecreateOffsetTooHigh(G4long eventOffset) const
G4bool VertexInsideWorld(const G4ThreeVector &pos) const
Utility function for derived classes to check a position is inside the world.
G4long NEventsInFile() const
G4bool OKToLoopFile() const
virtual void RecreateAdvanceToEvent(G4int eventOffset)=0
Advance into the file as required.
G4long NEventsLeftInFile() const
static BDSPrimaryGeneratorFile * ConstructGenerator(const GMAD::Beam &beam, BDSBunch *bunchIn, G4bool recreate, G4int eventOffset, G4bool batchMode)
G4long NEventsSkipped() const
Return the offset into the file if any.
Parser namespace for GMAD language. Combination of Geant4 and MAD.