LDMX Software
GeneralParticleSource.h
Go to the documentation of this file.
1
7#ifndef SIMCORE_GENERALPARTICLESOURCE_H
8#define SIMCORE_GENERALPARTICLESOURCE_H
9
10//------------//
11// Geant4 //
12//------------//
13#include "G4GeneralParticleSource.hh"
14
15//------------//
16// LDMX //
17//------------//
19
20// Forward declarations
21class G4Event;
22
23namespace simcore {
24namespace generators {
25
31 public:
40 GeneralParticleSource(const std::string& name,
41 const framework::config::Parameters& parameters);
42
44 virtual ~GeneralParticleSource() = default;
45
51 void GeneratePrimaryVertex(G4Event* event) override;
52 void RecordConfig(const std::string& id, ldmx::RunHeader& rh) override;
53
54 private:
61 G4GeneralParticleSource theG4Source_;
62
64 std::vector<std::string> init_commands_;
65
66}; // GeneralParticleSource
67
68} // namespace generators
69} // namespace simcore
70
71#endif // SIMCORE_GENERALPARTICLESOURCE_H
Header file for PrimaryGenerator.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:27
Run-specific configuration and data stored in its own output TTree alongside the event TTree in the o...
Definition RunHeader.h:54
Interface that defines a simulation primary generator.
Class that extends the functionality of G4GeneralParticleSource.
void RecordConfig(const std::string &id, ldmx::RunHeader &rh) override
Record the configuration of the primary generator into the run header.
std::vector< std::string > init_commands_
storage of initialization commands (for config recording)
virtual ~GeneralParticleSource()=default
Destructor.
void GeneratePrimaryVertex(G4Event *event) override
Generate the primary vertices in the Geant4 event.
G4GeneralParticleSource theG4Source_
The underlying Geant4 GPS implementation.