finsihed all basic functions
This commit is contained in:
parent
6a37f038d2
commit
4ca97d9a60
|
@ -6,6 +6,8 @@ import subprocess
|
||||||
|
|
||||||
cgitb.enable()
|
cgitb.enable()
|
||||||
|
|
||||||
|
cgi.maxlen=1024 * 1024
|
||||||
|
|
||||||
form = cgi.FieldStorage()
|
form = cgi.FieldStorage()
|
||||||
|
|
||||||
fn1=""
|
fn1=""
|
||||||
|
@ -18,6 +20,7 @@ message1=""
|
||||||
message2=""
|
message2=""
|
||||||
message3=""
|
message3=""
|
||||||
message4=""
|
message4=""
|
||||||
|
message5=""
|
||||||
|
|
||||||
fileitem = form['filename1']
|
fileitem = form['filename1']
|
||||||
if fileitem.filename:
|
if fileitem.filename:
|
||||||
|
@ -82,36 +85,70 @@ else:
|
||||||
##change to files directory
|
##change to files directory
|
||||||
os.chdir(r"files")
|
os.chdir(r"files")
|
||||||
|
|
||||||
|
## remove files ?
|
||||||
|
|
||||||
pngName=""
|
pngName=""
|
||||||
result=""
|
result=""
|
||||||
haha=""
|
haha=""
|
||||||
dwba_1=""
|
dwba_1=""
|
||||||
dwba_2=""
|
dwba_2=""
|
||||||
|
dwba_3=""
|
||||||
|
dwba_4=""
|
||||||
|
dwbaPNG=""
|
||||||
|
inFile=""
|
||||||
|
outFile=""
|
||||||
|
isDWBA=False
|
||||||
|
dwbaExFile=""
|
||||||
|
dwbaRootFile=""
|
||||||
|
isTransferOK=False
|
||||||
|
|
||||||
#------- if only DWBA
|
#------- if only DWBA
|
||||||
if fn4!="" :
|
if fn4!="" :
|
||||||
dwba_1 = subprocess.run(["../Cleopatra/InFileCreator", fn4, "0", "180", "0.1"] , stdout=subprocess.PIPE).stdout.decode('utf-8')
|
dwba_1 = subprocess.run(["../Cleopatra/InFileCreator", fn4, "0", "180", "0.1"] , stdout=subprocess.PIPE).stdout.decode('utf-8')
|
||||||
#result = dwbs_1.find('.in')
|
outFile = fn4+ ".out"
|
||||||
|
cmd = "../Cleopatra/ptolemy <%s.in> %s.out" % (fn4, fn4)
|
||||||
|
os.system(cmd)
|
||||||
#dwba_2 = subprocess.run(["../Cleopatra/ptolemy", , "0", "180", "0.1"] , stdout=subprocess.PIPE).stdout.decode('utf-8')
|
if os.path.exists(outFile) :
|
||||||
|
dwba_2 = outFile
|
||||||
|
dwba_3 = subprocess.run(["../Cleopatra/ExtractXSec", outFile, "1"], stdout=subprocess.PIPE).stdout.decode('utf-8')
|
||||||
|
dwbaRootFile = fn4 + ".root"
|
||||||
|
dwbaExFile = fn4 + ".Ex.txt"
|
||||||
|
dwba_4 = subprocess.run(["../Cleopatra/PlotTGraphTObjArray", dwbaRootFile, "1"], stdout=subprocess.PIPE).stdout.decode('utf-8')
|
||||||
|
dwbaPNG = dwba_4.splitlines().pop()
|
||||||
|
isDWBA = True
|
||||||
|
|
||||||
'''
|
if fn1=="" or fn2=="":
|
||||||
if fn1=="" or fn2=="" or fn3=="" :
|
result = "imcomplete input files for kinematocs Simulation"
|
||||||
result = "imcomplete input files"
|
|
||||||
pngName = ""
|
pngName = ""
|
||||||
haha = ""
|
haha = ""
|
||||||
else:
|
else:
|
||||||
result = subprocess.run(["../Cleopatra/Transfer", fn1, fn2, fn3, "0"], stdout=subprocess.PIPE).stdout.decode('utf-8')
|
if isDWBA :
|
||||||
haha = subprocess.run(["../Cleopatra/PlotSimulation", "transfer.root"], stdout=subprocess.PIPE).stdout.decode('utf-8')
|
result = subprocess.run(["../Cleopatra/Transfer", fn1, fn2, dwbaExFile, dwbaRootFile, "transfer.root", "reaction.dat", "0"], stdout=subprocess.PIPE).stdout.decode('utf-8')
|
||||||
pngName=haha.splitlines().pop()
|
isTransferOK = True
|
||||||
'''
|
else:
|
||||||
|
if fn3=="" :
|
||||||
|
result = "missing Ex.txt"
|
||||||
|
else:
|
||||||
|
result = subprocess.run(["../Cleopatra/Transfer", fn1, fn2, fn3, "", "transfer.root", "reaction.dat", "0"], stdout=subprocess.PIPE).stdout.decode('utf-8')
|
||||||
|
isTransferOK = True
|
||||||
|
|
||||||
|
if isTransferOK :
|
||||||
|
if fn5 =="":
|
||||||
|
haha = subprocess.run(["../Cleopatra/PlotSimulation", "transfer.root"], stdout=subprocess.PIPE).stdout.decode('utf-8')
|
||||||
|
else:
|
||||||
|
haha = subprocess.run(["../Cleopatra/PlotSimulation", "transfer.root", fn5], stdout=subprocess.PIPE).stdout.decode('utf-8')
|
||||||
|
pngName=haha.splitlines().pop()
|
||||||
|
|
||||||
|
|
||||||
print ("Content-Type: text/html\r\n\r\n")
|
print ("Content-Type: text/html\r\n\r\n")
|
||||||
print ("<html>")
|
print ("<html>")
|
||||||
print ("<style> img {max-width: 100%} </style>")
|
print ("<style> img {max-width: 100%} </style>")
|
||||||
print ("<style> body { font-family: courier, courier new, serif;} </style>")
|
print ("<style> body { font-family: courier, courier new, serif;} </style>")
|
||||||
print ("<body>")
|
print ("<body>")
|
||||||
|
|
||||||
|
if dwbaPNG != "" :
|
||||||
|
print ("<img src=\"files/%s\">" % dwbaPNG)
|
||||||
|
|
||||||
if pngName != "" :
|
if pngName != "" :
|
||||||
print ("<img src=\"files/%s\">" % pngName)
|
print ("<img src=\"files/%s\">" % pngName)
|
||||||
|
|
||||||
|
@ -121,6 +158,9 @@ print ("<br>Ex File : %s" % message3)
|
||||||
print ("<br>DWBA File : %s" % message4)
|
print ("<br>DWBA File : %s" % message4)
|
||||||
print ("<br>Plot Config File : %s" % message5)
|
print ("<br>Plot Config File : %s" % message5)
|
||||||
print ("<br><span style=\"white-space: pre-line\"> %s </span>" % dwba_1)
|
print ("<br><span style=\"white-space: pre-line\"> %s </span>" % dwba_1)
|
||||||
|
print ("<br><span style=\"white-space: pre-line\"> %s </span>" % dwba_2)
|
||||||
|
print ("<br><span style=\"white-space: pre-line\"> %s </span>" % dwba_3)
|
||||||
|
print ("<br><span style=\"white-space: pre-line\"> %s </span>" % dwba_4)
|
||||||
print ("<br><span style=\"white-space: pre-line\"> %s </span>" % result)
|
print ("<br><span style=\"white-space: pre-line\"> %s </span>" % result)
|
||||||
print ("<br><span style=\"white-space: pre-line\"> %s </span>" % haha)
|
print ("<br><span style=\"white-space: pre-line\"> %s </span>" % haha)
|
||||||
print ("</body>")
|
print ("</body>")
|
||||||
|
|
2
digios
2
digios
|
@ -1 +1 @@
|
||||||
Subproject commit d251aa1a3533d669cd24f5d932fab3dc160a4dc7
|
Subproject commit 6c2c8950171e13ab858e61e1bc75c5d4283c7cb0
|
24
index.html
24
index.html
|
@ -54,7 +54,17 @@
|
||||||
<section>
|
<section>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<p>Some descriptions/Intructions here...</p>
|
<p>
|
||||||
|
<ul>
|
||||||
|
<li>The kenimatic calculation is documented in <a href="https://wiki.anl.gov/wiki_heliosdaq/images/3/3f/Kinematics_of_HELIOS.pdf" >Here</a>.</li>
|
||||||
|
<li>The DWBA calucation is using Ptolemy. <a href="https://www.phy.anl.gov/theory/research/ptolemy/">Here</a> for more detail. </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>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>This page is created and hosted by FSU</li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<!-- ////////////////////////////////////////// -->
|
<!-- ////////////////////////////////////////// -->
|
||||||
<table>
|
<table>
|
||||||
|
@ -67,7 +77,13 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td style="text-align:left">
|
<td style="text-align:left">
|
||||||
<a href="sample_files/detectorGeo_sample.txt" download="detectorGeo.txt">DetectorGeo File</a>
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -85,7 +101,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td style="text-align:left">
|
<td style="text-align:left">
|
||||||
<a href="sample_files/PlotConfig_sample.txt" download="DWBA">Plot Config File</a>
|
<a href="sample_files/PlotConfig_sample.txt" download="PlotConfig.txt">Plot Config File</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -140,7 +156,7 @@
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<iframe name="NuclearData" style="border:none" width="400" height="80%"></iframe>
|
<iframe name="NuclearData" style="border:none" width="400" height="40%"></iframe>
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|
|
@ -42,3 +42,4 @@
|
||||||
#32Si(t,p)34Si 0 0L=0 0+ 0.000 8MeV/u lA #two-nucleon_transfer
|
#32Si(t,p)34Si 0 0L=0 0+ 0.000 8MeV/u lA #two-nucleon_transfer
|
||||||
#36Ar(d,a)34Cl 0 4L=2 3+ 0.000 8MeV/u As # (d,a) reaction
|
#36Ar(d,a)34Cl 0 4L=2 3+ 0.000 8MeV/u As # (d,a) reaction
|
||||||
|
|
||||||
|
32Si(d,p)33Si 0 1p3/2 3/2- 0.000 8.8MeV/u AK
|
||||||
|
|
30
sample_files/PlotConfig_sample.txt
Normal file
30
sample_files/PlotConfig_sample.txt
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
/////enum plotID { pEZ, /// 0
|
||||||
|
///// pRecoilXY, /// 1
|
||||||
|
///// pRecoilXY1, /// 2
|
||||||
|
///// pRecoilXY2, /// 3
|
||||||
|
///// pRecoilRZ, /// 4
|
||||||
|
///// pRecoilRTR, /// 5
|
||||||
|
///// pTDiffZ, /// 6
|
||||||
|
///// pThetaCM, /// 7
|
||||||
|
///// pThetaCM_Z, /// 8
|
||||||
|
///// pExCal, /// 9
|
||||||
|
///// pRecoilRThetaCM, /// 10
|
||||||
|
///// pArrayXY, /// 11
|
||||||
|
///// pInfo, /// 12
|
||||||
|
///// pHitID, /// 13
|
||||||
|
///// pElum1XY, /// 14
|
||||||
|
///// pEElum1R, /// 15
|
||||||
|
///// pElum1RThetaCM, /// 16
|
||||||
|
///// pEmpty }; /// 17
|
||||||
|
/////=============================================== User Config
|
||||||
|
{pEZ, pExCal, pThetaCM, pRecoilRZ, break, pThetaCM_Z, pRecoilXY, pInfo, pRecoilRThetaCM} //Canvas config
|
||||||
|
hit == 1 && loop <= 1 && thetaCM > 10
|
||||||
|
60 //elum range
|
||||||
|
{0,50} //thetaCM range
|
||||||
|
false //shownKELines
|
||||||
|
false //isOverRideEx
|
||||||
|
{-0.5, 4.0} // over-rdied Ex range
|
||||||
|
///============================== example of gate
|
||||||
|
hit == 1 && loop <= 1 && thetaCM > 10 && detRowID == 0
|
||||||
|
hit == 1 && loop <= 1
|
||||||
|
15 < rhoElum1 && rhoElum1 < 50 && rhoElum2 > 60
|
|
@ -1,4 +1,4 @@
|
||||||
-4.00 //Bfield_[T]
|
-2.50 //Bfield_[T]
|
||||||
0.00 //Bfield_direction_to_z-axis_[deg]_should_not_use
|
0.00 //Bfield_direction_to_z-axis_[deg]_should_not_use
|
||||||
462.5 //bore_[mm]
|
462.5 //bore_[mm]
|
||||||
11.5 //distance_from_axis_[mm]
|
11.5 //distance_from_axis_[mm]
|
||||||
|
@ -23,5 +23,5 @@ Out //detector_facing_Out_or_In
|
||||||
117.9
|
117.9
|
||||||
176.8
|
176.8
|
||||||
235.8 //5th_det
|
235.8 //5th_det
|
||||||
290.0
|
294.0
|
||||||
#============= end of file
|
#============= end of file
|
31
sample_files/detectorGeo_SOLARIS_sample.txt
Normal file
31
sample_files/detectorGeo_SOLARIS_sample.txt
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
-2.50 //Bfield_[T]
|
||||||
|
0.00 //Bfield_direction_to_z-axis_[deg]_should_not_use
|
||||||
|
462.5 //bore_[mm]
|
||||||
|
11.5 //distance_from_axis_[mm]
|
||||||
|
10.0 //width_of_detector_[mm]
|
||||||
|
50 //length_of_detector_[mm]
|
||||||
|
1000 //recoil_position_+_for_downstream_[mm]
|
||||||
|
10.0 //inner_radius_of_recoil_detector_[mm]
|
||||||
|
40.2 //outter_radius_of_recoil_detector_[mm]
|
||||||
|
false //is_coincident_with_recoil
|
||||||
|
0 //Recoil_1_position_[mm]_when_0_disable_tree_branch
|
||||||
|
0 //Recoil_2_position_[mm]
|
||||||
|
0.00 //Elum_1_position_[mm]_(just_another_recoil_detector_but_for_light_recoil)
|
||||||
|
0.00 //Elum_2_position_[mm]_when_Elum=0_disable_tree_branch
|
||||||
|
0 //support_length_[mm]
|
||||||
|
-121 //first_position_-_for_upstream_[mm]
|
||||||
|
0.03 //energy_resolution_of_PSD_array_[MeV]
|
||||||
|
1.00 //position_resolution_of_PSD_array_[mm]
|
||||||
|
Out //detector_facing_Out_or_In
|
||||||
|
6 //number_of_detector_as_same_side
|
||||||
|
0.00 //1st_detector_near_position_in_reference_to_det6_[mm]
|
||||||
|
58.6 //2nd_det
|
||||||
|
117.9
|
||||||
|
176.8
|
||||||
|
235.8 //5th_det
|
||||||
|
294.0
|
||||||
|
353.2
|
||||||
|
412.1
|
||||||
|
471.0
|
||||||
|
530.0
|
||||||
|
#============= end of file
|
Loading…
Reference in New Issue
Block a user