40{
41 if(particle_definition == nullptr)
42 {
45 particle_definition = particleTable->
FindParticle(particleName=
"geantino");
46 if(particle_definition == nullptr)
47 {
49 msg = "G4RayTracer uses geantino to trace the ray, but your physics list does not\n";
50 msg += "define G4Geantino. Please add G4Geantino in your physics list.";
52 }
53 }
54
55
56
58
59
60
63 particle->SetKineticEnergy( particle_energy );
64 particle->SetMass( mass );
65 particle->SetMomentumDirection( direc );
66 particle->SetPolarization(particle_polarization.
x(),
67 particle_polarization.
y(),
68 particle_polarization.
z());
69 vertex->SetPrimary( particle );
70
72}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
void AddPrimaryVertex(G4PrimaryVertex *aPrimaryVertex)
G4double GetPDGMass() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()