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

Concrete implementation of the ELFormFactorsModelI interface. Computes elastic form factors using the BBA2003 parameterization. More...

#include <BBA03ELFormFactorsModel.h>

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

Public Member Functions

 BBA03ELFormFactorsModel ()
 BBA03ELFormFactorsModel (string config)
virtual ~BBA03ELFormFactorsModel ()
double Gep (const Interaction *interaction) const
 Compute the elastic form factor G_{ep} for the input interaction.
double Gmp (const Interaction *interaction) const
 Compute the elastic form factor G_{mp} for the input interaction.
double Gen (const Interaction *interaction) const
 Compute the elastic form factor G_{en} for the input interaction.
double Gmn (const Interaction *interaction) const
 Compute the elastic form factor G_{mn} for the input interaction.
void Configure (const Registry &config)
void Configure (string param_set)
Public Member Functions inherited from genie::ELFormFactorsModelI
virtual ~ELFormFactorsModelI ()
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

void LoadConfig (void)
double BBA03Fit (double q2, double g0, const BBA2003Fit_t &fp) const

Private Attributes

BBA2003Fit_t fGep
 BBA2003 fit coefficients for Gep.
BBA2003Fit_t fGmp
 BBA2003 fit coefficients for Gmp.
BBA2003Fit_t fGmn
 BBA2003 fit coefficients for Gmn.
double fGenA
 Krutov parameterization for Gen.
double fGenB
 Krutov parameterization for Gen.
double fQ2Max
 Gep/Gmp assummed const for Q2 > Q2Max.
double fMv
 Elactic vector mass.
double fMv2
 Elactic vector mass.
double fMuP
 Anomalous proton magnetic moment.
double fMuN
 Anomalous neutron magnetic moment.

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::ELFormFactorsModelI
 ELFormFactorsModelI ()
 ELFormFactorsModelI (string name)
 ELFormFactorsModelI (string name, string config)
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::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

Concrete implementation of the ELFormFactorsModelI interface. Computes elastic form factors using the BBA2003 parameterization.

References:\n H.Budd, NuINT-02 proceedings
Author
Costas Andreopoulos <c.andreopoulos \at cern.ch> University of Liverpool
Created:\n Oct 19, 2005
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 BBA03ELFormFactorsModel.h.

Constructor & Destructor Documentation

◆ BBA03ELFormFactorsModel() [1/2]

BBA03ELFormFactorsModel::BBA03ELFormFactorsModel ( )

Definition at line 21 of file BBA03ELFormFactorsModel.cxx.

21 :
22ELFormFactorsModelI("genie::BBA03ELFormFactorsModel")
23{
24
25}

References genie::ELFormFactorsModelI::ELFormFactorsModelI().

◆ BBA03ELFormFactorsModel() [2/2]

BBA03ELFormFactorsModel::BBA03ELFormFactorsModel ( string config)

Definition at line 27 of file BBA03ELFormFactorsModel.cxx.

27 :
28ELFormFactorsModelI("genie::BBA03ELFormFactorsModel", config)
29{
30
31}

References genie::ELFormFactorsModelI::ELFormFactorsModelI().

◆ ~BBA03ELFormFactorsModel()

BBA03ELFormFactorsModel::~BBA03ELFormFactorsModel ( )
virtual

Definition at line 33 of file BBA03ELFormFactorsModel.cxx.

34{
35
36}

Member Function Documentation

◆ BBA03Fit()

double BBA03ELFormFactorsModel::BBA03Fit ( double q2,
double g0,
const BBA2003Fit_t & fp ) const
private

Definition at line 140 of file BBA03ELFormFactorsModel.cxx.

142{
143// The BBA2003 inverse polynomizal fit function for Gep,Gmp,Gmn
144// Inputs:
145// q2 : momentum transfer, <0
146// g0 : G(q2=0) -> Gep=1, Gmp=mup, Gmn=mun (mu:magnetic moment)
147// fit : BBA2003 fit parameters for either Gep,Gmp,Gmn
148
149 double Q2 = -q2;
150 double Q4 = Q2 * Q2;
151 double Q6 = Q4 * Q2;
152 double Q8 = Q6 * Q2;
153 double Q10 = Q8 * Q2;
154 double Q12 = Q10 * Q2;
155
156 double g = g0 / (1. + fit.a2*Q2 + fit.a4*Q4 + fit.a6*Q6 +
157 fit.a8*Q8 + fit.a10*Q10 + fit.a12*Q12);
158 return g;
159}
double Q2(const Interaction *const i)

References genie::SBBA2003Fit::a10, genie::SBBA2003Fit::a12, genie::SBBA2003Fit::a2, genie::SBBA2003Fit::a4, genie::SBBA2003Fit::a6, and genie::SBBA2003Fit::a8.

Referenced by Gep(), Gmn(), and Gmp().

◆ Configure() [1/2]

void BBA03ELFormFactorsModel::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 86 of file BBA03ELFormFactorsModel.cxx.

