GENIEGenerator
Loading...
Searching...
No Matches
genie::NuclearModelI Class Referenceabstract

Pure abstract base class. Defines the NuclearModelI interface to be implemented by any physics model describing the distribution of nucleons within a nuclei. More...

#include <NuclearModelI.h>

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

Public Member Functions

virtual ~NuclearModelI ()
virtual bool GenerateNucleon (const Target &) const =0
virtual bool GenerateNucleon (const Target &tgt, double hitNucleonRadius) const
virtual double Prob (double p, double w, const Target &) const =0
virtual double Prob (double p, double w, const Target &tgt, double hitNucleonRadius) const
virtual NuclearModel_t ModelType (const Target &) const =0
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 Configure (const Registry &config)
virtual void Configure (string config)
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.

Protected Member Functions

 NuclearModelI ()
 NuclearModelI (std::string name)
 NuclearModelI (std::string name, std::string config)
virtual void LoadConfig ()
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

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)

Private Attributes

const genie::FermiMomentumTablefKFTable
string fKFTableName

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)

Detailed Description

Pure abstract base class. Defines the NuclearModelI interface to be implemented by any physics model describing the distribution of nucleons within a nuclei.

Author
Costas Andreopoulos <c.andreopoulos \at cern.ch> University of Liverpool
Created:\n October 09, 2004
License:\n Copyright (c) 2003-2025, The GENIE Collaboration
For the full text of the license visit http://copyright.genie-mc.org

Important revisions after version 2.0.0 : @ Mar 18, 2016 - JJ (SD) Added option for GenerateNucleon() to be called with a target and a radius as the arguments. Currently used by LocalFGM. Calls GenerateNucleon() with the radius set to 0 for all other NuclearModelI implementations.

@ Jul 2020 - Marco Roda Added fooks for FermiMomentum and LocalFermiMomentum

Definition at line 46 of file NuclearModelI.h.

Constructor & Destructor Documentation

◆ ~NuclearModelI()

virtual genie::NuclearModelI::~NuclearModelI ( )
inlinevirtual

Definition at line 49 of file NuclearModelI.h.

49{};

◆ NuclearModelI() [1/3]

genie::NuclearModelI::NuclearModelI ( )
inlineprotected

Definition at line 96 of file NuclearModelI.h.

97 : Algorithm()
99 , fCurrMomentum(0,0,0)
101 , fKFTable(nullptr)
102 , fKFTableName("Unspecified")
103 {};
FermiMoverInteractionType_t fFermiMoverInteractionType
const genie::FermiMomentumTable * fKFTable
@ kFermiMoveDefault

References genie::Algorithm::Algorithm(), fCurrMomentum, fCurrRemovalEnergy, fFermiMoverInteractionType, fKFTable, fKFTableName, and genie::kFermiMoveDefault.

Referenced by genie::EffectiveSF::EffectiveSF(), genie::EffectiveSF::EffectiveSF(), genie::NuclearModelMap::FermiMomentum(), genie::FGMBodekRitchie::FGMBodekRitchie(), genie::FGMBodekRitchie::FGMBodekRitchie(), genie::NuclearModelMap::GenerateNucleon(), genie::NuclearModelMap::LoadConfig(), genie::NuclearModelMap::LocalFermiMomentum(), genie::LocalFGM::LocalFGM(), genie::LocalFGM::LocalFGM(), genie::NuclearModelMap::ModelType(), genie::NuclearModelMap::NuclearModelMap(), genie::NuclearModelMap::NuclearModelMap(), genie::NuclearModelMap::Prob(), genie::NuclearModelMap::SelectModel(), genie::SpectralFunc::SpectralFunc(), genie::SpectralFunc::SpectralFunc(), genie::SpectralFunc1d::SpectralFunc1d(), and genie::SpectralFunc1d::SpectralFunc1d().

◆ NuclearModelI() [2/3]

genie::NuclearModelI::NuclearModelI ( std::string name)
inlineprotected

◆ NuclearModelI() [3/3]

genie::NuclearModelI::NuclearModelI ( std::string name,
std::string config )
inlineprotected

Member Function Documentation

◆ FermiMomentum()

double NuclearModelI::FermiMomentum ( const Target & t,
int nucleon_pdg ) const
virtual

Reimplemented in genie::FGMBodekRitchie, and genie::NuclearModelMap.

Definition at line 54 of file NuclearModelI.cxx.

54 {
55
56 if ( ! fKFTable ) return 0. ;
57
58 return fKFTable->FindClosestKF( t.Pdg(), nucleon_pdg);
59
60}
int Pdg(void) const
Definition Target.h:71

Referenced by genie::FGMBodekRitchie::FermiMomentum(), and LocalFermiMomentum().

◆ FermiMomentumTable()

const genie::FermiMomentumTable & genie::NuclearModelI::FermiMomentumTable ( ) const
inlineprotected

Definition at line 124 of file NuclearModelI.h.

124{ return *fKFTable ; }

References fKFTable.

◆ FermiMomentumTableName()

const string & genie::NuclearModelI::FermiMomentumTableName ( ) const
inlineprotected

