00001 // -*- C++ -*- $Id: moller.cxx,v 1.1 2000/09/01 20:20:20 burnett Exp $ 00002 // 00003 // This file is part of Gismo 2 00004 00005 // Contents ------------------------------------------------------- 00006 // 00007 // EGS::moller 00008 // 00009 // End ----------------------------------------------------------- 00010 00011 #include "EGS.h" 00012 #include "PEGSData.h" 00013 #include "Random.h" 00014 00015 void EGS::moller(const PEGSData &mat) 00016 { 00017 00018 // version 4.00 -- 26 jan 1986/1900 00019 //****************************************************************** 00020 // discrete Moller scattering (a call to this routine) has been 00021 // arbitrarily defined and calculated to mean moller scatterings 00022 // which impart to the secondary electron sufficient energy that 00023 // it be transported discretely. the threshold to transport an 00024 // electron discretely is a total energy of ae or a kinetic energy 00025 // of te=ae-rm. since the kinetic energy transfer is always, by 00026 // definition, less than half of the incident kinetic energy, this 00027 // implies that the incident energy, eie, must be larger than 00028 // thmoll=te*2+rm. the rest of the collision contribution is 00029 // subtracted continuously from the electron as ionization 00030 // loss during transport. 00031 //****************************************************************** 00032 00033 float eie = this->e; // get energy in MeV 00034 float br; 00035 double peie=eie; //precise energy of incident electron 00036 double prm = rm; 00037 double pekin=peie-prm; //precise k.e. of incident electron 00038 float ekin=pekin, 00039 t0 =ekin/rm, 00040 e0 =t0+1.0, 00041 extrae = eie - mat.thmoll, 00042 e02 =e0*e0, 00043 betai2=e02/(e02-1.0), 00044 ep0 = mat.te/ekin, 00045 g1 =(1.-2.*ep0)*betai2, 00046 g2 =t0*t0/e02, 00047 g3 =(2.*t0+1.)/e02; 00048 00049 // H.H.Nagel has constructed a factorization of the frequency 00050 // distribution function for the moller differential cross 00051 // section used as suggested by butcher and messel. 00052 // (H.H.Nagel, op.cit., p. 53-55) 00053 // however, a much simpler sampling method which does not become 00054 // very inefficient near thmoll is the following. . . 00055 // let br=eks/ekin, where eks is kinetic energy transfered to the 00056 // secondary electron and ekin is the incident kinetic energy. 00057 00058 // modified (7 feb 1974) to use the true moller cross section. 00059 // that is, instead of the e+ e- average given in the Rossi 00060 // formula used by Nagel. the sampling scheme is that 00061 // used by messel and crawford (epsdf 1970 p.13) 00062 // first sample (1/br**2) over (te/ekin,1/2) . . . 00063 00064 if( g1>0 ) //THB: add this since it got stuck here ??? 00065 for(;;) 00066 { // to retry if rejected 00067 float rnno27 = Random::flat(); 00068 br = mat.te/(ekin-extrae*rnno27); 00069 00070 // use messel and crawfords rejection function. 00071 float r=br/(1.-br); 00072 float rnno28 = Random::flat(); 00073 float rejf4=g1*(1.+g2*br*br+r*(r-g3)); 00074 if (rnno28 <= rejf4) break; //try until accepted. 00075 } 00076 else 00077 br=0.5; 00078 double pekse2=br*ekin; //precise kinetic energy of secondary electron #2 00079 double pese1=peie-pekse2; //precise energy of secondary electron #1 00080 double pese2=pekse2+prm; //precise energy of secondary electron #2 00081 00082 this->e = pese1; // reassign electron energy 00083 // moller angles are uniquely determined by kinematics 00084 00085 double h1=(peie+prm)/pekin; 00086 00087 // direction cosine change for 'old' electron 00088 00089 double dcosth=h1*(pese1-prm)/(pese1+prm); 00090 float costhe=sqrt(dcosth); 00091 00092 float phi = Random::flat(2.*M_PI); 00093 rotate(costhe, phi); 00094 00095 EGS& newel = *new EGS(this); 00096 newel.iq = -1; 00097 newel.e = pese2; 00098 dcosth=h1*(pese2-prm)/(pese2+prm); 00099 costhe=sqrt(dcosth); 00100 newel.rotate(costhe, phi+M_PI); 00101 00102 }//end of subroutine moller end; 00103
1.2.3 written by Dimitri van Heesch,
© 1997-2000