LDMX Software
LHEPrimaryGenerator.h
1
9#ifndef SIMCORE_LHEPRIMARYGENERATOR_H
10#define SIMCORE_LHEPRIMARYGENERATOR_H
11
12// LDMX
13#include "Framework/Configure/Parameters.h"
14#include "Framework/Exception/Exception.h"
18
19// Geant4
20#include "G4Event.hh"
21#include "G4IonTable.hh"
22#include "G4PhysicalConstants.hh"
23#include "G4RunManager.hh"
24#include "G4SystemOfUnits.hh"
25class G4Event;
26
27namespace simcore {
28namespace generators {
29
35 public:
41 LHEPrimaryGenerator(const std::string& name,
42 const framework::config::Parameters& parameters);
43
47 virtual ~LHEPrimaryGenerator() = default;
48
53 void GeneratePrimaryVertex(G4Event* anEvent) override;
54
60 void RecordConfig(const std::string& id, ldmx::RunHeader& rh) override;
61
62 private:
66 std::string file_path_;
67
73
77 std::vector<double> vertex_;
78
79 // enable logging
80 enableLogging("LHEPrimaryGenerator")
81};
82
83} // namespace generators
84} // namespace simcore
85
86#endif // SIMCORE_LHEPRIMARYGENERATOR_H
Class for reading LHE 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 an LHEEvent.
LHEPrimaryGenerator(const std::string &name, const framework::config::Parameters &parameters)
Class constructor.
std::vector< double > vertex_
The vertex offset to apply to the LHE event vertex.
void RecordConfig(const std::string &id, ldmx::RunHeader &rh) override
Record configuration information.
lhe::LHEReader reader_
The LHE reader with the event data.
void GeneratePrimaryVertex(G4Event *anEvent) override
Generate vertices in the Geant4 event.
std::string file_path_
The file path to the LHE file.
virtual ~LHEPrimaryGenerator()=default
Class destructor.
Reads LHE event data into an LHEEvent object.
Definition LHEReader.h:25
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...