172 G4double daughterP[3], daughterE[3];
175 const size_t MAX_LOOP = 10000;
176 for (
size_t loop_counter=0; loop_counter <MAX_LOOP; ++loop_counter){
178 PhaseSpace(massK, &daughterM[0], &daughterE[0], &daughterP[0]);
180 daughterM[idPi],daughterM[idLepton],daughterM[idNutrino]);
199 delete parentparticle;
202 G4double costheta, sintheta, phi, sinphi, cosphi;
203 G4double costhetan, sinthetan, phin, sinphin, cosphin;
207 sintheta = std::sqrt((1.0-costheta)*(1.0+costheta));
209 sinphi = std::sin(phi);
210 cosphi = std::cos(phi);
211 direction =
new G4ThreeVector(sintheta*cosphi,sintheta*sinphi,costheta);
218 costhetan = (daughterP[1]*daughterP[1]-daughterP[2]*daughterP[2]-daughterP[0]*daughterP[0])/(2.0*daughterP[2]*daughterP[0]);
219 sinthetan = std::sqrt((1.0-costhetan)*(1.0+costhetan));
221 sinphin = std::sin(phin);
222 cosphin = std::cos(phin);
223 direction->
setX( sinthetan*cosphin*costheta*cosphi - sinthetan*sinphin*sinphi + costhetan*sintheta*cosphi);
224 direction->
setY( sinthetan*cosphin*costheta*sinphi + sinthetan*sinphin*cosphi + costhetan*sintheta*sinphi);
225 direction->
setZ( -sinthetan*cosphin*sintheta + costhetan*costheta);
239 G4cout <<
"G4KL3DecayChannel::DecayIt ";
240 G4cout <<
" create decay products in rest frame " <<
G4endl;
241 G4cout <<
" decay products address=" << products <<
G4endl;
void CheckAndFillDaughters()
CLHEP::Hep3Vector G4ThreeVector
G4int PushProducts(G4DynamicParticle *aParticle)
G4ParticleDefinition * G4MT_parent
G4ParticleDefinition ** G4MT_daughters
G4double DalitzDensity(G4double parentmass, G4double Epi, G4double El, G4double Enu, G4double massPi, G4double massL, G4double massNu)
static constexpr double rad
static constexpr double twopi
G4GLOB_DLL std::ostream G4cout
G4int GetVerboseLevel() const
G4double GetPDGMass() const
static constexpr double GeV
G4String ** daughters_name
void PhaseSpace(G4double Mparent, const G4double *Mdaughter, G4double *Edaughter, G4double *Pdaughter)
void CheckAndFillParent()