LDMX Software
LHEPrimaryGenerator.h
1
9#ifndef SIMCORE_LHEPRIMARYGENERATOR_H
10#define SIMCORE_LHEPRIMARYGENERATOR_H
11
12// LDMX
13#include "Framework/Configure/Parameters.h"
16
17// Geant4
18#include "G4Event.hh"
19#include "G4PhysicalConstants.hh"
20#include "G4SystemOfUnits.hh"
21class G4Event;
22
23namespace simcore {
24namespace generators {
25
31 public:
37 LHEPrimaryGenerator(const std::string& name,
38 const framework::config::Parameters& parameters);
39
43 virtual ~LHEPrimaryGenerator() = default;
44
49 void GeneratePrimaryVertex(G4Event* anEvent) override;
50
56 void RecordConfig(const std::string& id, ldmx::RunHeader& rh) override;
57
58 private:
62 std::string file_path_;
63
69
73 std::vector<double> vertex_;
74
75 // enable logging
76 enableLogging("LHEPrimaryGenerator")
77};
78
79} // namespace generators
80} // namespace simcore
81
82#endif // SIMCORE_LHEPRIMARYGENERATOR_H
Class for reading LHE 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 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:24
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...