package mmc; /** * class contains functions necessary for the calculation of decay */ public class Decay extends CrossSections implements DFunctionOfx{ private FindRoot f; /** * creates internal references to p and m */ public Decay(CrossSections cros){ super(cros); f = new FindRoot(imaxs, iprec); } //----------------------------------------------------------------------------------------------------// /** * this cross section describes decay */ public double decay(){ if(cros.cd<=0 || p.l<0) return 0; return cros.cd/Math.max((p.p/p.m)*p.l*C, xres); } //----------------------------------------------------------------------------------------------------// public static boolean flag=false; public String out; /** * energy of the electron that results from the muon decay */ public double e(double ernd, double arnd, double srnd, Output o){ if(p.l<0) return 0; double emax, x0, f0, el, lm, pl; String out1="nu", out2="nu"; if(p.type==2){ final double brmu=0.1737; final double brel=0.1783+brmu; final double brpi=0.1109+brel; final double br2p=0.2540+brpi; final double br3p=0.1826+br2p; if(srnd