GENIEGenerator
Loading...
Searching...
No Matches
Physics
Coherent
XSection
NuclDensityMomentIntegrand.cxx
Go to the documentation of this file.
1
//____________________________________________________________________________
2
/*
3
Copyright (c) 2003-2025, The GENIE Collaboration
4
For the full text of the license visit http://copyright.genie-mc.org
5
6
Author: Costas Andreopoulos <costas.andreopoulos \at cern.ch>
7
University of Liverpool
8
*/
9
//____________________________________________________________________________
10
11
#include <TMath.h>
12
13
#include "
Framework/Messenger/Messenger.h
"
14
#include "
Physics/NuclearState/NuclearUtils.h
"
15
#include "
Physics/Coherent/XSection/NuclDensityMomentIntegrand.h
"
16
17
using namespace
genie
;
18
19
//____________________________________________________________________________
20
utils::gsl::wrap::NuclDensityMomentIntegrand::NuclDensityMomentIntegrand
(
21
int
A,
int
k):
22
ROOT::Math::IBaseFunctionOneDim()
23
{
24
fA
= A;
25
fK
= k;
26
27
if
(
fK
< 0) {
28
LOG
(
"Nuclear"
,
pDEBUG
)
29
<<
"Sure you want to calculate an inverse nuclear density moment ("
30
<<
"E[r^{"
<<
fK
<<
"}]) ?"
;
31
}
32
if
(
fA
<= 1) {
33
LOG
(
"Nuclear"
,
pWARN
)
34
<<
"The atomic mass number A should be >1 (input value was: "
35
<<
fA
<<
")"
;
36
}
37
}
38
//____________________________________________________________________________
39
utils::gsl::wrap::NuclDensityMomentIntegrand::~NuclDensityMomentIntegrand
()
40
{
41
42
}
43
//____________________________________________________________________________
44
unsigned
int
utils::gsl::wrap::NuclDensityMomentIntegrand::NDim
(
void
)
const
45
{
46
return
1;
47
}
48
//____________________________________________________________________________
49
double
utils::gsl::wrap::NuclDensityMomentIntegrand::DoEval
(
double
r)
const
50
{
51
if
(
fA
<= 1)
return
0;
52
53
double
rho =
utils::nuclear::Density
(r,
fA
);
54
double
rkth = TMath::Power(r,
fK
);
55
56
double
integrand = rho * rkth;
57
return
integrand;
58
}
59
//____________________________________________________________________________
60
ROOT::Math::IBaseFunctionOneDim *
61
utils::gsl::wrap::NuclDensityMomentIntegrand::Clone
(
void
)
const
62
{
63
return
new
utils::gsl::wrap::NuclDensityMomentIntegrand
(
fA
,
fK
);
64
}
65
//____________________________________________________________________________
Messenger.h
pDEBUG
#define pDEBUG
Definition
Messenger.h:63
LOG
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition
Messenger.h:96
pWARN
#define pWARN
Definition
Messenger.h:60
NuclDensityMomentIntegrand.h
NuclearUtils.h
genie::utils::gsl::wrap::NuclDensityMomentIntegrand
Integrand for the calculation of the k^th nuclear density moment: \int_{0}^{\infinity}...
Definition
NuclDensityMomentIntegrand.h:31
genie::utils::gsl::wrap::NuclDensityMomentIntegrand::fK
int fK
Definition
NuclDensityMomentIntegrand.h:41
genie::utils::gsl::wrap::NuclDensityMomentIntegrand::DoEval
double DoEval(double xin) const
Definition
NuclDensityMomentIntegrand.cxx:49
genie::utils::gsl::wrap::NuclDensityMomentIntegrand::~NuclDensityMomentIntegrand
~NuclDensityMomentIntegrand()
Definition
NuclDensityMomentIntegrand.cxx:39
genie::utils::gsl::wrap::NuclDensityMomentIntegrand::Clone
ROOT::Math::IBaseFunctionOneDim * Clone(void) const
Definition
NuclDensityMomentIntegrand.cxx:61
genie::utils::gsl::wrap::NuclDensityMomentIntegrand::fA
int fA
Definition
NuclDensityMomentIntegrand.h:40
genie::utils::gsl::wrap::NuclDensityMomentIntegrand::NDim
unsigned int NDim(void) const
Definition
NuclDensityMomentIntegrand.cxx:44
genie::utils::gsl::wrap::NuclDensityMomentIntegrand::NuclDensityMomentIntegrand
NuclDensityMomentIntegrand(int A, int k)
Definition
NuclDensityMomentIntegrand.cxx:20
genie::utils::nuclear::Density
double Density(double r, int A, double ring=0.)
Definition
NuclearUtils.cxx:396
genie
THE MAIN GENIE PROJECT NAMESPACE
Definition
AlgCmp.h:25
Generated on
for GENIEGenerator by
1.14.0