65 G4cerr <<
"TG4ExtDecayer::ImportDecayProducts: " << G4endl
66 <<
" No fExternalDecayer is defined." << G4endl;
71 G4ThreeVector momentum = track.GetMomentum();
72 G4double etot = track.GetDynamicParticle()->GetTotalEnergy();
93 G4cout <<
"nofParticles: " << nofParticles << G4endl;
98 G4DecayProducts* decayProducts =
99 new G4DecayProducts(*(track.GetDynamicParticle()));
102 for (G4int i = 0; i < nofParticles; i++) {
105 TParticle* particle =
108 G4int status = particle->GetStatusCode();
109 G4int pdg = particle->GetPdgCode();
110 if ((status > 0 && status < 11) &&
112 (abs(pdg) != 12 && abs(pdg) != 14 && abs(pdg) != 16))) {
117 G4cout <<
" " << i <<
"th particle PDG: " << pdg <<
" ";
121 G4DynamicParticle* dynamicParticle =
124 if (dynamicParticle) {
127 G4cout <<
" G4 particle name: "
128 << dynamicParticle->GetDefinition()->GetParticleName()
133 decayProducts->PushProducts(dynamicParticle);
140 G4cout <<
"nofParticles for tracking: " << counter << G4endl;
143 return decayProducts;
Definition of the TG4ParticlesManager class.
Provides mapping between TDatabasePDG and Geant4 particles.
G4DynamicParticle * CreateDynamicParticle(const TParticle *particle) const
G4int GetPDGEncoding(G4ParticleDefinition *particle)
TParticle * GetParticle(const TClonesArray *particles, G4int index) const