GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
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:
Inheritance graph
[legend]
Collaboration diagram for genie::BBA03ELFormFactorsModel:
Collaboration graph
[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. More...
 
double Gmp (const Interaction *interaction) const
 Compute the elastic form factor G_{mp} for the input interaction. More...
 
double Gen (const Interaction *interaction) const
 Compute the elastic form factor G_{en} for the input interaction. More...
 
double Gmn (const Interaction *interaction) const
 Compute the elastic form factor G_{mn} for the input interaction. More...
 
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. More...
 
virtual AlgStatus_t GetStatus (void) const
 Get algorithm status. More...
 
virtual bool AllowReconfig (void) const
 
virtual AlgCmp_t Compare (const Algorithm *alg) const
 Compare with input algorithm. More...
 
virtual void SetId (const AlgId &id)
 Set algorithm ID. More...
 
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. More...
 

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

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. More...
 
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. More...
 
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. More...
 
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 More...
 
int AddLowRegistry (Registry *rp, bool owns=true)
 add registry with lowest priority, also update ownership More...
 
int MergeTopRegistry (const Registry &r)
 
int AddTopRegisties (const vector< Registry * > &rs, bool owns=false)
 Add registries with top priority, also udated Ownerships. More...
 
- Protected Attributes inherited from genie::Algorithm
bool fAllowReconfig
 
bool fOwnsSubstruc
 true if it owns its substructure (sub-algs,...) More...
 
AlgId fID
 algorithm name and configuration set More...
 
vector< Registry * > fConfVect
 
vector< bool > fOwnerships
 ownership for every registry in fConfVect More...
 
AlgStatus_t fStatus
 algorithm execution status More...
 
AlgMapfOwnedSubAlgMp
 local pool for owned sub-algs (taken out of the factory pool) More...
 

Detailed Description

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

References:
H.Budd, NuINT-02 proceedings
Author
Costas Andreopoulos <c.andreopoulos cern.ch> University of Liverpool
Created:
Oct 19, 2005
License:
Copyright (c) 2003-2024, 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::BBA03ELFormFactorsModel ( )

Definition at line 21 of file BBA03ELFormFactorsModel.cxx.

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

Definition at line 27 of file BBA03ELFormFactorsModel.cxx.

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

Definition at line 33 of file BBA03ELFormFactorsModel.cxx.

34 {
35 
36 }

Member Function Documentation

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

Definition at line 140 of file BBA03ELFormFactorsModel.cxx.

References genie::SBBA2003Fit::a10, genie::SBBA2003Fit::a12, genie::SBBA2003Fit::a2, genie::SBBA2003Fit::a4, genie::SBBA2003Fit::a6, genie::SBBA2003Fit::a8, genie::units::g, and genie::utils::kinematics::Q2().

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

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 }
static constexpr double g
Definition: Units.h:144
double Q2(const Interaction *const i)
Definition: KineUtils.cxx:1077
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.

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

87 {
88  Algorithm::Configure(config);
89  this->LoadConfig();
90 }
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
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.

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

93 {
94  Algorithm::Configure(param_set);
95  this->LoadConfig();
96 }
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
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.

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

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 }
double HitNucMass(void) const
Definition: Target.cxx:233
std::mt19937 gen(rd())
static constexpr double b
Definition: Units.h:78
double fMuN
Anomalous neutron magnetic moment.
double q2(bool selected=false) const
Definition: Kinematics.cxx:141
const double a
double fGenB
Krutov parameterization for Gen.
const Kinematics & Kine(void) const
Definition: Interaction.h:71
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition: Target.h:40
const InitialState & InitState(void) const
Definition: Interaction.h:69
const Target & Tgt(void) const
Definition: InitialState.h:66
double fGenA
Krutov parameterization for Gen.
double fMv2
Elactic vector mass.
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.

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

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 }
double fMuP
Anomalous proton magnetic moment.
double fQ2Max
Gep/Gmp assummed const for Q2 &gt; Q2Max.
BBA2003Fit_t fGep
BBA2003 fit coefficients for Gep.
double q2(bool selected=false) const
Definition: Kinematics.cxx:141
const Kinematics & Kine(void) const
Definition: Interaction.h:71
BBA2003Fit_t fGmp
BBA2003 fit coefficients for Gmp.
double BBA03Fit(double q2, double g0, const BBA2003Fit_t &fp) const
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.

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

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.
double fMuN
Anomalous neutron magnetic moment.
double q2(bool selected=false) const
Definition: Kinematics.cxx:141
const Kinematics & Kine(void) const
Definition: Interaction.h:71
double BBA03Fit(double q2, double g0, const BBA2003Fit_t &fp) const
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.

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

