package mmc; /** * class contains functions necessary for calculation of bremsstrahlung losses */ public class Bremsstrahlung extends CrossSections{ public BremsContinuous c; public BremsStochastic s; public double vMax, vUp, vMin=0; protected Bremsstrahlung brems; private Integral L; //----------------------------------------------------------------------------------------------------// /** * creates internal references to p and m, to be called from subclasses */ public Bremsstrahlung(Bremsstrahlung cros){ p=cros.p; m=cros.m; this.cros=cros.cros; brems=cros; } //----------------------------------------------------------------------------------------------------// /** * initializes subclasses and creates internal references to p and m */ public Bremsstrahlung(CrossSections cros){ super(cros); brems=this; c = new BremsContinuous(this); s = new BremsStochastic(this); L = new Integral(iromb, imaxs, iprec); } //----------------------------------------------------------------------------------------------------// /** * call before using the bremsstrahlung functions to set the component of the primary */ public void setEnergy(int i){ cros.component=i; vMax=1-(3./4)*sqrtE*(p.m/p.e)*Math.pow(m.Z[i], 1./3); if(vMax<0) vMax=0; if(brems.lorenz) vMax=Math.min(vMax, brems.lorenzCut/p.e); vMax=Math.min(vMax, 1-p.m/p.e); vUp=Math.min(vMax, m.vCut(p.e)); } //----------------------------------------------------------------------------------------------------// public int form=1; /** * this is what the Elastic Bremsstrahlung Cross Section (EBCS) is equal to * units are [1/cm] since the multiplication by No*n is done here. * Corrections for excitations of the nucleus and deep inelastic excitations of separate nucleons are * included (positive term dn/Z), as well as the contribution of the mu-diagrams to the inelastic * bremsstrahlung on the electrons (non-zero only for allowed energies of photon after electron recoil). */ protected double Sel(double v, int i){ double aux, Z3, result, Dn, s1=0; Z3=Math.pow(m.Z[i], -1./3); switch(form){ case 1: // Kelner, Kokoulin, and Petrukhin parametrization { int step; double d, da, dn, Fa, maxV; d=p.m*p.m*v/(2*p.e*(1-v)); s1=m.B[i]*Z3; da=Math.log(1+Me/(d*sqrtE*s1)); Dn=1.54*Math.pow(m.A[i], 0.27); s1=Me*Dn/(p.m*s1); dn=Math.log(Dn/(1+d*(Dn*sqrtE-2)/p.m)); maxV=Me*(p.e-p.m)/(p.e*(p.e-p.p+Me)); if(v10) Fd*=(2./3)*Z3; result=((4./3)*(1-v)+v*v)*Math.log(Fd); } break; case 4: // complete screening case (Tsai, from PDB) default: { result=(((4./3)*(1-v)+v*v)*(m.radl(m.Z[i])/m.Z[i])+(1./9)*(1-v)*(m.Z[i]+1))/m.Z[i]; } } aux=2*m.Z[i]*(Me/p.m)*Re; aux*=(Alpha/v)*aux*result; if(cros.lpm){ if(form!=1){ s1=m.B[i]*Z3; Dn=1.54*Math.pow(m.A[i], 0.27); s1=Me*Dn/(p.m*s1); } aux*=lpm(v, s1); } double c2=p.c*p.c; return m.No*m.n[i]*c2*c2*aux; } //----------------------------------------------------------------------------------------------------// private boolean init=true; private double eLpm; protected double Xo; /** * Landau Pomeranchuk Migdal effect and dielectric suppression evaluation */ protected void setLpm(){ if(init){ boolean lpmSave=cros.lpm; init=false; cros.lpm=false; double sum=0, e=p.e; p.setEnergy(bigEnergy); for(int i=0; i