44 : loopMax(100), mDaughter0(dMass0), mDaughter1(dMass1),
45 mDaughter2(dMass2), pDaughter0(0.), pDaughter1(0.), pDaughter2(0.)
47 parentMass = std::max(pMass, mDaughter0 + mDaughter1 + mDaughter2 + CLHEP::keV);
99 std::vector<G4ThreeVector> pVect;
101 if (CalculateMomentumMagnitudes() ) {
105 G4double sintheta = std::sqrt((1.0-costheta)*(1.0+costheta));
109 G4ThreeVector direction0(sintheta*cosphi, sintheta*sinphi, costheta);
111 G4double costhetan = (pDaughter1*pDaughter1 - pDaughter2*pDaughter2
112 - pDaughter0*pDaughter0)/(2.0*pDaughter2*pDaughter0);
113 G4double sinthetan = std::sqrt((1.0-costhetan)*(1.0+costhetan));
118 direction2.
setX(sinthetan*cosphin*costheta*cosphi -
119 sinthetan*sinphin*sinphi + costhetan*sintheta*cosphi);
120 direction2.
setY(sinthetan*cosphin*costheta*sinphi +
121 sinthetan*sinphin*cosphi + costhetan*sintheta*sinphi);
122 direction2.
setZ(-sinthetan*cosphin*sintheta + costhetan*costheta);
125 pVect.push_back(pDaughter0*direction0);
126 pVect.push_back(-direction0*pDaughter0 - direction2*pDaughter2);
127 pVect.push_back(pDaughter2*direction2);
130 G4cerr <<
"G4GDecay3::GetThreeBodyMomenta: " << loopMax
131 <<
" or more loops in momentum magnitude calculation " <<
G4endl;