55 {
56  double q2 = interaction->Kine().q2();
57  double gmp = this->BBA03Fit(q2, fMuP, fGmp);
58  return gmp;
59 }
double fMuP
Anomalous proton magnetic moment.
double q2(bool selected=false) const
Definition: Kinematics.cxx:141
const Kinematics & Kine(void) const
Definition: Interaction.h:71
BBA2003Fit_t fGmp
BBA2003 fit coefficients for Gmp.
double BBA03Fit(double q2, double g0, const BBA2003Fit_t &fp) const
void BBA03ELFormFactorsModel::LoadConfig ( void  )
private

Definition at line 98 of file BBA03ELFormFactorsModel.cxx.

References genie::SBBA2003Fit::a10, genie::SBBA2003Fit::a12, genie::SBBA2003Fit::a2, genie::SBBA2003Fit::a4, genie::SBBA2003Fit::a6, genie::SBBA2003Fit::a8, fGenA, fGenB, fGep, fGmn, fGmp, fMuN, fMuP, fMv, fMv2, fQ2Max, and genie::Algorithm::GetParam().

Referenced by Configure().

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 }
double fMuP
Anomalous proton magnetic moment.
BBA2003Fit_t fGmn
BBA2003 fit coefficients for Gmn.
double fMv
Elactic vector mass.
double fQ2Max
Gep/Gmp assummed const for Q2 &gt; Q2Max.
BBA2003Fit_t fGep
BBA2003 fit coefficients for Gep.
double fMuN
Anomalous neutron magnetic moment.
double fGenB
Krutov parameterization for Gen.
BBA2003Fit_t fGmp
BBA2003 fit coefficients for Gmp.
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
double fGenA
Krutov parameterization for Gen.
double fMv2
Elactic vector mass.

Member Data Documentation

double genie::BBA03ELFormFactorsModel::fGenA
private

Krutov parameterization for Gen.

Definition at line 64 of file BBA03ELFormFactorsModel.h.

Referenced by Gen(), and LoadConfig().

double genie::BBA03ELFormFactorsModel::fGenB
private

Krutov parameterization for Gen.

Definition at line 65 of file BBA03ELFormFactorsModel.h.

Referenced by Gen(), and LoadConfig().

BBA2003Fit_t genie::BBA03ELFormFactorsModel::fGep
private

BBA2003 fit coefficients for Gep.

Definition at line 61 of file BBA03ELFormFactorsModel.h.

Referenced by Gep(), and LoadConfig().

BBA2003Fit_t genie::BBA03ELFormFactorsModel::fGmn
private

BBA2003 fit coefficients for Gmn.

Definition at line 63 of file BBA03ELFormFactorsModel.h.

Referenced by Gmn(), and LoadConfig().

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().

double genie::BBA03ELFormFactorsModel::fMuN
private

Anomalous neutron magnetic moment.

Definition at line 70 of file BBA03ELFormFactorsModel.h.

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

double genie::BBA03ELFormFactorsModel::fMuP
private

Anomalous proton magnetic moment.

Definition at line 69 of file BBA03ELFormFactorsModel.h.

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

double genie::BBA03ELFormFactorsModel::fMv
private

Elactic vector mass.

Definition at line 67 of file BBA03ELFormFactorsModel.h.

Referenced by LoadConfig().

double genie::BBA03ELFormFactorsModel::fMv2
private

Elactic vector mass.

Definition at line 68 of file BBA03ELFormFactorsModel.h.

Referenced by Gen(), and LoadConfig().

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: