NuclDensityMomentIntegrand.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  Author: Costas Andreopoulos <costas.andreopoulos \at cern.ch>
7  University of Liverpool & STFC Rutherford Appleton Laboratory
8 */
9 //____________________________________________________________________________
10 
11 #include <TMath.h>
12 
16 
17 using namespace genie;
18 
19 //____________________________________________________________________________
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 //____________________________________________________________________________
40 {
41 
42 }
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 //____________________________________________________________________________
60 ROOT::Math::IBaseFunctionOneDim *
62 {
64 }
65 //____________________________________________________________________________
ROOT::Math::IBaseFunctionOneDim * Clone(void) const
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
double Density(double r, int A, double ring=0.)
#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: {0}^{} {A}(r) r^k d^{3}r where {A}(...
#define A
Definition: memgrp.cpp:38
#define pDEBUG
Definition: Messenger.h:63