#include "PrimaryEventAction_service.hh"
void artg4tk::PrimaryEventActionService::addG4Particle |
( |
G4Event * |
event, |
|
|
int |
pdgId, |
|
|
const G4ThreeVector & |
pos, |
|
|
double |
time, |
|
|
double |
energy, |
|
|
const G4ThreeVector & |
mom |
|
) |
| |
|
private |
void artg4tk::PrimaryEventActionService::generatePrimaries |
( |
G4Event * |
anEvent | ) |
|
|
overrideprivatevirtual |
Reimplemented from artg4tk::PrimaryGeneratorActionBase.
Definition at line 24 of file PrimaryEventAction.cc.
References addG4Particle(), e, and art::ProductRetriever::getMany().
28 std::cout <<
"Primary:: GenParticles*******************Size: " << allGens.size() <<
'\n';
29 for (
auto const& h : allGens) {
31 std::cout <<
"Primary:: GenParticlesCollection*******************Size: " << gens.size() <<
'\n';
32 for (GenParticle
const& genpart : gens) {
33 std::cout <<
" genpart.pdgId(): " << genpart.pdgId()
34 <<
"\n position: " << genpart.position() <<
"\nmomentum: " << genpart.momentum()
35 <<
"\nenergy: " << genpart.momentum().e() <<
'\n';
40 genpart.momentum().e(),
std::vector< GenParticle > GenParticleCollection
void addG4Particle(G4Event *event, int pdgId, const G4ThreeVector &pos, double time, double energy, const G4ThreeVector &mom)
std::vector< Handle< PROD > > getMany(SelectorBase const &selector=MatchAllSelector{}) const
virtual void artg4tk::ActionBase::initialize |
( |
| ) |
|
|
inlinevirtualinherited |
std::string const& artg4tk::ActionBase::myName |
( |
| ) |
const |
|
inlineinherited |
The documentation for this class was generated from the following files: