TMDlib is hosted by Hepforge, IPPP Durham
TMDlib.h
Go to the documentation of this file.
1 #ifndef TMDlib_H
2 #define TMDlib_H
3 
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include <string.h>
7 #include <cstring>
8 #include <math.h>
9 #include <vector>
10 #include <iostream>
11 
12 using namespace std;
13 
14 namespace TMDlib {
15 
16  double ipow(double,int);
17  extern int iipow(int,int);
18  // to initialise TMD with name ( and optionally with iset and imode
19  void TMDinit(const string name, int irep, int imode ) ;
20  void TMDinit(const string name, int irep ) ;
21  void TMDinit(const string name) ;
22  void TMDinit(int & iset) ;
23 
24  // TMDpdf 1st to return TMD value at x,xbar,kt,mu as a vector
25  vector<double> TMDpdf( double x, double xbar, double kt, double mu) ;
26  // TMDpdf 2nd to return TMD value at x,xbar,kt,mu as a vector
27  vector<double> TMDpdf(int kf, double x, double xbar, double kt, double mu) ;
28  // TMDpdf 3rd to return TMD value at x,xbar,kt,mu as a vector
29  void TMDpdf( double x, double xbar, double kt, double mu, vector<double>& xpq) ;
30  // TMDpdf 4th to return TMD value at x,xbar,kt,mu as a vector
31  void TMDpdf(int kf, double x, double xbar, double kt, double mu, vector<double>& xpq) ;
32  // TMDpdf 5th to return TMD value at x,xbar,kt,mu for flavor
33  void TMDpdf( double x, double xbar, double kt, double mu, double& uval, double& dval, double& sea, double& charm, double& bottom, double& gluon );
34  // TMDpdf 6th to return TMD value at x,xbar,kt,mu for flavor
35  void TMDpdf(int kf, double x, double xbar, double kt, double mu, double& uval, double& dval, double& sea, double& charm, double& bottom, double& gluon );
36  // TMDpdf 7th to return TMD value at x,xbar,kt,mu for flavor
37  void TMDpdf( double x, double xbar, double kt, double mu, double& up, double& ubar, double& dn, double& dbar, double& strange, double& sbar, double& charm, double& cbar, double& bottom, double& bbar, double& gluon );
38  // TMDpdf 8th to return TMD value at x,xbar,kt,mu for flavor
39  void TMDpdf(int kf, double x, double xbar, double kt, double mu, double& up, double& ubar, double& dn, double& dbar, double& strange, double& sbar, double& charm, double& cbar, double& bottom, double& bbar, double& gluon );
40 
41  double TMDalphas(double mu);
42 
43  double TMDgetLam4( );
44  int TMDgetNf( );
45  int TMDgetOrderAlphaS( );
46  int TMDgetOrderPDF( );
47  double TMDgetXmin();
48  double TMDgetXmax();
49  double TMDgetQ2min();
50  double TMDgetQ2max();
51  int TMDnumberPDF(string name);
52 // tools
53 
54  double Cdhfint(int narg, double arg[500], int nent[500], double ent[500], double table[1000000]);
55  void polint(double xa[], double ya[], int n, double x, double& y, double& dy) ;
56  void polin3(double x1a[], double x2a[], double x3a[], double ya[][1][4], int m, int n, int o, double x1, double x2, double x3, double& y, double& dy);
57 
58 
59 // ccfm stuff
60  void ccfmuPDF(int kf, double x, double kt, double p, double& up, double& ubar, double& dn, double& dbar, double& strange, double& sbar, double& charm, double& cbar, double& bottom, double& bbar, double& top, double& tbar, double& phot, double& gluon ) ;
61  void ccfmiPDF(int kf, double x, double p, double& up, double& ubar, double& dn, double& dbar, double& strange, double& sbar, double& charm, double& cbar, double& bottom, double& bbar, double& gluon ) ;
62 
63 
64 // GBW
65  void gbwuPDFlight(double x, double kt, double& gluon ) ;
66  void gbwuPDFcharm(double x, double kt, double& gluon ) ;
67  //double blueml(double x, double kt, double p ) ;
68 
69 
70 // SBRS
71  void sbrsPDF(int irep, int imode, double x, double kt, double p, double& uval, double& dval, double& sea, double& charm);
72 
73 // Kutak Sapeta
74  void ksPDF(double x, double kt, double p, double& upl, double& dn, double& sea, double& charm, double& bottom, double& gluon);
75  void ksuPDFgrid(int kf, double x, double kt , double p, double& up, double& dn, double& sea, double& charm, double& bottom, double& gluon ) ;
76  void ksDLCPDF(double x, double kt, double p, double& up, double& ubar, double& down, double& dbar, double& strange, double& sbar, double& charm,
77  double& cbar, double& bottom, double& bbar, double& gluon);
78  void ksBHKSPDF(double x, double kt, double p, double& up, double& ubar, double& down, double& dbar, double& strange, double& sbar, double& charm,
79  double& cbar, double& bottom, double& bbar, double& gluon);
80 
81 // M. Echevaria TMDgluon
82  void tmd_ME(int kf, double x, double kt , double p, double& uval, double& dval, double& sea, double& charm, double& bottom, double& gluon ) ;
83 
84  extern "C" {
85  // Fortran routines
86  // remember FORTRAN passes pointer (instead of values) to subroutines
87  #define initalphas initalphas_
88  void initalphas(int* iord, double* fr2, double* mur , double* asmur, double* mc, double* mb, double* mt);
89  #define unpol unpol_
90  void unpol(int* in , double* scale, double* scale2, double* bc, double* lam1, double* lam2, double* x_ME, double* kt_ME,double* Qf, double* result );
91  // #define asmur _asmur
92  #define blueml blueml_
93  double blueml(double* x, double* kt, double* p ) ;
94 
95  }
96 
97 
98 
99 
100 }
101 
102 #endif