19#ifndef BDSROOTSAMPLERREADER_H
20#define BDSROOTSAMPLERREADER_H
23#include "G4RotationMatrix.hh"
24#include "G4ThreeVector.hh"
25#include "G4VPrimaryGenerator.hh"
32class G4PrimaryParticle;
52 const G4String& fileNameIn,
54 G4bool removeUnstableWithoutDecayIn =
true,
55 G4bool warnAboutSkippedParticlesIn =
true);
67 G4PrimaryParticle* vertex;
81 void ReadPrimaryParticlesFloat(G4long index);
82 void ReadPrimaryParticlesDouble(G4long index);
85 G4long currentFileEventIndex;
91 G4bool removeUnstableWithoutDecay;
92 G4bool warnAboutSkippedParticles;
93 G4RotationMatrix referenceBeamMomentumOffset;
94 mutable G4VSolid* worldSolid;
104 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 GeneratePrimaryVertex(G4Event *anEvent)
Read the next non-empty sampler entry from the file.
virtual void RecreateAdvanceToEvent(G4int eventOffset)
Advance to the correct event number in the file for recreation.
std::vector< DisplacedVertex > vertices
Used for transiently loading information.
void ReadSingleEvent(G4long index)
Clear the hepmcEvent object, reallocate and read a single event and fill that member.
G4bool anyParticlesFoundAtAll
virtual G4bool VertexInsideWorld(const G4ThreeVector &pos) const
Conversion from HepMC::GenEvent to G4Event.
BDSROOTSamplerReader()=delete
Do not require default constructor.