PDFxTMDLib  1.0.0
PDFUtils.h
Go to the documentation of this file.
1 #pragma once
3 
4 namespace PDFxTMD
5 {
6 template <typename Reader> bool isInRangeX(const Reader &reader, double x)
7 {
8  auto [xmin, xmax] = reader.getBoundaryValues(PhaseSpaceComponent::X);
9  return x >= xmin && x <= xmax;
10 }
11 template <typename Reader> bool isInRangeQ2(const Reader &reader, double q2)
12 {
13  auto [q2min, q2max] = reader.getBoundaryValues(PhaseSpaceComponent::Q2);
14  return q2 >= q2min && q2 <= q2max;
15 }
16 template <typename Reader> bool isInRangeKt2(const Reader &reader, double kt2)
17 {
18  auto [kt2min, kt2max] = reader.getBoundaryValues(PhaseSpaceComponent::Kt2);
19  return kt2 >= kt2min && kt2 <= kt2max;
20 }
21 // Check if the point (x, mu) is within the range of the PDF
22 // set
23 template <typename Reader> inline bool isInRange(const Reader &reader, double x, double mu2)
24 {
25  const auto [xmin, xmax] = std::move(reader.getBoundaryValues(PhaseSpaceComponent::X));
26  const auto [q2min, q2max] = std::move(reader.getBoundaryValues(PhaseSpaceComponent::Q2));
27  return x >= xmin && x <= xmax && mu2 >= q2min && mu2 <= q2max;
28 }
29 template <typename Reader> bool isInRange(const Reader &reader, double x, double kt2, double mu2)
30 {
31  return isInRange<Reader>(reader, x, mu2) && isInRangeKt2<Reader>(reader, kt2);
32 }
33 } // namespace PDFxTMD
Definition: AllFlavorsShape.h:14
bool isInRangeX(const Reader &reader, double x)
Definition: PDFUtils.h:6
bool isInRange(const Reader &reader, double x, double mu2)
Definition: PDFUtils.h:23
bool isInRangeKt2(const Reader &reader, double kt2)
Definition: PDFUtils.h:16
bool isInRangeQ2(const Reader &reader, double q2)
Definition: PDFUtils.h:11
int mu2
Definition: pdfset_tutorial.py:14
int kt2
Definition: pdfset_tutorial.py:15