26 #include "Framework/Conventions/GBuild.h" 37 using std::ostringstream;
38 using namespace genie;
59 TH1D * hst = iter->second;
80 <<
"Null nucleon momentum probability distribution";
83 double p = prob->GetRandom();
84 LOG(
"BodekRitchie",
pINFO) <<
"|p,nucleon| = " <<
p;
88 double costheta = -1. + 2. * rnd->
RndGen().Rndm();
89 double sintheta = TMath::Sqrt(1.-costheta*costheta);
90 double fi = 2 *
kPi * rnd->
RndGen().Rndm();
91 double cosfi = TMath::Cos(fi);
92 double sinfi = TMath::Sin(fi);
94 double px = p*sintheta*cosfi;
95 double py = p*sintheta*sinfi;
96 double pz = p*costheta;
106 if(it !=
fNucRmvE.end()) fCurrRemovalEnergy = it->second;
120 int bin = prob_distr->FindBin(mom);
121 double y = prob_distr->GetBinContent(bin);
122 double dx = prob_distr->GetBinWidth(bin);
136 <<
"Computing P = f(p_nucleon) for: " << target.
AsString();
148 double C = 4. *
kPi * TMath::Power(KF,3) / 3.;
149 double R = 1. / (1.- KF/
fPMax);
150 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 152 LOG(
"BodekRitchie",
pDEBUG) <<
"C = " << C;
158 int npbins = (
int) (1000*fPMax);
159 TH1D * prob =
new TH1D(
"",
"", npbins, 0, fPMax);
160 prob->SetDirectory(0);
162 double dp = fPMax / (npbins-1);
163 double iC = (C>0) ? 1./C : 0.;
164 double kfa_pi_2 = TMath::Power(KF*a/
kPi,2);
166 for(
int i = 0; i < npbins; i++) {
168 double p2 = TMath::Power(p,2);
173 phi2 = iC * (1. - 6.*kfa_pi_2);
175 phi2 = iC * (2*R*kfa_pi_2*TMath::Power(KF/p,4.));
178 double dP_dp = 4*
kPi * p2 * phi2;
179 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 180 LOG(
"BodekRitchie",
pDEBUG) <<
"p = " << p <<
", dP/dp = " << dP_dp;
182 prob->Fill(p, dP_dp);
186 prob->Scale( 1.0 / prob->Integral(
"width") );
190 map<string, TH1D*>::value_type(target.
AsString(),prob));
211 double A = (double) t.
A() ;
213 double Z = (double) t.
Z() ;
214 kF *= TMath::Power( 2*Z/A, 1./3.);
217 double N = (double) t.
N() ;
218 kF *= TMath::Power( 2*N/A, 1./3.);
221 LOG(
"BodekRitchie",
pINFO) <<
"Corrected KF = " << kF;
256 const std::string keyStart =
"RFG-NucRemovalE@Pdg=";
264 if (0 == key.compare(0, keyStart.size(), keyStart.c_str())) {
265 pdg = atoi(key.c_str() + keyStart.size());
268 if (0 != pdg && 0 != Z) {
269 ostringstream key_ss ;
270 key_ss << keyStart <<
pdg;
271 RgKey rgkey = key_ss.str();
274 eb = TMath::Max(eb, 0.);
276 <<
"Nucleus: " << pdg <<
" -> using Eb = " << eb <<
" GeV";
277 fNucRmvE.insert(map<int,double>::value_type(Z,eb));
282 <<
"Finished LoadConfig";
283 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 286 <<
"Z = " << (*it).first <<
"; eb = " << (*it).second;
string AsString(void) const
THE MAIN GENIE PROJECT NAMESPACE
static RandomGen * Instance()
Access instance.
int HitNucPdg(void) const
map< int, double > fNucRmvE
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...
virtual const Registry & GetConfig(void) const
virtual ~FGMBodekRitchie()
virtual double FermiMomentum(const Target &, int nucleon_pdg) const
double BindEnergyPerNucleon(const Target &target)
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
void Configure(const Registry &config)
const RgIMap & GetItemMap(void) const
double BindEnergyPerNucleonParametrization(const Target &target)
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) const
TH1D * ProbDistro(const Target &t) const
double fCurrRemovalEnergy
virtual void LoadConfig()
double Prob(double mom, double w, const Target &t) const
double FermiMomentumForIsoscalarNucleonParametrization(const Target &target)
bool HitNucIsSet(void) const
A registry. Provides the container for algorithm configuration parameters.
TRandom3 & RndGen(void) const
rnd number generator for generic usage
QTextStream & bin(QTextStream &s)
map< string, TH1D * > fProbDistroMap
virtual double FermiMomentum(const Target &t, int nucleon_pdg) const
int IonPdgCodeToZ(int pdgc)
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.
map< RgKey, RegistryItemI * > RgIMap