LHAPDF is hosted by Hepforge, IPPP Durham
LHAPDF  6.1.6
Factories.h
1 // -*- C++ -*-
2 //
3 // This file is part of LHAPDF
4 // Copyright (C) 2012-2016 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 
12 namespace 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 
27 
28 
38  // Config& getConfig();
39  Info& getConfig();
40 
41 
57  PDFSet& getPDFSet(const std::string& setname);
58 
59 
64  PDFInfo* mkPDFInfo(const std::string& setname, int member);
65 
70  PDFInfo* mkPDFInfo(int lhaid);
71 
73 
74 
76 
77 
82  PDF* mkPDF(const std::string& setname, int member);
83 
88  PDF* mkPDF(int lhaid);
89 
101  PDF* mkPDF(const std::string& setname_nmem);
102 
104 
105 
107 
108 
110  void mkPDFs(const std::string& setname, std::vector<PDF*>& pdfs);
111 
113  std::vector<PDF*> mkPDFs(const std::string& setname);
114 
118  template <typename PTR>
119  void mkPDFs(const std::string& setname, std::vector<PTR>& pdfs) {
120  std::vector<PDF*> rawptrs;
121  mkPDFs(setname, rawptrs);
122  pdfs.clear();
123  pdfs.reserve(rawptrs.size());
124  for (const PDF* p : rawptrs)
125  pdfs.push_back(PTR(p));
126  }
127 
129 
130 
132 
133 
138  Interpolator* mkInterpolator(const std::string& name);
139 
140 
145  Extrapolator* mkExtrapolator(const std::string& name);
146 
147 
149 
150 
158  AlphaS* mkAlphaS(const Info& info);
159 
167  AlphaS* mkAlphaS(const std::string& setname);
168 
176  AlphaS* mkAlphaS(const std::string& setname, int member);
177 
185  AlphaS* mkAlphaS(int lhaid);
186 
194  AlphaS* mkBareAlphaS(const std::string& type);
195 
197 
198 
199 }
200 #endif
PDF is the general interface for access to parton density information.
Definition: PDF.h:26
void mkPDFs(const std::string &setname, std::vector< PDF * > &pdfs)
Get all PDFs in a named set (return by filling the supplied vector).
PDF * mkPDF(const std::string &setname, int member)
Info & getConfig()
PDFSet & getPDFSet(const std::string &setname)
AlphaS * mkAlphaS(const Info &info)
Make an AlphaS object from an Info object.
Namespace for all LHAPDF functions and classes.
Definition: AlphaS.h:14
Calculator interface for computing alpha_s(Q2) in various ways.
Definition: AlphaS.h:23
Extrapolator * mkExtrapolator(const std::string &name)
The general interface for interpolating between grid points.
Definition: Interpolator.h:21
AlphaS * mkBareAlphaS(const std::string &type)
Make an AlphaS object of the requested type without a PDF reference.
PDFInfo * mkPDFInfo(const std::string &setname, int member)
Metadata base class for PDFs, PDF sets, or global configuration.
Definition: Info.h:30
Interpolator * mkInterpolator(const std::string &name)
The general interface for extrapolating beyond grid boundaries.
Definition: Extrapolator.h:20