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/Logger.h"
15
16class G4Event;
17
18namespace simcore {
19namespace generators {
20
27 public:
33 FromScoringPlane(const std::string& name,
34 const framework::config::Parameters& parameters);
35
39 virtual ~FromScoringPlane() = default;
40
52 void prepEvent(const framework::Event& event) override;
53
58 void GeneratePrimaryVertex(G4Event* anEvent) override;
59
65 void RecordConfig(const std::string& id, ldmx::RunHeader& rh) override;
66
67 private:
69 std::string coll_name_;
71 std::string pass_name_;
73 std::vector<int> select_planes_;
75 std::vector<G4PrimaryVertex*> primary_vertices_;
77 enableLogging("FromScoringPlane")
78};
79
80} // namespace generators
81} // namespace simcore
82
83#endif // SIMCORE_FROMSCORINGPLANE_H
Header file for PrimaryGenerator.
Implements an event buffer system for storing event data.
Definition Event.h:40
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.
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 ...