GENIEGenerator
Loading...
Searching...
No Matches
genie::EffectiveSF Class Reference

An effective spectral function to match psi' superscaling. Implements the NuclearModelI interface. More...

#include <EffectiveSF.h>

Inheritance diagram for genie::EffectiveSF:
[legend]
Collaboration diagram for genie::EffectiveSF:
[legend]

Public Member Functions

 EffectiveSF ()
 EffectiveSF (string config)
virtual ~EffectiveSF ()
bool GenerateNucleon (const Target &t) const
double Prob (double mom, double w, const Target &t) const
NuclearModel_t ModelType (const Target &) const
void Configure (const Registry &config)
void Configure (string param_set)
virtual bool GenerateNucleon (const Target &tgt, double hitNucleonRadius) const
virtual double Prob (double p, double w, const Target &tgt, double hitNucleonRadius) const
Public Member Functions inherited from genie::NuclearModelI
virtual ~NuclearModelI ()
virtual double FermiMomentum (const Target &, int nucleon_pdg) const
virtual double LocalFermiMomentum (const Target &, int nucleon_pdg, double radius) const
double RemovalEnergy (void) const
double Momentum (void) const
const TVector3 & Momentum3 (void) const
FermiMoverInteractionType_t GetFermiMoverInteractionType (void) const
void SetMomentum3 (const TVector3 &mom) const
void SetRemovalEnergy (double E) const
Public Member Functions inherited from genie::Algorithm
virtual ~Algorithm ()
virtual void FindConfig (void)
virtual const RegistryGetConfig (void) const
RegistryGetOwnedConfig (void)
virtual const AlgIdId (void) const
 Get algorithm ID.
virtual AlgStatus_t GetStatus (void) const
 Get algorithm status.
virtual bool AllowReconfig (void) const
virtual AlgCmp_t Compare (const Algorithm *alg) const
 Compare with input algorithm.
virtual void SetId (const AlgId &id)
 Set algorithm ID.
virtual void SetId (string name, string config)
const AlgorithmSubAlg (const RgKey &registry_key) const
void AdoptConfig (void)
void AdoptSubstructure (void)
virtual void Print (ostream &stream) const
 Print algorithm info.

Private Member Functions

TH1D * ProbDistro (const Target &t) const
TH1D * MakeEffectiveSF (const Target &target) const
TH1D * MakeEffectiveSF (double bs, double bp, double alpha, double beta, double c1, double c2, double c3, const Target &target) const
double ReturnBindingEnergy (const Target &target) const
double GetTransEnh1p1hMod (const Target &target) const
double Returnf1p1h (const Target &target) const
void LoadConfig (void)

Private Attributes

map< string, TH1D * > fProbDistroMap
double fPMax
double fPCutOff
bool fEjectSecondNucleon2p2h
bool fUseElFFTransEnh
map< int, double > fNucRmvE
map< int, double > f1p1hMap
map< int, std::vector< double > > fProbDistParams
map< int, double > fTransEnh1p1hMods
map< pair< int, int >, double > fRangeNucRmvE
map< pair< int, int >, double > fRange1p1hMap
map< pair< int, int >, std::vector< double > > fRangeProbDistParams
map< pair< int, int >, double > fRangeTransEnh1p1hMods

Additional Inherited Members

Static Public Member Functions inherited from genie::Algorithm
static string BuildParamVectKey (const std::string &comm_name, unsigned int i)
static string BuildParamVectSizeKey (const std::string &comm_name)
static string BuildParamMatKey (const std::string &comm_name, unsigned int i, unsigned int j)
static string BuildParamMatRowSizeKey (const std::string &comm_name)
static string BuildParamMatColSizeKey (const std::string &comm_name)
Protected Member Functions inherited from genie::NuclearModelI
 NuclearModelI ()
 NuclearModelI (std::string name)
 NuclearModelI (std::string name, std::string config)
