Page MenuHomeHEPForge

makeExp2
No OneTemporary

makeExp2

#!/usr/bin/perl
require "subs.pl";
$input = <>;
chomp $input;
($exp,$address) = split /\s+/,$input;
open TEST,'>>explist';
print "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01//EN' 'http://www.w3.org/TR/html4/strict.dtd'>";
print "<html>
<head>
<style TYPE='text/css'>
A:link {color:blue;
text-decoration:underline;
font-family: arial, verdana, helvetica, sans-serif;
font-size: 10pt;
font-weight:bold;}
A:visited {color:blue;
text-decoration:underline;
font-size: 10pt;
font-family: arial, verdana, helvetica, sans-serif;
font-weight:bold;}
A:hover {color:red;
text-decoration:underline;
font-size: 10pt;
font-family: arial, verdana, helvetica, sans-serif;
font-weight:bold;}
TH {background-color:#bbbbbb}
TD {background-color:#eeeeee}
</STYLE>
<link rel='stylesheet' href='/review/quarkonii/hepdata.css' type='text/css'>
</head>
<body>
<table border=1 cellpadding=15pt>
<tr>
<td bgcolor='#DDDDDD' valign='top'>
<!--#include virtual='/review/quarkonii/cont.shtml'-->
</td>
<td bgcolor='#EEEEEE' valign='top'>
<!--#include virtual='/review/quarkonii/top.shtml'-->
</td>
</tr>
<tr>
<td valign='top'>
<!--#include virtual='/review/quarkonii/navig.shtml'-->
</td>
<td bgcolor='#FFFFca' valign='top'>
";
print "<title>$exp QUARKONII data </title>
<body bgcolor='#ffffff'>
<table width='100%'>
<td>
<b><font size=+3 color='#000080'>Data from the $exp Collaboration</font></b>
<td align=right>
<a href=index.shtml>
<img alt='BACK' src='../../../icons/back.gif'</a>
</table>
<hr>
";
print "<font size=-1>The individual links display the specific datasets.</font><br>";
print "<font size=-1>The publication reference link displays the SPIRES hep database entry.</font><br>";
print "<font size=-1>The [R] link displays the complete entry for that paper from the HepData Reaction database.</font>";
print "<hr>";
$oirn = 0;
$first = 0;
open INPUT,'quarkonii.file';
while ($line = <INPUT>){
if($line !~ m/^!/){
chomp $line;
@line = split /\t+/,$line;
if($line[0] eq $exp){
$istate=$line[1];
($beam,$target) =split /\s+/,$istate,2;
if($beam eq 'd'){$beam = 'deut';}
$istate = $beam.' '.$target;
$nucleus=$line[2];
$fsall = $line[8];
($fs,$dummy)=split /,/,$fsall,2;
if($nucleus ne '-'){
@nucleus = split /,/,$nucleus;
foreach $m (0...$#nucleus){
$istate[$m] = $beam.' '.$nucleus[$m];
}
$restring="re.DsReactions like '$istate[0] --> $fs%'";
foreach $m (1...$#nucleus){
$restring = $restring." or re.DsReactions like '$istate[$m] --> $fs%'";
}
}
else{
if($istate eq 'p d') {$istate = 'p deut';}
$restring = "re.DsReactions like '$istate --> $fs%'";
}
$sqrts=$line[3];
$obs=$line[4];
$obsfull=$line[4];
if($obs =~ m/,/){
($obs,$dummy) = split /,/,$obs;
}
$irn=$line[5];
$ins=0;
$typeId="SpiresId" ;
$paperId="irn" ;
if(substr($irn,0,1) eq "i") {
$irn=substr($irn,1);
$ins=1;
$typeId="InspireId";
$paperId="ins";
}
# print "\n $ins $irn\n";
$auth=$line[6];
$ref=$line[7];
if($irn ne $oirn){
if (-e "/home/whalley/review/quarkonii/abs/$irn.abs") {
$tle = `cat /home/whalley/review/quarkonii/abs/$irn.abs`;
} else {
$tle = "";
}
print " </ul>\n";
if($first == 0) { print "<ul>\n"; $first=1;}
if($ins==0){ print " <br><li><b>$line[6] et al. <a href='http://inspirehep.net/search?p=find+irn+";}
if($ins==1){ print " <br><li><b>$line[6] et al. <a href='http://inspirehep.net/record/";}
print $irn;
if($ins==0) { print "&of=hb";}
print "' target='_blank' title='$tle'>$ref</a>\n";
$result = `echo "select count(*) from Papers where $typeId=$irn" | mysql hepdataworking`;
@result = split /\n/,$result;
if($result[1]>0){
if($ins==0) { print " <a href = '$address/View/irn$irn' target='_blank'>[R]</a>"; }
if($ins==1) { print " <a href = '$address/View/ins$irn' target='_blank'>[R]</a>"; }
}
print "<font size=-1> - $irn </font>";
print "</b><br>\n";
$result = `echo "select Title from Papers where $typeId=$irn" | mysql hepdataworking`;
@result = split /\n/,$result;
$title = $result[1];
if($title eq ""){
$result = `echo "select title from paper where $paperId=$irn" | mysql papers`;
@result = split /\n/,$result;
$title = $result[1];
}
print "<i><font size=-1>$title</font></i><br>\n";
print " <ul>\n";
$oirn = $irn;
}
print " <li>$line[10] - ";
print "<b><font size=-1>$istate --> $fsall... $sqrts GeV $obsfull</font></b>";
# print "searching for: $obs, $restring\n";
# print "\nsearching for: $obs : $restring:";
$dslocal = &getDsLocalDsId($obs,$restring);
# print " result $dslocal\n";
@dslocal = split /\n/,$dslocal;
if($#dslocal>0){
foreach $n (1...$#dslocal){
# print "<br/> <font size=-1> $obs (<i>$fs</i>)</font>\n";
# print "<br/>\n";
print "<table>\n";
($localid,$dsid) = split /\s+/,$dslocal[$n];
$dscomment = `echo "select Comments from DatasetComments where DATASET_ID=$dsid" | mysql hepdataworking`;
@dscomment = split /\n/,$dscomment;
$header = `echo "select Header,AXIS_ID from XAxes where _dataset_DATASET_ID=$dsid and LocalId=1" | mysql hepdataworking`;
@head = split /\n/,$header;
@head1 = split /\s+/,$head[1];
$axid = $head1[$#head1];
@header = split /\s+IN\s+/,$head1[0];
$header[0] =~ s/^\(//;
$header[0] =~ s/\($//;
if($header[0] =~ m/^MEAN/){
$header[0] =~ s/N=//;
} elsif($header[0] =~ m/^ABS/){
$header[0] =~ s/ABS\(//;$header[0] =~ s/\)$//; @header = split /\(/,$header[0];
} else {
@header = split /\(/,$header[0];
}
if( $header[0] eq 'SQRT') { $header[0]='Ecm'; }
$bins = `echo "select Max(LocalId) from Bins where _xAxis_AXIS_ID=$axid" | mysql hepdataworking`;
@bins = split /\n/,$bins;
print "<tr><td>";
print TEST "$exp $irn $localid\n";
&filter($dscomment[1]);
if($ins==0) { print "<a href = '/review-cgi/quarkonii/irn$irn/d$localid' title='$dscomment[1]'><font size=-2>$obs <i>v</i> $header[0]</font></a>"; }
if($ins==1) { print "<a href = '/review-cgi/quarkonii/ins$irn/d$localid' title='$dscomment[1]'><font size=-2>$obs <i>v</i> $header[0]</font></a>"; }
# print " <a href = '/review-cgi/quarkonii/$irn/d$localid'>[$localid]</a>";
if($bins[1] == 1) {
# print "<font size=-1> ($localid/$bins[1] point)</font>";
} else{
# print "<font size=-1> ($localid/$bins[1] points)</font>";
}
print "<font size=-1> ($localid)</font>";
print "</td>";
print "<td></td><td>";
$shortcomment = substr($dscomment[1],0,80);
print "<font size=-2>($shortcomment... $nucleus)</font>";
print "</td></tr>";
print "</table>\n";
}
}
if($line[12] ne '' ){ print " $line[12]"; }
}
}
}
print " </ul>\n";
print "</ul>\n";
print "</td>
</tr>
</table>
</body>
</html>
";
sub filter{
$_[0] =~ s/>/&gt\;/g;
$_[0] =~ s/</&lt\;/g;
$_[0] =~ s/>=/&ge\;/g;
$_[0] =~ s/<=/&le\;/g;
$_[0] =~ s/</&lt\;/g;
$_[0] =~ s/</&lt\;/g;
}
exit();
print "<hr>\n";

File Metadata

Mime Type
text/html
Expires
Mon, Jan 20, 8:16 PM (8 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4242194
Default Alt Text
makeExp2 (7 KB)

Event Timeline