added PlotConfig generation
This commit is contained in:
parent
f166a74880
commit
d3cd22d7ad
|
@ -20,18 +20,12 @@ def FindAZ(AZ):
|
||||||
form = cgi.FieldStorage()
|
form = cgi.FieldStorage()
|
||||||
|
|
||||||
beam_AZ = form.getvalue('beam_AZ')
|
beam_AZ = form.getvalue('beam_AZ')
|
||||||
#beam_A = form.getvalue('beam_A')
|
|
||||||
#beam_Z = form.getvalue('beam_Z')
|
|
||||||
beam_Jpi = form.getvalue('beam_Jpi')
|
beam_Jpi = form.getvalue('beam_Jpi')
|
||||||
beam_Ex = form.getvalue('beam_Ex')
|
beam_Ex = form.getvalue('beam_Ex')
|
||||||
|
|
||||||
target_AZ = form.getvalue('target_AZ')
|
target_AZ = form.getvalue('target_AZ')
|
||||||
#target_A = form.getvalue('target_A')
|
|
||||||
#target_Z = form.getvalue('target_Z')
|
|
||||||
|
|
||||||
lRecoil_AZ = form.getvalue('lRecoil_AZ')
|
lRecoil_AZ = form.getvalue('lRecoil_AZ')
|
||||||
#lRecoil_A = form.getvalue('lRecoil_A')
|
|
||||||
#lRecoil_Z = form.getvalue('lRecoil_Z')
|
|
||||||
|
|
||||||
KEA = form.getvalue('KEA')
|
KEA = form.getvalue('KEA')
|
||||||
BField = form.getvalue('BField')
|
BField = form.getvalue('BField')
|
||||||
|
@ -137,42 +131,6 @@ f.close()
|
||||||
|
|
||||||
#================== if DWBA, write DWBA.txt, else write Ex.txt
|
#================== if DWBA, write DWBA.txt, else write Ex.txt
|
||||||
fn4 = "sim_DWBA.txt"
|
fn4 = "sim_DWBA.txt"
|
||||||
'''
|
|
||||||
beamName=""
|
|
||||||
hRecoil_A = int(beam_A) + int(target_A) - int(lRecoil_A)
|
|
||||||
hRecoil_Z = int(beam_Z) + int(target_Z) - int(lRecoil_Z)
|
|
||||||
hRecoilName=""
|
|
||||||
|
|
||||||
targetName=""
|
|
||||||
lRecoilName=""
|
|
||||||
|
|
||||||
if target_A == "1" and target_Z == "0":
|
|
||||||
targetName="n"
|
|
||||||
if target_A == "1" and target_Z == "1":
|
|
||||||
targetName="p"
|
|
||||||
if target_A == "2" and target_Z == "1":
|
|
||||||
targetName="d"
|
|
||||||
if target_A == "3" and target_Z == "1":
|
|
||||||
targetName="t"
|
|
||||||
if target_A == "3" and target_Z == "2":
|
|
||||||
targetName="3He"
|
|
||||||
if target_A == "4" and target_Z == "2":
|
|
||||||
targetName="a"
|
|
||||||
|
|
||||||
|
|
||||||
if lRecoil_A == "1" and lRecoil_Z == "0":
|
|
||||||
lRecoilName="n"
|
|
||||||
if lRecoil_A == "1" and lRecoil_Z == "1":
|
|
||||||
lRecoilName="p"
|
|
||||||
if lRecoil_A == "2" and lRecoil_Z == "1":
|
|
||||||
lRecoilName="d"
|
|
||||||
if lRecoil_A == "3" and lRecoil_Z == "1":
|
|
||||||
lRecoilName="t"
|
|
||||||
if lRecoil_A == "3" and lRecoil_Z == "2":
|
|
||||||
lRecoilName="3He"
|
|
||||||
if lRecoil_A == "4" and lRecoil_Z == "2":
|
|
||||||
lRecoilName="a"
|
|
||||||
'''
|
|
||||||
|
|
||||||
hRecoil = [ beam[0] + target[0] - lRecoil[0], beam[1] + target[1] - lRecoil[1] ]
|
hRecoil = [ beam[0] + target[0] - lRecoil[0], beam[1] + target[1] - lRecoil[1] ]
|
||||||
hRecoil_AZ = FindName(hRecoil[0], hRecoil[1]);
|
hRecoil_AZ = FindName(hRecoil[0], hRecoil[1]);
|
||||||
|
@ -206,7 +164,34 @@ if isDWBA == False:
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
#================== write PlotConfig.txt (to be done)
|
#================== write PlotConfig.txt (to be done)
|
||||||
fn5=""
|
fn5="PlotConfig.txt"
|
||||||
|
|
||||||
|
plotStr="{"
|
||||||
|
plotSize=len(plot)
|
||||||
|
for i in range(plotSize):
|
||||||
|
plotStr += plot[i] + ", "
|
||||||
|
if( i == (int)(plotSize/2) and i > 3 ) :
|
||||||
|
plotStr += "break, "
|
||||||
|
plotStr +="pInfo}\n"
|
||||||
|
|
||||||
|
gateStr =""
|
||||||
|
gateSize=len(gate)
|
||||||
|
for i in range(gateSize):
|
||||||
|
gateStr += gate[i]
|
||||||
|
if( i < gateSize - 1 ):
|
||||||
|
gateStr += " && "
|
||||||
|
gateStr +="\n"
|
||||||
|
|
||||||
|
f = open(fn5, "w")
|
||||||
|
f.write(plotStr)
|
||||||
|
f.write(gateStr)
|
||||||
|
f.write("60 //elum range\n")
|
||||||
|
f.write("{0, 50} //thetaCM range\n")
|
||||||
|
f.write("false //showKElines\n")
|
||||||
|
f.write("false //isOverRideEx\n")
|
||||||
|
f.write("{-0.5, 4.0} //over-ride Ex range\n")
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
|
||||||
#==================== Run Simulation
|
#==================== Run Simulation
|
||||||
dwba_1=""
|
dwba_1=""
|
||||||
|
@ -304,6 +289,7 @@ if isDWBA:
|
||||||
print ("<br><span style=\"white-space: pre-line\"> %s </span>" % dwba_4)
|
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>")
|
||||||
print ("</html>")
|
print ("</html>")
|
||||||
|
|
||||||
|
|
|
@ -152,7 +152,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h3> Plot config (still working on):</h3>
|
<h3> Plot config:</h3>
|
||||||
|
|
||||||
<input type="checkbox" name="plot" value="pEZ" checked/>E vs Z<br>
|
<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="pExCal" checked/>Ex (cal.)<br>
|
||||||
|
@ -161,6 +161,7 @@
|
||||||
<input type="checkbox" name="plot" value="pRecoilXY" checked/>Recoil X vs Y<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="pRecoilRThetaCM"/>Recoil-R vs ThetaCM<br>
|
||||||
<input type="checkbox" name="plot" value="pRecoilRZ"/>Recoil R vs Z<br>
|
<input type="checkbox" name="plot" value="pRecoilRZ"/>Recoil R vs Z<br>
|
||||||
|
<input type="checkbox" name="plot" value="pTDiffZ"/>Time diff vs Z<br>
|
||||||
<input type="checkbox" name="plot" value="pArrayXY"/>Array X vs Y<br>
|
<input type="checkbox" name="plot" value="pArrayXY"/>Array X vs Y<br>
|
||||||
|
|
||||||
<p></p>
|
<p></p>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user