LDMX Software
FromScoringPlane.h
1
8#ifndef SIMCORE_FROMSCORINGPLANE_H
9#define SIMCORE_FROMSCORINGPLANE_H
10
11// LDMX
12#include "Framework/Configure/Parameters.h"
13#include "Framework/Exception/Exception.h"
14#include "Framework/Logger.h"
17
18class G4Event;
19
20namespace simcore {
21namespace generators {
22
29 public:
35 FromScoringPlane(const std::string& name,
36 const framework::config::Parameters& parameters);
37
41 virtual ~FromScoringPlane() = default;
42
54 void prepEvent(const framework::Event& event) override;
55
60 void GeneratePrimaryVertex(G4Event* anEvent) override;
61
67 void RecordConfig(const std::string& id, ldmx::RunHeader& rh) override;
68
69 private:
71 std::string coll_name_;
73 std::string pass_name_;
75 std::vector<int> select_planes_;
77 std::vector<G4PrimaryVertex*> primary_vertices_;
79 enableLogging("FromScoringPlane")
80};
81
82} // namespace generators
83} // namespace simcore
84
85#endif // SIMCORE_FROMSCORINGPLANE_H
Header file for PrimaryGenerator.
Class that provides extra information for Geant4 primary particles.
Implements an event buffer system for storing event data.
Definition Event.h:42
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.
Copy particles from a particular scoring plane in as primaries of a new simulation.
std::string coll_name_
name of scoring plane collection we should use
std::vector< G4PrimaryVertex * > primary_vertices_
list of primary vertices we will give over to the G4Event
std::vector< int > select_planes_
list of plane ID numbers to select for (use all hits if empty)
std::string pass_name_
name of pass for scoring plane collection we should use
void GeneratePrimaryVertex(G4Event *anEvent) override
Generate vertices in the Geant4 event.
virtual ~FromScoringPlane()=default
Class destructor.
FromScoringPlane(const std::string &name, const framework::config::Parameters &parameters)
Class constructor.
void prepEvent(const framework::Event &event) override
Retrieve the collection of scoring plane hits and copy the selected hits into our copies of primary p...
void RecordConfig(const std::string &id, ldmx::RunHeader &rh) override
Record configuration information.
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...