const string & FermiMomentumTableName () const
const genie::FermiMomentumTableFermiMomentumTable () const
Protected Member Functions inherited from genie::Algorithm
 Algorithm ()
 Algorithm (string name)
 Algorithm (string name, string config)
void Initialize (void)
void DeleteConfig (void)
void DeleteSubstructure (void)
RegistryExtractLocalConfig (const Registry &in) const
RegistryExtractLowerConfig (const Registry &in, const string &alg_key) const
 Split an incoming configuration Registry into a block valid for the sub-algo identified by alg_key.
template<class T>
bool GetParam (const RgKey &name, T &p, bool is_top_call=true) const
template<class T>
bool GetParamDef (const RgKey &name, T &p, const T &def) const
template<class T>
int GetParamVect (const std::string &comm_name, std::vector< T > &v, bool is_top_call=true) const
 Handle to load vectors of parameters.
int GetParamVectKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
template<class T>
int GetParamMat (const std::string &comm_name, TMatrixT< T > &mat, bool is_top_call=true) const
 Handle to load matrix of parameters.
template<class T>
int GetParamMatSym (const std::string &comm_name, TMatrixTSym< T > &mat, bool is_top_call=true) const
int GetParamMatKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
int AddTopRegistry (Registry *rp, bool owns=true)
 add registry with top priority, also update ownership
int AddLowRegistry (Registry *rp, bool owns=true)
 add registry with lowest priority, also update ownership
int MergeTopRegistry (const Registry &r)
int AddTopRegisties (const vector< Registry * > &rs, bool owns=false)
 Add registries with top priority, also udated Ownerships.
Protected Attributes inherited from genie::NuclearModelI
double fCurrRemovalEnergy
TVector3 fCurrMomentum
FermiMoverInteractionType_t fFermiMoverInteractionType
Protected Attributes inherited from genie::Algorithm
bool fAllowReconfig
bool fOwnsSubstruc
 true if it owns its substructure (sub-algs,...)
AlgId fID
 algorithm name and configuration set
vector< Registry * > fConfVect
vector< bool > fOwnerships
 ownership for every registry in fConfVect
AlgStatus_t fStatus
 algorithm execution status
AlgMapfOwnedSubAlgMp
 local pool for owned sub-algs (taken out of the factory pool)

Detailed Description

An effective spectral function to match psi' superscaling. Implements the NuclearModelI interface.

References:\n http://arxiv.org/abs/1405.0583
Author
Brian Coopersmith, University of Rochester
Created:\n April 02, 2014
License:\n Copyright (c) 2003-2025, The GENIE Collaboration
For the full text of the license visit http://copyright.genie-mc.org

Definition at line 34 of file EffectiveSF.h.

Constructor & Destructor Documentation

◆ EffectiveSF() [1/2]

EffectiveSF::EffectiveSF ( )

Definition at line 38 of file EffectiveSF.cxx.

38 :
39NuclearModelI("genie::EffectiveSF")
40{
41
42}

References genie::NuclearModelI::NuclearModelI().

◆ EffectiveSF() [2/2]

EffectiveSF::EffectiveSF ( string config)

Definition at line 44 of file EffectiveSF.cxx.

44 :
45NuclearModelI("genie::EffectiveSF", config)
46{
47
48}

References genie::NuclearModelI::NuclearModelI().

◆ ~EffectiveSF()

EffectiveSF::~EffectiveSF ( )
virtual

Definition at line 52 of file EffectiveSF.cxx.

53{
54 map<string, TH1D*>::iterator iter = fProbDistroMap.begin();
55 for( ; iter != fProbDistroMap.begin(); ++iter) {
56 TH1D * hst = iter->second;
57 if(hst) {
58 delete hst;
59 hst=0;
60 }
61 }
62 fProbDistroMap.clear();
63}
map< string, TH1D * > fProbDistroMap
Definition EffectiveSF.h:72

References fProbDistroMap.

Member Function Documentation

◆ Configure() [1/2]

void EffectiveSF::Configure ( const Registry & config)
virtual