Definition at line 123 of file NuclearModelI.h.

123{ return fKFTableName; }

References fKFTableName.

◆ GenerateNucleon() [1/2]

◆ GenerateNucleon() [2/2]

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

Reimplemented in genie::EffectiveSF, genie::FGMBodekRitchie, genie::LocalFGM, genie::NuclearModelMap, genie::SpectralFunc1d, and genie::SpectralFunc.

Definition at line 40 of file NuclearModelI.cxx.

42 {
43 return GenerateNucleon(tgt);
44 }
virtual bool GenerateNucleon(const Target &) const =0

References GenerateNucleon().

◆ GetFermiMoverInteractionType()

FermiMoverInteractionType_t genie::NuclearModelI::GetFermiMoverInteractionType ( void ) const
inline

Definition at line 80 of file NuclearModelI.h.

81 {
83 }

References fFermiMoverInteractionType.

Referenced by genie::NuclearModelMap::GenerateNucleon().

◆ LoadConfig()

void NuclearModelI::LoadConfig ( void )
protectedvirtual

Reimplemented in genie::EffectiveSF, genie::FGMBodekRitchie, genie::LocalFGM, genie::NuclearModelMap, genie::SpectralFunc1d, and genie::SpectralFunc.

Definition at line 72 of file NuclearModelI.cxx.

72 {
73
74 string fermi_table_key = "FermiMomentumTable" ;
75
76 // first try to get the Fermi Momentum table from the specific model configurtaion
77 if ( ! GetParam( fermi_table_key, fKFTableName, false ) ) {
78
79 // if that fails, the information should come from the Global Config
80 Registry * algos = AlgConfigPool::Instance() -> GlobalParameterList() ;
81 fKFTableName = algos -> GetString( fermi_table_key ) ;
82
83 }
84
85 FermiMomentumTablePool * kftp = FermiMomentumTablePool::Instance();
87
88 // Note that model specifications can abvoid the usage of the table
89 // but if this configuration is called it's necessary that the table is set.
90 assert(fKFTable);
91
92}
static AlgConfigPool * Instance()
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
const FermiMomentumTable * GetTable(string name)
static FermiMomentumTablePool * Instance(void)
string GetString(xmlDocPtr xml_doc, string node_path)

References fKFTable, fKFTableName, genie::Algorithm::GetParam(), genie::FermiMomentumTablePool::GetTable(), genie::AlgConfigPool::Instance(), and genie::FermiMomentumTablePool::Instance().

Referenced by genie::EffectiveSF::LoadConfig(), genie::FGMBodekRitchie::LoadConfig(), genie::LocalFGM::LoadConfig(), genie::SpectralFunc1d::LoadConfig(), and genie::SpectralFunc::LoadConfig().

◆ LocalFermiMomentum()

double NuclearModelI::LocalFermiMomentum ( const Target & t,
int nucleon_pdg,
double radius ) const
virtual

Reimplemented in genie::LocalFGM, and genie::NuclearModelMap.

Definition at line 64 of file NuclearModelI.cxx.

65 {
66 return FermiMomentum( t, nucleon_pdg ) ;
67
68}
virtual double FermiMomentum(const Target &, int nucleon_pdg) const

References FermiMomentum().

Referenced by genie::utils::BindHitNucleon().

◆ ModelType()

◆ Momentum()

double genie::NuclearModelI::Momentum ( void ) const
inline

Definition at line 70 of file NuclearModelI.h.

71 {
72 return fCurrMomentum.Mag();
73 }

References fCurrMomentum.

◆ Momentum3()

◆ Prob() [1/2]

virtual double genie::NuclearModelI::Prob ( double p,
double w,
const Target &  ) const
pure virtual

◆ Prob() [2/2]

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

Reimplemented in genie::EffectiveSF, genie::FGMBodekRitchie, genie::LocalFGM, genie::NuclearModelMap, genie::SpectralFunc1d, and genie::SpectralFunc.

Definition at line 46 of file NuclearModelI.cxx.

48 {
49 return Prob(p,w,tgt);
50 }
virtual double Prob(double p, double w, const Target &) const =0

References Prob().

◆ RemovalEnergy()

double genie::NuclearModelI::RemovalEnergy ( void ) const
inline

◆ SetMomentum3()

void genie::NuclearModelI::SetMomentum3 ( const TVector3 & mom) const
inline

Definition at line 86 of file NuclearModelI.h.

87 {
88 fCurrMomentum = mom;
89 };

References fCurrMomentum.

Referenced by genie::NewQELXSec::Integrate().

◆ SetRemovalEnergy()

void genie::NuclearModelI::SetRemovalEnergy ( double E) const
inline

Definition at line 90 of file NuclearModelI.h.

91 {
93 }

References fCurrRemovalEnergy.

Referenced by genie::NewQELXSec::Integrate().

Member Data Documentation

◆ fCurrMomentum

◆ fCurrRemovalEnergy

◆ fFermiMoverInteractionType

◆ fKFTable

const genie::FermiMomentumTable* genie::NuclearModelI::fKFTable
private

◆ fKFTableName

string genie::NuclearModelI::fKFTableName
private

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