|
LDMX Software
|
Copy particles from a particular scoring plane in as primaries of a new simulation. More...
#include <FromScoringPlane.h>
Public Member Functions | |
| FromScoringPlane (const std::string &name, const framework::config::Parameters ¶meters) | |
| Class constructor. | |
| virtual | ~FromScoringPlane ()=default |
| Class destructor. | |
| void | prepEvent (const framework::Event &event) override |
| Retrieve the collection of scoring plane hits and copy the selected hits into our copies of primary particles. | |
| void | GeneratePrimaryVertex (G4Event *anEvent) override |
| Generate vertices in the Geant4 event. | |
| void | RecordConfig (const std::string &id, ldmx::RunHeader &rh) override |
| Record configuration information. | |
Public Member Functions inherited from simcore::PrimaryGenerator | |
| PrimaryGenerator (const std::string &name, const framework::config::Parameters ¶meters) | |
| Constructor. | |
| DECLARE_FACTORY_WITH_WAREHOUSE (PrimaryGenerator, std::shared_ptr< PrimaryGenerator >, const std::string &, const framework::config::Parameters &) | |
| virtual | ~PrimaryGenerator ()=default |
| Destructor. | |
| std::string | name () |
| void | smearBeamspot (G4PrimaryVertex *primary_vertex) |
| Apply beam spot smearing to a primary vertex. | |
| bool | useBeamspot () const |
| Check if beam spot smearing is enabled for this generator. | |
Private Attributes | |
| std::string | coll_name_ |
| name of scoring plane collection we should use | |
| std::string | pass_name_ |
| name of pass for scoring plane collection we should use | |
| std::vector< int > | select_planes_ |
| list of plane ID numbers to select for (use all hits if empty) | |
| std::vector< G4PrimaryVertex * > | primary_vertices_ |
| list of primary vertices we will give over to the G4Event | |
Additional Inherited Members | |
Protected Attributes inherited from simcore::PrimaryGenerator | |
| std::string | name_ {""} |
| Name of the PrimaryGenerator. | |
| bool | use_beamspot_ {false} |
| Flag denoting whether beam spot smearing is enabled for this generator. | |
| double | beamspot_x_size_ {0} |
| Extent of the beamspot in x [mm]. | |
| double | beamspot_y_size_ {0} |
| Extent of the beamspot in y [mm]. | |
| double | beamspot_z_size_ {0} |
| Extent of the beamspot in z [mm]. | |
Copy particles from a particular scoring plane in as primaries of a new simulation.
Definition at line 28 of file FromScoringPlane.h.
| simcore::generators::FromScoringPlane::FromScoringPlane | ( | const std::string & | name, |
| const framework::config::Parameters & | parameters ) |
Class constructor.
| name | The name of the generator. |
| parameters | Configuration parameters. |
Definition at line 13 of file FromScoringPlane.cxx.
|
overridevirtual |
Generate vertices in the Geant4 event.
| anEvent | The Geant4 event. |
Implements simcore::PrimaryGenerator.
Definition at line 78 of file FromScoringPlane.cxx.
References primary_vertices_.
|
overridevirtual |
Retrieve the collection of scoring plane hits and copy the selected hits into our copies of primary particles.
The particles are copied into the G4Event in GeneratePrimaryVertex
| framework::Exception | if the requested scoring plane hits are not available, most often because the input file containing them was not requested |
| [in] | event | framework::Event containing necessary scoring plane hits |
Reimplemented from simcore::PrimaryGenerator.
Definition at line 20 of file FromScoringPlane.cxx.
References coll_name_, pass_name_, primary_vertices_, select_planes_, and simcore::UserPrimaryParticleInformation::setHepEvtStatus().
|
overridevirtual |
Record configuration information.
| id | The configuration ID. |
| rh | The run header. |
Implements simcore::PrimaryGenerator.
Definition at line 85 of file FromScoringPlane.cxx.
References coll_name_, pass_name_, and ldmx::RunHeader::setStringParameter().
|
private |
name of scoring plane collection we should use
Definition at line 71 of file FromScoringPlane.h.
Referenced by prepEvent(), and RecordConfig().
|
private |
name of pass for scoring plane collection we should use
Definition at line 73 of file FromScoringPlane.h.
Referenced by prepEvent(), and RecordConfig().
|
private |
list of primary vertices we will give over to the G4Event
Definition at line 77 of file FromScoringPlane.h.
Referenced by GeneratePrimaryVertex(), and prepEvent().
|
private |
list of plane ID numbers to select for (use all hits if empty)
Definition at line 75 of file FromScoringPlane.h.
Referenced by prepEvent().