Configure the algorithm with an external registry The registry is merged with the top level registry if it is owned, Otherwise a copy of it is added with the highest priority

Reimplemented from genie::Algorithm.

Definition at line 271 of file EffectiveSF.cxx.

272{
273 Algorithm::Configure(config);
274 this->LoadConfig();
275}
virtual void Configure(const Registry &config)
Definition Algorithm.cxx:62

References genie::Algorithm::Configure(), and LoadConfig().

◆ Configure() [2/2]

void EffectiveSF::Configure ( string config)
virtual

Configure the algorithm from the AlgoConfigPool based on param_set string given in input An algorithm contains a vector of registries coming from different xml configuration files, which are loaded according a very precise prioriy This methods will load a number registries in order of priority: 1) "Tunable" parameter set from CommonParametes. This is loaded with the highest prioriry and it is designed to be used for tuning procedure Usage not expected from the user. 2) For every string defined in "CommonParame" the corresponding parameter set will be loaded from CommonParameter.xml 3) parameter set specified by the config string and defined in the xml file of the algorithm 4) if config is not "Default" also the Default parameter set from the same xml file will be loaded Effectively this avoids the repetion of a parameter when it is not changed in the requested configuration

Reimplemented from genie::Algorithm.

Definition at line 277 of file EffectiveSF.cxx.

278{
279 Algorithm::Configure(param_set);
280 this->LoadConfig();
281}

References genie::Algorithm::Configure(), and LoadConfig().

◆ GenerateNucleon() [1/2]

bool EffectiveSF::GenerateNucleon ( const Target & t) const
virtual

Implements genie::NuclearModelI.

Definition at line 67 of file EffectiveSF.cxx.

68{
69 assert(target.HitNucIsSet());
71 fCurrMomentum.SetXYZ(0,0,0);
72
73 //-- set fermi momentum vector
74 //
75
76 if ( target.A() > 1 ) {
77 TH1D * prob = this->ProbDistro(target);
78 if(!prob) {
79 LOG("EffectiveSF", pNOTICE)
80 << "Null nucleon momentum probability distribution";
81 exit(1);
82 }
83
84 double p = prob->GetRandom();
85
86#ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
87 LOG("EffectiveSF", pDEBUG) << "|p,nucleon| = " << p;
88#endif
89
90 RandomGen * rnd = RandomGen::Instance();
91
92 double costheta = -1. + 2. * rnd->RndGen().Rndm();
93 double sintheta = TMath::Sqrt(1.-costheta*costheta);
94 double fi = 2 * kPi * rnd->RndGen().Rndm();
95 double cosfi = TMath::Cos(fi);
96 double sinfi = TMath::Sin(fi);
97
98 double px = p*sintheta*cosfi;
99 double py = p*sintheta*sinfi;
100 double pz = p*costheta;
101
102 fCurrMomentum.SetXYZ(px, py, pz);
103
104 }
105
106 //-- set removal energy
107 //
108
110 double f1p1h = this->Returnf1p1h(target);
111 // Since TE increases the QE peak via a 2p2h process, we decrease f1p1h
112 // in order to increase the 2p2h interaction to account for this enhancement.
113 f1p1h /= this->GetTransEnh1p1hMod(target);
114 if ( RandomGen::Instance() -> RndGen().Rndm() < f1p1h) {
116 } else if (fEjectSecondNucleon2p2h) {
118 } else {
120 }
121
122 return true;
123}
#define pNOTICE
Definition Messenger.h:61
#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
double Returnf1p1h(const Target &target) const
double GetTransEnh1p1hMod(const Target &target) const
double ReturnBindingEnergy(const Target &target) const
TH1D * ProbDistro(const Target &t) const
FermiMoverInteractionType_t fFermiMoverInteractionType
static RandomGen * Instance()
Access instance.
Definition RandomGen.cxx:74
TRandom3 & RndGen(void) const
rnd number generator for generic usage
Definition RandomGen.h:80
@ kFermiMoveEffectiveSF2p2h_noeject
@ kFermiMoveEffectiveSF2p2h_eject
@ kFermiMoveEffectiveSF1p1h