87{
89 this->LoadConfig();
90}
virtual void Configure(const Registry &config)
Definition Algorithm.cxx:62

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

◆ Configure() [2/2]

void BBA03ELFormFactorsModel::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 92 of file BBA03ELFormFactorsModel.cxx.

93{
94 Algorithm::Configure(param_set);
95 this->LoadConfig();
96}

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

◆ Gen()

double BBA03ELFormFactorsModel::Gen ( const Interaction * interaction) const
virtual

Compute the elastic form factor G_{en} for the input interaction.

Implements genie::ELFormFactorsModelI.

Definition at line 61 of file BBA03ELFormFactorsModel.cxx.

62{
63 double q2 = interaction->Kine().q2();
64
65 const Target & tgt = interaction->InitState().Tgt();
66
67 double M = tgt.HitNucMass(); // Mnucl
68 double M2 = TMath::Power(M,2); // Mnucl^2
69 double t = -q2/(4*M2); // q2<0
70 double a = fGenA; // Krutov et al. parameter a
71 double b = fGenB; // Krutov et al. parameter b
72 double mv2 = fMv2; // elastic vector mass^2
73 double GD = 1./TMath::Power(1-q2/mv2,2.); // dipole form factor
74
75 double gen = -1. * fMuN * a * t * GD / (1 + b*t);
76 return gen;
77}
std::mt19937 gen(rd())
double fMuN
Anomalous neutron magnetic moment.
double fGenB
Krutov parameterization for Gen.
double fGenA
Krutov parameterization for Gen.
const Target & Tgt(void) const
const Kinematics & Kine(void) const
Definition Interaction.h:71
const InitialState & InitState(void) const
Definition Interaction.h:69
double q2(bool selected=false) const
double HitNucMass(void) const
Definition Target.cxx:233
const double a

References a, fGenA, fGenB, fMuN, fMv2, gen(), genie::Target::HitNucMass(), genie::Interaction::InitState(), genie::Interaction::Kine(), genie::Kinematics::q2(), and genie::InitialState::Tgt().

◆ Gep()

double BBA03ELFormFactorsModel::Gep ( const Interaction * interaction) const
virtual

Compute the elastic form factor G_{ep} for the input interaction.

Implements genie::ELFormFactorsModelI.

Definition at line 38 of file BBA03ELFormFactorsModel.cxx.

39{
40 double gep = 0;
41 double q2 = interaction->Kine().q2();
42
43 if( TMath::Abs(q2) > fQ2Max ) {
44 double gepmx = this->BBA03Fit(-fQ2Max, 1., fGep);
45 double gmpmx = this->BBA03Fit(-fQ2Max, fMuP, fGmp);
46 double gmp = this->BBA03Fit(q2, fMuP, fGmp);
47 gep = gmp * (gepmx/gmpmx);
48 } else {
49 gep = this->BBA03Fit(q2, 1., fGep);
50 }
51 return gep;
52}
BBA2003Fit_t fGmp
BBA2003 fit coefficients for Gmp.
double BBA03Fit(double q2, double g0, const BBA2003Fit_t &fp) const
double fMuP
Anomalous proton magnetic moment.
BBA2003Fit_t fGep
BBA2003 fit coefficients for Gep.
double fQ2Max
Gep/Gmp assummed const for Q2 > Q2Max.

References BBA03Fit(), fGep, fGmp, fMuP, fQ2Max, genie::Interaction::Kine(), and genie::Kinematics::q2().

◆ Gmn()

double BBA03ELFormFactorsModel::Gmn ( const Interaction * interaction) const
virtual

Compute the elastic form factor G_{mn} for the input interaction.

Implements genie::ELFormFactorsModelI.

Definition at line 79 of file BBA03ELFormFactorsModel.cxx.

80{
81 double q2 = interaction->Kine().q2();
82 double gmn = this->BBA03Fit(q2, fMuN, fGmn);
83 return gmn;
84}
BBA2003Fit_t fGmn
BBA2003 fit coefficients for Gmn.

References BBA03Fit(), fGmn, fMuN, genie::Interaction::Kine(), and genie::Kinematics::q2().

◆ Gmp()

double BBA03ELFormFactorsModel::Gmp ( const Interaction * interaction) const
virtual

Compute the elastic form factor G_{mp} for the input interaction.

Implements genie::ELFormFactorsModelI.

Definition at line 54 of file BBA03ELFormFactorsModel.cxx.

55{
56 double q2 = interaction->Kine().q2();
57 double gmp = this->BBA03Fit(q2, fMuP, fGmp);
58 return gmp;
59}

References BBA03Fit(), fGmp, fMuP, genie::Interaction::Kine(), and genie::Kinematics::q2().

◆ LoadConfig()

void BBA03ELFormFactorsModel::LoadConfig ( void )
private

Definition at line 98 of file BBA03ELFormFactorsModel.cxx.

