function AngularCrossSection() { this.Const = new Constants(); // смотри в constants.js this.ComFun = new CommonFun(); this.NucName = new NucleusName(); this.Npoint=0; this.Ap = 1; this.Zp = 1; this.At = 12; this.Zt = 6; this.Atr = 0; this.Ztr = 0; this._Ap = 1; this._Zp = 1; this._At = 12; this._Zt = 6; this.ReactionType = 'elastic';//elastic | inelastic | pickup | stripping this.Theta = []; this.CrSect = []; this.ErrorPlus = []; this.ErrorMinus = []; this.ThMin = 0.0; this.ThMax = 180; this.CSMin = 0.1; this.CSMax = 1.0; this.Elab = 10.0; this.Ecm = 9.23; this.mu = 0.923; this._mu = 0.923; this.eta = 1; this._eta =1; this.Q = 0; this.SigmaTotal = 0.0; this.cm_lab = 'cm'; // cm | lab this.units = 'ratio';// ratio | b/sr | mb/sr | mcb/sr | nb/sr | pb/sr this.Debugging = false; this.NoData = true; this.Ratio = false; //-------------------------------------------------------------------- this.setReaction = function(zp,ap,zt,at,e,esys,ztr,atr,q,rtype) { this.Ap = ap; this.Zp = zp; this.At = at; this.Zt = zt; this.Atr= atr; this.Ztr= ztr; this.ReactionType = rtype; if(this.ReactionType == 'pickup') { this._Ap = 1*this.Ap + 1*this.Atr; this._Zp= 1*this.Zp + 1*this.Ztr; this._At = 1*this.At - 1*this.Atr; this._Zt= 1*this.Zt - 1*this.Ztr; } else if(this.ReactionType == 'stripping') { this._Ap = 1*this.Ap - 1*this.Atr; this._Zp= 1*this.Zp - 1*this.Ztr; this._At = 1*this.At + 1*this.Atr; this._Zt= 1*this.Zt + 1*this.Ztr; } else // elastic, inelastic { this._Ap= ap; this._Zp= zp; this._At= at; this._Zt= zt; } this.Q = q; if(esys == 'lab') this.Elab = e; else if(esys == 'cm') this.Elab = e*(1*ap+1*at)/at; else this.Elab = e*ap; this.Ecm = this.Elab*at/(1*ap+1*at); this.mu = 1.*ap*at/(1*ap+1*at); this._mu = 1.*this._Ap*this._At/(1*this._Ap+1*this._At); this.eta = this.Zp*this.Zt*this.Const.e2*this.mu/this.Const.h2_mn/Math.sqrt(2*this.mu*this.Ecm/this.Const.h2_mn); this._eta = this._Zp*this._Zt*this.Const.e2*this._mu/this.Const.h2_mn/Math.sqrt(2*this._mu*(this.Ecm+this.Q)/this.Const.h2_mn); } //-------------------------------------------------------------------- this.CS_cm_to_lab = function() { if(this.cm_lab == 'lab') return; var c,x,thlab, m12 = 1.*this.Ap/this.At, alpha = Math.sqrt(this._mu*(1.0 + 1*this.Q/this.Ecm)/this.mu); if(this.Debugging) console.log("Angular CS: alpha = "+alpha+", Q="+this.Q+", Ecm="+this.Ecm+", mu="+this.mu+", _mu="+this._mu); for(var i=0;ilab"); } //-------------------------------------------------------------------- this.CS_lab_to_cm = function() { if(this.cm_lab == 'cm') return; var c,s,x,thlab, m12=1.*Ap/At, alpha = Math.sqrt(this._mu*(1 + 1*this.Q/this.Ecm)/this.mu); for(var i=0;i1.e-20) if(this.ErrorMinus==null) { if(this.CSMin > this.CrSect[i]) this.CSMin = this.CrSect[i]; } else // dlya opredeleniya min nuzhno uchest' oshibku { tmp = this.CrSect[i] - this.ErrorMinus[i]; if(tmp*this.CrSect[i] > 0) { if(this.CSMin > tmp)//esli oshibki v predelah 2-h poryadkov ot secheniya if(this.ComFun.Log10(this.CrSect[i]/this.ErrorMinus[i]) >= -2.0) this.CSMin = tmp; } else if(tmp <= 0) { if(this.CSMin > this.CrSect[i]) this.CSMin = 0.5*this.CrSect[i]; } else if(this.CSMin > this.CrSect[i]) this.CSMin = this.CrSect[i]; } //---------------------------------------------------------------- if(this.ThMaxthis.Theta[i])this.ThMin=this.Theta[i]; } if(this.Npoint==1) { this.CSMax*=1.1; this.CSMin*=0.9; this.ThMax*=1.1; this.ThMin*=0.9; } if(Math.abs(this.CSMax-this.CSMin)<1.e-50) this.CSMax = 1*this.CSMax + 1; if(Math.abs(this.ThMax-this.ThMin)<1.e-50) {this.ThMax = 1*this.ThMax + 1.; this.ThMin -= 1.;} // some correction if(this.CSMin<1.e-8 && this.CSMax>1.e-8) this.CSMin=1.e-8; if(this.CSMax nuzhno ego pereschitat' v cm. dlya vychisleniya J*ds/dO if(sys == 'lab') { cos2_lab = Math.cos(th); sin_lab = Math.sin(th); sin2_lab = sin_lab*sin_lab; m12 = 1.*this.Ap/this.At; cos2_lab = cos2_lab*cos2_lab; xx = 1*m12*m12*(sin2_lab-1.)*sin2_lab + 1*cos2_lab; if(th_deg < 90) cos_cm = (-1*m12*sin2_lab + 1*Math.sqrt(xx)); else cos_cm = (-1*m12*sin2_lab - 1*Math.sqrt(xx)); s = Math.sqrt(0.5*(1.-cos_cm));// sin(th_cm/2) xx = 1. + 1*m12*m12+2.*m12*cos_cm; Jacobian = xx*Math.sqrt(xx)/Math.abs(1. + 1*m12*cos_cm); } //--------------------------------------------------------------------------- if(this.Ap==this.At && this.Zp==this.Zt) { sin2_th = s*s; cos2_th = 1 - sin2_th; ln_sin2_th = Math.log(1./sin2_th); ln_cos2_th = Math.log(1./cos2_th); re = 1*Math.cos(this.eta*ln_sin2_th)/sin2_th + 1*Math.cos(this.eta*ln_cos2_th)/cos2_th, im = 1*Math.sin(this.eta*ln_sin2_th)/sin2_th + 1*Math.sin(this.eta*ln_cos2_th)/cos2_th; cs = 10.*x*x*(1*re*re + 1*im*im); } else cs = 10.*x*x/(s*s*s*s); //--------------------------------------------------------------------------- return cs*Jacobian; } //-------------------------------------------------------------------- this.getReactionTitle = function() { var str = this.NucName.getNucleusName(this.At,this.Zt)+ "("+this.NucName.getNucleusName(this.Ap,this.Zp)+ ","+this.NucName.getNucleusName(this._Ap,this._Zp)+ ")"+this.NucName.getNucleusName(this._At,this._Zt)+ ", Elab = "+this.Elab+" MeV"; return str; } //-------------------------------------------------------------------- this.saveCrossSection = function() { var str = "theta_" + this.cm_lab + "(deg) " +"ds/dO("+this.units+") "; if(this.ErrorPlus != null) str = str + "+Error "; if(this.ErrorMinus != null) str = str + "-Error "; str = str + "\n"; for(var i=0;i