and now: with pt
420
prog/python/qqgg/analytical_xs.html
Normal file
|
@ -0,0 +1,420 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2020-03-28 Sat 11:30 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>‎</title>
|
||||
<meta name="generator" content="Org mode" />
|
||||
<style type="text/css">
|
||||
<!--/*--><![CDATA[/*><!--*/
|
||||
.title { text-align: center;
|
||||
margin-bottom: .2em; }
|
||||
.subtitle { text-align: center;
|
||||
font-size: medium;
|
||||
font-weight: bold;
|
||||
margin-top:0; }
|
||||
.todo { font-family: monospace; color: red; }
|
||||
.done { font-family: monospace; color: green; }
|
||||
.priority { font-family: monospace; color: orange; }
|
||||
.tag { background-color: #eee; font-family: monospace;
|
||||
padding: 2px; font-size: 80%; font-weight: normal; }
|
||||
.timestamp { color: #bebebe; }
|
||||
.timestamp-kwd { color: #5f9ea0; }
|
||||
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
|
||||
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
|
||||
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
|
||||
.underline { text-decoration: underline; }
|
||||
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
|
||||
p.verse { margin-left: 3%; }
|
||||
pre {
|
||||
border: 1px solid #ccc;
|
||||
box-shadow: 3px 3px 3px #eee;
|
||||
padding: 8pt;
|
||||
font-family: monospace;
|
||||
overflow: auto;
|
||||
margin: 1.2em;
|
||||
}
|
||||
pre.src {
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
padding-top: 1.2em;
|
||||
}
|
||||
pre.src:before {
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: white;
|
||||
top: -10px;
|
||||
right: 10px;
|
||||
padding: 3px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
pre.src:hover:before { display: inline;}
|
||||
/* Languages per Org manual */
|
||||
pre.src-asymptote:before { content: 'Asymptote'; }
|
||||
pre.src-awk:before { content: 'Awk'; }
|
||||
pre.src-C:before { content: 'C'; }
|
||||
/* pre.src-C++ doesn't work in CSS */
|
||||
pre.src-clojure:before { content: 'Clojure'; }
|
||||
pre.src-css:before { content: 'CSS'; }
|
||||
pre.src-D:before { content: 'D'; }
|
||||
pre.src-ditaa:before { content: 'ditaa'; }
|
||||
pre.src-dot:before { content: 'Graphviz'; }
|
||||
pre.src-calc:before { content: 'Emacs Calc'; }
|
||||
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
|
||||
pre.src-fortran:before { content: 'Fortran'; }
|
||||
pre.src-gnuplot:before { content: 'gnuplot'; }
|
||||
pre.src-haskell:before { content: 'Haskell'; }
|
||||
pre.src-hledger:before { content: 'hledger'; }
|
||||
pre.src-java:before { content: 'Java'; }
|
||||
pre.src-js:before { content: 'Javascript'; }
|
||||
pre.src-latex:before { content: 'LaTeX'; }
|
||||
pre.src-ledger:before { content: 'Ledger'; }
|
||||
pre.src-lisp:before { content: 'Lisp'; }
|
||||
pre.src-lilypond:before { content: 'Lilypond'; }
|
||||
pre.src-lua:before { content: 'Lua'; }
|
||||
pre.src-matlab:before { content: 'MATLAB'; }
|
||||
pre.src-mscgen:before { content: 'Mscgen'; }
|
||||
pre.src-ocaml:before { content: 'Objective Caml'; }
|
||||
pre.src-octave:before { content: 'Octave'; }
|
||||
pre.src-org:before { content: 'Org mode'; }
|
||||
pre.src-oz:before { content: 'OZ'; }
|
||||
pre.src-plantuml:before { content: 'Plantuml'; }
|
||||
pre.src-processing:before { content: 'Processing.js'; }
|
||||
pre.src-python:before { content: 'Python'; }
|
||||
pre.src-R:before { content: 'R'; }
|
||||
pre.src-ruby:before { content: 'Ruby'; }
|
||||
pre.src-sass:before { content: 'Sass'; }
|
||||
pre.src-scheme:before { content: 'Scheme'; }
|
||||
pre.src-screen:before { content: 'Gnu Screen'; }
|
||||
pre.src-sed:before { content: 'Sed'; }
|
||||
pre.src-sh:before { content: 'shell'; }
|
||||
pre.src-sql:before { content: 'SQL'; }
|
||||
pre.src-sqlite:before { content: 'SQLite'; }
|
||||
/* additional languages in org.el's org-babel-load-languages alist */
|
||||
pre.src-forth:before { content: 'Forth'; }
|
||||
pre.src-io:before { content: 'IO'; }
|
||||
pre.src-J:before { content: 'J'; }
|
||||
pre.src-makefile:before { content: 'Makefile'; }
|
||||
pre.src-maxima:before { content: 'Maxima'; }
|
||||
pre.src-perl:before { content: 'Perl'; }
|
||||
pre.src-picolisp:before { content: 'Pico Lisp'; }
|
||||
pre.src-scala:before { content: 'Scala'; }
|
||||
pre.src-shell:before { content: 'Shell Script'; }
|
||||
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
|
||||
/* additional language identifiers per "defun org-babel-execute"
|
||||
in ob-*.el */
|
||||
pre.src-cpp:before { content: 'C++'; }
|
||||
pre.src-abc:before { content: 'ABC'; }
|
||||
pre.src-coq:before { content: 'Coq'; }
|
||||
pre.src-groovy:before { content: 'Groovy'; }
|
||||
/* additional language identifiers from org-babel-shell-names in
|
||||
ob-shell.el: ob-shell is the only babel language using a lambda to put
|
||||
the execution function name together. */
|
||||
pre.src-bash:before { content: 'bash'; }
|
||||
pre.src-csh:before { content: 'csh'; }
|
||||
pre.src-ash:before { content: 'ash'; }
|
||||
pre.src-dash:before { content: 'dash'; }
|
||||
pre.src-ksh:before { content: 'ksh'; }
|
||||
pre.src-mksh:before { content: 'mksh'; }
|
||||
pre.src-posh:before { content: 'posh'; }
|
||||
/* Additional Emacs modes also supported by the LaTeX listings package */
|
||||
pre.src-ada:before { content: 'Ada'; }
|
||||
pre.src-asm:before { content: 'Assembler'; }
|
||||
pre.src-caml:before { content: 'Caml'; }
|
||||
pre.src-delphi:before { content: 'Delphi'; }
|
||||
pre.src-html:before { content: 'HTML'; }
|
||||
pre.src-idl:before { content: 'IDL'; }
|
||||
pre.src-mercury:before { content: 'Mercury'; }
|
||||
pre.src-metapost:before { content: 'MetaPost'; }
|
||||
pre.src-modula-2:before { content: 'Modula-2'; }
|
||||
pre.src-pascal:before { content: 'Pascal'; }
|
||||
pre.src-ps:before { content: 'PostScript'; }
|
||||
pre.src-prolog:before { content: 'Prolog'; }
|
||||
pre.src-simula:before { content: 'Simula'; }
|
||||
pre.src-tcl:before { content: 'tcl'; }
|
||||
pre.src-tex:before { content: 'TeX'; }
|
||||
pre.src-plain-tex:before { content: 'Plain TeX'; }
|
||||
pre.src-verilog:before { content: 'Verilog'; }
|
||||
pre.src-vhdl:before { content: 'VHDL'; }
|
||||
pre.src-xml:before { content: 'XML'; }
|
||||
pre.src-nxml:before { content: 'XML'; }
|
||||
/* add a generic configuration mode; LaTeX export needs an additional
|
||||
(add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
|
||||
pre.src-conf:before { content: 'Configuration File'; }
|
||||
|
||||
table { border-collapse:collapse; }
|
||||
caption.t-above { caption-side: top; }
|
||||
caption.t-bottom { caption-side: bottom; }
|
||||
td, th { vertical-align:top; }
|
||||
th.org-right { text-align: center; }
|
||||
th.org-left { text-align: center; }
|
||||
th.org-center { text-align: center; }
|
||||
td.org-right { text-align: right; }
|
||||
td.org-left { text-align: left; }
|
||||
td.org-center { text-align: center; }
|
||||
dt { font-weight: bold; }
|
||||
.footpara { display: inline; }
|
||||
.footdef { margin-bottom: 1em; }
|
||||
.figure { padding: 1em; }
|
||||
.figure p { text-align: center; }
|
||||
.inlinetask {
|
||||
padding: 10px;
|
||||
border: 2px solid gray;
|
||||
margin: 10px;
|
||||
background: #ffffcc;
|
||||
}
|
||||
#org-div-home-and-up
|
||||
{ text-align: right; font-size: 70%; white-space: nowrap; }
|
||||
textarea { overflow-x: auto; }
|
||||
.linenr { font-size: smaller }
|
||||
.code-highlighted { background-color: #ffff00; }
|
||||
.org-info-js_info-navigation { border-style: none; }
|
||||
#org-info-js_console-label
|
||||
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
|
||||
.org-info-js_search-highlight
|
||||
{ background-color: #ffff00; color: #000000; font-weight: bold; }
|
||||
.org-svg { width: 90%; }
|
||||
/*]]>*/-->
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
/*
|
||||
@licstart The following is the entire license notice for the
|
||||
JavaScript code in this tag.
|
||||
|
||||
Copyright (C) 2012-2019 Free Software Foundation, Inc.
|
||||
|
||||
The JavaScript code in this tag is free software: you can
|
||||
redistribute it and/or modify it under the terms of the GNU
|
||||
General Public License (GNU GPL) as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option)
|
||||
any later version. The code is distributed WITHOUT ANY WARRANTY;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
|
||||
|
||||
As additional permission under GNU GPL version 3 section 7, you
|
||||
may distribute non-source (e.g., minimized or compacted) forms of
|
||||
that code without the copy of the GNU GPL normally required by
|
||||
section 4, provided you include this license notice and a URL
|
||||
through which recipients can access the Corresponding Source.
|
||||
|
||||
|
||||
@licend The above is the entire license notice
|
||||
for the JavaScript code in this tag.
|
||||
*/
|
||||
<!--/*--><![CDATA[/*><!--*/
|
||||
function CodeHighlightOn(elem, id)
|
||||
{
|
||||
var target = document.getElementById(id);
|
||||
if(null != target) {
|
||||
elem.cacheClassElem = elem.className;
|
||||
elem.cacheClassTarget = target.className;
|
||||
target.className = "code-highlighted";
|
||||
elem.className = "code-highlighted";
|
||||
}
|
||||
}
|
||||
function CodeHighlightOff(elem, id)
|
||||
{
|
||||
var target = document.getElementById(id);
|
||||
if(elem.cacheClassElem)
|
||||
elem.className = elem.cacheClassElem;
|
||||
if(elem.cacheClassTarget)
|
||||
target.className = elem.cacheClassTarget;
|
||||
}
|
||||
/*]]>*///-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
<div id="table-of-contents">
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org255850a">1. Init</a>
|
||||
<ul>
|
||||
<li><a href="#org2f3a4e9">1.1. Required Modules</a></li>
|
||||
<li><a href="#org2e97ca2">1.2. Utilities</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org468bdb4">2. Implementation</a></li>
|
||||
<li><a href="#org9989482">3. Calculations</a>
|
||||
<ul>
|
||||
<li><a href="#org9716522">3.1. XS qq -> gamma gamma</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org255850a" class="outline-2">
|
||||
<h2 id="org255850a"><span class="section-number-2">1</span> Init</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
</div>
|
||||
<div id="outline-container-org2f3a4e9" class="outline-3">
|
||||
<h3 id="org2f3a4e9"><span class="section-number-3">1.1</span> Required Modules</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-ipython" id="org91f75e0"><span style="color: #859900; font-weight: bold;">import</span> numpy <span style="color: #859900; font-weight: bold;">as</span> np
|
||||
<span style="color: #859900; font-weight: bold;">import</span> matplotlib.pyplot <span style="color: #859900; font-weight: bold;">as</span> plt
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2e97ca2" class="outline-3">
|
||||
<h3 id="org2e97ca2"><span class="section-number-3">1.2</span> Utilities</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-ipython" id="org41306d9">%run ../utility.py
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org468bdb4" class="outline-2">
|
||||
<h2 id="org468bdb4"><span class="section-number-2">2</span> Implementation</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-ipython" id="org30462c1"><span style="color: #35a69c; font-style: italic;">"""</span>
|
||||
<span style="color: #35a69c; font-style: italic;">Implementation of the analytical cross section for q q_bar -></span>
|
||||
<span style="color: #35a69c; font-style: italic;">gamma gamma</span>
|
||||
|
||||
<span style="color: #35a69c; font-style: italic;">Author: Valentin Boettcher <a href="mailto:hiro%40protagon.space"><hiro@protagon.space></a></span>
|
||||
<span style="color: #35a69c; font-style: italic;">"""</span>
|
||||
|
||||
<span style="color: #859900; font-weight: bold;">import</span> numpy <span style="color: #859900; font-weight: bold;">as</span> np
|
||||
<span style="color: #859900; font-weight: bold;">from</span> scipy.constants <span style="color: #859900; font-weight: bold;">import</span> alpha
|
||||
|
||||
<span style="color: #96A7A9; font-style: italic;"># </span><span style="color: #96A7A9; font-style: italic;">NOTE: a more elegant solution would be a decorator</span>
|
||||
<span style="color: #859900; font-weight: bold;">def</span> <span style="color: #b58900;">energy_factor</span>(charge, esp):
|
||||
<span style="color: #35a69c; font-style: italic;">"""</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> Calculates the factor common to all other values in this module</span>
|
||||
|
||||
<span style="color: #35a69c; font-style: italic;"> Arguments:</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> esp -- center of momentum energy in GeV</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> charge -- charge of the particle in units of the elementary charge</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> """</span>
|
||||
|
||||
<span style="color: #859900; font-weight: bold;">return</span> charge**4*(alpha/esp)**2/6
|
||||
|
||||
|
||||
<span style="color: #859900; font-weight: bold;">def</span> <span style="color: #b58900;">diff_xs</span>(theta, charge, esp):
|
||||
<span style="color: #35a69c; font-style: italic;">"""</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> Calculates the differential cross section as a function of the</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> azimuth angle theta in units of 1/GeV^2.</span>
|
||||
|
||||
<span style="color: #35a69c; font-style: italic;"> Arguments:</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> theta -- azimuth angle</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> esp -- center of momentum energy in GeV</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> charge -- charge of the particle in units of the elementary charge</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> """</span>
|
||||
|
||||
<span style="color: #268bd2;">f</span> = energy_factor(charge, esp)
|
||||
<span style="color: #859900; font-weight: bold;">return</span> f*((np.cos(theta)**+1)/np.sin(theta)**2)
|
||||
|
||||
<span style="color: #859900; font-weight: bold;">def</span> <span style="color: #b58900;">diff_xs_eta</span>(eta, charge, esp):
|
||||
<span style="color: #35a69c; font-style: italic;">"""</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> Calculates the differential cross section as a function of the</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> pseudo rapidity of the photons in units of 1/GeV^2.</span>
|
||||
|
||||
<span style="color: #35a69c; font-style: italic;"> Arguments:</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> eta -- pseudo rapidity</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> esp -- center of momentum energy in GeV</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> charge -- charge of the particle in units of the elementary charge</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> """</span>
|
||||
|
||||
<span style="color: #268bd2;">f</span> = energy_factor(charge, esp)
|
||||
<span style="color: #859900; font-weight: bold;">return</span> f*(2*np.cosh(eta)**2 - 1)
|
||||
|
||||
<span style="color: #859900; font-weight: bold;">def</span> <span style="color: #b58900;">total_xs_eta</span>(eta, charge, esp):
|
||||
<span style="color: #35a69c; font-style: italic;">"""</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> Calculates the total cross section as a function of the pseudo</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> rapidity of the photons in units of 1/GeV^2. If the rapditiy is</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> specified as a tuple, it is interpreted as an interval. Otherwise</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> the interval [-eta, eta] will be used.</span>
|
||||
|
||||
<span style="color: #35a69c; font-style: italic;"> Arguments:</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> eta -- pseudo rapidity (tuple or number)</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> esp -- center of momentum energy in GeV</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> charge -- charge of the particle in units of the elementar charge</span>
|
||||
<span style="color: #35a69c; font-style: italic;"> """</span>
|
||||
|
||||
<span style="color: #268bd2;">f</span> = energy_factor(charge, esp)
|
||||
<span style="color: #859900; font-weight: bold;">if</span> <span style="color: #859900; font-weight: bold;">not</span> <span style="color: #d33682; font-style: italic;">isinstance</span>(eta, <span style="color: #d33682; font-style: italic;">tuple</span>):
|
||||
<span style="color: #268bd2;">eta</span> = (-eta, eta)
|
||||
|
||||
<span style="color: #859900; font-weight: bold;">if</span> <span style="color: #d33682; font-style: italic;">len</span>(eta) != 2:
|
||||
<span style="color: #859900; font-weight: bold;">raise</span> <span style="color: #b58900; font-style: italic;">ValueError</span>(<span style="color: #2aa198;">'Invalid eta cut.'</span>)
|
||||
|
||||
<span style="color: #859900; font-weight: bold;">def</span> <span style="color: #b58900;">F</span>(x):
|
||||
<span style="color: #859900; font-weight: bold;">return</span> np.tanh(x) - 2*x
|
||||
|
||||
<span style="color: #859900; font-weight: bold;">return</span> 2*np.pi*f*(F(eta[0]) - F(eta[1]))
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9989482" class="outline-2">
|
||||
<h2 id="org9989482"><span class="section-number-2">3</span> Calculations</h2>
|
||||
<div class="outline-text-2" id="text-3">
|
||||
</div>
|
||||
<div id="outline-container-org9716522" class="outline-3">
|
||||
<h3 id="org9716522"><span class="section-number-3">3.1</span> XS qq -> gamma gamma</h3>
|
||||
<div class="outline-text-3" id="text-3-1">
|
||||
<p>
|
||||
First, set up the input parameters.
|
||||
</p>
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-ipython" id="org9135f0f"><span style="color: #268bd2;">eta</span> = 2.5
|
||||
<span style="color: #268bd2;">charge</span> = 1/3
|
||||
<span style="color: #268bd2;">esp</span> = 200 <span style="color: #96A7A9; font-style: italic;"># </span><span style="color: #96A7A9; font-style: italic;">GeV</span>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
And now calculate the cross section in picobarn.
|
||||
</p>
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-ipython" id="org1b205cb"><span style="color: #268bd2;">xs_gev</span> = total_xs_eta(eta, charge, esp)
|
||||
<span style="color: #268bd2;">xs_pb</span> = gev_to_pb(xs_gev)
|
||||
<span style="color: #859900; font-weight: bold;">print</span>(tex_value(xs_pb, unit=r<span style="color: #2aa198;">'\pico\barn'</span>, prefix=r<span style="color: #2aa198;">'\eta = '</span>))
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<a href="../../../results/xs/xs.tex">../../../results/xs/xs.tex</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Compared to sherpa, it's pretty close.
|
||||
</p>
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-ipython" id="org2bcb666"><span style="color: #268bd2;">sherpa</span> = 0.0538009
|
||||
xs_pb/sherpa
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
0.9998585425137037
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
I had to set the runcard option <code>EW_SCHEME: alpha0</code> to use the pure
|
||||
QED coupling constant.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="date">Created: 2020-03-28 Sat 11:30</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -66,7 +66,7 @@
|
|||
cosine of the azimuth angle θ in units of 1/GeV².
|
||||
|
||||
Arguments:
|
||||
θ -- azimuth angle
|
||||
cosθ -- cosine of the azimuth angle
|
||||
esp -- center of momentum energy in GeV
|
||||
charge -- charge of the particle in units of the elementary charge
|
||||
"""
|
||||
|
@ -88,6 +88,20 @@
|
|||
f = energy_factor(charge, esp)
|
||||
return f*(2*np.cosh(η)**2 - 1)
|
||||
|
||||
def diff_xs_pt(pt, charge, esp):
|
||||
"""
|
||||
Calculates the differential cross section as a function of the
|
||||
transversal impulse of the photons in units of 1/GeV^2.
|
||||
|
||||
Arguments:
|
||||
η -- transversal impulse
|
||||
esp -- center of momentum energy in GeV
|
||||
charge -- charge of the particle in units of the elementary charge
|
||||
"""
|
||||
|
||||
f = energy_factor(charge, esp)
|
||||
return f*((esp/pt)**2/2 - 1)
|
||||
|
||||
def total_xs_eta(η, charge, esp):
|
||||
"""
|
||||
Calculates the total cross section as a function of the pseudo
|
||||
|
@ -161,12 +175,13 @@ Compared to sherpa, it's pretty close.
|
|||
|
||||
I had to set the runcard option ~EW_SCHEME: alpha0~ to use the pure
|
||||
QED coupling constant.
|
||||
*** Numerical Integration
|
||||
*** Numerical Integration and Sampling
|
||||
Set up the integration and plot intervals.
|
||||
#+begin_src ipython :session :exports both :results raw drawer
|
||||
interval_η = [-η, η]
|
||||
interval = η_to_θ([-η, η])
|
||||
interval_cosθ = np.cos(interval)
|
||||
interval_pt = η_to_pt([0, η], esp/2)
|
||||
plot_interval = [0.1, np.pi-.1]
|
||||
#+end_src
|
||||
|
||||
|
@ -190,7 +205,7 @@ save_fig(fig, 'diff_xs', 'xs', size=[4, 4])
|
|||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
[[file:./obipy-resources/VutHnr.png]]
|
||||
[[file:./obipy-resources/EvlB5m.png]]
|
||||
:END:
|
||||
|
||||
Define the integrand.
|
||||
|
@ -217,7 +232,7 @@ save_fig(fig, 'xs_integrand', 'xs', size=[4, 4])
|
|||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
[[file:./obipy-resources/vkG9zr.png]]
|
||||
[[file:./obipy-resources/lOkEKe.png]]
|
||||
:END:
|
||||
|
||||
|
||||
|
@ -230,7 +245,7 @@ Intergrate σ with the mc method.
|
|||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
(0.05364189417398581, 4.241792187836808e-05)
|
||||
(0.05382327328187836, 4.2568280254619665e-05)
|
||||
:END:
|
||||
|
||||
#+begin_src ipython :session :exports both :results raw drawer output :file xs_mc.tex
|
||||
|
@ -246,6 +261,8 @@ Now we monte-carlo sample our distribution.
|
|||
#+begin_src ipython :session :exports both :results raw drawer
|
||||
cosθ_sample = sample(lambda x: diff_xs_cosθ(x, charge, esp), interval_cosθ)
|
||||
η_sample = sample(lambda x: diff_xs_eta(x, charge, esp), interval_η)
|
||||
pt_sample = sample(lambda x: diff_xs_pt(x, charge, esp), interval_pt)
|
||||
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
|
@ -276,7 +293,7 @@ save_fig(fig, 'histo_cos_theta', 'xs', size=(4,2))
|
|||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
[[file:./obipy-resources/XUeHmM.png]]
|
||||
[[file:./obipy-resources/UtLSDE.png]]
|
||||
:END:
|
||||
|
||||
And the histogram for η.
|
||||
|
@ -287,5 +304,16 @@ save_fig(fig, 'histo_eta', 'xs', size=(4,2))
|
|||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
[[file:./obipy-resources/lxq7dj.png]]
|
||||
[[file:./obipy-resources/I7AUEF.png]]
|
||||
:END:
|
||||
|
||||
And the same for pt.
|
||||
#+begin_src ipython :session :exports both :results raw drawer
|
||||
draw_histo(pt_sample, r'$p_{T}$ [GeV]')
|
||||
save_fig(fig, 'histo_pt', 'xs', size=(4,2))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
[[file:./obipy-resources/Ix0X0o.png]]
|
||||
:END:
|
||||
|
|
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 13 KiB |
|
@ -3811,7 +3811,7 @@
|
|||
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
|
||||
\pgfsetstrokecolor{textcolor}%
|
||||
\pgfsetfillcolor{textcolor}%
|
||||
\pgftext[x=0.466597in,y=2.197917in,,bottom,rotate=90.000000]{\color{textcolor}\rmfamily\fontsize{10.000000}{12.000000}\selectfont \(\displaystyle \frac{d\sigma}{d\omega}\) [pb]}%
|
||||
\pgftext[x=0.466597in,y=2.197917in,,bottom,rotate=90.000000]{\color{textcolor}\rmfamily\fontsize{10.000000}{12.000000}\selectfont \(\displaystyle \frac{d\sigma}{d\Omega}\) [pb]}%
|
||||
\end{pgfscope}%
|
||||
\begin{pgfscope}%
|
||||
\pgfpathrectangle{\pgfqpoint{0.866319in}{0.594444in}}{\pgfqpoint{2.935069in}{3.206944in}}%
|
||||
|
|
BIN
prog/python/qqgg/figs/xs/histo_pt.pdf
Normal file
3955
prog/python/qqgg/figs/xs/histo_pt.pgf
Normal file
1
prog/python/qqgg/figs/xs/histo_pt.tex
Normal file
|
@ -0,0 +1 @@
|
|||
\input{figs/xs/histo_pt.pgf}
|
|
@ -42,6 +42,7 @@ def sample(f, interval, point_density=10000,
|
|||
a, b = interval
|
||||
if b < a:
|
||||
a, b = b, a
|
||||
interval = [a, b]
|
||||
|
||||
np.random.seed(seed)
|
||||
|
||||
|
@ -59,4 +60,5 @@ def sample(f, interval, point_density=10000,
|
|||
points = np.random.uniform([a, 0], [b, 1], [num_points_x, 2])
|
||||
sample_points = points[:, 0] \
|
||||
[np.where(f(points[:, 0]) > points[:, 1]*upper_bound)]
|
||||
|
||||
return sample_points
|
||||
|
|
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 11 KiB |
BIN
prog/python/qqgg/obipy-resources/EvlB5m.png
Normal file
After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 13 KiB |
BIN
prog/python/qqgg/obipy-resources/I7AUEF.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
prog/python/qqgg/obipy-resources/Ix0X0o.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 12 KiB |
BIN
prog/python/qqgg/obipy-resources/UtLSDE.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 17 KiB |