99{
100 //-- load BBA03 model parameters
101
102 // BBA2003 fit coefficients
103 GetParam( "BBA03-Gep-a2", fGep.a2 ) ;
104 GetParam( "BBA03-Gep-a4", fGep.a4 ) ;
105 GetParam( "BBA03-Gep-a6", fGep.a6 ) ;
106 GetParam( "BBA03-Gep-a8", fGep.a8 ) ;
107 GetParam( "BBA03-Gep-a10", fGep.a10 ) ;
108 GetParam( "BBA03-Gep-a12", fGep.a12 ) ;
109
110 GetParam( "BBA03-Gmp-a2", fGmp.a2 ) ;
111 GetParam( "BBA03-Gmp-a4", fGmp.a4 ) ;
112 GetParam( "BBA03-Gmp-a6", fGmp.a6 ) ;
113 GetParam( "BBA03-Gmp-a8", fGmp.a8 ) ;
114 GetParam( "BBA03-Gmp-a10", fGmp.a10 ) ;
115 GetParam( "BBA03-Gmp-a12", fGmp.a12 ) ;
116
117 GetParam( "BBA03-Gmn-a2", fGmn.a2 ) ;
118 GetParam( "BBA03-Gmn-a4", fGmn.a4 ) ;
119 GetParam( "BBA03-Gmn-a6", fGmn.a6 ) ;
120 GetParam( "BBA03-Gmn-a8", fGmn.a8 ) ;
121 GetParam( "BBA03-Gmn-a10", fGmn.a10 ) ;
122 GetParam( "BBA03-Gmn-a12", fGmn.a12 ) ;
123
124 // Krutov parameters
125 GetParam( "BBA03-Gen-a", fGenA ) ;
126 GetParam( "BBA03-Gen-b", fGenB ) ;
127
128 // Q2max
129 GetParam( "BBA03-Q2Max", fQ2Max ) ;
130
131 // vector mass
132 GetParam( "EL-Mv",fMv ) ;
133 fMv2 = TMath::Power(fMv,2);
134
135 // anomalous magnetic moments
136 GetParam( "AnomMagnMoment-P", fMuP ) ;
137 GetParam( "AnomMagnMoment-N", fMuN ) ;
138}
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const

References fGenA, fGenB, fGep, fGmn, fGmp, fMuN, fMuP, fMv, fMv2, fQ2Max, and genie::Algorithm::GetParam().

Referenced by Configure(), and Configure().

Member Data Documentation

◆ fGenA

double genie::BBA03ELFormFactorsModel::fGenA
private

Krutov parameterization for Gen.

Definition at line 64 of file BBA03ELFormFactorsModel.h.

Referenced by Gen(), and LoadConfig().

◆ fGenB

double genie::BBA03ELFormFactorsModel::fGenB
private

Krutov parameterization for Gen.

Definition at line 65 of file BBA03ELFormFactorsModel.h.

Referenced by Gen(), and LoadConfig().

◆ fGep

BBA2003Fit_t genie::BBA03ELFormFactorsModel::fGep
private

BBA2003 fit coefficients for Gep.

Definition at line 61 of file BBA03ELFormFactorsModel.h.

Referenced by Gep(), and LoadConfig().

◆ fGmn

BBA2003Fit_t genie::BBA03ELFormFactorsModel::fGmn
private

BBA2003 fit coefficients for Gmn.

Definition at line 63 of file BBA03ELFormFactorsModel.h.

Referenced by Gmn(), and LoadConfig().

◆ fGmp

BBA2003Fit_t genie::BBA03ELFormFactorsModel::fGmp
private

BBA2003 fit coefficients for Gmp.

Definition at line 62 of file BBA03ELFormFactorsModel.h.

Referenced by Gep(), Gmp(), and LoadConfig().

◆ fMuN

double genie::BBA03ELFormFactorsModel::fMuN
private

Anomalous neutron magnetic moment.

Definition at line 70 of file BBA03ELFormFactorsModel.h.

Referenced by Gen(), Gmn(), and LoadConfig().

◆ fMuP

double genie::BBA03ELFormFactorsModel::fMuP
private

Anomalous proton magnetic moment.

Definition at line 69 of file BBA03ELFormFactorsModel.h.

Referenced by Gep(), Gmp(), and LoadConfig().

◆ fMv

double genie::BBA03ELFormFactorsModel::fMv
private

Elactic vector mass.

Definition at line 67 of file BBA03ELFormFactorsModel.h.

Referenced by LoadConfig().

◆ fMv2

double genie::BBA03ELFormFactorsModel::fMv2
private

Elactic vector mass.

Definition at line 68 of file BBA03ELFormFactorsModel.h.

Referenced by Gen(), and LoadConfig().

◆ fQ2Max

double genie::BBA03ELFormFactorsModel::fQ2Max
private

Gep/Gmp assummed const for Q2 > Q2Max.

Definition at line 66 of file BBA03ELFormFactorsModel.h.

Referenced by Gep(), and LoadConfig().


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