LDMX Software
HepMCPrimaryGenerator.h
Go to the documentation of this file.
1
7#ifndef SIMCORE_HEPMCPRIMARYGENERATOR_H
8#define SIMCORE_HEPMCPRIMARYGENERATOR_H
9
10// LDMX
11#include "Framework/Configure/Parameters.h"
12#include "Framework/Exception/Exception.h"
16
17// Geant4
18#include "G4Event.hh"
19#include "G4IonTable.hh"
20#include "G4PhysicalConstants.hh"
21#include "G4RunManager.hh"
22#include "G4SystemOfUnits.hh"
23class G4Event;
24
25namespace simcore {
26namespace generators {
27
33 public:
39 HepMCPrimaryGenerator(const std::string& name,
40 const framework::config::Parameters& parameters);
41
45 virtual ~HepMCPrimaryGenerator() = default;
46
51 void GeneratePrimaryVertex(G4Event* anEvent) override;
52
58 void RecordConfig(const std::string& id, ldmx::RunHeader& rh) override;
59
60 private:
64 std::string file_path_;
65
70
74 std::vector<double> vertex_;
75
76 // enable logging
77 enableLogging("HepMCPrimaryGenerator")
78};
79
80} // namespace generators
81} // namespace simcore
82
83#endif // SIMCORE_HEPMCPRIMARYGENERATOR_H
Class for reading HepMC event data.
Header file for PrimaryGenerator.
Class that provides extra information for Geant4 primary particles.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:29
Run-specific configuration and data stored in its own output TTree alongside the event TTree in the o...
Definition RunHeader.h:57
Interface that defines a simulation primary generator.
Generates a Geant4 event from a HepMCEvent.
virtual ~HepMCPrimaryGenerator()=default
Class destructor.
std::vector< double > vertex_
The vertex offset to apply to the HepMC event vertex.
hepmc::HepMCReader reader_
The HepMC reader with the event data.
std::string file_path_
The file path to the HepMC file.
HepMCPrimaryGenerator(const std::string &name, const framework::config::Parameters &parameters)
Class constructor.
void GeneratePrimaryVertex(G4Event *anEvent) override
Generate vertices in the Geant4 event.
void RecordConfig(const std::string &id, ldmx::RunHeader &rh) override
Record configuration information.
Reads HepMC event data into a HepMCEvent object.
Definition HepMCReader.h:29
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...