References genie::Target::A(), genie::NuclearModelI::fCurrMomentum, genie::NuclearModelI::fCurrRemovalEnergy, fEjectSecondNucleon2p2h, genie::NuclearModelI::fFermiMoverInteractionType, GetTransEnh1p1hMod(), genie::Target::HitNucIsSet(), genie::RandomGen::Instance(), genie::kFermiMoveEffectiveSF1p1h, genie::kFermiMoveEffectiveSF2p2h_eject, genie::kFermiMoveEffectiveSF2p2h_noeject, genie::constants::kPi, LOG, pDEBUG, pNOTICE, ProbDistro(), ReturnBindingEnergy(), Returnf1p1h(), and genie::RandomGen::RndGen().

◆ GenerateNucleon() [2/2]

bool NuclearModelI::GenerateNucleon ( const Target & tgt,
double hitNucleonRadius ) const
virtual

Reimplemented from genie::NuclearModelI.

Definition at line 52 of file NuclearModelI.cxx.

42 {
43 return GenerateNucleon(tgt);
44 }
bool GenerateNucleon(const Target &t) const

◆ GetTransEnh1p1hMod()

double EffectiveSF::GetTransEnh1p1hMod ( const Target & target) const
private

Definition at line 167 of file EffectiveSF.cxx.

167 {
168 double transEnhMod;
170 fRangeTransEnh1p1hMods, &transEnhMod) &&
171 transEnhMod > 0) {
172 return transEnhMod;
173 }
174 // If none specified, assume no enhancement to quasielastic peak
175 return 1.0;
176}
map< pair< int, int >, double > fRangeTransEnh1p1hMods
Definition EffectiveSF.h:89
map< int, double > fTransEnh1p1hMods
Definition EffectiveSF.h:82
bool GetValueFromNuclearMaps(const Target &target, const map< int, double > &nuc_to_val, const map< pair< int, int >, double > &nucA_range_to_val, double *val)

References fRangeTransEnh1p1hMods, fTransEnh1p1hMods, and genie::utils::config::GetValueFromNuclearMaps().

Referenced by GenerateNucleon().

◆ LoadConfig()

void EffectiveSF::LoadConfig ( void )
privatevirtual

Reimplemented from genie::NuclearModelI.

Definition at line 285 of file EffectiveSF.cxx.

