added WebSimHelper, need to combine the simpleSim to heliosmatics.html
3
.gitignore
vendored
|
@ -15,6 +15,7 @@ root_data
|
||||||
*.in
|
*.in
|
||||||
*.out
|
*.out
|
||||||
*.txt
|
*.txt
|
||||||
|
*.csv
|
||||||
|
|
||||||
Cleopatra/ExtractXSec
|
Cleopatra/ExtractXSec
|
||||||
Cleopatra/ExtractXSecFromText
|
Cleopatra/ExtractXSecFromText
|
||||||
|
@ -26,3 +27,5 @@ Cleopatra/PlotSimulation
|
||||||
Cleopatra/PlotTGraphTObjArray
|
Cleopatra/PlotTGraphTObjArray
|
||||||
Cleopatra/SimAlpha
|
Cleopatra/SimAlpha
|
||||||
Cleopatra/SimTransfer
|
Cleopatra/SimTransfer
|
||||||
|
|
||||||
|
__pycache__
|
|
@ -20,9 +20,8 @@
|
||||||
#include "constant.h" // amu
|
#include "constant.h" // amu
|
||||||
#include <stdlib.h> //atoi
|
#include <stdlib.h> //atoi
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
string massData="/Cleopatra/mass20.txt";
|
std::string massData="../Cleopatra/mass20.txt";
|
||||||
|
|
||||||
// about the mass**.txt
|
// about the mass**.txt
|
||||||
// Mass Excess = (ATOMIC MASS - A)*amu | e.g. n : (1.088664.91585E-6-1)*amu
|
// Mass Excess = (ATOMIC MASS - A)*amu | e.g. n : (1.088664.91585E-6-1)*amu
|
||||||
|
@ -34,15 +33,17 @@ class Isotope {
|
||||||
public:
|
public:
|
||||||
int A, Z;
|
int A, Z;
|
||||||
double Mass, MassError, BEA;
|
double Mass, MassError, BEA;
|
||||||
string Name, Symbol;
|
std::string Name, Symbol;
|
||||||
string dataSource;
|
std::string dataSource;
|
||||||
|
|
||||||
Isotope(){findHeliosPath();};
|
Isotope(){dataSource = massData;};
|
||||||
Isotope(int a, int z){ findHeliosPath();SetIso(a,z); };
|
Isotope(int a, int z){ dataSource = massData; SetIso(a,z); };
|
||||||
Isotope(string name){ findHeliosPath(); SetIsoByName(name); };
|
Isotope(std::string name){ dataSource = massData; SetIsoByName(name); };
|
||||||
|
|
||||||
|
void SetMassTablePath(std::string path){ dataSource = path;}
|
||||||
|
|
||||||
void SetIso(int a, int z);
|
void SetIso(int a, int z);
|
||||||
void SetIsoByName(string name);
|
void SetIsoByName(std::string name);
|
||||||
|
|
||||||
double CalSp(int Np, int Nn); // this for the Np-proton, Nn-neutron removal
|
double CalSp(int Np, int Nn); // this for the Np-proton, Nn-neutron removal
|
||||||
double CalSp2(int a, int z); // this is for (a,z) nucleus removal
|
double CalSp2(int a, int z); // this is for (a,z) nucleus removal
|
||||||
|
@ -59,10 +60,10 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void FindMassByAZ(int a, int z); // give mass, massError, BEA, Name, Symbol;
|
void FindMassByAZ(int a, int z); // give mass, massError, BEA, Name, Symbol;
|
||||||
void FindMassByName(string name); // give Z, mass, massError, BEA;
|
void FindMassByName(std::string name); // give Z, mass, massError, BEA;
|
||||||
|
|
||||||
int TwoJ(int nShell);
|
int TwoJ(int nShell);
|
||||||
string Orbital(int nShell);
|
std::string Orbital(int nShell);
|
||||||
int magic(int i){
|
int magic(int i){
|
||||||
switch (i){
|
switch (i){
|
||||||
case 0: return 2; break;
|
case 0: return 2; break;
|
||||||
|
@ -109,22 +110,8 @@ private:
|
||||||
lineMass200 = 2774;
|
lineMass200 = 2774;
|
||||||
}
|
}
|
||||||
|
|
||||||
char * heliosPath;
|
|
||||||
bool isFindOnce;
|
bool isFindOnce;
|
||||||
|
|
||||||
void findHeliosPath(){
|
|
||||||
heliosPath = getenv("HELIOSSYS");
|
|
||||||
if( heliosPath ){
|
|
||||||
dataSource = heliosPath;
|
|
||||||
dataSource += "/analysis" + massData;
|
|
||||||
}else{
|
|
||||||
dataSource = ".." + massData;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void Isotope::SetIso(int a, int z){
|
void Isotope::SetIso(int a, int z){
|
||||||
|
@ -133,16 +120,16 @@ void Isotope::SetIso(int a, int z){
|
||||||
FindMassByAZ(a,z);
|
FindMassByAZ(a,z);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Isotope::SetIsoByName(string name){
|
void Isotope::SetIsoByName(std::string name){
|
||||||
FindMassByName(name);
|
FindMassByName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Isotope::FindMassByAZ(int A, int Z){
|
void Isotope::FindMassByAZ(int A, int Z){
|
||||||
string line;
|
std::string line;
|
||||||
int lineNum=0;
|
int lineNum=0;
|
||||||
int list_A, list_Z;
|
int list_A, list_Z;
|
||||||
|
|
||||||
ifstream myfile;
|
std::ifstream myfile;
|
||||||
int flag=0;
|
int flag=0;
|
||||||
|
|
||||||
setFileLines();
|
setFileLines();
|
||||||
|
@ -171,11 +158,11 @@ void Isotope::FindMassByAZ(int A, int Z){
|
||||||
this->BEA = atof((line.substr(54,11)).c_str());
|
this->BEA = atof((line.substr(54,11)).c_str());
|
||||||
this->Mass = list_Z*mp + (list_A-list_Z)*mn - this->BEA/1000*list_A;
|
this->Mass = list_Z*mp + (list_A-list_Z)*mn - this->BEA/1000*list_A;
|
||||||
this->MassError = atof((line.substr(65,7)).c_str());
|
this->MassError = atof((line.substr(65,7)).c_str());
|
||||||
string str = line.substr(20,2);
|
std::string str = line.substr(20,2);
|
||||||
str.erase(remove(str.begin(), str.end(), ' '), str.end());
|
str.erase(remove(str.begin(), str.end(), ' '), str.end());
|
||||||
this->Symbol = str;
|
this->Symbol = str;
|
||||||
|
|
||||||
ostringstream ss;
|
std::ostringstream ss;
|
||||||
ss << A << this->Symbol;
|
ss << A << this->Symbol;
|
||||||
this->Name = ss.str();
|
this->Name = ss.str();
|
||||||
flag = 1;
|
flag = 1;
|
||||||
|
@ -202,7 +189,7 @@ void Isotope::FindMassByAZ(int A, int Z){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Isotope::FindMassByName(string name){
|
void Isotope::FindMassByName(std::string name){
|
||||||
|
|
||||||
// done seperate the Mass number and the name
|
// done seperate the Mass number and the name
|
||||||
if( name == "n" ) {
|
if( name == "n" ) {
|
||||||
|
@ -220,7 +207,7 @@ void Isotope::FindMassByName(string name){
|
||||||
if( name == "t" ) name = "3H";
|
if( name == "t" ) name = "3H";
|
||||||
if( name == "a" ) name = "4He";
|
if( name == "a" ) name = "4He";
|
||||||
|
|
||||||
string temp = name;
|
std::string temp = name;
|
||||||
int lastDigit = 0;
|
int lastDigit = 0;
|
||||||
|
|
||||||
for(int i=0; temp[i]; i++){
|
for(int i=0; temp[i]; i++){
|
||||||
|
@ -251,12 +238,12 @@ void Isotope::FindMassByName(string name){
|
||||||
//printf(" Symbol = |%s| , Mass = %d\n", this->Symbol.c_str(), this->A);
|
//printf(" Symbol = |%s| , Mass = %d\n", this->Symbol.c_str(), this->A);
|
||||||
|
|
||||||
// find the nucleus in the data
|
// find the nucleus in the data
|
||||||
string line;
|
std::string line;
|
||||||
int lineNum=0;
|
int lineNum=0;
|
||||||
int list_A;
|
int list_A;
|
||||||
string list_symbol;
|
std::string list_symbol;
|
||||||
|
|
||||||
ifstream myfile;
|
std::ifstream myfile;
|
||||||
int flag=0;
|
int flag=0;
|
||||||
|
|
||||||
setFileLines();
|
setFileLines();
|
||||||
|
@ -289,11 +276,11 @@ void Isotope::FindMassByName(string name){
|
||||||
this->Mass = this->Z*mp + (list_A-this->Z)*mn - this->BEA/1000*list_A;
|
this->Mass = this->Z*mp + (list_A-this->Z)*mn - this->BEA/1000*list_A;
|
||||||
this->MassError = atof((line.substr(65,7)).c_str());
|
this->MassError = atof((line.substr(65,7)).c_str());
|
||||||
|
|
||||||
string str = line.substr(20,2);
|
std::string str = line.substr(20,2);
|
||||||
str.erase(remove(str.begin(), str.end(), ' '), str.end());
|
str.erase(remove(str.begin(), str.end(), ' '), str.end());
|
||||||
this->Symbol = str;
|
this->Symbol = str;
|
||||||
|
|
||||||
ostringstream ss;
|
std::ostringstream ss;
|
||||||
ss << this->A << this->Symbol;
|
ss << this->A << this->Symbol;
|
||||||
this->Name = ss.str();
|
this->Name = ss.str();
|
||||||
flag = 1;
|
flag = 1;
|
||||||
|
@ -372,7 +359,7 @@ int Isotope::TwoJ(int nShell){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
string Isotope::Orbital(int nShell){
|
std::string Isotope::Orbital(int nShell){
|
||||||
|
|
||||||
switch(nShell){
|
switch(nShell){
|
||||||
case 0: return "0s1 "; break; //
|
case 0: return "0s1 "; break; //
|
||||||
|
@ -416,7 +403,7 @@ void Isotope::ListShell(){
|
||||||
int n = A-Z;
|
int n = A-Z;
|
||||||
int p = Z;
|
int p = Z;
|
||||||
|
|
||||||
int k = min(n,p);
|
int k = std::min(n,p);
|
||||||
int nMagic = 0;
|
int nMagic = 0;
|
||||||
for( int i = 0; i < 7; i++){
|
for( int i = 0; i < 7; i++){
|
||||||
if( magic(i) < k && k <= magic(i+1) ){
|
if( magic(i) < k && k <= magic(i+1) ){
|
||||||
|
@ -434,7 +421,7 @@ void Isotope::ListShell(){
|
||||||
|
|
||||||
printf("------------------ Core:%3s, inner Core:%3s \n", (core2.Name).c_str(), (core1.Name).c_str());
|
printf("------------------ Core:%3s, inner Core:%3s \n", (core2.Name).c_str(), (core1.Name).c_str());
|
||||||
printf(" || ");
|
printf(" || ");
|
||||||
int t = max(n,p);
|
int t = std::max(n,p);
|
||||||
int nShell = 0;
|
int nShell = 0;
|
||||||
do{
|
do{
|
||||||
int occ = TwoJ(nShell)+1;
|
int occ = TwoJ(nShell)+1;
|
||||||
|
@ -512,8 +499,6 @@ void Isotope::Print(){
|
||||||
|
|
||||||
if (Mass > 0){
|
if (Mass > 0){
|
||||||
|
|
||||||
findHeliosPath();
|
|
||||||
|
|
||||||
printf(" using mass data : %s \n", dataSource.c_str());
|
printf(" using mass data : %s \n", dataSource.c_str());
|
||||||
printf(" mass of \e[47m\e[31m%s\e[m nucleus (Z,A)=(%3d,%3d) is \e[47m\e[31m%12.5f\e[m MeV, BE/A=%7.5f MeV\n", Name.c_str(), Z, A, Mass, BEA/1000.);
|
printf(" mass of \e[47m\e[31m%s\e[m nucleus (Z,A)=(%3d,%3d) is \e[47m\e[31m%12.5f\e[m MeV, BE/A=%7.5f MeV\n", Name.c_str(), Z, A, Mass, BEA/1000.);
|
||||||
printf(" total BE : %12.5f MeV\n",BEA*A/1000.);
|
printf(" total BE : %12.5f MeV\n",BEA*A/1000.);
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
class TransferReaction {
|
class TransferReaction {
|
||||||
public:
|
public:
|
||||||
TransferReaction(){Inititization();};
|
TransferReaction(){Inititization();};
|
||||||
TransferReaction(string configFile, unsigned short ID = 0);
|
TransferReaction(std::string configFile, unsigned short ID = 0);
|
||||||
TransferReaction(int beamA, int beamZ,
|
TransferReaction(int beamA, int beamZ,
|
||||||
int targetA, int targetZ,
|
int targetA, int targetZ,
|
||||||
int recoilA, int recoilZ, float beamEnergy_AMeV);
|
int recoilA, int recoilZ, float beamEnergy_AMeV);
|
||||||
|
@ -84,7 +84,7 @@ private:
|
||||||
Recoil recoil;
|
Recoil recoil;
|
||||||
ReactionConfig config;
|
ReactionConfig config;
|
||||||
|
|
||||||
string nameA, namea, nameb, nameB;
|
std::string nameA, namea, nameb, nameB;
|
||||||
double thetaIN, phiIN;
|
double thetaIN, phiIN;
|
||||||
double mA, ma, mb, mB;
|
double mA, ma, mb, mB;
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ private:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
TransferReaction::TransferReaction(string configFile, unsigned short ID){
|
TransferReaction::TransferReaction(std::string configFile, unsigned short ID){
|
||||||
Inititization();
|
Inititization();
|
||||||
SetReactionFromFile(configFile, ID);
|
SetReactionFromFile(configFile, ID);
|
||||||
}
|
}
|
||||||
|
@ -227,7 +227,7 @@ void TransferReaction::SetExB(double Ex){
|
||||||
isReady = false;
|
isReady = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransferReaction::SetReactionFromFile(string configFile, unsigned short ID){
|
void TransferReaction::SetReactionFromFile(std::string configFile, unsigned short ID){
|
||||||
|
|
||||||
if( config.LoadReactionConfig(configFile) ){
|
if( config.LoadReactionConfig(configFile) ){
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,8 @@ int main(int argc, char *argv[]){
|
||||||
double Ex = 0;
|
double Ex = 0;
|
||||||
double xRatio = 0.95;
|
double xRatio = 0.95;
|
||||||
int nDiv = 1;
|
int nDiv = 1;
|
||||||
string reactionTxt = "reactionConfig.txt";
|
std::string reactionTxt = "reactionConfig.txt";
|
||||||
string detGeoTxt = "detectorGeo.txt";
|
std::string detGeoTxt = "detectorGeo.txt";
|
||||||
int ID = 0;
|
int ID = 0;
|
||||||
|
|
||||||
if ( argc >= 2 ) Ex = atof(argv[1]);
|
if ( argc >= 2 ) Ex = atof(argv[1]);
|
||||||
|
|
|
@ -94,7 +94,7 @@ void FindThetaCM(double Ex, int nDivision=1, double XRATION = 0.95,
|
||||||
|
|
||||||
int iDet = array.nDet;
|
int iDet = array.nDet;
|
||||||
double length = array.detLength;
|
double length = array.detLength;
|
||||||
vector<double> midPos;
|
std::vector<double> midPos;
|
||||||
|
|
||||||
for(int i = 0; i < iDet; i++){
|
for(int i = 0; i < iDet; i++){
|
||||||
if( array.firstPos > 0 ){
|
if( array.firstPos > 0 ){
|
||||||
|
|
|
@ -135,9 +135,9 @@ void Transfer(
|
||||||
dwbaExList = (TMacro *) distFile->FindObjectAny("ExList");
|
dwbaExList = (TMacro *) distFile->FindObjectAny("ExList");
|
||||||
int numEx = dwbaExList->GetListOfLines()->GetSize() - 1 ;
|
int numEx = dwbaExList->GetListOfLines()->GetSize() - 1 ;
|
||||||
for(int i = 1; i <= numEx ; i++){
|
for(int i = 1; i <= numEx ; i++){
|
||||||
string temp = dwbaExList->GetListOfLines()->At(i)->GetName();
|
std::string temp = dwbaExList->GetListOfLines()->At(i)->GetName();
|
||||||
if( temp[0] == '/' ) continue;
|
if( temp[0] == '/' ) continue;
|
||||||
vector<string> tempStr = AnalysisLib::SplitStr(temp, " ");
|
std::vector<std::string> tempStr = AnalysisLib::SplitStr(temp, " ");
|
||||||
exList.Add( atof(tempStr[0].c_str()), atof(tempStr[1].c_str()), 1.0, 0.00);
|
exList.Add( atof(tempStr[0].c_str()), atof(tempStr[1].c_str()), 1.0, 0.00);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,7 +330,7 @@ void Transfer(
|
||||||
//--- cal modified f
|
//--- cal modified f
|
||||||
TObjArray * fxList = new TObjArray();
|
TObjArray * fxList = new TObjArray();
|
||||||
TGraph ** fx = new TGraph*[numEx];
|
TGraph ** fx = new TGraph*[numEx];
|
||||||
vector<double> px, py;
|
std::vector<double> px, py;
|
||||||
int countfx = 0;
|
int countfx = 0;
|
||||||
for( int j = 0 ; j < numEx; j++){
|
for( int j = 0 ; j < numEx; j++){
|
||||||
double a = helios.GetDetRadius();
|
double a = helios.GetDetRadius();
|
||||||
|
@ -692,8 +692,8 @@ int main (int argc, char *argv[]) {
|
||||||
|
|
||||||
//run Armory/Check_Simulation
|
//run Armory/Check_Simulation
|
||||||
if( isPlot ){
|
if( isPlot ){
|
||||||
ifstream file_in;
|
std::ifstream file_in;
|
||||||
file_in.open("../Cleopatra/Check_Simulation.C", ios::in);
|
file_in.open("../Cleopatra/Check_Simulation.C", std::ios::in);
|
||||||
if( file_in){
|
if( file_in){
|
||||||
printf("---- running ../Cleopatra/Check_Simulation.C on %s \n", saveFileName.Data());
|
printf("---- running ../Cleopatra/Check_Simulation.C on %s \n", saveFileName.Data());
|
||||||
TString cmd;
|
TString cmd;
|
||||||
|
|
|
@ -26,7 +26,7 @@ void PrintPotential(){
|
||||||
|
|
||||||
/// A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
|
/// A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
|
||||||
/// 1 1 1 1 0 0 1 1 0 0 1 1 1 0 0 1 1 0 0 0 0 1 0 1 1 1
|
/// 1 1 1 1 0 0 1 1 0 0 1 1 1 0 0 1 1 0 0 0 0 1 0 1 1 1
|
||||||
string potentialRef(string name){
|
std::string potentialRef(std::string name){
|
||||||
|
|
||||||
//======== Deuteron
|
//======== Deuteron
|
||||||
if( name == "A" ){
|
if( name == "A" ){
|
||||||
|
@ -1034,7 +1034,7 @@ bool BassaniPicardPotential(int A, int Z, double E){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CallPotential(string potName, int A, int Z, double E, int Zproj){
|
bool CallPotential(std::string potName, int A, int Z, double E, int Zproj){
|
||||||
bool okFlag = false;
|
bool okFlag = false;
|
||||||
|
|
||||||
if( potName == "A") okFlag = AnCaiPotential(A, Z, E);
|
if( potName == "A") okFlag = AnCaiPotential(A, Z, E);
|
||||||
|
|
239
WebSimHelper/EnergyLevelsPlot.js
Normal file
|
@ -0,0 +1,239 @@
|
||||||
|
let energy = [];
|
||||||
|
let jpi = [];
|
||||||
|
let Name;
|
||||||
|
let A;
|
||||||
|
let Sym;
|
||||||
|
|
||||||
|
function breakdownName(str) {
|
||||||
|
const match = str.match(/^(\d+)([a-zA-Z]+)$/);
|
||||||
|
if (match) {
|
||||||
|
const numberPart = parseInt(match[1]);
|
||||||
|
const stringPart = match[2];
|
||||||
|
return { numberPart, stringPart };
|
||||||
|
} else {
|
||||||
|
return null; // If the input string doesn't match the expected format
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let Sn = 999;
|
||||||
|
let Sp = 999;
|
||||||
|
let Sa = 999;
|
||||||
|
|
||||||
|
function GetData(){
|
||||||
|
|
||||||
|
Name = document.getElementById('ASym').value;
|
||||||
|
let maxEx = parseFloat(document.getElementById('maxEx').value);
|
||||||
|
|
||||||
|
let str = 'displayIsoData.py?ASym=' + Name + "&maxEx=" + maxEx;
|
||||||
|
|
||||||
|
let client = new XMLHttpRequest();
|
||||||
|
client.onreadystatechange = function() {
|
||||||
|
let haha = client.responseText.split('\n');
|
||||||
|
|
||||||
|
jpi = [];
|
||||||
|
energy = [];
|
||||||
|
haha.forEach(line =>{
|
||||||
|
|
||||||
|
// console.log(line)
|
||||||
|
if( line.includes("Sn:") ) {
|
||||||
|
let pos1 = line.indexOf("Sn:");
|
||||||
|
let pos2 = line.indexOf("MeV");
|
||||||
|
Sn = parseFloat(line.substring(pos1+3, pos2));
|
||||||
|
}
|
||||||
|
if( line.includes("Sp:") ) {
|
||||||
|
let pos1 = line.indexOf("Sp:");
|
||||||
|
let pos2 = line.indexOf("MeV");
|
||||||
|
Sp = parseFloat(line.substring(pos1+3, pos2));
|
||||||
|
}
|
||||||
|
if( line.includes("Sa:") ) {
|
||||||
|
let pos1 = line.indexOf("Sa:");
|
||||||
|
let pos2 = line.indexOf("MeV");
|
||||||
|
Sa = parseFloat(line.substring(pos1+3, pos2));
|
||||||
|
}
|
||||||
|
|
||||||
|
if( line.includes("<tr><td style=") && line.length != 0) {
|
||||||
|
jpi.push(line.substring(95).slice(0,-10).trim());
|
||||||
|
energy.push(parseFloat(line.substring(43,54).trim()));
|
||||||
|
// console.log(jpi[jpi.length - 1] + ", " + energy[energy.length-1]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
client.open('GET', str, false);
|
||||||
|
client.send();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function PlotLevels(){
|
||||||
|
|
||||||
|
GetData();
|
||||||
|
|
||||||
|
Plotly.purge("Plot_Levels");
|
||||||
|
|
||||||
|
if( energy.length == 0 ) return;
|
||||||
|
|
||||||
|
// console.log( Name + " | num. states : " + energy.length);
|
||||||
|
|
||||||
|
const plotWidth = 300;
|
||||||
|
const plotHeight = 600;
|
||||||
|
const yMin = -1;
|
||||||
|
|
||||||
|
let maxEx = parseFloat(document.getElementById('maxEx').value);
|
||||||
|
const maxExExp = Math.max(...energy);
|
||||||
|
|
||||||
|
// console.log(maxExExp);
|
||||||
|
|
||||||
|
// let maxY = parseFloat(document.getElementById('plotRange').value);
|
||||||
|
|
||||||
|
const fig = {
|
||||||
|
data: [],
|
||||||
|
layout: {
|
||||||
|
plot_bgcolor: 'white',
|
||||||
|
width: plotWidth,
|
||||||
|
height: plotHeight,
|
||||||
|
margin: { l: 0, r: 0, t: 0, b: 0 },
|
||||||
|
showlegend: false,
|
||||||
|
xaxis: {
|
||||||
|
showline: false,
|
||||||
|
visible: false,
|
||||||
|
range: [-1, 2.5]
|
||||||
|
},
|
||||||
|
yaxis: {
|
||||||
|
range: [yMin, maxEx + 2],
|
||||||
|
showline: false,
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
annotations: []
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const l = energy.length;
|
||||||
|
|
||||||
|
const fontSize = 14;
|
||||||
|
const fontSizeMeV = fontSize / plotHeight * (maxExExp + 1 - yMin);
|
||||||
|
|
||||||
|
let ypos = [];
|
||||||
|
for( let i = 0; i < energy.length; i++) ypos.push(energy[i]);
|
||||||
|
|
||||||
|
let noOverlap = false;
|
||||||
|
let loop = 0;
|
||||||
|
|
||||||
|
while (!noOverlap && loop < 2 * l) {
|
||||||
|
for (let i = 1; i <= l; i++) {
|
||||||
|
const diff = ypos[i] - ypos[i - 1];
|
||||||
|
if (diff < fontSizeMeV) {
|
||||||
|
ypos[i - 1] += (diff - fontSizeMeV) / 2;
|
||||||
|
ypos[i] += (fontSizeMeV - diff) / 2;
|
||||||
|
if (ypos[i - 1] < yMin + fontSizeMeV / 2) {
|
||||||
|
ypos[i - 1] = yMin + fontSizeMeV / 2;
|
||||||
|
ypos[i] = ypos[i - 1] + fontSizeMeV;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let count = 0;
|
||||||
|
for (let i = 1; i <= l; i++) {
|
||||||
|
const diff = ypos[i] - ypos[i - 1];
|
||||||
|
if (diff > fontSizeMeV) {
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (count === l) {
|
||||||
|
noOverlap = true;
|
||||||
|
}
|
||||||
|
loop++;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 0; i < l; i++) {
|
||||||
|
fig.data.push({
|
||||||
|
x: [0, 1],
|
||||||
|
y: [energy[i], energy[i]],
|
||||||
|
mode: 'lines',
|
||||||
|
line: { color: 'black', width: 1 }
|
||||||
|
});
|
||||||
|
|
||||||
|
fig.data.push({
|
||||||
|
x: [1.03, 1.1, 1.19],
|
||||||
|
y: [energy[i], ypos[i], ypos[i]],
|
||||||
|
mode: 'lines',
|
||||||
|
line: { color: 'gray', width: 1 }
|
||||||
|
});
|
||||||
|
|
||||||
|
// console.log(energy[i]+ ", " + ypos[i]);
|
||||||
|
|
||||||
|
fig.layout.annotations.push({
|
||||||
|
x: 1.2,
|
||||||
|
y: ypos[i],
|
||||||
|
text: `${energy[i].toFixed(3)}, ${jpi[i]}`,
|
||||||
|
xanchor: 'left',
|
||||||
|
font: { size: fontSize },
|
||||||
|
showarrow: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Sn: " + Sn);
|
||||||
|
console.log("Sp: " + Sp);
|
||||||
|
console.log("Sa: " + Sa);
|
||||||
|
|
||||||
|
let leftPos = -0.8;
|
||||||
|
|
||||||
|
fig.data.push({
|
||||||
|
x: [leftPos, 1],
|
||||||
|
y: [Sn, Sn],
|
||||||
|
mode: 'lines',
|
||||||
|
line: { color: 'blue', width: 1 }
|
||||||
|
});
|
||||||
|
fig.layout.annotations.push({
|
||||||
|
x: leftPos,
|
||||||
|
y: Sn + fontSizeMeV/2,
|
||||||
|
text: `${'Sn:'+Sn.toFixed(3)}`,
|
||||||
|
xanchor: 'left',
|
||||||
|
font: { size: fontSize, color: 'blue' },
|
||||||
|
showarrow: false
|
||||||
|
});
|
||||||
|
|
||||||
|
fig.data.push({
|
||||||
|
x: [leftPos, 1],
|
||||||
|
y: [Sp, Sp],
|
||||||
|
mode: 'lines',
|
||||||
|
line: { color: 'red', width: 1 }
|
||||||
|
});
|
||||||
|
fig.layout.annotations.push({
|
||||||
|
x: leftPos,
|
||||||
|
y: Sp + fontSizeMeV/2,
|
||||||
|
text: `${'Sp:'+Sp.toFixed(3)}`,
|
||||||
|
xanchor: 'left',
|
||||||
|
font: { size: fontSize, color: 'red' },
|
||||||
|
showarrow: false
|
||||||
|
});
|
||||||
|
|
||||||
|
fig.data.push({
|
||||||
|
x: [leftPos, 1],
|
||||||
|
y: [Sa, Sa],
|
||||||
|
mode: 'lines',
|
||||||
|
line: { color: 'purple', width: 1 }
|
||||||
|
});
|
||||||
|
fig.layout.annotations.push({
|
||||||
|
x: leftPos,
|
||||||
|
y: Sa + fontSizeMeV/2,
|
||||||
|
text: `${'Sa:'+Sa.toFixed(3)}`,
|
||||||
|
xanchor: 'left',
|
||||||
|
font: { size: fontSize, color: 'purple' },
|
||||||
|
showarrow: false
|
||||||
|
});
|
||||||
|
|
||||||
|
// let NameYPos = (parseFloat(maxEx) + 2*fontSizeMeV);
|
||||||
|
// console.log(NameYPos);
|
||||||
|
|
||||||
|
let name2 = breakdownName(Name);
|
||||||
|
|
||||||
|
fig.layout.annotations.push({
|
||||||
|
x: 0.5,
|
||||||
|
y: (maxEx + 1),
|
||||||
|
text: "<sup>" + name2.numberPart +"</sup>" + name2.stringPart,
|
||||||
|
font: { size: 2 * fontSize },
|
||||||
|
showarrow: false
|
||||||
|
});
|
||||||
|
|
||||||
|
// Create the plot
|
||||||
|
Plotly.newPlot('Plot_Levels', fig.data, fig.layout);
|
||||||
|
|
||||||
|
}
|
55
WebSimHelper/README.md
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
# Introduction
|
||||||
|
|
||||||
|
This is a web inteface for the HELIOS/SOLARIS simulation. Its purpose is NOT to replace the Simulation_Helper.C in the origin digios repository.
|
||||||
|
It is simply provide a more easy accessible way to do simulation.
|
||||||
|
|
||||||
|
# Installation in Apache2
|
||||||
|
|
||||||
|
Assume the parant SOLARIS_ANALYSIS is in the home folder
|
||||||
|
add a symbolic link
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$cd /var/www/html
|
||||||
|
$ln -s ~/SOLARIS_ANALYSIS SOLARIS
|
||||||
|
```
|
||||||
|
|
||||||
|
I want localhost/SOLARIS map to /var/www/html/SOLARIS/WebSimHelper, in the apache config
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$cd /etc/apache2/sit-available
|
||||||
|
$touch SOLARIS.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
inside SOLARIS.conf
|
||||||
|
|
||||||
|
```sh
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerAdmin rtang@anl.gov
|
||||||
|
DocumentRoot /var/www/html/
|
||||||
|
ServerName localhost
|
||||||
|
|
||||||
|
#map localhost/SOLARIS to /var/www/html/SOLARIS/WebSimHelper
|
||||||
|
Alias /SOLARIS /var/www/html/SOLARIS/WebSimHelper
|
||||||
|
|
||||||
|
#set the directory properties
|
||||||
|
<Directory /var/www/html/>
|
||||||
|
Options Indexes FollowSymLinks
|
||||||
|
AllowOverride None
|
||||||
|
Require all granted
|
||||||
|
Options +ExecCGI
|
||||||
|
AddHandler cgi-script .cgi .py
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||||
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||||
|
|
||||||
|
</VirtualHost>
|
||||||
|
```
|
||||||
|
|
||||||
|
then enable the site
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$sudo a2ensite SOLARIS.conf
|
||||||
|
$sudo systemctl restart apach2.service
|
||||||
|
```
|
||||||
|
|
29
WebSimHelper/displayIsoData.py
Executable file
|
@ -0,0 +1,29 @@
|
||||||
|
#!/usr/bin/env /usr/bin/python3
|
||||||
|
|
||||||
|
import isotopeLib
|
||||||
|
import cgi
|
||||||
|
|
||||||
|
form = cgi.FieldStorage()
|
||||||
|
|
||||||
|
ASym = form.getvalue('ASym')
|
||||||
|
maxEx = form.getvalue('maxEx')
|
||||||
|
|
||||||
|
print( "Content-type:text/html\r\n\r\n")
|
||||||
|
print("<html>")
|
||||||
|
print("<style> body { font-family: courier, courier new, serif; color: #F7CF3C; } </style>")
|
||||||
|
print("<body>")
|
||||||
|
|
||||||
|
isotopeLib.PrintIsoWeb(ASym)
|
||||||
|
|
||||||
|
if maxEx == "can be omitted" or float(maxEx) <= 0:
|
||||||
|
maxEx = -1
|
||||||
|
else:
|
||||||
|
isotopeLib.PrintIsoExWeb(ASym, float(maxEx))
|
||||||
|
|
||||||
|
|
||||||
|
print("</body>")
|
||||||
|
print("</html>")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
470
WebSimHelper/heliosmatics.html
Normal file
|
@ -0,0 +1,470 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Heliosmatics</title>
|
||||||
|
<meta name="description" content="HELIOSmatics was first built by Ben P. Kay in MS Excel around 2010. Later, it was modified by Ryan Tang. Now, it migrates to web.">
|
||||||
|
<link rel="icon" type="image/x-icon" href="logos/SOLARIS_favicon.png">
|
||||||
|
<script src="https://cdn.plot.ly/plotly-2.16.1.min.js"></script>
|
||||||
|
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, user-scalable=0"/>
|
||||||
|
</head>
|
||||||
|
<style>
|
||||||
|
body{
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
background : #6DB33E;
|
||||||
|
}
|
||||||
|
.column{
|
||||||
|
float : left;
|
||||||
|
width: 650px;
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
.row:after {
|
||||||
|
content: "";
|
||||||
|
display: table;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
.plotStyle{
|
||||||
|
width:650px;
|
||||||
|
height:600px;
|
||||||
|
}
|
||||||
|
.slider{
|
||||||
|
width : 400px;
|
||||||
|
}
|
||||||
|
.plotSlider{
|
||||||
|
width: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
height:4px;
|
||||||
|
background-color:#F7CF3C;
|
||||||
|
border-style:none;
|
||||||
|
border-width:none;
|
||||||
|
}
|
||||||
|
@media screen and (max-width: 1000px) {
|
||||||
|
.column {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.plotStyle{
|
||||||
|
width:400px;
|
||||||
|
height: 370px;
|
||||||
|
}
|
||||||
|
.slider{
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
.plotSlider{
|
||||||
|
width: 180px;
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
height: 50px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1>HELIOSmatics</h1>
|
||||||
|
|
||||||
|
<button onclick="CopyInputs()">Copy settings to clipboard</button>
|
||||||
|
|
||||||
|
<h1 id='reactionName' style="color: #1363A7"> 24F(d,p)25F@10MeV/u</h1>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right"> Beam (A):</td>
|
||||||
|
<td><Input type="text" style="width:60px" value="24F" id="beam" enterkeyhint="done"/></td>
|
||||||
|
<td style="text-align:right"> Beam Ex:</td>
|
||||||
|
<td><Input type="text" style="width:60px" value="0" id="beamEx" enterkeyhint="done"/></td>
|
||||||
|
<td>MeV</td>
|
||||||
|
<td id='beamSp'></td>
|
||||||
|
<!--td id="beamYield"></td>-->
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right"> Target (a):</td>
|
||||||
|
<td><Input type="text" style="width:60px" value="d" id="target" enterkeyhint="done"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right"> Light (b):</td>
|
||||||
|
<td><Input type="text" style="width:60px" value="p" id="light" enterkeyhint="done"/></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 style="font: 12px" id='heavySp'></p>
|
||||||
|
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<input type="radio" name="SSType" id='HELIOS' value="HELIOS"/>HELIOS
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="radio" name="SSType" id='SOLARIS' value="SOLARIS" checked="checked"/>SOLARIS
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="radio" name="SSType" id='ISS' value="ISS"/>ISS
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right"> B-field (abs.):</td>
|
||||||
|
<td><Input type="text" style="width:60px" value="2" id='BField' enterkeyhint="done"/></td>
|
||||||
|
<td>T</td>
|
||||||
|
<td><Input type="range" min="0" max="6" step="0.05" value="2" class="slider" id='BRange'/> </td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right"> Beam Energy:</td>
|
||||||
|
<td><Input type="text" style="width:60px" value="10" id='KEA' enterkeyhint="done"/></td>
|
||||||
|
<td>MeV/u</td>
|
||||||
|
<td><Input type="range" min="0" max="20" step="0.1" value="10" class="slider" id='KEARange'/> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td id='minKEA'> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
<table id="ExTable", style="border:1px solid; text-align:center;">
|
||||||
|
<tr>
|
||||||
|
<th style="width:85px"> E<sub>x</sub> [MeV]</th>
|
||||||
|
<th style="width:85px"> θ<sub>cm</sub>[deg]</th>
|
||||||
|
<th style="width:70px">E<sub>b</sub>[MeV]</th>
|
||||||
|
<th style="width:70px">Z<sub>b0</sub>[mm]</th>
|
||||||
|
<th style="width:70px">Z<sub>b</sub>[mm]</th>
|
||||||
|
<th style="width:70px">2ρ<sub>b</sub>[mm]</th>
|
||||||
|
<th style="width:70px">θLab<sub>b</sub>[deg]</th>
|
||||||
|
<th style="width:60px">T<sub>b</sub>[ns]</th>
|
||||||
|
<th style="width:70px">E<sub>B</sub>[MeV]</th>
|
||||||
|
<th style="width:90px">θLab<sub>B</sub>[deg]</th>
|
||||||
|
<th style="width:80px">Z<sub>B0</sub>/2[mm]</th>
|
||||||
|
<th style="width:70px">2ρ<sub>B</sub>[mm]</th>
|
||||||
|
</tr>
|
||||||
|
</tr>
|
||||||
|
<td><input type="text" id='Ex1' name="Ex" size="8" value="0" enterkeyhint="done"/></td>
|
||||||
|
<td><input type="text" id='theta1' name="thetaCM" size="8" value="10" enterkeyhint="done"/></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</tr>
|
||||||
|
<td><input type="text" id='Ex2' name="Ex" size="8" value="1" enterkeyhint="done"/></td>
|
||||||
|
<td><input type="text" id='theta2' name="thetaCM" size="8" value="40" enterkeyhint="done"/></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<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" style="width:60px" value="0" id='thetaCM' enterkeyhint="done"/></td>
|
||||||
|
<td>deg</td>
|
||||||
|
<td><Input type="range" min="0" max="50" step="0.1" value="0" class="slider" id='thetaCMRange'/> </td>
|
||||||
|
</tr>
|
||||||
|
<td style="text-align:right"> Array Pos:</td>
|
||||||
|
<td><Input type="text" style="width:60px" value="-100" id='posArray' enterkeyhint="done"/></td>
|
||||||
|
<td>mm</td>
|
||||||
|
<td><Input type="range" min="-500" max="1000" step="1" value="-100" class="slider" id='posArrayRange'/> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right"> Recoil Pos:</td>
|
||||||
|
<td><Input type="text" style="width:60px" value="1500" id='posRecoil' enterkeyhint="done"/></td>
|
||||||
|
<td>mm</td>
|
||||||
|
<td><Input type="range" min="0" max="2000" step="1" value="1500" class="slider" id='posRecoilRange'/> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right" > Recoil radius, inner [mm]:</td>
|
||||||
|
<td><Input type="text" style="width:40px" value="10" id='innerRecoil' enterkeyhint="done"/></td>
|
||||||
|
<td style="text-align:right" > outter [mm]:</td>
|
||||||
|
<td><Input type="text" style="width:40px" value="45" id='outterRecoil' enterkeyhint="done"/></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="column">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div id="Plot_EZ" class="plotStyle"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr> <td> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td> zRange can be changed by Array position.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>eRange:</td>
|
||||||
|
<td><Input type="text" style="width:60px" value="12" id='eRange' enterkeyhint="done"/></td>
|
||||||
|
<td>MeV</td>
|
||||||
|
<td><Input type="range" min="1" max="30" step="0.1" value="12" class="plotSlider" id='eRangeSlider'/></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr> <td> </td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="column">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div id="Plot_RZ" class="plotStyle"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr> <td> </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>zRange(Min):</td>
|
||||||
|
<td><Input type="text" style="width:60px" value="-200" id='zRange1' enterkeyhint="done"/></td>
|
||||||
|
<td>mm</td>
|
||||||
|
<td><Input type="range" min="-2000" max="4000" step="1" value="-200" class="plotSlider" id='zRange1Slider'/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>zRange(Max):</td>
|
||||||
|
<td><Input type="text" style="width:60px" value="2000" id='zRange2' enterkeyhint="done"/></td>
|
||||||
|
<td>mm</td>
|
||||||
|
<td><Input type="range" min="-2000" max="4000" step="1" value="2000" class="plotSlider" id='zRange2Slider'/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>rRange:</td>
|
||||||
|
<td><Input type="text" style="width:60px" value="50" id='rRange' enterkeyhint="done"/></td>
|
||||||
|
<td>mm</td>
|
||||||
|
<td><Input type="range" min="1" max="400" step="1" value="50" class="plotSlider" id='rRangeSlider'/></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr> <td> </td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p id="n0"></p>
|
||||||
|
<p id="n1"></p>
|
||||||
|
<p id="n2"></p>
|
||||||
|
<p id="n3"></p>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<h1>θ<sub>CM</sub> Calculator</h1>
|
||||||
|
|
||||||
|
The calculation only give θ<sub>CM</sub> after the bending.
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>Ex [MeV] : </td>
|
||||||
|
<td><Input type="text" style="width:60px" value="0" id='Ex0' enterkeyhint="done"/></td>
|
||||||
|
<td>θ<sub>CM</sub> Gate [deg] : </td>
|
||||||
|
<td><Input type="text" style="width:60px" value="10" id='thetaCMGate' enterkeyhint="done"/></td>
|
||||||
|
<td>X Gate [%] : </td>
|
||||||
|
<td><Input type="text" style="width:60px" value="95" id='XGate' enterkeyhint="done"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<table id='thetaCMTable' style="border:1px solid; text-align:center;">
|
||||||
|
<tr>
|
||||||
|
<td style="width:30px"><b>ID</b></td>
|
||||||
|
<td style="width:120px"><b>pos<sub>0</sub>(gated)</b></td>
|
||||||
|
<td style="width:120px"><b>pos<sub>1</sub>(gated)</b></td>
|
||||||
|
<td style="width:60px"><b>θ<sub>1</sub>[deg]</b></td>
|
||||||
|
<td style="width:60px"><b>θ<sub>2</sub>[deg]</b></td>
|
||||||
|
<td style="width:60px"><b>θ<sub>avg</sub>[deg]</b></td>
|
||||||
|
<td style="width:60px"><b>Δθ[deg]</b></td>
|
||||||
|
<td style="width:100px"><b>sin(θ<sub>avg</sub>)Δθ</b></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<!-- ===================================================== -->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<h1> DWBA and Monte Carlo Simulation (under construction...)</h1>
|
||||||
|
|
||||||
|
<table id='DWBATable' style="border:1px solid; text-align:center;">
|
||||||
|
<tr>
|
||||||
|
<td> E<sub>x</sub> [MeV]</td>
|
||||||
|
<td> J<sup>π</sup></td>
|
||||||
|
<td> Orbital </td>
|
||||||
|
</tr>
|
||||||
|
</tr>
|
||||||
|
<td id='dwba1'>0</td>
|
||||||
|
<td><input type="text" name="Jpi" size="5" value="3/2+" enterkeyhint="done"/></td>
|
||||||
|
<td><input type="text" name="Orb" size="5" value="0d3/2" enterkeyhint="done"/></td>
|
||||||
|
</tr>
|
||||||
|
</tr>
|
||||||
|
<td id='dwba2'>0</td>
|
||||||
|
<td><input type="text" name="Jpi" size="5" value="1/2+" enterkeyhint="done"/></td>
|
||||||
|
<td><input type="text" name="Orb" size="5" value="1s1/2" enterkeyhint="done"/></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p></p>
|
||||||
|
<input type="checkbox" name="DWBA" value="On"/>Cal. DWBA
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>Incoming Channel</td>
|
||||||
|
<td>
|
||||||
|
<select name="op1">
|
||||||
|
<option value="A" selected>D | An & Cai (2006), E < 183, 12 < A < 238</option>
|
||||||
|
<option value="H">D | Han, Shi, & Shen, (2006), E < 200 | 12 < A < 209</option>
|
||||||
|
<option value="B">D | Bojowald et al., (1988), 50 < E < 80 | 27 < A < 208</option>
|
||||||
|
<option value="K">P | Koning & Delaroche, (2009), E < 200 | 24 < A < 209 | Iso.Dep.</option>
|
||||||
|
<option value="V">P | Varner et al., (1991), 16 < E < 65 | 4 < A < 209</option>
|
||||||
|
<option value="M">P | Menet et al., (1971), 30 < E < 60 | 40 < A </option>
|
||||||
|
<option value="x">A=3 | Xu, Guo, Han, & Shen, (2011), E < 250 | 20 < A < 209 </option>
|
||||||
|
<option value="l">A=3 | Liang, Li, & Cai, (2009), E < 270 | All masses </option>
|
||||||
|
<option value="x">A=4 | Su & Han, (2015), E < 398 | 20 < A < 209 </option>
|
||||||
|
</select>
|
||||||
|
<td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Outgoing Channel</td>
|
||||||
|
<td>
|
||||||
|
<select name="op2">
|
||||||
|
<option value="A">D | An & Cai (2006), E < 183, 12 < A < 238</option>
|
||||||
|
<option value="H">D | Han, Shi, & Shen, (2006), E < 200 | 12 < A < 209</option>
|
||||||
|
<option value="B">D | Bojowald et al., (1988), 50 < E < 80 | 27 < A < 208</option>
|
||||||
|
<option value="K" selected>P | Koning & Delaroche, (2009), E < 200 | 24 < A < 209 | Iso.Dep.</option>
|
||||||
|
<option value="V">P | Varner et al., (1991), 16 < E < 65 | 4 < A < 209</option>
|
||||||
|
<option value="M">P | Menet et al., (1971), 30 < E < 60 | 40 < A </option>
|
||||||
|
<option value="x">A=3 | Xu, Guo, Han, & Shen, (2011), E < 250 | 20 < A < 209 </option>
|
||||||
|
<option value="l">A=3 | Liang, Li, & Cai, (2009), E < 270 | All masses </option>
|
||||||
|
<option value="x">A=4 | Su & Han, (2015), E < 398 | 20 < A < 209 </option>
|
||||||
|
</select>
|
||||||
|
<td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3> Plot config (still working on):</h3>
|
||||||
|
|
||||||
|
<input type="checkbox" name="plot" value="pEZ" checked/>E vs Z<br>
|
||||||
|
<input type="checkbox" name="plot" value="pExCal" checked/>Ex (cal.)<br>
|
||||||
|
<input type="checkbox" name="plot" value="pThetaCM" checked/>ThetaCM<br>
|
||||||
|
<input type="checkbox" name="plot" value="pThetaCM_Z" checked/>ThetaCM vs Z<br>
|
||||||
|
<input type="checkbox" name="plot" value="pRecoilXY" checked/>Recoil X vs Y<br>
|
||||||
|
<input type="checkbox" name="plot" value="pRecoilRThetaCM"/>Recoil-R vs ThetaCM<br>
|
||||||
|
<input type="checkbox" name="plot" value="pRecoilRZ"/>Recoil R vs Z<br>
|
||||||
|
<input type="checkbox" name="plot" value="pArrayXY"/>Array X vs Y<br>
|
||||||
|
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
<input type="checkbox" name="gate" value="hit==1" checked/>Array Hit<br>
|
||||||
|
<input type="checkbox" name="gate" value="loop<=1" checked/>Loop = 1<br>
|
||||||
|
<input type="checkbox" name="gate" value="thetaCM>10" checked/> ThetaCM > 10 deg<br>
|
||||||
|
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
<input type = "submit" value = "Run Simulation" style="width:200px;height:60px;font-size:20px" />
|
||||||
|
|
||||||
|
<p></p>
|
||||||
|
<iframe style="border:none;"></iframe>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- ===================================================== -->
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<p></p>
|
||||||
|
HELIOSmatics was first built by Ben P. Kay in MS Excel around 2010. It was modified by Ryan Tang later. And now it migrated to the web on Dec, 2022.
|
||||||
|
<br>
|
||||||
|
The calculation can be found in the source code (heliosmatics.js or press F12)
|
||||||
|
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<hr>
|
||||||
|
Experimental 3D model
|
||||||
|
<div id="Plot_3D" class="plotStyle"></div>
|
||||||
|
-->
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
<!-- ######################################################################################### -->
|
||||||
|
|
||||||
|
<script src="heliosmatics.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
function CopyInputs(){
|
||||||
|
let inputs = document.getElementsByTagName("input");
|
||||||
|
let copyText = "====HELIOSMATICS|";
|
||||||
|
for(let i = 0; i < inputs.length; i++){
|
||||||
|
if( inputs[i].type == 'text'){
|
||||||
|
//console.log(inputs[i].id.substring(0,2));
|
||||||
|
if( inputs[i].id.substring(0,2) == 'Ex' || inputs[i].id.substring(0,5) == 'theta' ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if( inputs[i].id == 'innerRecoil'){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
copyText += inputs[i].value + ", ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
copyText += document.getElementById('heavyName').innerHTML;
|
||||||
|
|
||||||
|
//console.log(copyText);
|
||||||
|
|
||||||
|
navigator.clipboard.writeText(copyText).then(
|
||||||
|
() => {
|
||||||
|
alert('Setting copied to clipboard.\nCan paste it in Monte Carlo simulation.\n' + copyText);
|
||||||
|
}).catch(
|
||||||
|
() =>{
|
||||||
|
alert('Cannot copy.');
|
||||||
|
});
|
||||||
|
|
||||||
|
//window.open('simpleSim.html');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</html>
|
1159
WebSimHelper/heliosmatics.js
Normal file
196
WebSimHelper/index.html
Normal file
|
@ -0,0 +1,196 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>SOLARIS Si-Array Mode Simulation </title>
|
||||||
|
<meta name="description" content="SOLARIS Si-Array mode simulation. This is ported from the original Heliosmatics in MS excel, Monte Carlo simulation using CERN ROOT, and DWBA simulation using the Peolemy.">
|
||||||
|
<link rel="icon" type="image/x-icon" href="logos/SOLARIS_favicon.png">
|
||||||
|
</head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<script src="https://cdn.plot.ly/plotly-2.16.1.min.js"></script>
|
||||||
|
<style>
|
||||||
|
|
||||||
|
:root{
|
||||||
|
--navWidth: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
/* table, th, td { */
|
||||||
|
/* border: 1px solid black; */
|
||||||
|
/* } */
|
||||||
|
table.center{
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
header {
|
||||||
|
background-color: #F7CF3C;
|
||||||
|
padding: 10px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 35px;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
nav {
|
||||||
|
float: left;
|
||||||
|
width : var(--navWidth);
|
||||||
|
height: 100vh;
|
||||||
|
/* background: #6DB33E; */
|
||||||
|
background: #1363A7;
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
article {
|
||||||
|
float: none;
|
||||||
|
padding: 0px;
|
||||||
|
margin-left: var(--navWidth);
|
||||||
|
height: 1000px;
|
||||||
|
height : 100vh;
|
||||||
|
/* background: #1363A7; */
|
||||||
|
background: #6DB33E;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
color : #F7CF3C;
|
||||||
|
}
|
||||||
|
|
||||||
|
.column1{
|
||||||
|
float : left;
|
||||||
|
width : 50%;
|
||||||
|
text-align:right;
|
||||||
|
}
|
||||||
|
.column2{
|
||||||
|
float : right;
|
||||||
|
width : 50%;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.row:after {
|
||||||
|
content: "";
|
||||||
|
display: table;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1000px) {
|
||||||
|
.column1 {
|
||||||
|
width: 100%;
|
||||||
|
height: 40%;
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
.column2 {
|
||||||
|
width: 100%;
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
nav {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
margin-left : 0;
|
||||||
|
}
|
||||||
|
article {
|
||||||
|
float: left;
|
||||||
|
margin-left : 0px;
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
margin-left : 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<header>
|
||||||
|
<div class="row">
|
||||||
|
<div class="column1"">
|
||||||
|
<img src="logos/SOLARIS_logo.png" width="300">
|
||||||
|
</div>
|
||||||
|
<div class="column2">
|
||||||
|
<span style="font-size:70px;">Simulation</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
|
||||||
|
<nav id="nav">
|
||||||
|
<div class="visit-counter"></div>
|
||||||
|
<p></p>
|
||||||
|
<table class="center">
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right"><a href="heliosmatics.html" target="uploaded">HELIOSmatics</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right"><a href="simpleSim.html" target="uploaded">DWBA and Monte Carlo Simulation</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right"><a href="miscCal.html" target="uploaded">Misc. Calulations</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right"><a href="instruction.html" target="uploaded">Intructions & Credits</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
|
||||||
|
<p></p><!-- ////////////////////////////////////////// -->
|
||||||
|
|
||||||
|
<form action = "displayIsoData.py" method = "POST" target = "NuclearData">
|
||||||
|
<table class="center">
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right">Isotopes Name:</td>
|
||||||
|
<td><input type = "text" name = "ASym" id="ASym" size="13" value="24F" enterkeyhint="done"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right">Max Ex [MeV]:</td>
|
||||||
|
<td><input type = "text" name = "maxEx" id="maxEx" size="13" value="can be omitted" enterkeyhint="done"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td><button onclick="PlotLevels()" style="width: 130px;">Get Isotopes Data</button></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<div id="Plot_Levels" class="plotStyle"></div>
|
||||||
|
<iframe name="NuclearData" style="border:none;width:100%;height:100%" ></iframe>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<!-- ////////////////////////////////////////// -->
|
||||||
|
<article id="article" >
|
||||||
|
<iframe id="main" name="uploaded" style="border:none;width:100%;" src="heliosmatics.html"></iframe>
|
||||||
|
</article>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<script src="EnergyLevelsPlot.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
let frame = document.getElementById("main");
|
||||||
|
let frameNav = document.getElementById("nav");
|
||||||
|
let frameArticle = document.getElementById("article");
|
||||||
|
|
||||||
|
let x = window.matchMedia("(max-width: 1000px)");
|
||||||
|
|
||||||
|
adjustHeight();
|
||||||
|
|
||||||
|
x.addListener(adjustHeight);
|
||||||
|
|
||||||
|
function adjustHeight(){
|
||||||
|
let hhh = frame.contentWindow.document.body.scrollHeight * 1.1 + 'px';
|
||||||
|
|
||||||
|
frame.style.height = hhh;
|
||||||
|
frameArticle.style.height = hhh;
|
||||||
|
|
||||||
|
if( x.matches){
|
||||||
|
frameNav.style.height = "40%";
|
||||||
|
}else{
|
||||||
|
frameNav.style.height = hhh;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
frame.onload = adjustHeight;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
76
WebSimHelper/instruction.html
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<style>
|
||||||
|
body{
|
||||||
|
//color : #767A4C;
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
//color : #F7CF3C;
|
||||||
|
color : #1363A7;
|
||||||
|
}
|
||||||
|
hr {
|
||||||
|
height:4px;
|
||||||
|
background-color:#F7CF3C;
|
||||||
|
border-style:none;
|
||||||
|
border-width:none;
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
@media screen and (max-width: 1000px) {
|
||||||
|
img {
|
||||||
|
height: 50px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<h1>Intructions:</h1>
|
||||||
|
<p>
|
||||||
|
<ul>
|
||||||
|
<li>Use the <a href="heliosmatics.html" target="uploaded">HELIOSmatics</a> to check the detector and field settings.</li>
|
||||||
|
<li>The easiest way to do DWBA and Monte Carlo Simulation is use the <a href="simpleSim.html" target="uploaded">Simplied Interface</a>
|
||||||
|
<li>The kenimatic calculation is documented in <a href="https://wiki.anl.gov/wiki_heliosdaq/images/3/3f/Kinematics_of_HELIOS.pdf" target="_blank" >Here</a>.</li>
|
||||||
|
<li>The DWBA calucation is using Ptolemy. <a href="https://www.phy.anl.gov/theory/research/ptolemy/" target="_blank">Here</a> for more detail. </li>
|
||||||
|
<li>Past calculations can be found <a href="files/" target="uploaded">Here</a>. Clear every Monday.</li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h1>Credits:</h1>
|
||||||
|
|
||||||
|
<h4>This page is created and hosted by Fox's Lab (FSU) in collabortion with SOLARIS (FRIB).</h4>
|
||||||
|
<h4>The SOLARIS project is based on HELIOS (ANL) and is leaded by ANL.</h4>
|
||||||
|
<h4>The ISS (ISOLDE Solenoidal Spectrometer) is located as CERN.</h4>
|
||||||
|
|
||||||
|
<a href="https://fsunuc.physics.fsu.edu" target="_blank"><img src="logos/FSU_logo_640.png"></a>
|
||||||
|
<a href="https://fribs.msu.edu/news/2021/solaris.html" target="_blank"><img src="logos/FRIB_logo.jpg"></a>
|
||||||
|
<a href="https://home.cern/science/experiments/isolde" target="_blank"><img src="logos/CERN_logo.svg"></a>
|
||||||
|
<a href="https://www.anl.gov/phy" target="_blank"><img src="logos/ANL_logo.gif"></a>
|
||||||
|
|
||||||
|
<a href="https://www.anl.gov/phy/solaris" target="_blank"><img src="logos/SOLARIS_logo.png"></a>
|
||||||
|
<a href="https://isolde-solenoidal-spectrometer.web.cern.ch/" target="_blank"><img src="logos/ISS_logo.png"></a>
|
||||||
|
<a href="https://www.anl.gov/phy/helical-orbit-spectrometer" target="_blank"><img src="logos/HELIOS_logo.jpg"></a>
|
||||||
|
|
||||||
|
<p></p>
|
||||||
|
The simulation was started from Ben Kay (ANL) around 2010 using excel spreadsheet.
|
||||||
|
<br>
|
||||||
|
Ryan Tang (former ANL postdoc, now at FSU) developed a Monte Carlo simulation with DWBA using CERN ROOT framework.
|
||||||
|
<br>
|
||||||
|
And the whole simulation migrated to here at Dec, 2022.
|
||||||
|
|
||||||
|
<p></p>
|
||||||
|
Contact: Ryan Tang (rtang at fsu.edu)
|
||||||
|
<p> any suggestions and feedback are very welcome.</p>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h2> Todo : </h2>
|
||||||
|
<ul>
|
||||||
|
<li>File name of the images of past calculations include reaction</li>
|
||||||
|
<li>Change the legend position of the DWBA calcualtion</li>
|
||||||
|
<li>A 3-D simulation? </li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
185
WebSimHelper/isotopeLib.py
Executable file
|
@ -0,0 +1,185 @@
|
||||||
|
#!/usr/bin/env /usr/bin/python3
|
||||||
|
|
||||||
|
import pandas as pd
|
||||||
|
import urllib.request
|
||||||
|
import re
|
||||||
|
import numpy
|
||||||
|
|
||||||
|
me = 0.51099895000 # +- 15
|
||||||
|
mp = 938.27208816 # +- 29
|
||||||
|
mn = 939.56542052 # +- 54
|
||||||
|
ma = 3727.37915
|
||||||
|
|
||||||
|
livechart = "https://nds.iaea.org/relnsd/v0/data?"
|
||||||
|
|
||||||
|
def lc_read_csv(url):
|
||||||
|
req = urllib.request.Request(url)
|
||||||
|
req.add_header('User-Agent', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0')
|
||||||
|
return pd.read_csv(urllib.request.urlopen(req))
|
||||||
|
|
||||||
|
# Read the saved CSV file back into a DataFrame
|
||||||
|
try :
|
||||||
|
haha = pd.read_csv('IAEA_NuclearData.csv')
|
||||||
|
except FileNotFoundError:
|
||||||
|
# the service URL
|
||||||
|
url = livechart + "fields=ground_states&nuclides=all"
|
||||||
|
haha = lc_read_csv(url)
|
||||||
|
haha.insert(0, 'A', haha['z'] + haha['n'])
|
||||||
|
haha.to_csv('IAEA_NuclearData.csv', index=False)
|
||||||
|
haha = pd.read_csv('IAEA_NuclearData.csv')
|
||||||
|
|
||||||
|
# print(haha.columns)
|
||||||
|
## ['A', 'z', 'n', 'symbol', 'radius', 'unc_r', 'abundance', 'unc_a',
|
||||||
|
## 'energy_shift', 'energy', 'unc_e', 'ripl_shift', 'jp', 'half_life',
|
||||||
|
## 'operator_hl', 'unc_hl', 'unit_hl', 'half_life_sec', 'unc_hls',
|
||||||
|
## 'decay_1', 'decay_1_%', 'unc_1', 'decay_2', 'decay_2_%', 'unc_2',
|
||||||
|
## 'decay_3', 'decay_3_%', 'unc_3', 'isospin', 'magnetic_dipole', 'unc_md',
|
||||||
|
## 'electric_quadrupole', 'unc_eq', 'qbm', 'unc_qb', 'qbm_n', 'unc_qbmn',
|
||||||
|
## 'qa', 'unc_qa', 'qec', 'unc_qec', 'sn', 'unc_sn', 'sp', 'unc_sp',
|
||||||
|
## 'binding', 'unc_ba', 'atomic_mass', 'unc_am', 'massexcess', 'unc_me',
|
||||||
|
## 'me_systematics', 'discovery', 'ENSDFpublicationcut-off',
|
||||||
|
## 'ENSDFauthors', 'Extraction_date']
|
||||||
|
|
||||||
|
|
||||||
|
def GetExList(ASym : str, maxEx : float):
|
||||||
|
try:
|
||||||
|
exList = lc_read_csv(livechart + "fields=levels&nuclides=" + ASym)
|
||||||
|
exJpi = exList[['energy', 'jp']]
|
||||||
|
exJpi = exJpi[exJpi['energy'] < (maxEx * 1000)]
|
||||||
|
return exJpi
|
||||||
|
except:
|
||||||
|
return pd.DataFrame()
|
||||||
|
|
||||||
|
def BreakDownName(ASym : str):
|
||||||
|
match = re.match(r'(\d+)(\D+)', ASym)
|
||||||
|
return [int(match.group(1)), match.group(2) ]
|
||||||
|
|
||||||
|
def GetAZ(ASym : str):
|
||||||
|
[A, sym] = BreakDownName(ASym)
|
||||||
|
try:
|
||||||
|
dudu = haha[(haha['symbol']==sym) & (haha['A']==A)]
|
||||||
|
Z = int(dudu['z'].iloc[0])
|
||||||
|
return [A, Z]
|
||||||
|
except:
|
||||||
|
return [A, numpy.nan]
|
||||||
|
|
||||||
|
def GetBindingPerA(ASym : str) -> float:
|
||||||
|
[A, sym] = BreakDownName(ASym)
|
||||||
|
try:
|
||||||
|
dudu = haha[(haha['symbol']==sym) & (haha['A']==A)]
|
||||||
|
Z = int(dudu['z'].iloc[0])
|
||||||
|
N = A - Z
|
||||||
|
return dudu['binding'].iloc[0]/1000
|
||||||
|
except:
|
||||||
|
return numpy.nan
|
||||||
|
|
||||||
|
def GetMassFromSym(ASym : str) -> float:
|
||||||
|
[A, sym] = BreakDownName(ASym)
|
||||||
|
try:
|
||||||
|
dudu = haha[(haha['symbol']==sym) & (haha['A']==A)]
|
||||||
|
Z = int(dudu['z'].iloc[0])
|
||||||
|
N = A - Z
|
||||||
|
binding = dudu['binding'].iloc[0]/1000
|
||||||
|
return Z*mp + N*mn - binding*A
|
||||||
|
except:
|
||||||
|
return numpy.nan
|
||||||
|
|
||||||
|
def GetMassFromAZ(A : int, Z : int) -> float:
|
||||||
|
try:
|
||||||
|
dudu = haha[(haha['z']==Z) & (haha['A']==A)]
|
||||||
|
Z = int(dudu['z'].iloc[0])
|
||||||
|
N = A - Z
|
||||||
|
binding = dudu['binding'].iloc[0]/1000
|
||||||
|
return Z*mp + N*mn - binding*A
|
||||||
|
except:
|
||||||
|
return numpy.nan
|
||||||
|
|
||||||
|
def GetSymbol(A : int, Z : int) -> str:
|
||||||
|
try:
|
||||||
|
dudu = haha[(haha['z']==Z) & (haha['A']==A)]
|
||||||
|
return "%d%s" % (A , dudu['symbol'].iloc[0])
|
||||||
|
except:
|
||||||
|
return "0x"
|
||||||
|
|
||||||
|
def GetJpi(ASym : str):
|
||||||
|
[A, sym] = BreakDownName(ASym)
|
||||||
|
try:
|
||||||
|
dudu = haha[(haha['symbol']==sym) & (haha['A']==A)]
|
||||||
|
return dudu['jp'].iloc[0]
|
||||||
|
except:
|
||||||
|
return "unknown"
|
||||||
|
|
||||||
|
def GetHalfLife(ASym : str) -> float:
|
||||||
|
[A, sym] = BreakDownName(ASym)
|
||||||
|
try:
|
||||||
|
dudu = haha[(haha['symbol']==sym) & (haha['A']==A)]
|
||||||
|
return dudu['half_life_sec'].iloc[0]
|
||||||
|
except:
|
||||||
|
return "unknown"
|
||||||
|
|
||||||
|
def GetSn(ASym : str) -> float:
|
||||||
|
[A, Z] = GetAZ(ASym)
|
||||||
|
if numpy.isnan(Z) :
|
||||||
|
return numpy.nan
|
||||||
|
else:
|
||||||
|
mass0 = GetMassFromAZ(A, Z)
|
||||||
|
mass1 = GetMassFromAZ(A-1, Z)
|
||||||
|
return mass1 + mn - mass0
|
||||||
|
|
||||||
|
def GetSp(ASym : str):
|
||||||
|
[A, Z] = GetAZ(ASym)
|
||||||
|
if numpy.isnan(Z) :
|
||||||
|
return numpy.nan
|
||||||
|
else:
|
||||||
|
mass0 = GetMassFromAZ(A, Z)
|
||||||
|
mass1 = GetMassFromAZ(A-1, Z-1)
|
||||||
|
return mass1 + mp - mass0
|
||||||
|
|
||||||
|
def GetSa(ASym : str):
|
||||||
|
[A, Z] = GetAZ(ASym)
|
||||||
|
if numpy.isnan(Z) :
|
||||||
|
return numpy.nan
|
||||||
|
else:
|
||||||
|
mass0 = GetMassFromAZ(A, Z)
|
||||||
|
mass1 = GetMassFromAZ(A-4, Z-2)
|
||||||
|
return mass1 + ma - mass0
|
||||||
|
|
||||||
|
def PrintIso(ASym: str):
|
||||||
|
[A, Z] = GetAZ(ASym)
|
||||||
|
print("========================= ", ASym)
|
||||||
|
print("A : %d, Z : %d, N : %d" % (A, Z, A-Z))
|
||||||
|
print(" Jpi : ", GetJpi(ASym))
|
||||||
|
print("half-live : %.2f sec" % (GetHalfLife(ASym)))
|
||||||
|
print(" Mass : %9.2f MeV" % (GetMassFromSym(ASym) ))
|
||||||
|
print(" Binding : %9.2f MeV/A" % (GetBindingPerA(ASym)))
|
||||||
|
print(" Binding : %9.2f MeV" % (GetBindingPerA(ASym) * A))
|
||||||
|
print(" Sn: %9.2f MeV" % GetSn(ASym))
|
||||||
|
print(" Sp: %9.2f MeV" % GetSp(ASym))
|
||||||
|
print(" Sa: %9.2f MeV" % GetSa(ASym))
|
||||||
|
print("=============================")
|
||||||
|
|
||||||
|
def PrintIsoWeb(ASym : str):
|
||||||
|
[A, Z] = GetAZ(ASym)
|
||||||
|
print("<br>========================= ", ASym)
|
||||||
|
print("<br>A : %d, Z : %d, N : %d" % (A, Z, A-Z))
|
||||||
|
print("<br> Jpi : ", GetJpi(ASym))
|
||||||
|
print("<br>half-live : %.2f sec" % (GetHalfLife(ASym)))
|
||||||
|
print("<br> Mass : %9.2f MeV" % (GetMassFromSym(ASym) ))
|
||||||
|
print("<br> Binding : %9.2f MeV/A" % (GetBindingPerA(ASym)))
|
||||||
|
print("<br> Binding : %9.2f MeV" % (GetBindingPerA(ASym) * A))
|
||||||
|
print("<br> Sn: %9.2f MeV" % GetSn(ASym))
|
||||||
|
print("<br> Sp: %9.2f MeV" % GetSp(ASym))
|
||||||
|
print("<br> Sa: %9.2f MeV" % GetSa(ASym))
|
||||||
|
print("<br>=============================")
|
||||||
|
|
||||||
|
|
||||||
|
def PrintIsoExWeb(ASym : str, maxEx : float):
|
||||||
|
exList = GetExList(ASym, maxEx)
|
||||||
|
if exList.empty:
|
||||||
|
print("<br> cannot find Ex data")
|
||||||
|
else:
|
||||||
|
print("<table>")
|
||||||
|
for i in range(0,len(exList)):
|
||||||
|
print("<tr><td style=\"text-align:right\" width=80>%9.3f</td><td style=\"text-align:right\" width=100>%s</td></tr>" % (exList['energy'].iloc[i]/1000, exList['jp'].iloc[i].replace(' ', ',')))
|
||||||
|
print("</table>")
|
||||||
|
|
BIN
WebSimHelper/logos/ANL_logo.gif
Normal file
After Width: | Height: | Size: 7.2 KiB |
1
WebSimHelper/logos/CERN_logo.svg
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<svg height="316.227766" viewBox="0 0 14.41662 14.41666" width="316.227766" xmlns="http://www.w3.org/2000/svg"><path d="m171.53706 206.16631c0-.26917-.2353-.35454-.41945-.35454-.12453 0-.20567.008-.26247.0134-.008.19756-.0162.37924-.0162.57433v.14887c.0268.004.15346.003.18133.002.22331-.005.51682-.0759.51682-.38453m4.66831-.97296c.50271.61665.91016 1.59279.96943 2.40947h.008l.4191-4.32823h.23636s-.26811 2.79788-.4244 4.18818c-.19543 1.74131-.44379 2.46415-.91898 3.22474l-.0727-.33126c.37006-.65017.47589-1.21779.52387-1.51659.15064-.93098-.0646-2.20169-.71332-3.19334-.72672-1.11125-2.026-1.92864-3.62091-1.92864-1.31021 0-2.44863.57573-3.24308 1.47426l-.19262-.1524c.84102-.95462 2.0634-1.56351 3.4357-1.56351 1.43898 0 2.72027.64664 3.5934 1.71732m-2.32798 2.39748-.0885-.00071c-.10866-.14675-1.24425-1.33138-1.34267-1.43616-.002.10019-.003.30833-.003.51082 0 .26882.0205.6791.0324.901-.0275-.005-.0681-.01-.11536-.01-.048 0-.0871.004-.11853.01.0222-.2861.0282-.75036.0282-1.1871 0-.34078-.005-.52775-.009-.69991l.0885.001c.11465.12453 1.24389 1.29293 1.34232 1.3977.002-.0998.003-.27657.003-.47907 0-.26881-.0205-.67945-.0324-.90099.0275.005.0681.01.11535.01.048 0 .0871-.004.11889-.01-.0226.2861-.0286.75036-.0286 1.1871 0 .34078.005.5341.009.70626m-2.04858-.0342c-.0247 0-.11818.001-.16969.009-.10689-.16298-.44944-.67663-.68262-.91616-.007 0-.13759 0-.13759 0v.21519c0 .23283.0106.46814.0215.70097-.0459-.008-.12911-.009-.14605-.009-.0173 0-.10054.001-.1464.009.0109-.23283.0215-.46814.0215-.70097v-.46531c0-.23284-.0106-.46849-.0215-.70097.10301.008.23283.0134.33584.0134.10302 0 .20567-.0134.30833-.0134.30586 0 .58632.0903.58632.43074 0 .36018-.35913.49001-.5648.51682.13265.1651.60748.74365.76447.91969-.054-.008-.14464-.009-.16933-.009m-1.58962.009c-.097-.005-.23213-.009-.36019-.0113-.0737-.001-.14569-.002-.20214-.002h-.024c-.1651 0-.41839.005-.58349.0134.0109-.23566.0219-.47096.0219-.70379v-.46532c0-.23283-.0109-.46813-.0219-.69814.16228.008.4131.0134.57538.0134s.46531-.007.55915-.0134c-.004.0254-.007.0554-.007.0921 0 .037.004.0751.007.0935-.1785-.0134-.49671-.0353-.84843-.0353-.003.11642-.008.60995-.008.67769.31926 0 .52387-.0138.68368-.0268-.005.0268-.008.0755-.008.10231 0 .0272.003.0674.008.0945-.18662-.019-.60466-.0247-.68368-.0247-.005.0907-.00071.67628.003.72566.19791-.003.70485-.0183.88935-.0353-.003.0205-.006.0628-.006.10407 0 .0409.002.0709.006.0995m-1.73037 2.69028c-.32244-.65581-.46885-1.32186-.48825-1.95897.0822 0 .1771.003.25894.003.0286.60996.16651 1.36772.64347 2.19146-.17216-.0631-.30163-.14676-.41416-.23566m-1.43263-3.62479c0-.58173.43991-.96908 1.03822-.96908.23283 0 .49918.072.6477.13547-.031.0688-.0564.15981-.0674.2166l-.0162.006c-.115-.12736-.29986-.23777-.57361-.23777-.34749 0-.74719.28116-.74719.84208 0 .5461.40746.83608.77153.83608.32737 0 .48366-.1524.62441-.27129l.0109.0109-.0399.21202c-.0646.0487-.28822.18803-.62442.18803-.60925 0-1.02411-.38382-1.02411-.96873m4.8461-4.27002c.7112.19967 1.3776.56515 1.90747 1.05904-.15275-.0406-.30868-.0737-.46708-.0984-.74506-.58878-1.71485-.94015-2.72803-.94015-2.39395 0-4.35327 1.95227-4.35327 4.35187 0 2.39959 1.95227 4.35151 4.35186 4.35151 2.3996 0 4.35152-1.95192 4.35152-4.35151 0-.92816-.34961-1.85561-.82974-2.51072.11466.0346.25436.0935.41522.18873.32491.49283.62654 1.29752.88477 2.53189.27093 1.29505 1.66476 7.49794 1.81539 8.16822h1.68734v-12.71341l-7.03545-.0434zm-2.32022 9.05439c.34537.29881.89218.67487 1.56845.91793-.0564.0603-.11782.12559-.18309.19473-.67557-.26705-1.33632-.68192-1.84961-1.24036.14428.0487.30339.0928.46425.1277m-5.06095-10.72056v14.41662h4.30248l4.25627-4.52614-.006-.005c-.68439.4826-1.55293.74471-2.4892.74471-1.73532 0-3.26461-1.02941-3.92783-2.3107l-.007.005.90276 3.04624h-.24448s-.44803-1.54376-.83044-2.88925c-.28928-1.01847-.46778-1.77306-.46531-2.44264.008-2.30328 1.81892-4.41501 4.22769-4.57094.066-.005.27093-.0258.57608-.0261 1.85526-.001 7.57203.0427 8.1213.0469v-1.48802zm11.37956 10.37802.0649.29492c-.77823.84067-1.96956 1.47073-3.35668 1.47073-.29704 0-.60713-.0289-.95215-.10195.0702-.0744.13723-.14605.20038-.21308.22154.0392.47625.0653.73766.0653 1.34902.00071 2.52765-.60642 3.30588-1.51588m-.72285-4.21147c.0219 1.27142-.56056 2.13466-.744 2.43382-.15981.26105-.54187.76412-1.27706 1.54481-.92745.98496-3.82623 4.06612-4.01955 4.27144h7.86095l-1.81257-8.25077z" fill="#1e59ae" transform="translate(-164.54114 -200.69462)"/></svg>
|
After Width: | Height: | Size: 4.3 KiB |
BIN
WebSimHelper/logos/FRIB_logo.jpg
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
WebSimHelper/logos/FSU_logo_640.png
Normal file
After Width: | Height: | Size: 600 KiB |
BIN
WebSimHelper/logos/HELIOS_logo.jpg
Normal file
After Width: | Height: | Size: 93 KiB |
BIN
WebSimHelper/logos/ISS_logo.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
WebSimHelper/logos/SOLARIS_favicon.png
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
WebSimHelper/logos/SOLARIS_logo.png
Normal file
After Width: | Height: | Size: 215 KiB |
43
WebSimHelper/massProxy.py
Executable file
|
@ -0,0 +1,43 @@
|
||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
import isotopeLib
|
||||||
|
import cgi
|
||||||
|
|
||||||
|
form = cgi.FieldStorage()
|
||||||
|
|
||||||
|
ASym = form.getvalue('ASym')
|
||||||
|
A=form.getvalue('A')
|
||||||
|
Z=form.getvalue('Z')
|
||||||
|
|
||||||
|
|
||||||
|
print( "Content-type:text/html\r\n\r\n")
|
||||||
|
|
||||||
|
if 'ASym' in form :
|
||||||
|
|
||||||
|
if ASym == "p" : ASym = "1H"
|
||||||
|
if ASym == "d" : ASym = "2H"
|
||||||
|
if ASym == "t" : ASym = "3H"
|
||||||
|
if ASym == "a" : ASym = "4He"
|
||||||
|
|
||||||
|
[A,Z] = isotopeLib.GetAZ(ASym)
|
||||||
|
|
||||||
|
if 'A' in form:
|
||||||
|
ASym = isotopeLib.GetSymbol(float(A), float(Z))
|
||||||
|
|
||||||
|
#===================================
|
||||||
|
# print(A)
|
||||||
|
# print(Z)
|
||||||
|
# print(isotopeLib.GetMassFromSym(ASym))
|
||||||
|
# print(ASym)
|
||||||
|
# print(isotopeLib.GetSn(ASym))
|
||||||
|
# print(isotopeLib.GetSp(ASym))
|
||||||
|
# print(isotopeLib.GetSa(ASym))
|
||||||
|
|
||||||
|
print(A , ",",
|
||||||
|
Z , ",",
|
||||||
|
format(isotopeLib.GetMassFromSym(ASym), '.2f'), ",",
|
||||||
|
ASym, ",",
|
||||||
|
format(isotopeLib.GetSn(ASym), '.2f'), ",",
|
||||||
|
format(isotopeLib.GetSp(ASym), '.2f'), ",",
|
||||||
|
format(isotopeLib.GetSa(ASym), '.2f')
|
||||||
|
)
|
287
WebSimHelper/miscCal.html
Normal file
|
@ -0,0 +1,287 @@
|
||||||
|
<!DOCTYOE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
body{
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
table{
|
||||||
|
border-collapse: collapse;
|
||||||
|
border : 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
td{
|
||||||
|
padding : 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<h1> enA, pnA, pps convertor </h1>
|
||||||
|
|
||||||
|
<table id="convertor">
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right">Charge state:</td>
|
||||||
|
<td><input type="text" id="ChargeState" size="10" value="6" enterkeyhint="done"/> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right">Attenuation:</td>
|
||||||
|
<td><input type="text" id="att" size="10" value="1e+4" enterkeyhint="done" /> </td>
|
||||||
|
</tr>
|
||||||
|
<tr style="text-align:center">
|
||||||
|
<td>enA </td>
|
||||||
|
<td>pnA </td>
|
||||||
|
<td>pps </td>
|
||||||
|
<td>att. pps </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><input type="text" id='enA' size="10" value="6" enterkeyhint="done"/></td>
|
||||||
|
<td><input type="text" id="pnA" size="10" enterkeyhint="done"/></td>
|
||||||
|
<td><input type="text" id="pps" size="10" enterkeyhint="done"/></td>
|
||||||
|
<td width="100"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h1> Yield Calculator </h1>
|
||||||
|
|
||||||
|
<table id="yieldTable">
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right"> Integrated Xsec </td>
|
||||||
|
<td><Input type="text" id="Xsec" size="10" value="4" enterkeyhint="done"/></td>
|
||||||
|
<td>mb</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right"> Beam intensity </td>
|
||||||
|
<td><Input type="text" id="BeamPPS" size="10" value="1e5" enterkeyhint="done"/></td>
|
||||||
|
<td>pps</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right"> Target thickness </td>
|
||||||
|
<td><Input type="text" id="thickness" size="10" value="100" enterkeyhint="done"/></td>
|
||||||
|
<td>ug/cm2</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right"> Target molar mass </td>
|
||||||
|
<td><Input type="text" id="molar" size="10" value="16" enterkeyhint="done"/></td>
|
||||||
|
<td>g/mol</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right"> Nucleus/molecule </td>
|
||||||
|
<td><Input type="text" id="ddd" size="10" value="2" enterkeyhint="done"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right"> Num of nucleus per area </td>
|
||||||
|
<td></td>
|
||||||
|
<td>count/cm2</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right"> Yield per sec </td>
|
||||||
|
<td></td>
|
||||||
|
<td>count/sec</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right"> Spectroscopic factor </td>
|
||||||
|
<td><Input type="text" id="SF" size="10" value="0.6" enterkeyhint="done"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right"> Wanted Count </td>
|
||||||
|
<td><Input type="text" id="wantedCount" size="10" value="1000" enterkeyhint="done"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right"> stat. uncertainty </td>
|
||||||
|
<td></td>
|
||||||
|
<td>%</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right"> Beam Time required </td>
|
||||||
|
<td></td>
|
||||||
|
<td>day</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
function toSci(xx, digi){
|
||||||
|
//return xx.toExponential(digi).replace(/e\+?/, ' x 10^');
|
||||||
|
return xx.toExponential(digi);
|
||||||
|
}
|
||||||
|
|
||||||
|
function convert(type){
|
||||||
|
let chargeState = document.getElementById('ChargeState').value;
|
||||||
|
let attenuation = document.getElementById('att').value;
|
||||||
|
let eee = 6241510000;
|
||||||
|
|
||||||
|
let table = document.getElementById('convertor');
|
||||||
|
|
||||||
|
if ( type == 1 ){
|
||||||
|
let enA = document.getElementById('enA').value;
|
||||||
|
let pnA = enA/chargeState;
|
||||||
|
let pps = pnA*eee;
|
||||||
|
var att = pps/attenuation;
|
||||||
|
document.getElementById('pnA').value = pnA;
|
||||||
|
document.getElementById('pps').value = toSci(pps,3);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( type == 2 ){
|
||||||
|
let pnA = document.getElementById('pnA').value;
|
||||||
|
let enA = pnA*chargeState;
|
||||||
|
let pps = pnA*eee;
|
||||||
|
var att = pps/attenuation;
|
||||||
|
document.getElementById('enA').value = enA;
|
||||||
|
document.getElementById('pps').value = toSci(pps,3);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( type == 3 ){
|
||||||
|
let pps = document.getElementById('pps').value;
|
||||||
|
let pnA = pps/eee;
|
||||||
|
let enA = pnA*chargeState;
|
||||||
|
var att = pps/attenuation;
|
||||||
|
document.getElementById('enA').value = enA;
|
||||||
|
document.getElementById('pnA').value = pnA;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.rows[3].cells[3].innerHTML = '<span style="color:#FF0000">' + toSci(att,3) + '</span>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function yieldCal(type){
|
||||||
|
let NA = 6.0221409e+23;
|
||||||
|
let mb2cm = 1e-27;
|
||||||
|
|
||||||
|
let xsec = document.getElementById('Xsec').value;
|
||||||
|
let beamPPS = document.getElementById('BeamPPS').value;
|
||||||
|
let thickness = document.getElementById('thickness').value;
|
||||||
|
let molar = document.getElementById('molar').value;
|
||||||
|
let nParticle = document.getElementById('ddd').value;
|
||||||
|
let SF = document.getElementById('SF').value;
|
||||||
|
let wantedCount = document.getElementById('wantedCount').value;
|
||||||
|
|
||||||
|
let table = document.getElementById('yieldTable');
|
||||||
|
|
||||||
|
let nTarget = thickness * NA * nParticle / molar / 1e6;
|
||||||
|
let yield = xsec * beamPPS * nTarget * mb2cm;
|
||||||
|
|
||||||
|
table.rows[5].cells[1].innerHTML = toSci(nTarget, 3);
|
||||||
|
table.rows[6].cells[1].innerHTML = yield.toPrecision(4);
|
||||||
|
|
||||||
|
let error = Math.sqrt(wantedCount)/wantedCount*100;
|
||||||
|
table.rows[9].cells[1].innerHTML = error.toPrecision(4);
|
||||||
|
|
||||||
|
let day = wantedCount / SF /yield /60/60/24;
|
||||||
|
//table.rows[10].cells[1].innerHTML = day.toPrecision(4);
|
||||||
|
table.rows[10].cells[1].innerHTML = '<span style="color:#FF0000">' + day.toPrecision(4) + '</span>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
convert(1);
|
||||||
|
yieldCal(1);
|
||||||
|
|
||||||
|
|
||||||
|
document.getElementById('enA').addEventListener('keypress',
|
||||||
|
function(e){
|
||||||
|
//alert( e.keyCode );
|
||||||
|
if(e.keyCode == 13 ){
|
||||||
|
convert(1);
|
||||||
|
}
|
||||||
|
}, false
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
document.getElementById('pnA').addEventListener('keypress',
|
||||||
|
function(e){
|
||||||
|
if(e.keyCode == 13){
|
||||||
|
convert(2);
|
||||||
|
}
|
||||||
|
}, false
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
document.getElementById('pps').addEventListener('keypress',
|
||||||
|
function(e){
|
||||||
|
if(e.keyCode == 13){
|
||||||
|
convert(3);
|
||||||
|
}
|
||||||
|
}, false
|
||||||
|
);
|
||||||
|
|
||||||
|
document.getElementById('att').addEventListener('keypress',
|
||||||
|
function(e){
|
||||||
|
if(e.keyCode == 13){
|
||||||
|
convert(1);
|
||||||
|
}
|
||||||
|
}, false
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
document.getElementById('ChargeState').addEventListener('keypress',
|
||||||
|
function(e){
|
||||||
|
if(e.keyCode == 13){
|
||||||
|
convert(1);
|
||||||
|
}
|
||||||
|
}, false
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
document.getElementById('Xsec').addEventListener('keypress',
|
||||||
|
function(e){
|
||||||
|
if(e.keyCode == 13){
|
||||||
|
yieldCal(0);
|
||||||
|
}
|
||||||
|
}, false
|
||||||
|
);
|
||||||
|
|
||||||
|
document.getElementById('BeamPPS').addEventListener('keypress',
|
||||||
|
function(e){
|
||||||
|
if(e.keyCode == 13){
|
||||||
|
yieldCal(1);
|
||||||
|
}
|
||||||
|
}, false
|
||||||
|
);
|
||||||
|
|
||||||
|
document.getElementById('thickness').addEventListener('keypress',
|
||||||
|
function(e){
|
||||||
|
if(e.keyCode == 13){
|
||||||
|
yieldCal(2);
|
||||||
|
}
|
||||||
|
}, false
|
||||||
|
);
|
||||||
|
|
||||||
|
document.getElementById('molar').addEventListener('keypress',
|
||||||
|
function(e){
|
||||||
|
if(e.keyCode == 13){
|
||||||
|
yieldCal(3);
|
||||||
|
}
|
||||||
|
}, false
|
||||||
|
);
|
||||||
|
|
||||||
|
document.getElementById('ddd').addEventListener('keypress',
|
||||||
|
function(e){
|
||||||
|
if(e.keyCode == 13){
|
||||||
|
yieldCal(4);
|
||||||
|
}
|
||||||
|
}, false
|
||||||
|
);
|
||||||
|
|
||||||
|
document.getElementById('SF').addEventListener('keypress',
|
||||||
|
function(e){
|
||||||
|
if(e.keyCode == 13){
|
||||||
|
yieldCal(5);
|
||||||
|
}
|
||||||
|
}, false
|
||||||
|
);
|
||||||
|
|
||||||
|
document.getElementById('wantedCount').addEventListener('keypress',
|
||||||
|
function(e){
|
||||||
|
if(e.keyCode == 13){
|
||||||
|
yieldCal(6);
|
||||||
|
}
|
||||||
|
}, false
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
</html>
|
529
WebSimHelper/simpleSim.html
Normal file
|
@ -0,0 +1,529 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>DWBA and Monte Carlo Simulation</title>
|
||||||
|
<link rel="icon" type="image/x-icon" href="logos/SOLARIS_favicon.png">
|
||||||
|
</head>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
background: #6DB33E;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1>DWBA and Monte Carlo Simulation</h1>
|
||||||
|
|
||||||
|
<button onclick="GetClipBoard()">Paste Settings from clipboard</button>
|
||||||
|
|
||||||
|
<form action = "simpleInput.py" method = "POST" target = "uploaded">
|
||||||
|
|
||||||
|
<h3>Reaction: </h3>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>Beam Energy</td>
|
||||||
|
<td><input type = "text" name = "KEA" size="6" value="10" /></td>
|
||||||
|
<td style="text-align:left">MeV/u</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Beam </td>
|
||||||
|
<td><input type = "text" name = "beam_AZ" size="6" value="16O"/></td>
|
||||||
|
<td style="text-align:right">J<sup>π</sup></td>
|
||||||
|
<td><input type = "text" id="beam_Jpi" name = "beam_Jpi" size="5" value="0+"/><td>
|
||||||
|
<td style="text-align:right">Ex:</td>
|
||||||
|
<td><input type = "text" name = "beam_Ex" size="6" value="0.00"/></td>
|
||||||
|
<td style="text-align:left">MeV</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Target</td>
|
||||||
|
<td><input type = "text" name = "target_AZ" size="6" value="d"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Light recoil</td>
|
||||||
|
<td><input type = "text" name = "lRecoil_AZ" size="6" value="p"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> Number of events </td>
|
||||||
|
<td><input type = "text" name = "numEvent" size="6" value="100000"/></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>Detector:</h3>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<input type="radio" name="SSType" value="HELIOS"/>HELIOS
|
||||||
|
<br>
|
||||||
|
<input type="radio" name="SSType" value="SOLARIS" checked="checked"/>SOLARIS
|
||||||
|
<br>
|
||||||
|
<input type="radio" name="SSType" value="ISS"/>ISS
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>B-field </td>
|
||||||
|
<td><input type = "text" name = "BField" size="5" value="-2.5"/></td>
|
||||||
|
<td style="text-align:left">T (minus sign = field point to upstream)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Array Pos.</td>
|
||||||
|
<td><input type = "text" name = "posArray" size="5" value="-100"/></td>
|
||||||
|
<td style="text-align:left">mm (negative for upstream)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Recoil Pos.</td>
|
||||||
|
<td><input type = "text" name = "posRecoil" size="5" value="500"/></td>
|
||||||
|
<td style="text-align:left">mm (negative for upstream)</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>DWBA and E<sub>x</sub> List:</h3>
|
||||||
|
|
||||||
|
<p><b style="color:red;">For 2-nucleon transfer</b>, <b>Orbital</b> take the form NL=X, where N is number of node, X is momentum number. n and L are related by Σ<sub>i</sub> (2n<sub>i</sub>+l<sub>i</sub>) = 2N + X + 2n + l, where n<sub>i</sub> and l<sub>i</sub> are the principle number and orbital angular momentum of the each transfered nucleon, and n and l are the internal quanta of the 2-nucleon. e.g. (t,p) reaction to 0f orbtial, the left-hand side would be n<sub>i</sub> = 0 and l<sub>i</sub> = 3 and the sum is 3+3 = 6 = 2N + X + 2n+l. Assume n = l = 0, we have 6 = 2N+L. Thus, 3L=0, 2L=2,1L=4, 0L=6. </p>
|
||||||
|
|
||||||
|
TODO: guess the orbital
|
||||||
|
<br>
|
||||||
|
<input type="checkbox" id="pos" onclick="checkParity()" checked/>Positive parity</td>
|
||||||
|
<input type="checkbox" id="neg" onclick="checkParity()" checked/>Negative parity</td>
|
||||||
|
<input type="checkbox" id="unk" onclick="checkParity()" checked/>Unknown parity</td>
|
||||||
|
<br>
|
||||||
|
<button type="button" onclick="addStates()">Add known states</button>
|
||||||
|
Isotope: <input type="text" id="AZ" size="5" value="17O"/>
|
||||||
|
Max Ex: <input type="text" id="maxEx" size="5" value="5"/>MeV
|
||||||
|
|
||||||
|
<p id='waiting'></p>
|
||||||
|
|
||||||
|
<table id="ExTable">
|
||||||
|
<tr>
|
||||||
|
<td><b> E<sub>x</sub> [MeV] </b></td>
|
||||||
|
<td><b> J<sup>π</sup></b></td>
|
||||||
|
<td><b> Orbital </b></td>
|
||||||
|
</tr>
|
||||||
|
</tr>
|
||||||
|
<td><input type="text" name="Ex" size="5" value="0"/></td>
|
||||||
|
<td><input type="text" name="Jpi" size="5" value="3/2+"/></td>
|
||||||
|
<td><input type="text" name="Orb" size="6" value="0d3/2"/></td>
|
||||||
|
<td><button type="button" onclick="addRow(this)">Insert Ex</button></td>
|
||||||
|
<td><button type="button" onclick="deleteRow(this)">Remove Ex</button></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td><button type="button" onclick="copyEx()">Copy Ex</button></td>
|
||||||
|
<td><button type="button" onclick="pasteEx()"> Paste Ex </button></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p></p>
|
||||||
|
<input type="checkbox" name="DWBA" value="On"/>Cal. DWBA
|
||||||
|
<!--<input type="checkbox" name="onlyDWBA" value="On"/>ONLY Cal. DWBA (tetsing)-->
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>Incoming Channel</td>
|
||||||
|
<td>
|
||||||
|
<select name="op1">
|
||||||
|
<option value="A" selected>D | An & Cai (2006) E < 183, 12 < A < 238</option>
|
||||||
|
<option value="H">D | Han, Shi, & Shen (2006) E < 200, 12 < A < 209</option>
|
||||||
|
<option value="B">D | Bojowald et al. (1988) 50 < E < 80, 27 < A < 208</option>
|
||||||
|
<option value="D">D | Daehnick, Childs, Vrcelj (1980) 11.8 < E < 80, 27 < A < 238 (REL) </option>
|
||||||
|
<option value="C">D | Daehnick, Childs, Vrcelj (1980) 11.8 < E < 80, 27 < A < 238 (NON-REL) </option>
|
||||||
|
<option value="L">D | Lohr and Haeberli (1974) 9 < E < 13, 40 < A </option>
|
||||||
|
<option value="Q">D | Perey and Perey (1963) 12 < E < 25, 40 < A </option>
|
||||||
|
<option value="Z">D | Zhang, Pang, Lou (2016) 5 < E < 170, A < 18, spe 6-7Li </option>
|
||||||
|
<option value="K">P | Koning & Delaroche (2009) E < 200, 24 < A < 209 | Iso.Dep.</option>
|
||||||
|
<option value="V">P | Varner et al. (1991) 16 < E < 65, 4 < A < 209</option>
|
||||||
|
<option value="M">P | Menet et al. (1971) 30 < E < 60, 40 < A </option>
|
||||||
|
<option value="G">P | Becchetti and Greenlees (1969) E < 50, 40 < A </option>
|
||||||
|
<option value="P">P | Perey (1963) E < 20, 30 < A < 100 </option>
|
||||||
|
<option value="x">A=3 | Xu, Guo, Han, & Shen (2011) E < 250, 20 < A < 209 </option>
|
||||||
|
<option value="l">A=3 | Liang, Li, & Cai (2009) E < 270, All masses </option>
|
||||||
|
<option value="p">A=3 | Pang et al. (2009) all E, all masses, Iso. Dep. </option>
|
||||||
|
<option value="c">A=3 | Li, Liang, Cai (2007), E < 40, 48 < A < 232, Tritons </option>
|
||||||
|
<option value="t">A=3 | Trost et al. (1987) 10 < E < 220, 10 < A < 208 </option>
|
||||||
|
<option value="h">A=3 | Hyakutake et al. (1980) 90 < E < 120, About 58 < A < 92 </option>
|
||||||
|
<option value="b">A=3 | Becchetti and Greenlees (1971), E < 40, 40 < A, Iso. Dep. </option>
|
||||||
|
<option value="s">A=4 | Su & Han (2015) E < 398, 20 < A < 209 </option>
|
||||||
|
<option value="a">A=4 | Avrigeanu et al. (2009) </option>
|
||||||
|
<option value="f">A=4 | Bassani and Picard (1969) 24 < E < 31, A = 90 </option>
|
||||||
|
</select>
|
||||||
|
<td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Outgoing Channel</td>
|
||||||
|
<td>
|
||||||
|
<select name="op2">
|
||||||
|
<option value="A">D | An & Cai (2006) E < 183, 12 < A < 238</option>
|
||||||
|
<option value="H">D | Han, Shi, & Shen (2006) E < 200, 12 < A < 209</option>
|
||||||
|
<option value="B">D | Bojowald et al. (1988) 50 < E < 80, 27 < A < 208</option>
|
||||||
|
<option value="D">D | Daehnick, Childs, Vrcelj (1980) 11.8 < E < 80, 27 < A < 238 (REL) </option>
|
||||||
|
<option value="C">D | Daehnick, Childs, Vrcelj (1980) 11.8 < E < 80, 27 < A < 238 (NON-REL) </option>
|
||||||
|
<option value="L">D | Lohr and Haeberli (1974) 9 < E < 13, 40 < A </option>
|
||||||
|
<option value="Q">D | Perey and Perey (1963) 12 < E < 25, 40 < A </option>
|
||||||
|
<option value="Z">D | Zhang, Pang, Lou (2016) 5 < E < 170, A < 18, spe 6-7Li </option>
|
||||||
|
<option value="K" selected>P | Koning & Delaroche (2009) E < 200, 24 < A < 209, Iso.Dep.</option>
|
||||||
|
<option value="V">P | Varner et al. (1991) 16 < E < 65, 4 < A < 209</option>
|
||||||
|
<option value="M">P | Menet et al. (1971) 30 < E < 60, 40 < A </option>
|
||||||
|
<option value="G">P | Becchetti and Greenlees (1969) E < 50, 40 < A </option>
|
||||||
|
<option value="P">P | Perey (1963) E < 20, 30 < A < 100 </option>
|
||||||
|
<option value="x">A=3 | Xu, Guo, Han, & Shen (2011) E < 250, 20 < A < 209 </option>
|
||||||
|
<option value="l">A=3 | Liang, Li, & Cai (2009) E < 270, All masses </option>
|
||||||
|
<option value="p">A=3 | Pang et al. (2009) all E | all masses, Iso. Dep. </option>
|
||||||
|
<option value="c">A=3 | Li, Liang, Cai (2007), E < 40, 48 < A < 232, Tritons </option>
|
||||||
|
<option value="t">A=3 | Trost et al. (1987) 10 < E < 220, 10 < A < 208 </option>
|
||||||
|
<option value="h">A=3 | Hyakutake et al. (1980) 90 < E < 120, About 58 < A < 92 </option>
|
||||||
|
<option value="b">A=3 | Becchetti and Greenlees (1971), E < 40, 40 < A, Iso. Dep. </option>
|
||||||
|
<option value="s">A=4 | Su & Han (2015) E < 398, 20 < A < 209 </option>
|
||||||
|
<option value="a">A=4 | Avrigeanu et al. (2009) </option>
|
||||||
|
<option value="f">A=4 | Bassani and Picard (1969) 24 < E < 31, A = 90 </option>
|
||||||
|
</select>
|
||||||
|
<td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<input type="checkbox" name="onlyDWBA" value="On"/>Only DWBA and Don't Sim. Angle range (for only DWBA)
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Min [deg]: </td>
|
||||||
|
<td><input type = "text" name = "minAng" size="6" value="0" /></td>
|
||||||
|
<td>Max [deg]: </td>
|
||||||
|
<td><input type = "text" name = "maxAng" size="6" value="90"/></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3> Plot config:</h3>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td><input type="checkbox" name="plot" value="pEZ" checked/>E vs Z</td>
|
||||||
|
<td><input type="checkbox" name="plot" value="pExCal" checked/>Ex (cal.)</td>
|
||||||
|
<td><input type="checkbox" name="plot" value="pThetaCM" checked/>ThetaCM</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><input type="checkbox" name="plot" value="pThetaCM_Z" checked/>ThetaCM vs Z</td>
|
||||||
|
<td><input type="checkbox" name="plot" value="pRecoilXY" checked/>Recoil X vs Y</td>
|
||||||
|
<td><input type="checkbox" name="plot" value="pRecoilRThetaCM"/>Recoil-R vs ThetaCM</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><input type="checkbox" name="plot" value="pRecoilRZ"/>Recoil R vs Z</td>
|
||||||
|
<td><input type="checkbox" name="plot" value="pTDiffZ"/>Time diff vs Z</td>
|
||||||
|
<td><input type="checkbox" name="plot" value="pArrayXY"/>Array X vs Y</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
<input type="checkbox" name="gate" value="hit==1" checked/>Array Hit<br>
|
||||||
|
<input type="checkbox" name="gate" value="loop<=1" checked/>Loop = 1<br>
|
||||||
|
<input type="checkbox" name="gate" value="thetaCM>10" checked/> ThetaCM > 10 deg<br>
|
||||||
|
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
<input type = "submit" value = "Run DWBA and Simulation" style="width:200px;height:60px;" formtarget="_blank"/>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<hr style="height:4px;background-color:#F7CF3C; border-style:none; border-width:none">
|
||||||
|
|
||||||
|
<h2>Advanced control</h2>
|
||||||
|
|
||||||
|
<!-- ////////////////////////////////////////// -->
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>Download Sample files:</td>
|
||||||
|
<td style="text-align:left">
|
||||||
|
<a href="sample_files/reactionConfig_sample.txt" download="reactionConfig.txt">Reaction File</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td style="text-align:left">
|
||||||
|
<a href="sample_files/detectorGeo_SOLARIS_sample.txt" download="detectorGeo_SOLAIRS.txt">DetectorGeo (SOLARIS) File</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td style="text-align:left">
|
||||||
|
<a href="sample_files/detectorGeo_HELIOS_sample.txt" download="detectorGeo_HELIOS.txt">DetectorGeo (HELIOS) File</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td style="text-align:left">
|
||||||
|
<a href="sample_files/Ex_sample.txt" download="Ex.txt">Ex File</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td style="text-align:left">
|
||||||
|
<a href="sample_files/DWBA_sample.txt" download="DWBA">DWBA File</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td style="text-align:left">
|
||||||
|
<a href="sample_files/PlotConfig_sample.txt" download="PlotConfig.txt">Plot Config File</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p></p><!-- ////////////////////////////////////////// -->
|
||||||
|
<form enctype = "multipart/form-data" action = "Simulation_gateway.py" method = "post" target="uploaded">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right" width="200">Reaction File </td>
|
||||||
|
<td><input type = "file" name = "filename1" /> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right" width="200">DetectorGeo File </th>
|
||||||
|
<td><input type = "file" name = "filename2" /> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right" width="200">Ex File </th>
|
||||||
|
<td><input type = "file" name = "filename3" /> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right" width="200">DWBA File ^ </th>
|
||||||
|
<td><input type = "file" name = "filename4" /> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right" width="200">*.in File ^ </th>
|
||||||
|
<td><input type = "file" name = "filename4a" /> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right" width="200">Plot Config File # </th>
|
||||||
|
<td><input type = "file" name = "filename5" /> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>^ can be alone <br># can be omitted</th>
|
||||||
|
<td><input type = "submit" value = "Upload & Run Simulation" style="height:50px; width:200px" formtarget="_blank"/> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>File name can be customized.</li>
|
||||||
|
<li>For kinematic simulation, only the reactionConfig.txt, detectorGeo.txt, and Ex.txt are needed.</li>
|
||||||
|
<li>For DWBA calculation, only the DWBA file is needed.</li>
|
||||||
|
<li>If reactionConfig.txt, detectorGeo.txt, and DWBA file are presented, will do DWBA and use the result for simulation.</li>
|
||||||
|
<li>When the DWBA file is presented, the kinematic simulation will use the DWBA result and also the excitation energy. i.e. the user provide Ex.txt will not be used.</li>
|
||||||
|
<li>User can use a customs in File for DWBA calculation. Once the in File exist, it ignores the DWBA file.</li>
|
||||||
|
<li>To change DWBA angular range, download the in file, edit it. But becareful, DWBA for kinematic simulation must be 0 -180 deg.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<hr style="height:4px;background-color:#F7CF3C; border-style:none; border-width:none">
|
||||||
|
The source code for calculation can be found in <a href="https://github.com/calemhoffman/digios/tree/master/analysis/Cleopatra/Transfer.C" target="_blank">Here</a>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
function GetClipBoard(){
|
||||||
|
navigator.clipboard.readText().then(
|
||||||
|
function(result){
|
||||||
|
//console.log(result);
|
||||||
|
if( result.substring(0,16) == "====HELIOSMATICS" ){
|
||||||
|
let haha = result.substring(17).split(', ');
|
||||||
|
console.log(haha);
|
||||||
|
//alert(haha);
|
||||||
|
document.getElementsByName('beam_AZ')[0].value = haha[0];
|
||||||
|
document.getElementsByName('beam_Ex')[0].value = haha[1];
|
||||||
|
document.getElementsByName('target_AZ')[0].value = haha[2];
|
||||||
|
document.getElementsByName('lRecoil_AZ')[0].value = haha[3];
|
||||||
|
document.getElementsByName('KEA')[0].value = haha[5];
|
||||||
|
document.getElementsByName('BField')[0].value = haha[4];
|
||||||
|
document.getElementsByName('posArray')[0].value = haha[6];
|
||||||
|
document.getElementsByName('posRecoil')[0].value = haha[7];
|
||||||
|
|
||||||
|
document.getElementById('AZ').value = haha[8];
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function copyEx(){
|
||||||
|
let inputs = document.getElementsByTagName("input");
|
||||||
|
let copyText = "====ExList|";
|
||||||
|
for(let i = 0; i < inputs.length; i++){
|
||||||
|
if( inputs[i].type == 'text'){
|
||||||
|
if( inputs[i].name == "Ex" || inputs[i].name == "Jpi" || inputs[i].name == "Orb" ){
|
||||||
|
//if( inputs[i].value == "" ) continue;
|
||||||
|
copyText += inputs[i].value;
|
||||||
|
if(inputs[i].name == "Orb") {
|
||||||
|
copyText += "|";
|
||||||
|
}else{
|
||||||
|
copyText += ",";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//console.log(copyText);
|
||||||
|
|
||||||
|
navigator.clipboard.writeText(copyText).then(
|
||||||
|
() => {
|
||||||
|
alert('Ex are copied to clipboard.\n' + copyText);
|
||||||
|
}).catch(
|
||||||
|
() =>{
|
||||||
|
alert('Cannot copy.');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function pasteEx(){
|
||||||
|
navigator.clipboard.readText().then(
|
||||||
|
function(result){
|
||||||
|
//console.log(result);
|
||||||
|
if( result.substring(0,10) == "====ExList" ){
|
||||||
|
let haha = result.substring(11).split('|');
|
||||||
|
//console.log(haha);
|
||||||
|
let table = document.getElementById("ExTable");
|
||||||
|
let nRow = table.rows.length;
|
||||||
|
//console.log(nRow);
|
||||||
|
//remove all Row except the 1st
|
||||||
|
for( let i = nRow; i > 2; i--){
|
||||||
|
table.deleteRow(i - 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
for( let i = 0; i < haha.length; i++){
|
||||||
|
if( haha[i] == "" ) continue;
|
||||||
|
|
||||||
|
let kaka = haha[i].split(',');
|
||||||
|
//console.log(kaka);
|
||||||
|
|
||||||
|
nRow = table.rows.length;
|
||||||
|
let row = table.insertRow(nRow-1);
|
||||||
|
row.innerHTML = '<td><input type="text" name="Ex" size="5" value="' + kaka[0] + '"/></td> \
|
||||||
|
<td><input type="text" name="Jpi" size="5" value="' + kaka[1] + '"/></td> \
|
||||||
|
<td><input type="text" name="Orb" size="6" value="' + kaka[2] + '"/></td>\
|
||||||
|
<td><button type="button" onclick="addRow(this)">Insert Ex</button></td> \
|
||||||
|
<td><button type="button" onclick="deleteRow(this)">Remove Ex</button></td>';
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
alert("Setting not fond in clipboard.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
let parity;
|
||||||
|
function checkParity(){
|
||||||
|
parity = 0;
|
||||||
|
if( document.getElementById('pos').checked == true ) parity += 1;
|
||||||
|
if( document.getElementById('neg').checked == true ) parity += 2;
|
||||||
|
if( document.getElementById('unk').checked == true ) parity += 4;
|
||||||
|
//console.log(parity);
|
||||||
|
}
|
||||||
|
|
||||||
|
checkParity();
|
||||||
|
|
||||||
|
function addStates(){
|
||||||
|
let AZ = document.getElementById('AZ').value;
|
||||||
|
let maxEx = document.getElementById('maxEx').value;
|
||||||
|
let beamJpi = document.getElementById('beam_Jpi').value;
|
||||||
|
|
||||||
|
let str = 'get_nuclear_data.py?isotopes_name=' + AZ + '&maxEx='+maxEx;
|
||||||
|
|
||||||
|
let table = document.getElementById("ExTable");
|
||||||
|
|
||||||
|
const client = new XMLHttpRequest();
|
||||||
|
|
||||||
|
client.addEventListener('loadstart',
|
||||||
|
function(e){
|
||||||
|
document.getElementById('waiting').innerHTML = "wait....retrieving data from IAEA..";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
client.addEventListener('error',
|
||||||
|
function(e){
|
||||||
|
document.getElementById('waiting').innerHTML = "Error.";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
client.addEventListener('loadend',
|
||||||
|
function(e){
|
||||||
|
let result = client.responseText.split(/\r?\n/);
|
||||||
|
|
||||||
|
//clear table
|
||||||
|
let nRow = table.rows.length;
|
||||||
|
for( let j = nRow; j > 2; j--){
|
||||||
|
table.deleteRow(j - 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
document.getElementById('waiting').innerHTML = "";
|
||||||
|
let count = 0;
|
||||||
|
|
||||||
|
for( let i = 0; i < result.length; i++){
|
||||||
|
if( i < 17 ) continue;
|
||||||
|
if( result[i] == "</table>" ) break;
|
||||||
|
|
||||||
|
let kaka = result[i].split(' ').filter(n => n);
|
||||||
|
|
||||||
|
let ex = parseFloat(kaka[3])/1000.;
|
||||||
|
let jpi = kaka[7]?.replace('(', '')?.replace(')', '');
|
||||||
|
console.log(ex + ", " + jpi);
|
||||||
|
|
||||||
|
//check parity
|
||||||
|
if( (((parity >> 2) & 1) != 1) && kaka[7].slice(-1) == ")" ) continue;
|
||||||
|
if( (((parity >> 2) & 1) != 1) && jpi == "," ) continue;
|
||||||
|
if( (((parity) & 1) != 1) && jpi.slice(-1) == "+" ) continue;
|
||||||
|
if( (((parity >> 1) & 1) != 1) && jpi.slice(-1) == "-" ) continue;
|
||||||
|
|
||||||
|
count ++;
|
||||||
|
nRow = table.rows.length;
|
||||||
|
let row = table.insertRow(nRow-1);
|
||||||
|
row.innerHTML = '<td><input type="text" name="Ex" size="5" value="' + ex.toFixed(3) + '"/></td> \
|
||||||
|
<td><input type="text" name="Jpi" size="5" value="' + jpi + '"/></td> \
|
||||||
|
<td><input type="text" name="Orb" size="6" /></td> \
|
||||||
|
<td><button type="button" onclick="addRow(this)">Insert Ex</button></td> \
|
||||||
|
<td><button type="button" onclick="deleteRow(this)">Remove Ex</button></td> \
|
||||||
|
<td>'+ kaka[7] +'</td>';
|
||||||
|
|
||||||
|
}
|
||||||
|
if( count == 0 ){
|
||||||
|
document.getElementById('waiting').innerHTML = "no states found.";
|
||||||
|
nRow = table.rows.length;
|
||||||
|
let row = table.insertRow(nRow-1);
|
||||||
|
row.innerHTML = '<td><input type="text" name="Ex" size="5" value="0"/></td> \
|
||||||
|
<td><input type="text" name="Jpi" size="5" value="1/2+"/></td> \
|
||||||
|
<td><input type="text" name="Orb" size="6" value="1s1/2"/></td> \
|
||||||
|
<td><button type="button" onclick="addRow(this)">Insert Ex</button></td> \
|
||||||
|
<td><button type="button" onclick="deleteRow(this)">Remove Ex</button></td>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
client.open('GET', str);
|
||||||
|
client.send();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//document.getElementById("ExTable").find('tr').click( () => {alert( $this.index);} );
|
||||||
|
|
||||||
|
function addRow(ele) {
|
||||||
|
|
||||||
|
let iRow = ele.closest('tr').sectionRowIndex;
|
||||||
|
|
||||||
|
let table = document.getElementById("ExTable");
|
||||||
|
let row = table.insertRow(iRow+1);
|
||||||
|
row.innerHTML = '<td><input type="text" name="Ex" size="5" /></td> \
|
||||||
|
<td><input type="text" name="Jpi" size="5"/></td> \
|
||||||
|
<td><input type="text" name="Orb" size="6"/></td> \
|
||||||
|
<td><button type="button" onclick="addRow(this)">Insert Ex</button></td> \
|
||||||
|
<td><button type="button" onclick="deleteRow(this)">Remove Ex</button></td>';
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteRow(ele){
|
||||||
|
let table = document.getElementById("ExTable");
|
||||||
|
let nRow = table.rows.length;
|
||||||
|
let iRow = ele.closest('tr').sectionRowIndex;
|
||||||
|
if ( nRow > 3){
|
||||||
|
table.deleteRow(iRow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</html>
|