<%@ LANGUAGE="VBScript" %> <% start_time = Time %> <% Dim SimParName() Dim SimParValue() Dim SimPardescription() Dim Parname() Dim Parvalue() Dim Pardescription() If Request("run")="" Then Run=0 Else Run= CLng(Request("run")) End If Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd ' Connection.Open phdb_rd_repl SQLStmtx = "select to_char(sysdate,'DD Mon YYYY') ddate,to_char(sysdate,'HH24:MI:SS') ttime,global_name from global_name " ' response.write(SQLStmtx & "
" ) Set RSx = Connection.Execute(SQLStmtx) If Not RSx.EOF Then select case CStr(RSx("global_name")) case "PHDB.WORLD" dbname="Main Phobos Database" case "ORACLE.WORLD" dbname="Phobos Server (old) Database" case "KRPHOBOS.WORLD" dbname="Krakow Database" case "ROCHESTER.WORLD" dbname="Rochester Database" end select Else dbname="Undefined Database" End If ' ' Get PMC parameters ' SQLStmt = " select sp.keyname,sp.ordernum,sp.textvalue,sp.numvalue,spt.description " SQLStmt = SQLStmt & " from phoffline.simulation_pars sp, " SQLStmt = SQLStmt & " (select * from phoffline.simpar_types where par_source='PMC') spt " SQLStmt = SQLStmt & " where sp.keyname=spt.par_name(+) " SQLStmt = SQLStmt & " and sp.RUN=" & Run ' response.write(SQLStmt & "
" ) Set RS = Connection.Execute(SQLStmt) Dim RNDMArr nsimpars=-1 Do While Not RS.EoF Select Case CStr(RS("keyname")) Case "PMCV" pmcversion=CStr(RS("textvalue")) Case "GEAV" geantversion=CStr(RS("textvalue")) Case "ZEBV" zebraversion=CStr(RS("textvalue")) Case "RNDM" rndmstr = CStr(RS("textvalue")) Case "ANNI" anni=CStr(RS("textvalue")) annid=CStr(RS("description")) Case "BREM" brem=CStr(RS("textvalue")) bremd=CStr(RS("description")) Case "COMP" comp=CStr(RS("textvalue")) compd=CStr(RS("description")) Case "DCAY" dcay=CStr(RS("textvalue")) dcayd=CStr(RS("description")) Case "DRAY" dray=CStr(RS("textvalue")) drayd=CStr(RS("description")) Case "HADR" hadr=CStr(RS("textvalue")) hadrd=CStr(RS("description")) Case "LOSS" loss=CStr(RS("textvalue")) lossd=CStr(RS("description")) Case "MULS" muls=CStr(RS("textvalue")) mulsd=CStr(RS("description")) Case "PAIR" pair=CStr(RS("textvalue")) paird=CStr(RS("description")) Case "PHOT" phot=CStr(RS("textvalue")) photd=CStr(RS("description")) Case "SECT" sect=CStr(RS("textvalue")) sectd=CStr(RS("description")) Case "RBDX" rbdx=CStr(RS("textvalue")) Case "RBDY" rbdy=CStr(RS("textvalue")) Case "RBDZ" rbdz=CStr(RS("textvalue")) Case "RBXX" rbxx=CStr(RS("textvalue")) Case "RBYY" rbyy=CStr(RS("textvalue")) Case "RBZZ" rbzz=CStr(RS("textvalue")) Case "RBXY" rbxy=CStr(RS("textvalue")) Case "RZMN" rzmn=CStr(RS("textvalue")) Case "RZMX" rzmx=CStr(RS("textvalue")) Case "CUTS" cuts=RS("textvalue") cutsd=RS("description") Case "GEONAME" geoname=RS("textvalue") geonamed="Geometry label" Case "GEOV" geov=RS("textvalue") geovd=RS("description") Case "PIXL" pixl=RS("textvalue") pixld=RS("description") Case "SECT" sect=RS("textvalue") sectd=RS("description") Case "SMEM" smem=RS("textvalue") smemd="Output to the ROOT file switch" Case "SAOU" saou=RS("textvalue") saoud=RS("description") Case "GENERATOR" gennamed=RS("textvalue") genname=RS("description") Case Else nsimpars=nsimpars+1 Redim Preserve SimParname(nsimpars) Redim Preserve SimPardescription(nsimpars) Redim Preserve SimParvalue(nsimpars) SimParvalue(nsimpars)=CStr(RS("textvalue")) If Not IsNull(RS("description")) Then SimPardescription(nsimpars)=CStr(RS("description")) Else SimPardescription(nsimpars)="Unknown" nsimpars = nsimpars - 1 End If End Select RS.MoveNext Loop Set RS=nothing ' ' Get simulated files ' SQLStmt = " select logical_name,server,dir_name,file_name " SQLStmt = SQLStmt & " from PHOFFLINE.SIMULATION_FILES " SQLStmt = SQLStmt & " where runseq " SQLStmt = SQLStmt & " in (select MAX(runseq) from phoffline.simrunseqs where RUN=" & run & ")" Set RSfile = Connection.Execute(SQLStmt) ' ' ' Get smearing files ' SQLStmt = " select smear_version, " SQLStmt = SQLStmt & " max(server) ser, max(dir_name) dn, max(file_name) fn " SQLStmt = SQLStmt & " from PHOFFLINE.SMEARING_FILES where RUN=" & run SQLStmt = SQLStmt & " group by smear_version order by smear_version desc" ' response.write(SQLStmt & "
" ) Set RSSmfile = Connection.Execute(SQLStmt) ' ' %> Simulation Run

Simulation Run <%=run%>

Status on  <%=RSx("ddate")%> at <%=RSx("ttime")%> in <%=dbname%>

Program

Program Name PMC
PMC Version <%=pmcversion%>
GEANT Version <%=geantversion%>
ZEBRA Version <%=zebraversion%>

Geometry

<% If geov <> "" Then %> <% End If %> <% If geoname <> "" Then %> <% End If %>
Geometry version <%=geov%>
Geometry label <%=geoname%>

Vertex

<% If rbxx <> "" Then %> <% End If %> <% If rbyy <> "" Then %> <% End If %> <% If rbzz <> "" Then %> <% End If %> <% If rbdx <> "" Then %> <% End If %> <% If rbdy <> "" Then %> <% End If %> <% If rbdz <> "" Then %> <% End If %> <% If rbxy <> "" Then %> <% End If %> <% If rzmn <> "" Then %> <% End If %> <% If rzmx <> "" Then %> <% End If %>
Vertex X center <%=rbxx%>
Vertex Y center <%=rbyy%>
Vertex Z center <%=rbzz%>
Vertex X (flat) width <%=rbdx%>
Vertex Y (flat) width <%=rbdy%>
Vertex Z (flat or triangular) width <%=rbdz%>
XY width, switch GAUSS(>0) FLAT(=0) <%=rbxy%>
Z minimum cut <%=rzmn%>
Z maximum cut <%=rzmx%>

Physics

<% If dcay <> "" Then %> <% End If %> <% If anni <> "" Then %> <% End If %> <% If brem <> "" Then %> <% End If %> <% If comp <> "" Then %> <% End If %> <% If dray <> "" Then %> <% End If %> <% If hadr <> "" Then %> <% End If %> <% If loss <> "" Then %> <% End If %> <% If muls <> "" Then %> <% End If %> <% If pair <> "" Then %> <% End If %> <% If phot <> "" Then %> <% End If %>
<%=dcayd%> <%=dcay%>
<%=annid%> <%=anni%>
<%=bremd%> <%=brem%>
<%=compd%> <%=comp%>
<%=drayd%> <%=dray%>
<%=hadrd%> <%=hadr%>
<%=lossd%> <%=loss%>
<%=mulsd%> <%=muls%>
<%=paird%> <%=pair%>
<%=photd%> <%=phot%>

Simulation switches

<% If smem <> "" Then %> <% End If %> <% If saou <> "" Then %> <% End If %> <% If sect <> "" Then %> <% End If %> <% If pixl <> "" Then %> <% End If %> <% If cuts <> "" Then %> <% End If %>
<%=smemd%> <%=smem%>
<%=saoud%> <%=saou%>
<%=sectd%> <%=sect%>
<%=pixld%> <%=pixl%>
<%=cutsd%> <%=cuts%>
Random numbers <%=rndmstr%>

Job Files

<% Do While Not RSfile.EoF %> <% RSfile.MoveNext Loop %>
Logical Name File Name Directory Server
<%=RSfile("logical_name")%> <%=RSfile("file_name")%> <%=RSfile("dir_name")%> <%=RSfile("server")%>

Smearing Files

<% Do While Not RSSmfile.EoF %> <% RSSmfile.MoveNext Loop %>
Version File Name Directory Server
<%=RSSmfile("smear_version")%> <%=RSSmfile("fn")%> <%=RSSmfile("dn")%> <%=RSSmfile("ser")%>
<% Connection.Close %>