21#ifndef BDSPRIMARYGENERATORHEPMC_H
22#define BDSPRIMARYGENERATORHEPMC_H
24#include "BDSEventGeneratorFileType.hh"
25#include "BDSPrimaryGeneratorFile.hh"
28#include "G4RotationMatrix.hh"
29#include "G4ThreeVector.hh"
30#include "G4VPrimaryGenerator.hh"
65 const G4String& fileNameIn,
68 G4bool removeUnstableWithoutDecayIn =
true,
69 G4bool warnAboutSkippedParticlesIn =
true);
87 void OpenFile(G4bool usualPrintOut =
true);
106 void HepMC2G4(
const HepMC3::GenEvent* hepmcevt, G4Event* g4event);
111 HepMC3::GenEvent* hepmcEvent;
114 HepMC3::Reader* reader;
116 G4bool removeUnstableWithoutDecay;
117 G4bool warnAboutSkippedParticles;
119 G4RotationMatrix referenceBeamMomentumOffset;
A wrapper of BDSBunch to include a filter for the events loaded by an event generator.
Loader to use any HepMC3 compatible file.
void SkipEvents(G4int nEventsToSkip)
virtual void RecreateAdvanceToEvent(G4int eventOffset)
Advance to the correct event number in the file for recreation.
BDSPrimaryGeneratorFileHEPMC()=delete
Do not require default constructor.
HepMC3::GenEvent * GetHepMCGenEvent() const
Accessor.
G4long CountEventsInFile()
virtual void GeneratePrimaryVertex(G4Event *anEvent)
void HepMC2G4(const HepMC3::GenEvent *hepmcevt, G4Event *g4event)
Conversion from HepMC::GenEvent to G4Event.
void OpenFile(G4bool usualPrintOut=true)
Construct the member "reader" and open the file for reading.
Common interface for any primary generators that are file based.