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"
14
15// Geant4
16#include "G4Event.hh"
17#include "G4PhysicalConstants.hh"
18#include "G4SystemOfUnits.hh"
19class G4Event;
20
21namespace simcore {
22namespace generators {
23
29 public:
35 HepMCPrimaryGenerator(const std::string& name,
36 const framework::config::Parameters& parameters);
37
41 virtual ~HepMCPrimaryGenerator() = default;
42
47 void GeneratePrimaryVertex(G4Event* anEvent) override;
48
54 void RecordConfig(const std::string& id, ldmx::RunHeader& rh) override;
55
56 private:
60 std::string file_path_;
61
66
70 std::vector<double> vertex_;
71
72 // enable logging
73 enableLogging("HepMCPrimaryGenerator")
74};
75
76} // namespace generators
77} // namespace simcore
78
79#endif // SIMCORE_HEPMCPRIMARYGENERATOR_H
Class for reading HepMC event data.
Header file for PrimaryGenerator.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:26
Run-specific configuration and data stored in its own output TTree alongside the event TTree in the o...
Definition RunHeader.h:68
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:27
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...