FragmentationFunctions.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2019, The GENIE Collaboration
4  For the full text of the license visit http://copyright.genie-mc.org
5  or see $GENIE/LICENSE
6 
7  Author: Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk>
8  University of Liverpool & STFC Rutherford Appleton Lab - June 15, 2004
9 
10  For documentation see the corresponding header file.
11 
12  Important revisions after version 2.0.0 :
13 
14 */
15 //____________________________________________________________________________
16 
17 #include <cmath>
18 
20 
21 //___________________________________________________________________________
23 {
24 // par[0] = N
25 // par[1] = epsilon
26 
27  double z = x[0];
28 
29  double D = par[0] * ( (1.-z)/z + par[1]*(2.-z)/(1.-z) ) *
30  pow(1+z, 2.) * pow(1. - 1./z - par[1]/(1.-z), -2.);
31  return D;
32 }
33 //___________________________________________________________________________
35 {
36 // par[0] = N
37 // par[1] = epsilon
38 
39  double z = x[0];
40 
41  double D = par[0] / ( z * pow(1. - 1./z - par[1]/(1.-z), 2) );
42 
43  return D;
44 }
45 //___________________________________________________________________________
46 
constexpr T pow(T x)
Definition: pow.h:72
Int_t par
Definition: SimpleIterate.C:24
double collins_spiller_func(double *x, double *par)
The Collins-Spiller fragmentation function.
double peterson_func(double *x, double *par)
The Peterson fragmentation function.
z
Definition: test.py:28