GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
genie::utils::gsl::wrap::NuclDensityMomentIntegrand Class Reference

Integrand for the calculation of the k^th nuclear density moment: {0}^{} {A}(r) r^k d^{3}r where {A}(r) is the nuclear density for a nucleus with atomic mass number A. More...

#include <NuclDensityMomentIntegrand.h>

Inheritance diagram for genie::utils::gsl::wrap::NuclDensityMomentIntegrand:
Inheritance graph
[legend]
Collaboration diagram for genie::utils::gsl::wrap::NuclDensityMomentIntegrand:
Collaboration graph
[legend]

Public Member Functions

 NuclDensityMomentIntegrand (int A, int k)
 
 ~NuclDensityMomentIntegrand ()
 
unsigned int NDim (void) const
 
double DoEval (double xin) const
 
ROOT::Math::IBaseFunctionOneDim * Clone (void) const
 

Private Attributes

int fA
 
int fK
 

Detailed Description

Integrand for the calculation of the k^th nuclear density moment: {0}^{} {A}(r) r^k d^{3}r where {A}(r) is the nuclear density for a nucleus with atomic mass number A.

Author
Costas Andreopoulos <c.andreopoulos cern.ch> University of Liverpool
Created:
July 12, 2019
License:
Copyright (c) 2003-2024, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Definition at line 30 of file NuclDensityMomentIntegrand.h.

Constructor & Destructor Documentation

utils::gsl::wrap::NuclDensityMomentIntegrand::NuclDensityMomentIntegrand ( int  A,
int  k 
)

Definition at line 20 of file NuclDensityMomentIntegrand.cxx.

References genie::units::A, fA, fK, LOG, pDEBUG, and pWARN.

21  :
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 }
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
static constexpr double A
Definition: Units.h:74
#define pWARN
Definition: Messenger.h:60
#define pDEBUG
Definition: Messenger.h:63
utils::gsl::wrap::NuclDensityMomentIntegrand::~NuclDensityMomentIntegrand ( )

Definition at line 39 of file NuclDensityMomentIntegrand.cxx.

40 {
41 
42 }

Member Function Documentation

ROOT::Math::IBaseFunctionOneDim * utils::gsl::wrap::NuclDensityMomentIntegrand::Clone ( void  ) const
double utils::gsl::wrap::NuclDensityMomentIntegrand::DoEval ( double  xin) const

Definition at line 49 of file NuclDensityMomentIntegrand.cxx.

References genie::utils::nuclear::Density().

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 }
double Density(double r, int A, double ring=0.)
unsigned int utils::gsl::wrap::NuclDensityMomentIntegrand::NDim ( void  ) const

Definition at line 44 of file NuclDensityMomentIntegrand.cxx.

45 {
46  return 1;
47 }

Member Data Documentation

int genie::utils::gsl::wrap::NuclDensityMomentIntegrand::fA
private

Definition at line 40 of file NuclDensityMomentIntegrand.h.

Referenced by NuclDensityMomentIntegrand().

int genie::utils::gsl::wrap::NuclDensityMomentIntegrand::fK
private

Definition at line 41 of file NuclDensityMomentIntegrand.h.

Referenced by NuclDensityMomentIntegrand().


The documentation for this class was generated from the following files: