49 massK(0.0), pLambda(0.0), pXi0(0.0)
65 thePionName,theLeptonName,theNutrinoName)
67 static const G4String K_plus(
"kaon+");
68 static const G4String K_minus(
"kaon-");
70 static const G4String Mu_plus(
"mu+");
71 static const G4String Mu_minus(
"mu-");
81 if ( ((theParentName == K_plus)&&(theLeptonName == E_plus)) ||
82 ((theParentName == K_minus)&&(theLeptonName == E_minus)) ) {
86 }
else if ( ((theParentName == K_plus)&&(theLeptonName == Mu_plus)) ||
87 ((theParentName == K_minus)&&(theLeptonName == Mu_minus)) ) {
91 }
else if ( (theParentName == K_L) &&
92 ((theLeptonName == E_plus) ||(theLeptonName == E_minus)) ){
96 }
else if ( (theParentName == K_L) &&
97 ((theLeptonName == Mu_plus) ||(theLeptonName == Mu_minus)) ){
104 G4cout <<
"G4KL3DecayChannel:: constructor :";
122 pLambda(right.pLambda),
132 if (
this != &right) {
189 G4double daughterP[3], daughterE[3];
192 const size_t MAX_LOOP = 10000;
193 for (
size_t loop_counter=0; loop_counter <MAX_LOOP; ++loop_counter){
215 delete parentparticle;
218 G4double costheta, sintheta, phi, sinphi, cosphi;
219 G4double costhetan, sinthetan, phin, sinphin, cosphin;
223 sintheta = std::sqrt((1.0-costheta)*(1.0+costheta));
225 sinphi = std::sin(phi);
226 cosphi = std::cos(phi);
227 direction =
new G4ThreeVector(sintheta*cosphi,sintheta*sinphi,costheta);
234 costhetan = (daughterP[1]*daughterP[1]-daughterP[2]*daughterP[2]-daughterP[0]*daughterP[0])/(2.0*daughterP[2]*daughterP[0]);
235 sinthetan = std::sqrt((1.0-costhetan)*(1.0+costhetan));
237 sinphin = std::sin(phin);
238 cosphin = std::cos(phin);
239 direction->setX( sinthetan*cosphin*costheta*cosphi - sinthetan*sinphin*sinphi + costhetan*sintheta*cosphi);
240 direction->setY( sinthetan*cosphin*costheta*sinphi + sinthetan*sinphin*cosphi + costhetan*sintheta*sinphi);
241 direction->setZ( -sinthetan*cosphin*sintheta + costhetan*costheta);
255 G4cout <<
"G4KL3DecayChannel::DecayIt ";
256 G4cout <<
" create decay products in rest frame " <<
G4endl;
257 G4cout <<
" decay products address=" << products <<
G4endl;
275 const G4int N_DAUGHTER=3;
277 for (index=0; index<N_DAUGHTER; index++){
278 sumofdaughtermass += M[index];
284 G4double momentummax=0.0, momentumsum = 0.0;
286 const size_t MAX_LOOP=10000;
287 for (
size_t loop_counter=0; loop_counter <MAX_LOOP; ++loop_counter){
298 energy = rd2*(parentM - sumofdaughtermass);
299 P[0] = std::sqrt(energy*energy + 2.0*energy*M[0]);
301 if ( P[0] >momentummax )momentummax = P[0];
304 energy = (1.-rd1)*(parentM - sumofdaughtermass);
305 P[1] = std::sqrt(energy*energy + 2.0*energy*M[1]);
307 if ( P[1] >momentummax )momentummax = P[1];
310 energy = (rd1-rd2)*(parentM - sumofdaughtermass);
311 P[2] = std::sqrt(energy*energy + 2.0*energy*M[2]);
313 if ( P[2] >momentummax )momentummax = P[2];
315 if (momentummax <= momentumsum - momentummax )
break;
319 G4cout <<
"G4KL3DecayChannel::PhaseSpace ";
321 for (index=0; index<3; index++){
322 G4cout << index <<
" : " << M[index]/
GeV <<
"GeV/c/c ";
323 G4cout <<
" : " << E[index]/
GeV <<
"GeV ";
369 G4double coeffB = massL*massL*(Enu-E/2.0);
370 G4double coeffC = massL*massL*E/4.0;
374 G4double Rho = (F*F)*(coeffA + coeffB*Xi + coeffC*Xi*Xi);
382 G4cout <<
" F :" << F <<
" Fmax :" << Fmax <<
" Xi :" << Xi <<
G4endl;
383 G4cout <<
" A :" << coeffA <<
" B :" << coeffB <<
" C :"<< coeffC <<
G4endl;
384 G4cout <<
" Rho :" << Rho <<
" RhoMax :" << RhoMax <<
G4endl;
void ClearDaughtersName()
virtual G4DecayProducts * DecayIt(G4double)
CLHEP::Hep3Vector G4ThreeVector
G4int PushProducts(G4DynamicParticle *aParticle)
G4ParticleDefinition * G4MT_parent
virtual ~G4KL3DecayChannel()
G4ParticleDefinition ** G4MT_daughters
const G4double w[NPOINTSGL]
G4GLOB_DLL std::ostream G4cout
G4double DalitzDensity(G4double Epi, G4double El, G4double Enu)
static const double twopi
G4int GetVerboseLevel() const
G4double GetPDGMass() const
G4double energy(const ThreeVector &p, const G4double m)
G4KL3DecayChannel & operator=(const G4KL3DecayChannel &)
G4String ** daughters_name
void PhaseSpace(G4double Mparent, const G4double *Mdaughter, G4double *Edaughter, G4double *Pdaughter)