Total Cross Section

We present the codes and the online webpage for the calculation of the total cross section for the following reactions:
\begin{alignat}{6} K^-p\to K^-p \, , \,& K^-p\to\bar{K}^0n \, ,\, & K^-p\to\pi^0 \Lambda \, , \, & K^-p\to\pi^- \Sigma^+ \, ,\, & K^-p\to\pi^+ \Sigma^- \, , \; & K^-p\to\pi^0 \Sigma^0 \, . \notag \end{alignat}

Fortran Code

  • Total Cross Section Fortran code and input: zip file
  • Contact person: Cesar Fernandez-Ramirez
  • Last update: September 2015
  • Zip File Content:
    • README file: README.tex and README.pdf
    • Fortran Source File: knxsecf.f
    • Parameter files (contain the parameters for each partial wave):
      • parameters.s01.inp
      • parameters.p01.inp
      • parameters.p03.inp
      • parameters.d03.inp
      • parameters.d05.inp
      • parameters.f05.inp
      • parameters.f07.inp
      • parameters.g07.inp
      • parameters.s11.inp
      • parameters.p11.inp
      • parameters.p13.inp
      • parameters.d13.inp
      • parameters.d15.inp
      • parameters.f15.inp
      • parameters.f17.inp
      • parameters.g17.inp
    • Input File: file.inp
    • Example of input file (file.inp):

      prk-toprok-
      1
      2.5
      4.5
      100
      
      • The first line indicates the process, the options are:

        • $K^-p\to K^-p$:     prk-toprok-
        • $K^-p\to\bar{K}^0n$:     prk-toneuk0
        • $K^-p\to\pi^0 \Lambda$:     prk-tolapi0
        • $K^-p\to\pi^- \Sigma^+$:   prk-tos+pi-
        • $K^-p\to\pi^+ \Sigma^-$:   prk-tos-pi+
        • $K^-p\to\pi^0 \Sigma^0$:     prk-tos0pi0

      • The second line indicates the fixed kinematical variable, the options are:

        • $s$ (GeV$^2$):        1
        • $p_{lab}$ (GeV):     2
        • $E_{lab}$ (GeV):     3

        where $s$ is energy squared in the center of mass frame,
        and $p_{lab}$ and $E_{lab}$ are, respectively, the momentum and the energy of the incoming $K^-$ in the laboratory frame.

      • The third line indicates the initial value of the kinematical variable.

      • The fourth line indicates the final value of the kinematical variable.

      • The fifth line indicates the the amount of points to calculate.
        There is a limit of 1000 points.
        It can be changed modifying variable max_data_points=1000 in module resonancesizes.

Online version

The online version of the code is the same as the one available for download except for some built-in functionalities aimed to allow the webpage to produce nicer plots.
The webpage has integrated some restrictions in the inputs through drop-down menus, kinematical ranges and number of points to calculate.
Depending on the kinematical variable used as input the available ranges are:

  • $s \in \left[2.1 , 5.0 \right]$ GeV$^2$
  • $p_{lab}\in \left[0.164 , 2.0 \right]$ GeV
  • $E_{lab}\in \left[0.52 , 2.07 \right]$ GeV
where $s$ is the energy squared in the center of mass frame,
and $p_{lab}$ and $E_{lab}$ are, respectively, the momentum and the energy of the incoming $K^-$ in the laboratory frame.
There is a limit of 1000 points to calculate.

Output

The online and the downloadable versions produce an output file (output.txt) which contains five columns:

    (i)     $s$ (GeV$^2$),
    (ii)   $~E_{lab}$ (GeV),
    (iii)  $~p_{lab}$ (GeV),
    (iv)   the center of mass incoming momentum squared $q^2$ (GeV$^2$), and
    (v)    total cross section in milibarn,
The online version also produces a figure with the total cross section vs $s$.

Run online version of the code

Select Reaction:

Select Kinematical Input:


'; // print horizontal line // Check that inputs are correct $ioerror=0; if ($_POST['formReaction'] == "") {echo"
  • PEBKAC. You forgot to select the Reaction!
  • ";$ioerror=1;} if ($_POST['formInput'] == "") {echo "
  • PEBKAC. You forgot to select what kind of Kinematical Input!
  • ";$ioerror=1;} if ($kininput == "s") {$inputkin = 1; if ( $emax > 5.0 || $emin < 2.1 || !(is_numeric($emin)) || !(is_numeric($emax)) || $emin > $emax) {echo "
  • PEBKAC. Wrong kinematic limits!
  • ";$ioerror=1;}} elseif ($kininput == "plab" ) {$inputkin = 2; if ( $emax > 2.0 || $emin < 0.164 || !(is_numeric($emin)) || !(is_numeric($emax)) || $emin > $emax) {echo "
  • PEBKAC. Wrong kinematic limits!
  • ";$ioerror=1;}} elseif ($kininput == "elab" ) {$inputkin = 3; if ( $emax > 2.07 || $emin < 0.52 || !(is_numeric($emin)) || !(is_numeric($emax)) || $emin > $emax ) {echo "
  • PEBKAC. Wrong kinematic limits!
  • ";$ioerror=1;}} if ($npoints < 1 || $npoints > 1000){echo "
  • PEBKAC. Wrong number of points!
  • ";$ioerror=1;} if ($ioerror==1) {return;} $rootPath = getcwd(); // change the directory // echo "
    The path is $rootPath
    "; chdir('KNscattering/KNXsec'); // because the execution write files // in the current directory $rootPath2 = getcwd(); $file = fopen("file.inp","w"); // open file fwrite($file,$reaction ."\n"); // print fwrite($file,$inputkin ."\n"); fwrite($file,$emin ."\n"); fwrite($file,$emax ."\n"); fwrite($file,$npoints ."\n"); // end print fclose($file); // close file exec('./xsec.exe'); // run the program //echo '' ; // GNUPLOT $ret = system('gnuplot44 gnuplot.txt', $response); //$ret = system('gnuplot gnuplot.txt ', $response); // run gnuplot on my computer //echo "
    return from gnuplot $ret
    "; //echo '
    '; system('which gnuplot'); system('gnuplot'); echo '
    ' ; // END GNUPLOT echo "
    Download the output file"; echo "
    "; chdir($rootPath); // go back to root directory } if(isset($_POST['submit'])) // call the function display if something is submitted { display(); } ?>

    This page has been accessed $counterVal times.
    Webpage by Cesar Fernandez-Ramirez

    "; ?>