improved heliosmatics.html
This commit is contained in:
parent
6d9dd02f8f
commit
34efa748d1
|
@ -9,12 +9,41 @@
|
|||
body{
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<body>
|
||||
|
||||
<h1>HELIOSmatics (experimental...)</h1>
|
||||
<h3 id='reactionName'> 24F(d,p)25F@10MeV/u</h3>
|
||||
<h2 id='reactionName'> 24F(d,p)25F@10MeV/u</h2>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td style="text-align:right"> Beam (A):</td>
|
||||
<td><Input type="text" size="2" value="24F" id="beam"/></td>
|
||||
<td style="text-align:right"> Beam Ex:</td>
|
||||
<td><Input type="text" size="2" value="0" id="beamEx"/></td>
|
||||
<td>MeV</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:right"> Target (a):</td>
|
||||
<td><Input type="text" size="2" value="d" id="target"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:right"> Light (b):</td>
|
||||
<td><Input type="text" size="2" value="p" id="light"/></td>
|
||||
<td style="text-align:right"> Q-value:</td>
|
||||
<td id='Q-value'>2.057</td>
|
||||
<td>MeV</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:right"> Heavy (B):</td>
|
||||
<td id='heavyName'>25F</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p></p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
|
@ -31,44 +60,25 @@
|
|||
<p></p>
|
||||
<table id="setting">
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td style="text-align:right"> Beam (A):</td>
|
||||
<td><Input type="text" size="7" value="24F" id="beam"/></td>
|
||||
<td style="text-align:right"> Beam Ex:</td>
|
||||
<td><Input type="text" size="7" value="0" id="beamEx"/></td>
|
||||
<td>MeV</td>
|
||||
<td style="text-align:right"> B-field:</td>
|
||||
<td><Input type="text" size="1" value="-2" id='BField'/></td>
|
||||
<td>T</td>
|
||||
<td><Input type="range" min="-4" max="4" step="0.05" value="-2" style="width:400px" id='BRange'/> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="text-align:right"> Target (a):</td>
|
||||
<td><Input type="text" size="7" value="d" id="target"/></td>
|
||||
<td style="text-align:right"> Beam Energy:</td>
|
||||
<td><Input type="text" size="7" value="10" id="KEA"/></td>
|
||||
<td><Input type="text" size="1" value="10" id='KEA'/></td>
|
||||
<td>MeV/u</td>
|
||||
<td><Input type="range" min="0" max="20" step="0.1" value="10" style="width:400px" id='KEARange'/> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:right"> Light (b):</td>
|
||||
<td><Input type="text" size="7" value="p" id="light"/></td>
|
||||
<td style="text-align:right"> min Beam Energy:</td>
|
||||
<td id='minKEA'>-1.107</td>
|
||||
<td>MeV/u</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:right"> Heavy (B):</td>
|
||||
<td id='heavyName'>25F</td>
|
||||
<td style="text-align:right"> Q-value:</td>
|
||||
<td id='Q-value'>2.057</td>
|
||||
<td>MeV</td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
<tr>
|
||||
<td style="text-align:right"> B-field:</td>
|
||||
<td><Input type="text" size="7" value="2" id="BField"/></td>
|
||||
<td>T</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table id="ExTable", style="border:1px solid">
|
||||
|
@ -101,29 +111,38 @@
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><button type="button" onclick="addRow()">Add E<sub>x</sub></button></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><button type="button" onclick="addRow()" style="width:85px">Add E<sub>x</sub></button></td>
|
||||
<td><button type="button" onclick="deleteRow()">Remove E<sub>x</sub></button></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p></p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td style="text-align:right"> θ<sub>CM</sub>:</td>
|
||||
<td><Input type="text" size="1" value="0" id='thetaCM'/></td>
|
||||
<td>deg</td>
|
||||
<td><Input type="range" min="0" max="40" step="0.1" value="0" style="width:600px" id='thetaCMRange'/> </td>
|
||||
</tr>
|
||||
<td style="text-align:right"> Array Pos:</td>
|
||||
<td><Input type="text" size="1" value="0" id='posArray'/></td>
|
||||
<td>mm</td>
|
||||
<td><Input type="range" min="-500" max="1000" step="1" value="0" style="width:600px" id='posArrayRange'/> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p></p>
|
||||
|
||||
<div id="Plot_EZ" style="width:650px;height:600px;"></div>
|
||||
|
||||
|
||||
<div id="Plot_EZ" style="width:600px;height:600px;"></div>
|
||||
|
||||
<p id='x1'></p>
|
||||
<p id='y1'></p>
|
||||
|
||||
<!--
|
||||
<p id="n0"></p>
|
||||
<p id="n1"></p>
|
||||
<p id="n2"></p>
|
||||
<p id="n3"></p>
|
||||
|
||||
<!--
|
||||
<p id='beam_k_lab'></p>
|
||||
<p id='E_tot_cm'></p>
|
||||
<p id='KE_cm'></p>
|
||||
|
@ -156,7 +175,6 @@ function addRow() {
|
|||
<td></td> \
|
||||
<td></td> \
|
||||
<td></td>';
|
||||
|
||||
Calculation();
|
||||
}
|
||||
|
||||
|
@ -166,35 +184,66 @@ function deleteRow(){
|
|||
if ( nRow > 3){
|
||||
table.deleteRow(nRow-2);
|
||||
}
|
||||
|
||||
Calculation();
|
||||
}
|
||||
|
||||
var beam = []; //A, Z, Mass
|
||||
var beam = []; //A, Z, Mass, Name
|
||||
var beamMass;
|
||||
var target= [];
|
||||
var light=[];
|
||||
var heavy=[];
|
||||
|
||||
function GetMass(AZ, id){
|
||||
var str = 'massProxy.py?AZ=' + AZ;
|
||||
var beamEx;
|
||||
var BField;
|
||||
var KEA;
|
||||
var KE;
|
||||
var reactionName;
|
||||
|
||||
var client = new XMLHttpRequest();
|
||||
var Qvalue;
|
||||
var minKEA;
|
||||
|
||||
var perpDistant = 11.5; //mm, detector prepdicular distance
|
||||
var bore = 462.0; // mm
|
||||
|
||||
const c = 299.792468;
|
||||
|
||||
var beam_k_lab;
|
||||
var E_tot_cm ;
|
||||
var KE_cm ;
|
||||
var max_Ex ;
|
||||
var beta ;
|
||||
var gamma ;
|
||||
|
||||
var ez_slope ; // MeV/mm
|
||||
|
||||
var alpha ;
|
||||
var alpha_B ;
|
||||
|
||||
var ExList = [];
|
||||
|
||||
function GetMassFromSym(AZ, id){
|
||||
let str = 'massProxy.py?AZ=' + AZ;
|
||||
|
||||
let client = new XMLHttpRequest();
|
||||
client.onreadystatechange = function() {
|
||||
var mass = client.responseText.split(",");
|
||||
let mass = client.responseText.split(",");
|
||||
if( id == 0 ){
|
||||
beam[0] = parseInt(mass[0]);
|
||||
beam[1] = parseInt(mass[1]);
|
||||
beam[2] = parseFloat(mass[2]);
|
||||
beam[3] = AZ;
|
||||
}
|
||||
if( id == 1 ){
|
||||
target[0] = parseInt(mass[0]);
|
||||
target[1] = parseInt(mass[1]);
|
||||
target[2] = parseFloat(mass[2]);
|
||||
target[3] = AZ;
|
||||
}
|
||||
if( id == 2 ){
|
||||
light[0] = parseInt(mass[0]);
|
||||
light[1] = parseInt(mass[1]);
|
||||
light[2] = parseFloat(mass[2]);
|
||||
light[3] = AZ;
|
||||
}
|
||||
}
|
||||
client.open('GET', str, false);
|
||||
|
@ -202,12 +251,12 @@ function GetMass(AZ, id){
|
|||
|
||||
}
|
||||
|
||||
function GetMass2(A,Z){
|
||||
var str = 'massProxy.py?A=' + A + '&Z=' + Z;
|
||||
function GetMassFromAZ(A,Z){
|
||||
let str = 'massProxy.py?A=' + A + '&Z=' + Z;
|
||||
|
||||
var client = new XMLHttpRequest();
|
||||
let client = new XMLHttpRequest();
|
||||
client.onreadystatechange = function() {
|
||||
var mass = client.responseText.split(",");
|
||||
let mass = client.responseText.split(",");
|
||||
heavy[2] = parseFloat(mass[2]);
|
||||
heavy[3] = mass[3].replace(/\s/g, '');
|
||||
}
|
||||
|
@ -216,66 +265,61 @@ function GetMass2(A,Z){
|
|||
|
||||
}
|
||||
|
||||
function Plot(data, titleTxt, rangeX, rangeY){
|
||||
function GetMass(){
|
||||
let beam_AZ = document.getElementById('beam').value;
|
||||
GetMassFromSym(beam_AZ, 0);
|
||||
let target_AZ = document.getElementById('target').value;
|
||||
GetMassFromSym(target_AZ, 1);
|
||||
let light_AZ = document.getElementById('light').value;
|
||||
GetMassFromSym(light_AZ, 2);
|
||||
|
||||
|
||||
}
|
||||
|
||||
function Calculation(){
|
||||
var beam_AZ = document.getElementById('beam').value;
|
||||
GetMass(beam_AZ, 0);
|
||||
var target_AZ = document.getElementById('target').value;
|
||||
GetMass(target_AZ, 1);
|
||||
var light_AZ = document.getElementById('light').value;
|
||||
GetMass(light_AZ, 2);
|
||||
beamMass = beam[2];
|
||||
|
||||
heavy[0] = beam[0]+target[0]-light[0];
|
||||
heavy[1] = beam[1]+target[1]-light[1];
|
||||
GetMass2(heavy[0], heavy[1]);
|
||||
heavy_AZ = heavy[3];
|
||||
GetMassFromAZ(heavy[0], heavy[1]);
|
||||
|
||||
var beamEx = parseFloat(document.getElementById('beamEx').value);
|
||||
var BField = parseFloat(document.getElementById('BField').value);
|
||||
var KEA = document.getElementById('KEA').value;
|
||||
var KE = KEA * beam[0];
|
||||
document.getElementById('heavyName').innerHTML = heavy[3];
|
||||
|
||||
var reactionName = beam_AZ +"(" + target_AZ + "," + light_AZ + ")" + heavy_AZ + "@" + KEA + "MeV/u";
|
||||
document.getElementById('reactionName').innerHTML = reactionName;
|
||||
//document.getElementById('n0').innerHTML = beam[0] + "," + beam[1] + "," + beam[2]
|
||||
//document.getElementById('n1').innerHTML = target[0] + "," + target[1] + "," + target[2]
|
||||
//document.getElementById('n2').innerHTML = light[0] + "," + light[1] + "," + light[2]
|
||||
//document.getElementById('n3').innerHTML = heavy[0] + "," + heavy[1] + "," + heavy[2]
|
||||
|
||||
var Qvalue = - heavy[2] - light[2] + beam[2] + target[2] + beamEx;
|
||||
var minKEA = (Math.pow(light[2] + heavy[2],2) - Math.pow(beam[2] + target[2],2))/2/target[2]/beam[0];
|
||||
var helios = document.getElementById('HELIOS').checked;
|
||||
var solaris = document.getElementById('SOLARIS').checked;
|
||||
var iss = document.getElementById('ISS').checked;
|
||||
var perpDistant = 11.5; //mm, detector prepdicular distance
|
||||
var bore = 462.0; // mm
|
||||
//if ( solaris == true ){
|
||||
//
|
||||
//}
|
||||
|
||||
if ( iss == true ){
|
||||
perpDistant = 20;
|
||||
}
|
||||
|
||||
function CalConstants(){
|
||||
|
||||
var beam_k_lab = Math.sqrt(Math.pow(beam[2]+KE,2) - Math.pow(beam[2],2));
|
||||
var E_tot_cm = Math.sqrt(Math.pow(target[2]+beam[2],2) + 2*target[2]*KE);
|
||||
var KE_cm = E_tot_cm - beam[2] - target[2];
|
||||
var max_Ex = KE_cm + Qvalue;
|
||||
var beta = beam_k_lab/(beam[2] + target[2] + KE);
|
||||
var gamma = 1./Math.sqrt(1-beta*beta);
|
||||
beamEx = parseFloat(document.getElementById('beamEx').value);
|
||||
|
||||
document.getElementById('heavyName').innerHTML = heavy_AZ;
|
||||
beam[2] = beamMass + beamEx;
|
||||
|
||||
BField = parseFloat(document.getElementById('BField').value);
|
||||
KEA = document.getElementById('KEA').value;
|
||||
KE = KEA * beam[0];
|
||||
|
||||
reactionName = beam[3] +"(" + target[3] + "," + light[3] + ")" + heavy[3] + "@" + KEA + "MeV/u";
|
||||
|
||||
Qvalue = - heavy[2] - light[2] + beam[2] + target[2] ;
|
||||
minKEA = (Math.pow(light[2] + heavy[2],2) - Math.pow(beam[2] + target[2],2))/2/target[2]/beam[0];
|
||||
|
||||
document.getElementById('reactionName').innerHTML = reactionName;
|
||||
document.getElementById('minKEA').innerHTML = minKEA.toFixed(3);
|
||||
document.getElementById('Q-value').innerHTML = Qvalue.toFixed(3);
|
||||
|
||||
beam_k_lab = Math.sqrt(Math.pow(beam[2] + KE,2) - Math.pow(beam[2],2));
|
||||
E_tot_cm = Math.sqrt(Math.pow(target[2] + beam[2],2) + 2*target[2]*KE);
|
||||
KE_cm = E_tot_cm - beam[2] - target[2];
|
||||
max_Ex = KE_cm + Qvalue;
|
||||
beta = beam_k_lab/(beam[2] + target[2] + KE);
|
||||
gamma = 1./Math.sqrt(1-beta*beta);
|
||||
|
||||
ez_slope = Math.abs(BField) * c * light[1]*beta/2/Math.PI/1000; // MeV/mm
|
||||
alpha = ez_slope/beta;
|
||||
alpha_B = alpha * heavy[1]/light[1];
|
||||
|
||||
|
||||
/*
|
||||
document.getElementById('n0').innerHTML = beam[0] + "," + beam[1] + "," + beam[2]
|
||||
document.getElementById('n1').innerHTML = target[0] + "," + target[1] + "," + target[2]
|
||||
document.getElementById('n2').innerHTML = light[0] + "," + light[1] + "," + light[2]
|
||||
document.getElementById('n3').innerHTML = heavy[0] + "," + heavy[1] + "," + heavy[2]
|
||||
|
||||
document.getElementById('beam_k_lab').innerHTML = beam_k_lab;
|
||||
document.getElementById('E_tot_cm').innerHTML = E_tot_cm;
|
||||
document.getElementById('max_Ex').innerHTML = max_Ex;
|
||||
|
@ -284,23 +328,42 @@ function Calculation(){
|
|||
document.getElementById('gamma').innerHTML = gamma;
|
||||
*/
|
||||
|
||||
const c = 299.792468;
|
||||
}
|
||||
|
||||
var ez_slope = BField * c * light[1]*beta/2/Math.PI/1000; // MeV/mm
|
||||
function SetSSType(){
|
||||
let helios = document.getElementById('HELIOS').checked;
|
||||
let solaris = document.getElementById('SOLARIS').checked;
|
||||
let iss = document.getElementById('ISS').checked;
|
||||
|
||||
var alpha = ez_slope/beta;
|
||||
var alpha_B = alpha * heavy[1]/light[1];
|
||||
if ( helios == true ) perpDistant = 11.5;
|
||||
if ( solaris == true ) perpDistant = 11.5;
|
||||
if ( iss == true ) perpDistant = 20;
|
||||
|
||||
var tableEx = document.getElementById("ExTable");
|
||||
var nRow = tableEx.rows.length;
|
||||
//document.getElementById('n1').innerHTML = perpDistant;
|
||||
}
|
||||
|
||||
var xList =[];
|
||||
var yList =[];
|
||||
|
||||
function Calculation(){
|
||||
|
||||
let tableEx = document.getElementById("ExTable");
|
||||
let nRow = tableEx.rows.length;
|
||||
|
||||
xList = [];
|
||||
yList = [];
|
||||
ExList = [];
|
||||
//alert("Calculation called");
|
||||
|
||||
let xmin ;
|
||||
|
||||
for( let i = 1; i < nRow-1; i++){
|
||||
let Ex = parseFloat(document.getElementById("Ex" + i).value);
|
||||
let theta = parseFloat(document.getElementById("theta" + i).value);
|
||||
|
||||
ExList.push(Ex);
|
||||
//alert( i, ", Ex : " + Ex);
|
||||
|
||||
let haha1 = E_tot_cm*E_tot_cm - Math.pow(heavy[2] + Ex + light[2],2);
|
||||
let haha2 = E_tot_cm*E_tot_cm - Math.pow(heavy[2] + Ex - light[2],2);
|
||||
|
||||
|
@ -310,11 +373,14 @@ function Calculation(){
|
|||
let ss = Math.sin(theta*Math.PI/180.);
|
||||
let qb = Math.sqrt(light[2]*light[2]+k_cm*k_cm);
|
||||
|
||||
|
||||
let Eb = gamma * qb - gamma * beta * k_cm * cs - light[2];
|
||||
|
||||
let Zb0 = (gamma*beta* qb - gamma * k_cm * cs )/alpha; //mm
|
||||
let rho = k_cm * ss/c/light[1]/BField * 1000; // mm
|
||||
|
||||
if( i == 1 ) xmin = Zb0;
|
||||
if( i > 1 & Zb0 < xmin) xmin = Zb0;
|
||||
|
||||
let rho = k_cm * ss/c/light[1]/Math.abs(BField) * 1000; // mm
|
||||
let Zb = Zb0 * (1- Math.asin(perpDistant/rho)/2/Math.PI);
|
||||
|
||||
let thetaLab = 180 - Math.atan2(k_cm * ss, gamma * (beta * qb - k_cm * cs)) * 180/Math.PI;
|
||||
|
@ -332,15 +398,15 @@ function Calculation(){
|
|||
let EB = gamma * qB + gamma * beta * k_cm * cs - heavy[2];
|
||||
let thetaLab_B = Math.atan2(-k_cm * ss, gamma * (beta * qB + k_cm * cs)) * 180/Math.PI;
|
||||
let ZB0 = (gamma*beta* qB + gamma * k_cm * cs )/alpha_B; //mm
|
||||
let rhoB = k_cm * ss/c/heavy[1]/BField * 1000; // mm
|
||||
let rhoB = k_cm * ss/c/heavy[1]/Math.abs(BField) * 1000; // mm
|
||||
|
||||
tableEx.rows[i].cells[8].innerHTML = EB.toFixed(3);
|
||||
tableEx.rows[i].cells[9].innerHTML = thetaLab_B.toFixed(2);
|
||||
tableEx.rows[i].cells[10].innerHTML = (ZB0/2).toFixed(2);
|
||||
tableEx.rows[i].cells[11].innerHTML = (2*rhoB).toFixed(2);
|
||||
|
||||
var xxx = [];
|
||||
var yyy = [];
|
||||
let xxx = [];
|
||||
let yyy = [];
|
||||
|
||||
for( let j = 0; j < 100 ; j++){
|
||||
let thetaCM = Math.PI/Math.log10(100) * Math.log10(100/(100-j)) ;
|
||||
|
@ -359,34 +425,85 @@ function Calculation(){
|
|||
|
||||
};
|
||||
|
||||
///------------- generate plot
|
||||
//var xRange = xmin < 0 ? [xmin, 0] : [xmin, xmin + 600]
|
||||
|
||||
let xRange = [-700, 0];
|
||||
|
||||
Plot(xRange, [0, 12]);
|
||||
|
||||
}
|
||||
|
||||
function PlotThetaCMLine(thetaCM){
|
||||
let cs = Math.cos(thetaCM * Math.PI /180);
|
||||
let ss = Math.sin(thetaCM * Math.PI /180);
|
||||
|
||||
let zList = [];
|
||||
let eList = [];
|
||||
|
||||
for( let z = -2000; z < 2000; z+=30){
|
||||
zList.push(z);
|
||||
|
||||
let kaka = Math.pow(gamma * ss,2);
|
||||
let a1 = light[2]*light[2]*(1-kaka);
|
||||
|
||||
let haha = (cs*Math.sqrt(alpha*alpha*z*z + a1) - kaka * ez_slope * z)/(1-kaka)- light[2];
|
||||
|
||||
eList.push(haha);
|
||||
|
||||
}
|
||||
|
||||
Plotly.addTraces("Plot_EZ", {x : zList, y: eList, name:"thetaCM=" + thetaCM }, 0);
|
||||
|
||||
}
|
||||
|
||||
function PlotBore(){
|
||||
let zList = [];
|
||||
let eList = [];
|
||||
|
||||
for( let z = -2000; z < 2000; z+=30){
|
||||
zList.push(z);
|
||||
|
||||
let haha = Math.sqrt((z*z+Math.PI*Math.PI*bore*bore)*alpha*alpha + light[2]*light[2]) - light[2];
|
||||
|
||||
eList.push(haha);
|
||||
|
||||
}
|
||||
|
||||
Plotly.addTraces("Plot_EZ", {x : zList, y: eList, name:"Bore" }, 0);
|
||||
}
|
||||
|
||||
function Plot(rangeX, rangeY){
|
||||
|
||||
let nEx = xList.length;
|
||||
|
||||
//document.getElementById('n0').innerHTML = nEx;
|
||||
|
||||
for( let i = 1; i < nRow-1; i++){
|
||||
if( i == 1 ){
|
||||
var data = [
|
||||
{ x : xList[0], y : yList[0], mode:"lines", type:"scatter"}
|
||||
{ x : xList[0], y : yList[0], mode:"lines", type:"scatter", name:"Ex="+ExList[0]}
|
||||
];
|
||||
|
||||
var layout = {
|
||||
xaxis: {range: [-700, 0], title: "Z [mm]", mirror : "allticks", linewidth : "1"},
|
||||
yaxis: {range: [0, 10], title: "Energy [MeV]" , mirror : "allticks", linewidth : "1"},
|
||||
title: reactionName
|
||||
xaxis: {range: rangeX, title: "Z [mm]", mirror : "allticks", linewidth : "1"},
|
||||
yaxis: {range: rangeY, title: "Energy [MeV]" , mirror : "allticks", linewidth : "1"},
|
||||
title: reactionName,
|
||||
legend: {yanchor:"top", xanchor:"left", x:"0.01",y:"0.99" }
|
||||
};
|
||||
|
||||
Plotly.newPlot( "Plot_EZ", data, layout );
|
||||
|
||||
}else{
|
||||
|
||||
Plotly.addTraces("Plot_EZ", {x : xList[i-1], y: yList[i-1]});
|
||||
}
|
||||
for( let i = 1; i < nEx; i++){
|
||||
Plotly.addTraces("Plot_EZ", {x : xList[i], y: yList[i], name:"Ex="+ExList[i]});
|
||||
}
|
||||
|
||||
PlotThetaCMLine(document.getElementById('thetaCM').value);
|
||||
PlotBore();
|
||||
}
|
||||
|
||||
document.getElementById('beam').addEventListener('keypress',
|
||||
function(e){
|
||||
if(e.keyCode == 13){
|
||||
Calculation();
|
||||
GetMass();
|
||||
CalConstants();
|
||||
}
|
||||
}, false
|
||||
);
|
||||
|
@ -394,7 +511,8 @@ document.getElementById('beam').addEventListener('keypress',
|
|||
document.getElementById('target').addEventListener('keypress',
|
||||
function(e){
|
||||
if(e.keyCode == 13){
|
||||
Calculation();
|
||||
GetMass();
|
||||
CalConstants();
|
||||
}
|
||||
}, false
|
||||
);
|
||||
|
@ -402,7 +520,8 @@ document.getElementById('target').addEventListener('keypress',
|
|||
document.getElementById('light').addEventListener('keypress',
|
||||
function(e){
|
||||
if(e.keyCode == 13){
|
||||
Calculation();
|
||||
GetMass();
|
||||
CalConstants();
|
||||
}
|
||||
}, false
|
||||
);
|
||||
|
@ -410,7 +529,8 @@ document.getElementById('light').addEventListener('keypress',
|
|||
document.getElementById('BField').addEventListener('keypress',
|
||||
function(e){
|
||||
if(e.keyCode == 13){
|
||||
Calculation();
|
||||
document.getElementById('BRange').value = this.value;
|
||||
//CalConstants();
|
||||
}
|
||||
}, false
|
||||
);
|
||||
|
@ -418,7 +538,7 @@ document.getElementById('BField').addEventListener('keypress',
|
|||
document.getElementById('beamEx').addEventListener('keypress',
|
||||
function(e){
|
||||
if(e.keyCode == 13){
|
||||
Calculation();
|
||||
CalConstants();
|
||||
}
|
||||
}, false
|
||||
);
|
||||
|
@ -426,12 +546,30 @@ document.getElementById('beamEx').addEventListener('keypress',
|
|||
document.getElementById('KEA').addEventListener('keypress',
|
||||
function(e){
|
||||
if(e.keyCode == 13){
|
||||
Calculation();
|
||||
document.getElementById('KEARange').value = this.value;
|
||||
//CalConstants();
|
||||
}
|
||||
}, false
|
||||
);
|
||||
|
||||
window.logMeThis = function(msg){
|
||||
document.getElementById('thetaCM').addEventListener('keypress',
|
||||
function(e){
|
||||
if(e.keyCode == 13){
|
||||
document.getElementById('thetaCMRange').value = this.value;
|
||||
}
|
||||
}, false
|
||||
);
|
||||
|
||||
document.getElementById('posArray').addEventListener('keypress',
|
||||
function(e){
|
||||
if(e.keyCode == 13){
|
||||
document.getElementById('posArrayRange').value = this.value;
|
||||
}
|
||||
}, false
|
||||
);
|
||||
|
||||
window.logMeThis = function(){
|
||||
SetSSType();
|
||||
Calculation();
|
||||
}
|
||||
var FuncEx = window.logMeThis.bind(null, "Ex");
|
||||
|
@ -440,10 +578,41 @@ window.addEventListener('keypress', FuncEx);
|
|||
var FuncThetaCM = window.logMeThis.bind(null, "thetaCM");
|
||||
window.addEventListener('keypress', FuncThetaCM);
|
||||
|
||||
var FuncThetaCM = window.logMeThis.bind(null, "SSType");
|
||||
window.addEventListener('click', FuncThetaCM);
|
||||
window.checkSSType = function(){
|
||||
SetSSType();
|
||||
Calculation();
|
||||
}
|
||||
|
||||
var FuncCheckSSType = window.checkSSType.bind(null, "SSType");
|
||||
document.getElementById('HELIOS').addEventListener('click', FuncCheckSSType);
|
||||
document.getElementById('SOLARIS').addEventListener('click', FuncCheckSSType);
|
||||
document.getElementById('ISS').addEventListener('click', FuncCheckSSType);
|
||||
|
||||
document.getElementById('BRange').oninput = function(){
|
||||
document.getElementById('BField').value = this.value;
|
||||
CalConstants();
|
||||
Calculation();
|
||||
}
|
||||
|
||||
document.getElementById('KEARange').oninput = function(){
|
||||
document.getElementById('KEA').value = this.value;
|
||||
CalConstants();
|
||||
Calculation();
|
||||
}
|
||||
|
||||
document.getElementById('thetaCMRange').oninput = function(){
|
||||
document.getElementById('thetaCM').value = this.value;
|
||||
CalConstants();
|
||||
Calculation();
|
||||
}
|
||||
|
||||
document.getElementById('posArrayRange').oninput = function(){
|
||||
document.getElementById('posArray').value = this.value;
|
||||
}
|
||||
|
||||
GetMass();
|
||||
CalConstants();
|
||||
SetSSType();
|
||||
Calculation();
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user