GENIEGenerator
Loading...
Searching...
No Matches
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
16
17using namespace genie;
18
19//____________________________________________________________________________
21 int A, int k):
22ROOT::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//____________________________________________________________________________
43//____________________________________________________________________________
45{
46 return 1;
47}
48//____________________________________________________________________________
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//____________________________________________________________________________
60ROOT::Math::IBaseFunctionOneDim *
65//____________________________________________________________________________
#define pDEBUG
Definition Messenger.h:63
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96
#define pWARN
Definition Messenger.h:60
Integrand for the calculation of the k^th nuclear density moment: \int_{0}^{\infinity}...
ROOT::Math::IBaseFunctionOneDim * Clone(void) const
double Density(double r, int A, double ring=0.)
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25