-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from N3PDF/docs1
Documentation - first batch
- Loading branch information
Showing
30 changed files
with
1,265 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
name: yadism - unit tests | ||
|
||
on: | ||
- push | ||
push: | ||
branches-ignore: | ||
- '*docs*' | ||
|
||
defaults: | ||
run: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# TMC | ||
How APFEL computes target mass corrections | ||
|
||
## Variable definition | ||
Source: `F2light.f` and similar | ||
|
||
As in the docs pdf (`dis.pdf`) aux variables are defined (`xi`, `rho` that is | ||
called `rhop` in the code) directly in `F2light.f` | ||
|
||
## Integration | ||
Source: `ConvolutePDFwithDISOperators.f` for `I2` | ||
Source: `ComputeDISOperators.f` for `OpI2` | ||
|
||
The integration is already provided, since it is precomputed on a grid. The | ||
matrix of coefficients it's called `I2(ihq,g,alpha)` where: | ||
- `ihq` is the flavour number (so 3 for light, 4 for charm and so on) | ||
- `g` is the subgrid number (since APFEL is breaking the global grid currently | ||
we don't know why), 0 means the joint (total) grid | ||
- `alpha` is the replacement for `xi` value, i.e. it is its discretization over | ||
the grid | ||
|
||
Two kinds of `I2` are provided: | ||
- `I2` as described above, used when pdf are already applied | ||
- `OpI2`, that is the correspondent of `OpF2`, in which instead of a number it | ||
provides an array to be dotted with the pdf once available (so it has one | ||
index more w.r.t. the former, since it is waiting for the pdf array) | ||
|
||
Since `OpI2` has one interpolation index more it has also another index on a | ||
subgrid (in order to identify the interpolation two index are used, one to get | ||
the subgrid and the other internal to the subgrid), so the signature it is | ||
`OpI2(jgrid,ihq,ipdf,alpha,beta)`: | ||
- `jgrid` and `alpha` are the subgrid and internal index for `xi` interpolant | ||
- `ipdf` and `beta` are the subgrid and internal index for pdf interpolant | ||
- `ihq` flavour index, as before | ||
|
||
### Integration | ||
Source: `RSLintegralsDIS.f` for `J_TMC` | ||
Source: `Evolution/interpolants.f` for `w_int` | ||
|
||
The actual integral of `I2` it's performed not on `F2(x)/x^2`, but on the basis | ||
functions (as documented in `dis.pdf` eq. 2.5), and the result of integration of | ||
basis functions is provided as another matrix `J_TMC(igrid,beta,alpha)`: | ||
- `igrid` and `alpha` are the subgrid and internal index for `xi` interpolant | ||
- `beta` is the index on which the sum is performed (the discrete replacement of | ||
`F2` integration) | ||
|
||
`J_TMC` it's defined integrating (it uses `dgauss`) the `w_int(k,beta,x)` | ||
polynomials: | ||
- `k` is the interpolation degree | ||
- `beta` is the interpolant index | ||
- `x` is the argument of the polynomial function | ||
|
||
For integrating `J_TMC` polynomials of degree 1 are used. | ||
|
||
#### About integration routine | ||
Note that `J_TMC` is computed through `dgauss` function of `cernlib` (see | ||
http://hep.fi.infn.it/cernlib.pdf pp.94-95), which signature is | ||
`dgauss(integrand,a,b,eps)` | ||
- `integrand` is the integrand | ||
- `a` and `b` are extremes of integration | ||
- `eps` is the required precision (relative is the integration `|I|>1`, otherwise | ||
absolute) | ||
Since the integrand in APFEL are interpolants of degree 1 they are always | ||
smaller than 1, and with a domain smaller than `[0,1]`, so we have for sure | ||
`|I|<1`. Since APFEL is also requiring an `eps = 1e-5` the *absolute* | ||
integration error of APFEL it's probably of that order of magnitude. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{% extends '!footer.html' %} | ||
|
||
{% block extrafooter %} | ||
<!-- your html code here --> | ||
<p style="text-align: center;">Made with ❤ and ⏲ by N3PDF team.</p> | ||
|
||
{%- if hasdoc('copyright') %} | ||
{% set path = pathto('copyright') %} | ||
{% set copyright = copyright|e %} | ||
<p style="text-align: center; font-size: 7pt;">© <a href="{{ path }}">{% trans %}Copyright{% endtrans %}</a> {{ copyright }}</p> | ||
{%- else %} | ||
{% set copyright = copyright|e %} | ||
<p style="text-align: center; font-size: 7pt;">© {% trans %}Copyright{% endtrans %} {{ copyright }}</p> | ||
{%- endif %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Development | ||
=========== | ||
|
||
Feature to be implemented | ||
------------------------- | ||
Known list of features to be implemented | ||
|
||
|
||
Known bugs | ||
---------- | ||
like behaviour Q2 APFEl & blabla | ||
|
||
Testing | ||
------- | ||
Description of testing workflows. | ||
|
||
Unit testing | ||
"""""""""""" | ||
Where are used unit tests and other interesting facts related to them. | ||
|
||
List and description of unit tests (currently only ``convolution`` related | ||
stuffs). | ||
|
||
APFEL benchmarks | ||
"""""""""""""""" | ||
Organization (db and so on), matrix (all the alternatives tested) and other | ||
benchmark related stuffs description. | ||
|
||
How to use benchmark tools | ||
'''''''''''''''''''''''''' | ||
Description of script ecosystem for running benchmarks and further analyzing | ||
their output (logs). | ||
|
||
Other stuffs | ||
------------ | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
todo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# conf for docutils | ||
|
||
[restructuredtext parser] | ||
#syntax_highlight = short |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Interpolation | ||
============= | ||
|
||
Interpolation kicks in the game in a lot of ways, namely 3: | ||
- there is an interpolation involved at the **pdf level**, that is really the only | ||
one `yadism` cares about, and is managed through `eko`: pdfs are delivered as | ||
an array of coefficient over an interpolation basis made of polynomials (of | ||
`x` or `logx`, chosen as an option) | ||
- there is an interpolation involved at the **structure functions level**: this | ||
is done by `APFEL` since it's precomputing the structure functions on the | ||
xgrid at initialization time, and when asked for a specific observable it | ||
interpolates it on the precomputed grid | ||
this is not done in `yadism` since we are computing the structure functions | ||
only when required, so we are computing exactly on that point and there is no | ||
need to interpolate it | ||
*note*: we can also do this quite easily, if required or for benchmarking, | ||
since the caching system makes it easier to switch on *precomputing model*, | ||
because if we setup the interpolation the precomputed grid is already stored, | ||
even if as a cache | ||
*note2*: everything in `APFEL` is discretized, so not only the structure | ||
functions themselves, but also everything that is integrated or the result of | ||
an integral (such as `I2` in `TMC`, see 2.5 in dis pdf in `apfel` docs, there | ||
is already a basis function involved to discretized the integrand, but also | ||
the result will be discretized on `xi` inserting other basis functions, as it | ||
is done in `F2light.f` for example) | ||
- there is a second *really bad* interpolation involved at the *level of the | ||
pdf* (at least in benchmarking), that is the `lhapdf` one: in order to get | ||
the pdf to interpolate we are using `lhapdf` grids. So `eko`, e.g., it's | ||
making pdf interpolation over our `xgrid`, but when evaluating the `pdf` on | ||
our `xgrid` you should take care that this is already interpolated, since our | ||
`xgrid` may not match the `lhapdf` one. | ||
This is done in both `yadism` and `APFEL`, so it's not a source of | ||
discrepancy, but it's make it approximate w.r.t. to the exact shape (for | ||
example when we are generating the `lhapdf` grids with a known function) | ||
*note*: this is not happening in `toyLH`, since we are not passing through | ||
`lhapdf` in that case, but mimic it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.