21#ifndef BDSHEPMC3READER_H
22#define BDSHEPMC3READER_H
24#include "BDSEventGeneratorFileType.hh"
27#include "G4RotationMatrix.hh"
28#include "G4ThreeVector.hh"
29#include "G4VPrimaryGenerator.hh"
65 const G4String& fileNameIn,
67 G4bool removeUnstableWithoutDecayIn =
true,
68 G4bool warnAboutSkippedParticlesIn =
true);
76 virtual void GeneratePrimaryVertex(G4Event* anEvent);
93 void HepMC2G4(
const HepMC3::GenEvent* hepmcevt, G4Event* g4event);
97 virtual G4bool VertexInsideWorld(
const G4ThreeVector& pos)
const;
102 HepMC3::GenEvent* hepmcEvent;
105 HepMC3::Reader* reader;
108 G4bool removeUnstableWithoutDecay;
109 G4bool warnAboutSkippedParticles;
111 G4RotationMatrix referenceBeamMomentumOffset;
112 mutable G4VSolid* worldSolid;
A wrapper of BDSBunch to include a filter for the events loaded by an event generator.
Loader to use any HepMC3 compatible file.
BDSHepMC3Reader()=delete
Do not require default constructor.
virtual void RecreateAdvanceToEvent(G4int eventOffset)
Advance to the correct event number in the file for recreation.
void OpenFile()
Construct the member "reader" and open the file for reading.
void ReadSingleEvent()
Clear the hepmcEvent object, reallocate and read a single event and fill that member.
void HepMC2G4(const HepMC3::GenEvent *hepmcevt, G4Event *g4event)
Conversion from HepMC::GenEvent to G4Event.
HepMC3::GenEvent * GetHepMCGenEvent() const
Accessor.