19#ifndef BDSPRIMARYGENERATORFILE_H
20#define BDSPRIMARYGENERATORFILE_H
22#include "G4ThreeVector.hh"
24#include "G4VPrimaryGenerator.hh"
108 G4bool endOfFileReached;
109 G4bool vertexGeneratedSuccessfully;
110 G4long currentFileEventIndex;
111 G4long nEventsInFile;
112 G4long nEventsReadThatPassedFilters;
113 G4long nEventsSkipped;
114 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.