File indexing completed on 2025-03-13 08:20:17
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include <DD4hep/Printout.h>
0016 #include <DD4hep/InstanceCount.h>
0017 #include <DDG4/Geant4InputHandling.h>
0018 #include <DDG4/Geant4PrimaryHandler.h>
0019
0020 using namespace dd4hep::sim;
0021
0022
0023 Geant4PrimaryHandler::Geant4PrimaryHandler(Geant4Context* ctxt, const std::string& nam)
0024 : Geant4GeneratorAction(ctxt,nam)
0025 {
0026 InstanceCount::increment(this);
0027 declareProperty("RejectPDGs", m_primaryConfig.m_rejectPDGs);
0028 declareProperty("ZeroTimePDGs", m_primaryConfig.m_zeroTimePDGs);
0029 }
0030
0031
0032 Geant4PrimaryHandler::~Geant4PrimaryHandler() {
0033 InstanceCount::decrement(this);
0034 }
0035
0036
0037 void Geant4PrimaryHandler::operator()(G4Event* event) {
0038 generatePrimaries(this, context(), event);
0039 }