FragmentationFunctions.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2020, The GENIE Collaboration
4  For the full text of the license visit http://copyright.genie-mc.org
5 
6  Costas Andreopoulos <constantinos.andreopoulos \at cern.ch>
7  University of Liverpool & STFC Rutherford Appleton Laboratory
8 */
9 //____________________________________________________________________________
10 
11 #include <cmath>
12 
14 
15 //___________________________________________________________________________
16 double genie::utils::frgmfunc::collins_spiller_func(double* x, double* par)
17 {
18 // par[0] = N
19 // par[1] = epsilon
20 
21  double z = x[0];
22 
23  double D = par[0] * ( (1.-z)/z + par[1]*(2.-z)/(1.-z) ) *
24  pow(1+z, 2.) * pow(1. - 1./z - par[1]/(1.-z), -2.);
25  return D;
26 }
27 //___________________________________________________________________________
28 double genie::utils::frgmfunc::peterson_func(double* x, double* par)
29 {
30 // par[0] = N
31 // par[1] = epsilon
32 
33  double z = x[0];
34 
35  double D = par[0] / ( z * pow(1. - 1./z - par[1]/(1.-z), 2) );
36 
37  return D;
38 }
39 //___________________________________________________________________________
constexpr T pow(T x)
Definition: pow.h:72
double collins_spiller_func(double *x, double *par)
The Collins-Spiller fragmentation function.
double peterson_func(double *x, double *par)
The Peterson fragmentation function.
#define D
Debug message.
Definition: tclscanner.cpp:775
list x
Definition: train.py:276