19#ifndef BDSPRIMARYGENERATORFILESAMPLER_H
20#define BDSPRIMARYGENERATORFILESAMPLER_H
22#include "BDSPrimaryGeneratorFile.hh"
24#include "G4RotationMatrix.hh"
26#include "G4ThreeVector.hh"
34class G4PrimaryParticle;
54 const G4String& fileNameIn,
57 G4bool removeUnstableWithoutDecayIn =
true,
58 G4bool warnAboutSkippedParticlesIn =
true);
70 G4PrimaryParticle* vertex;
85 void ReadPrimaryParticlesDouble(G4long index);
91 G4bool removeUnstableWithoutDecay;
92 G4bool warnAboutSkippedParticles;
93 G4RotationMatrix referenceBeamMomentumOffset;
98 std::vector<G4PrimaryVertex*> currentVertices;
A wrapper of BDSBunch to include a filter for the events loaded by an event generator.
Loader of ROOT Event output for receating events.
Loader to read a specific sampler from a BDSIM ROOT output file.
virtual void RecreateAdvanceToEvent(G4int eventOffset)
Advance to the correct event number in the file for recreation.
void ReadSingleEvent(G4long index, G4Event *anEvent)
Read sampler hits and put into primary vertices if they pass filters.
std::vector< DisplacedVertex > vertices
Used for transiently loading information.
BDSPrimaryGeneratorFileSampler()=delete
Do not require default constructor.
void ReadPrimaryParticlesFloat(G4long index)
Conversion from HepMC::GenEvent to G4Event.
void SkipEvents(G4long nEventsToSkip)
virtual void GeneratePrimaryVertex(G4Event *anEvent)
Read the next non-empty sampler entry from the file.
Common interface for any primary generators that are file based.