lhapdf is hosted by Hepforge, IPPP Durham
LHAPDF 6.5.3
Loading...
Searching...
No Matches
Factories.h
1// -*- C++ -*-
2//
3// This file is part of LHAPDF
4// Copyright (C) 2012-2022 The LHAPDF collaboration (see AUTHORS for details)
5//
6#pragma once
7#ifndef LHAPDF_Factories_H
8#define LHAPDF_Factories_H
9
10#include <string>
11
12namespace LHAPDF {
13
14
15 // Forward declarations to avoid circular dependencies
16 class PDF;
17 class Info;
18 class PDFSet;
19 class PDFInfo;
20 class Config;
21 class Interpolator;
22 class Extrapolator;
23 class AlphaS;
24
25
28
31
36 PDF* mkPDF(const std::string& setname, int member);
37
42 PDF* mkPDF(int lhaid);
43
55 PDF* mkPDF(const std::string& setname_nmem);
56
58
59
62
78 PDFSet& getPDFSet(const std::string& setname);
79
81 void mkPDFs(const std::string& setname, std::vector<PDF*>& pdfs);
82
84 std::vector<PDF*> mkPDFs(const std::string& setname);
85
89 template <typename PTR>
90 void mkPDFs(const std::string& setname, std::vector<PTR>& pdfs) {
91 std::vector<PDF*> rawptrs;
92 mkPDFs(setname, rawptrs);
93 pdfs.clear();
94 pdfs.reserve(rawptrs.size());
95 // for (const PDF* p : rawptrs) pdfs.push_back(PTR(p)); //< Reinstate when C++11 is guaranteed, without flags
96 for (size_t i = 0; i < rawptrs.size(); ++i) pdfs.push_back(PTR(rawptrs[i]));
97 }
98
100
101
104
114 // Config& getConfig();
116
121 PDFInfo* mkPDFInfo(const std::string& setname, int member);
122
127 PDFInfo* mkPDFInfo(int lhaid);
128
130
131
134
139 Interpolator* mkInterpolator(const std::string& name);
140
141
146 Extrapolator* mkExtrapolator(const std::string& name);
147
149
150
153
161 AlphaS* mkAlphaS(const Info& info);
162
170 AlphaS* mkAlphaS(const std::string& setname);
171
179 AlphaS* mkAlphaS(const std::string& setname, int member);
180
188 AlphaS* mkAlphaS(int lhaid);
189
197 AlphaS* mkBareAlphaS(const std::string& type);
198
200
202
203}
204#endif
Calculator interface for computing alpha_s(Q2) in various ways.
Definition: AlphaS.h:24
The general interface for extrapolating beyond grid boundaries.
Definition: Extrapolator.h:20
Metadata base class for PDFs, PDF sets, or global configuration.
Definition: Info.h:29
The general interface for interpolating between grid points.
Definition: Interpolator.h:21
Metadata class for PDF members.
Definition: PDFInfo.h:18
Class for PDF-set metadata and manipulation.
Definition: PDFSet.h:104
PDF is the general interface for access to parton density information.
Definition: PDF.h:40
AlphaS * mkBareAlphaS(const std::string &type)
Make an AlphaS object of the requested type without a PDF reference.
AlphaS * mkAlphaS(const Info &info)
Make an AlphaS object from an Info object.
Info & getConfig()
PDFInfo * mkPDFInfo(const std::string &setname, int member)
Extrapolator * mkExtrapolator(const std::string &name)
Interpolator * mkInterpolator(const std::string &name)
PDF * mkPDF(const std::string &setname, int member)
void mkPDFs(const std::string &setname, std::vector< PDF * > &pdfs)
Get all PDFs in a named set (return by filling the supplied vector).
PDFSet & getPDFSet(const std::string &setname)
Namespace for all LHAPDF functions and classes.
Definition: AlphaS.h:14