20 #include "G4DecayProducts.hh"
21 #include "G4DecayTable.hh"
28 std::vector<Particle> children;
31 G4ParticleDefinition* pDef =
32 m_pdgToG4Conv.getParticleDefinition(parent.
pdg());
33 if (pDef ==
nullptr) {
37 G4DecayTable* dt = pDef->GetDecayTable();
42 G4VDecayChannel*
channel = dt->SelectADecayChannel();
43 if (channel ==
nullptr) {
47 G4DecayProducts* products = channel->DecayIt();
48 if (products ==
nullptr) {
58 G4int nProducts = products->entries();
59 for (G4int
i = 0;
i < nProducts;
i++) {
60 G4DynamicParticle* prod = products->PopProducts();
61 if (prod ==
nullptr) {
66 const G4ThreeVector& mom = prod->GetMomentum();
69 amgMom *= convertEnergy;
70 const int32_t
pdg = prod->GetPDGcode();
75 .setAbsoluteMomentum(amgMom.norm())
80 children.push_back(
std::move(childParticle));