19 #include "Framework/Conventions/GBuild.h" 29 using std::ostringstream;
30 using namespace genie;
53 double hitNucleonRadius)
const 62 TH1D * prob = this->
ProbDistro(target,hitNucleonRadius);
65 <<
"Null nucleon momentum probability distribution";
68 double p = prob->GetRandom();
70 LOG(
"LocalFGM",
pINFO) <<
"|p,nucleon| = " <<
p;
74 double costheta = -1. + 2. * rnd->
RndGen().Rndm();
75 double sintheta = TMath::Sqrt(1.-costheta*costheta);
76 double fi = 2 *
kPi * rnd->
RndGen().Rndm();
77 double cosfi = TMath::Cos(fi);
78 double sinfi = TMath::Sin(fi);
80 double px = p*sintheta*cosfi;
81 double py = p*sintheta*sinfi;
82 double pz = p*costheta;
90 if(it !=
fNucRmvE.end()) fCurrRemovalEnergy = it->second;
97 double hitNucleonRadius)
const 100 TH1D * prob = this->
ProbDistro(target, hitNucleonRadius);
101 int bin = prob->FindBin(p);
102 double y = prob->GetBinContent(bin);
103 double dx = prob->GetBinWidth(bin);
115 <<
"Computing P = f(p_nucleon) for: " << target.
AsString()
116 <<
", Nucleon Radius = " <<
r;
118 <<
", P(max) = " <<
fPMax;
135 double C = 4. *
kPi * TMath::Power(KF,3) / 3.;
139 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 148 TH1D * prob =
new TH1D(
"",
"", npbins, 0,
fPMax);
149 prob->SetDirectory(0);
151 double dp =
fPMax / (npbins-1);
155 for(
int i = 0; i < npbins; i++) {
157 double p2 = TMath::Power(p,2);
171 double dP_dp = 4*
kPi * p2 * phi2;
172 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 173 LOG(
"LocalFGM",
pDEBUG) <<
"p = " << p <<
", dP/dp = " << dP_dp;
175 prob->Fill(p, dP_dp);
179 prob->Scale( 1.0 / prob->Integral(
"width") );
189 double numNuc = (double) ( (is_p) ? t.
Z() : t.
N() );
224 LOG(
"LocalFGM",
pFATAL) <<
"Momentum CutOff greater than Momentum Max";
234 for(
int Z=1;
Z<140;
Z++) {
235 for(
int A=
Z;
A<3*
Z;
A++) {
238 key <<
"RFG-NucRemovalE@Pdg=" << pdgc;
239 RgKey rgkey = key.str();
241 if (
GetParam( rgkey, eb,
false ) ) {
242 eb = TMath::Max(eb, 0.);
243 LOG(
"LocalFGM",
pINFO) <<
"Nucleus: " << pdgc <<
" -> using Eb = " << eb <<
" GeV";
244 fNucRmvE.insert(map<int,double>::value_type(Z,eb));
string AsString(void) const
THE MAIN GENIE PROJECT NAMESPACE
static RandomGen * Instance()
Access instance.
int HitNucPdg(void) const
double Density(double r, int A, double ring=0.)
double Prob(double p, double w, const Target &t, double hitNucleonRadius) const
Pure abstract base class. Defines the NuclearModelI interface to be implemented by any physics model ...
A singleton holding random number generator classes. All random number generation in GENIE should tak...
double BindEnergyPerNucleon(const Target &target)
map< int, double > fNucRmvE
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
virtual void Configure(const Registry &config)
bool GenerateNucleon(const Target &t, double hitNucleonRadius) const
double fCurrRemovalEnergy
virtual void LoadConfig()
TH1D * ProbDistro(const Target &t, double r) const
bool HitNucIsSet(void) const
A registry. Provides the container for algorithm configuration parameters.
TRandom3 & RndGen(void) const
rnd number generator for generic usage
int IonPdgCode(int A, int Z)
QTextStream & bin(QTextStream &s)
virtual double LocalFermiMomentum(const Target &t, int nucleon_pdg, double radius) const
static constexpr double fermi
void Configure(const Registry &config)
bool GetParamDef(const RgKey &name, T &p, const T &def) const
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
Root of GENIE utility namespaces.