286{
287
289
290 this->GetParamDef("EjectSecondNucleon2p2h", fEjectSecondNucleon2p2h, false);
291
292 this->GetParamDef("MomentumMax", fPMax, 1.0);
293 this->GetParamDef("MomentumCutOff", fPCutOff, 0.65);
294 assert(fPMax > 0 && fPCutOff > 0 && fPCutOff <= fPMax);
295
296 // Find out if Transverse enhancement is enabled to figure out whether to load
297 // the 2p2h enhancement parameters.
298 this->GetParam("UseElFFTransverseEnhancement", fUseElFFTransEnh );
299 if (!fUseElFFTransEnh) {
300 LOG("EffectiveSF", pINFO)
301 << "Transverse enhancement not used; "
302 << "Do not increase the 2p2h cross section.";
303 }
304 else {
305 LoadAllIsotopesForKey("TransEnhf1p1hMod", "EffectiveSF",
307 LoadAllNucARangesForKey("TransEnhf1p1hMod", "EffectiveSF",
309 }
310
311 LoadAllIsotopesForKey("BindingEnergy", "EffectiveSF", GetOwnedConfig(), &fNucRmvE);
312 LoadAllNucARangesForKey("BindingEnergy", "EffectiveSF",
314 LoadAllIsotopesForKey("f1p1h", "EffectiveSF", GetOwnedConfig(), &f1p1hMap);
315 LoadAllNucARangesForKey("f1p1h", "EffectiveSF", GetOwnedConfig(), &fRange1p1hMap);
316
317 for (int Z = 1; Z < 140; Z++) {
318 for (int A = Z; A < 3*Z; A++) {
319 const int pdgc = pdg::IonPdgCode(A, Z);
320 double bs, bp, alpha, beta, c1, c2, c3;
321 if (GetDoubleKeyPDG("bs", pdgc, GetOwnedConfig(), &bs) &&
322 GetDoubleKeyPDG("bp", pdgc, GetOwnedConfig(), &bp) &&
323 GetDoubleKeyPDG("alpha", pdgc, GetOwnedConfig(), &alpha) &&
324 GetDoubleKeyPDG("beta", pdgc, GetOwnedConfig(), &beta) &&
325 GetDoubleKeyPDG("c1", pdgc, GetOwnedConfig(), &c1) &&
326 GetDoubleKeyPDG("c2", pdgc, GetOwnedConfig(), &c2) &&
327 GetDoubleKeyPDG("c3", pdgc, GetOwnedConfig(), &c3)) {
328 vector<double> pars = vector<double>();
329 pars.push_back(bs);
330 pars.push_back(bp);
331 pars.push_back(alpha);
332 pars.push_back(beta);
333 pars.push_back(c1);
334 pars.push_back(c2);
335 pars.push_back(c3);
336 LOG("EffectiveSF", pINFO)
337 << "Nucleus: " << pdgc << " -> using bs = " << bs << "; bp = "<< bp
338 << "; alpha = " << alpha << "; beta = "<<beta<<"; c1 = "<<c1
339 <<"; c2 = "<<c2<< "; c3 = " << c3;
340 fProbDistParams[pdgc] = pars;
341 }
342 }
343 }
344 for(int lowA = 1; lowA < 3 * 140; lowA++) {
345 for(int highA = lowA; highA < 3 * 140; highA++) {
346 double bs, bp, alpha, beta, c1, c2, c3;
347 if (GetDoubleKeyRangeNucA("bs", lowA, highA, GetOwnedConfig(), &bs) &&
348 GetDoubleKeyRangeNucA("bp", lowA, highA, GetOwnedConfig(), &bp) &&
349 GetDoubleKeyRangeNucA("alpha",lowA, highA, GetOwnedConfig(), &alpha) &&
350 GetDoubleKeyRangeNucA("beta", lowA, highA, GetOwnedConfig(), &beta) &&
351 GetDoubleKeyRangeNucA("c1", lowA, highA, GetOwnedConfig(), &c1) &&
352 GetDoubleKeyRangeNucA("c2", lowA, highA, GetOwnedConfig(), &c2) &&
353 GetDoubleKeyRangeNucA("c3", lowA, highA, GetOwnedConfig(), &c3)) {
354 vector<double> pars = vector<double>();
355 pars.push_back(bs);
356 pars.push_back(bp);
357 pars.push_back(alpha);
358 pars.push_back(beta);
359 pars.push_back(c1);
360 pars.push_back(c2);
361 pars.push_back(c3);
362 LOG("EffectiveSF", pINFO) << "For "<< lowA - 1 <<" < A < " << highA + 1
363 <<" -> using bs = " << bs << "; bp = "<< bp
364 << "; alpha = " << alpha << "; beta = "<<beta<<"; c1 = "<<c1
365 <<"; c2 = "<<c2<< "; c3 = " << c3;
366 fRangeProbDistParams[pair<int, int>(lowA, highA)] = pars;
367 }
368 }
369 }
370}
#define pINFO
Definition Messenger.h:62
Registry * GetOwnedConfig(void)
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
bool GetParamDef(const RgKey &name, T &p, const T &def) const
map< pair< int, int >, std::vector< double > > fRangeProbDistParams
Definition EffectiveSF.h:88
map< int, double > fNucRmvE
Definition EffectiveSF.h:79
map< pair< int, int >, double > fRangeNucRmvE
Definition EffectiveSF.h:86
map< pair< int, int >, double > fRange1p1hMap
Definition EffectiveSF.h:87
map< int, double > f1p1hMap
Definition EffectiveSF.h:80
map< int, std::vector< double > > fProbDistParams
Definition EffectiveSF.h:81
virtual void LoadConfig()
int IonPdgCode(int A, int Z)
Definition PDGUtils.cxx:71
void LoadAllIsotopesForKey(const char *key_name, const char *log_tool_name, Registry *config, map< int, double > *nuc_to_val)
void LoadAllNucARangesForKey(const char *key_name, const char *log_tool_name, Registry *config, map< pair< int, int >, double > *nuc_rangeA_to_val)
bool GetDoubleKeyPDG(const char *valName, const int pdgc, Registry *config, double *val)
bool GetDoubleKeyRangeNucA(const char *valName, const int lowA, const int highA, Registry *config, double *val)

References f1p1hMap, fEjectSecondNucleon2p2h, fNucRmvE, fPCutOff, fPMax, fProbDistParams, fRange1p1hMap, fRangeNucRmvE, fRangeProbDistParams, fRangeTransEnh1p1hMods, fTransEnh1p1hMods, fUseElFFTransEnh, genie::utils::config::GetDoubleKeyPDG(), genie::utils::config::GetDoubleKeyRangeNucA(), genie::Algorithm::GetOwnedConfig(), genie::Algorithm::GetParam(), genie::Algorithm::GetParamDef(), genie::pdg::IonPdgCode(), genie::utils::config::LoadAllIsotopesForKey(), genie::utils::config::LoadAllNucARangesForKey(), genie::NuclearModelI::LoadConfig(), LOG, and pINFO.

Referenced by Configure(), and Configure().

◆ MakeEffectiveSF() [1/2]

TH1D * EffectiveSF::MakeEffectiveSF ( const Target & target) const
private

Definition at line 181 of file EffectiveSF.cxx.

182{
183 // First check for individually specified nuclei
184 int pdgc = pdg::IonPdgCode(target.A(), target.Z());
185 map<int,vector<double> >::const_iterator it = fProbDistParams.find(pdgc);
186 if(it != fProbDistParams.end()) {
187 vector<double> v = it->second;
188 return this->MakeEffectiveSF(v[0], v[1], v[2], v[3],
189 v[4], v[5], v[6], target);
190 }
191
192 // Then check in the ranges of A
193 map<pair<int, int>, vector<double> >::const_iterator range_it = fRangeProbDistParams.begin();
194 for(; range_it != fRangeProbDistParams.end(); ++range_it) {
195 if (target.A() >= range_it->first.first && target.A() <= range_it->first.second) {
196 vector<double> v = range_it->second;
197 return this->MakeEffectiveSF(v[0], v[1], v[2], v[3],
198 v[4], v[5], v[6], target);
199 }
200 }
201
202 return NULL;
203}
TH1D * MakeEffectiveSF(const Target &target) const
int Z(void) const
Definition Target.h:68
int A(void) const
Definition Target.h:70

References genie::Target::A(), fProbDistParams, fRangeProbDistParams, genie::pdg::IonPdgCode(), MakeEffectiveSF(), and genie::Target::Z().

Referenced by MakeEffectiveSF(), and ProbDistro().

◆ MakeEffectiveSF() [2/2]

TH1D * EffectiveSF::MakeEffectiveSF ( double bs,
double bp,
double alpha,
double beta,
double c1,
double c2,
double c3,
const Target & target ) const
private

Definition at line 208 of file EffectiveSF.cxx.

211{
212 //-- create the probability distribution
213 int npbins = (int) (1000 * fPMax);
214
215 TH1D * prob = new TH1D("", "", npbins, 0, fPMax);
216 prob->SetDirectory(0);
217
218 double dp = fPMax / (npbins-1);
219 for(int i = 0; i < npbins; i++) {
220 double p = i * dp;
221 double y = p / 0.197;
222 double as = c1 * exp(-pow(bs*y,2));
223 double ap = c2 * pow(bp * y, 2) * exp(-pow(bp * y, 2));
224 double at = c3 * pow(y, beta) * exp(-alpha * (y - 2));
225 double rr = (3.14159265 / 4) * (as + ap + at) * pow(y, 2) / 0.197;
226 double dP_dp = rr / 1.01691371;
227 if(p>fPCutOff)
228 dP_dp = 0;
229 assert(dP_dp >= 0);
230 // calculate probability density : dProbability/dp
231#ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
232 LOG("EffectiveSF", pDEBUG) << "p = " << p << ", dP/dp = " << dP_dp;
233#endif
234 prob->Fill(p, dP_dp);
235 }
236
237 //-- normalize the probability distribution
238 prob->Scale( 1.0 / prob->Integral("width") );
239
240 //-- store
241 fProbDistroMap.insert(
242 map<string, TH1D*>::value_type(target.AsString(),prob));
243 return prob;
244}
string AsString(void) const
Definition Target.cxx:383

References genie::Target::AsString(), fPCutOff, fPMax, fProbDistroMap, LOG, and pDEBUG.

◆ ModelType()

NuclearModel_t genie::EffectiveSF::ModelType ( const Target & ) const
inlinevirtual

Implements genie::NuclearModelI.

Definition at line 47 of file EffectiveSF.h.

48 {
50 }
@ kNucmEffSpectralFunc

References genie::kNucmEffSpectralFunc.

◆ Prob() [1/2]

double EffectiveSF::Prob ( double mom,
double w,
const Target & t ) const
virtual

Implements genie::NuclearModelI.

Definition at line 129 of file EffectiveSF.cxx.

130{
131 if(w < 0) {
132 TH1D * prob_distr = this->ProbDistro(target);
133 int bin = prob_distr->FindBin(mom);
134 double y = prob_distr->GetBinContent(bin);
135 double dx = prob_distr->GetBinWidth(bin);
136 double prob = y * dx;
137 return prob;
138 }
139 return 1;
140}

References ProbDistro().

◆ Prob() [2/2]

double NuclearModelI::Prob ( double p,
double w,
const Target & tgt,
double hitNucleonRadius ) const
virtual

Reimplemented from genie::NuclearModelI.

Definition at line 56 of file NuclearModelI.cxx.

48 {
49 return Prob(p,w,tgt);
50 }
double Prob(double mom, double w, const Target &t) const

References genie::NuclearModelI::fKFTable.

◆ ProbDistro()

TH1D * EffectiveSF::ProbDistro ( const Target & t) const
private

Definition at line 145 of file EffectiveSF.cxx.

146{
147 //-- return stored /if already computed/
148 map<string, TH1D*>::iterator it = fProbDistroMap.find(target.AsString());
149 if(it != fProbDistroMap.end()) return it->second;
150
151 LOG("EffectiveSF", pNOTICE)
152 << "Computing P = f(p_nucleon) for: " << target.AsString();
153 LOG("EffectiveSF", pNOTICE)
154 << "P(cut-off) = " << fPCutOff << ", P(max) = " << fPMax;
155
156 //-- get information for the nuclear target
157 int nucleon_pdgc = target.HitNucPdg();
158 assert( pdg::IsProton(nucleon_pdgc) || pdg::IsNeutron(nucleon_pdgc) );
159 return this->MakeEffectiveSF(target);
160
161}
bool IsProton(int pdgc)
Definition PDGUtils.cxx:336
bool IsNeutron(int pdgc)
Definition PDGUtils.cxx:341

References genie::Target::AsString(), fPCutOff, fPMax, fProbDistroMap, genie::Target::HitNucPdg(), genie::pdg::IsNeutron(), genie::pdg::IsProton(), LOG, MakeEffectiveSF(), and pNOTICE.

Referenced by GenerateNucleon(), and Prob().

◆ ReturnBindingEnergy()

double EffectiveSF::ReturnBindingEnergy ( const Target & target) const
private

Definition at line 248 of file EffectiveSF.cxx.

249{
250 double binding_en;
251 if (GetValueFromNuclearMaps(target, fNucRmvE, fRangeNucRmvE, &binding_en) &&
252 binding_en > 0) {
253 return binding_en;
254 }
255 return 0;
256}

References fNucRmvE, fRangeNucRmvE, and genie::utils::config::GetValueFromNuclearMaps().

Referenced by GenerateNucleon().

◆ Returnf1p1h()

double EffectiveSF::Returnf1p1h ( const Target & target) const
private

Definition at line 261 of file EffectiveSF.cxx.

262{
263 double f1p1h;
264 if (GetValueFromNuclearMaps(target, f1p1hMap, fRange1p1hMap, &f1p1h) &&
265 f1p1h >= 0 && f1p1h <= 1) {
266 return f1p1h;
267 }
268 return 1;
269}

References f1p1hMap, fRange1p1hMap, and genie::utils::config::GetValueFromNuclearMaps().

Referenced by GenerateNucleon().

Member Data Documentation

◆ f1p1hMap

map<int, double> genie::EffectiveSF::f1p1hMap
private

Definition at line 80 of file EffectiveSF.h.

Referenced by LoadConfig(), and Returnf1p1h().

◆ fEjectSecondNucleon2p2h

bool genie::EffectiveSF::fEjectSecondNucleon2p2h
private

Definition at line 75 of file EffectiveSF.h.

Referenced by GenerateNucleon(), and LoadConfig().

◆ fNucRmvE

map<int, double> genie::EffectiveSF::fNucRmvE
private

Definition at line 79 of file EffectiveSF.h.

Referenced by LoadConfig(), and ReturnBindingEnergy().

◆ fPCutOff

double genie::EffectiveSF::fPCutOff
private

Definition at line 74 of file EffectiveSF.h.

Referenced by LoadConfig(), MakeEffectiveSF(), and ProbDistro().

◆ fPMax

double genie::EffectiveSF::fPMax
private

Definition at line 73 of file EffectiveSF.h.

Referenced by LoadConfig(), MakeEffectiveSF(), and ProbDistro().

◆ fProbDistParams

map<int, std::vector<double> > genie::EffectiveSF::fProbDistParams
private

Definition at line 81 of file EffectiveSF.h.

Referenced by LoadConfig(), and MakeEffectiveSF().

◆ fProbDistroMap

map<string, TH1D *> genie::EffectiveSF::fProbDistroMap
mutableprivate

Definition at line 72 of file EffectiveSF.h.

Referenced by MakeEffectiveSF(), ProbDistro(), and ~EffectiveSF().

◆ fRange1p1hMap

map<pair<int, int>, double> genie::EffectiveSF::fRange1p1hMap
private

Definition at line 87 of file EffectiveSF.h.

Referenced by LoadConfig(), and Returnf1p1h().

◆ fRangeNucRmvE

map<pair<int, int>, double> genie::EffectiveSF::fRangeNucRmvE
private

Definition at line 86 of file EffectiveSF.h.

Referenced by LoadConfig(), and ReturnBindingEnergy().

◆ fRangeProbDistParams

map<pair<int, int>, std::vector<double> > genie::EffectiveSF::fRangeProbDistParams
private

Definition at line 88 of file EffectiveSF.h.

Referenced by LoadConfig(), and MakeEffectiveSF().

◆ fRangeTransEnh1p1hMods

map<pair<int, int>, double> genie::EffectiveSF::fRangeTransEnh1p1hMods
private

Definition at line 89 of file EffectiveSF.h.

Referenced by GetTransEnh1p1hMod(), and LoadConfig().

◆ fTransEnh1p1hMods

map<int, double> genie::EffectiveSF::fTransEnh1p1hMods
private

Definition at line 82 of file EffectiveSF.h.

Referenced by GetTransEnh1p1hMod(), and LoadConfig().

◆ fUseElFFTransEnh

bool genie::EffectiveSF::fUseElFFTransEnh
private

Definition at line 76 of file EffectiveSF.h.

Referenced by LoadConfig().


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