LDMX Software
ParticleGun.h
Go to the documentation of this file.
1
7#ifndef SIMCORE_PARTICLE_GUN_H
8#define SIMCORE_PARTICLE_GUN_H
9
10//------------//
11// Geant4 //
12//------------//
13#include "G4ParticleGun.hh"
14
15//------------//
16// LDMX //
17//------------//
19
20// Forward declarations
21class G4Event;
22
23namespace simcore {
24namespace generators {
25
31 public:
45 ParticleGun(const std::string& name,
46 const framework::config::Parameters& parameters);
47
49 virtual ~ParticleGun() = default;
50
56 void GeneratePrimaryVertex(G4Event* event) override;
57
58 void RecordConfig(const std::string& id, ldmx::RunHeader& rh) override;
59
60 private:
64 G4ParticleGun theGun_;
65
70
71}; // ParticleGun
72
73} // namespace generators
74} // namespace simcore
75
76#endif // SIMCORE_PARTICLE_GUN_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 G4ParticleGun.
Definition ParticleGun.h:30
int verbosity_
LDMX Verbosity for this generator.
Definition ParticleGun.h:69
void GeneratePrimaryVertex(G4Event *event) override
Generate the primary vertices in the Geant4 event.
virtual ~ParticleGun()=default
Destructor.
G4ParticleGun theGun_
The actual Geant4 implementation of the ParticleGun.
Definition ParticleGun.h:64
void RecordConfig(const std::string &id, ldmx::RunHeader &rh) override
Record the configuration of the primary generator into the run header.