57 {
63 } else {
66 }
67
72 G4double cnorm1=px_nucleon*px_nucleon+py_nucleon*py_nucleon;
74 G4double tnorm=cnorm1+pz_nucleon*pz_nucleon;
76 G4double btm=std::exp(-4.*tnorm*bpn);
81 G4double stheta=std::sqrt(1.-ctheta*ctheta);
89 ThreeVector mom_nucleon(
90 px_nucleon*ctheta+cnorm*stheta*(t1*t7+t4*t8),
91 py_nucleon*ctheta+cnorm*stheta*(t2*t7+t5*t8),
92 pz_nucleon*ctheta+cnorm*stheta*t6*t8
93 );
94 nucleon->setMomentum(mom_nucleon);
95 pion->setMomentum(-mom_nucleon);
96
97#ifdef INCLXX_IN_GEANT4_MODE
100#endif
101
103 if (iso == 1 || iso == -1) {
105 if (rndm < 1.) {
109 pion->setType(pionType);
110 }
111 else {
115 }
116 }
117 else {
121 pion->setType(pionType);
122 }
123
124#ifdef INCLXX_IN_GEANT4_MODE
125
126 if ( startingNucleonType !=
nucleon->getType() || startingPionType !=
pion->getType() ) {
127 nucleon->setParentResonancePDGCode(0);
128 nucleon->setParentResonanceID(0);
129 pion->setParentResonancePDGCode(0);
130 pion->setParentResonanceID(0);
131 }
132#endif
133
134 fs->addModifiedParticle(nucleon);
135 fs->addModifiedParticle(pion);
136 }
G4int getIsospin(const ParticleType t)
Get the isospin of a particle.
ParticleType getNucleonType(const G4int isosp)
Get the type of nucleon.
ParticleType getPionType(const G4int isosp)
Get the type of pion.
G4bool nucleon(G4int ityp)