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::BBA05ELFormFactorsModel Class Reference

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

#include <BBA05ELFormFactorsModel.h>

Inheritance diagram for genie::BBA05ELFormFactorsModel:
Inheritance graph
[legend]
Collaboration diagram for genie::BBA05ELFormFactorsModel:
Collaboration graph
[legend]

Public Member Functions

 BBA05ELFormFactorsModel ()
 
 BBA05ELFormFactorsModel (string config)
 
virtual ~BBA05ELFormFactorsModel ()
 
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 BBA05Fit (double tau, const BBA2005Fit_t &fp) const
 
double tau (const Interaction *interaction) const
 

Private Attributes

BBA2005Fit_t fGep
 BBA2005 fit coefficients for Gep. More...
 
BBA2005Fit_t fGen
 BBA2005 fit coefficients for Gen. More...
 
BBA2005Fit_t fGmp
 BBA2005 fit coefficients for Gmp. More...
 
BBA2005Fit_t fGmn
 BBA2005 fit coefficients for Gmn. 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 BBA2005 parameterization.

References:
R.Bradford, A.Bodek, H.Budd and J.Arrington, hep-ex/0602017
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 BBA05ELFormFactorsModel.h.

Constructor & Destructor Documentation

BBA05ELFormFactorsModel::BBA05ELFormFactorsModel ( )

Definition at line 18 of file BBA05ELFormFactorsModel.cxx.

18  :
19 ELFormFactorsModelI("genie::BBA05ELFormFactorsModel")
20 {
21 
22 }
BBA05ELFormFactorsModel::BBA05ELFormFactorsModel ( string  config)

Definition at line 24 of file BBA05ELFormFactorsModel.cxx.

24  :
25 ELFormFactorsModelI("genie::BBA05ELFormFactorsModel", config)
26 {
27 
28 }
BBA05ELFormFactorsModel::~BBA05ELFormFactorsModel ( )
virtual

Definition at line 30 of file BBA05ELFormFactorsModel.cxx.

31 {
32 
33 }

Member Function Documentation

double BBA05ELFormFactorsModel::BBA05Fit ( double  tau,
const BBA2005Fit_t fp 
) const
private

Definition at line 122 of file BBA05ELFormFactorsModel.cxx.

References genie::SBBA2005Fit::a0, genie::SBBA2005Fit::a1, genie::SBBA2005Fit::a2, genie::SBBA2005Fit::b1, genie::SBBA2005Fit::b2, genie::SBBA2005Fit::b3, and genie::SBBA2005Fit::b4.

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

124 {
125  double t2 = TMath::Power(t, 2);
126  double t3 = TMath::Power(t, 3);
127  double t4 = TMath::Power(t2,2);
128 
129  double Gn = (fp.a0) + (fp.a1*t) + (fp.a2*t2);
130  double Gd = 1 + (fp.b1*t) + (fp.b2*t2) + (fp.b3*t3) + (fp.b4*t4);
131 
132  double G = Gn/Gd;
133  return G;
134 }
void BBA05ELFormFactorsModel::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 65 of file BBA05ELFormFactorsModel.cxx.

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

66 {
67  Algorithm::Configure(config);
68  this->LoadConfig();
69 }
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
void BBA05ELFormFactorsModel::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 71 of file BBA05ELFormFactorsModel.cxx.

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

72 {
73  Algorithm::Configure(config);
74  this->LoadConfig();
75 }
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
double BBA05ELFormFactorsModel::Gen ( const Interaction interaction) const
virtual

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

Implements genie::ELFormFactorsModelI.

Definition at line 50 of file BBA05ELFormFactorsModel.cxx.

References BBA05Fit(), fGen, gen(), and tau().

51 {
52  double t = this->tau(interaction);
53  double gen = this->BBA05Fit(t,fGen);
54  return gen;
55 }
BBA2005Fit_t fGen
BBA2005 fit coefficients for Gen.
std::mt19937 gen(rd())
double BBA05Fit(double tau, const BBA2005Fit_t &fp) const
double tau(const Interaction *interaction) const
double BBA05ELFormFactorsModel::Gep ( const Interaction interaction) const
virtual

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

Implements genie::ELFormFactorsModelI.

Definition at line 35 of file BBA05ELFormFactorsModel.cxx.

References BBA05Fit(), fGep, and tau().

36 {
37  double t = this->tau(interaction);
38  double gep = this->BBA05Fit(t,fGep);
39  return gep;
40 }
BBA2005Fit_t fGep
BBA2005 fit coefficients for Gep.
double BBA05Fit(double tau, const BBA2005Fit_t &fp) const
double tau(const Interaction *interaction) const
double BBA05ELFormFactorsModel::Gmn ( const Interaction interaction) const
virtual

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

Implements genie::ELFormFactorsModelI.

Definition at line 57 of file BBA05ELFormFactorsModel.cxx.

References BBA05Fit(), fGmn, fMuN, and tau().

58 {
59  double t = this->tau(interaction);
60  double gmn = this->BBA05Fit(t,fGmn);
61  gmn *= fMuN;
62  return gmn;
63 }
double BBA05Fit(double tau, const BBA2005Fit_t &fp) const
double tau(const Interaction *interaction) const
BBA2005Fit_t fGmn
BBA2005 fit coefficients for Gmn.
double fMuN
Anomalous neutron magnetic moment.
double BBA05ELFormFactorsModel::Gmp ( const Interaction interaction) const
virtual

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

Implements genie::ELFormFactorsModelI.

Definition at line 42 of file BBA05ELFormFactorsModel.cxx.

References BBA05Fit(), fGmp, fMuP, and tau().

43 {
44  double t = this->tau(interaction);
45  double gmp = this->BBA05Fit(t,fGmp);
46  gmp *= fMuP;
47  return gmp;
48 }
BBA2005Fit_t fGmp
BBA2005 fit coefficients for Gmp.
double BBA05Fit(double tau, const BBA2005Fit_t &fp) const
double tau(const Interaction *interaction) const
double fMuP
Anomalous proton magnetic moment.
void BBA05ELFormFactorsModel::LoadConfig ( void  )
private

Definition at line 77 of file BBA05ELFormFactorsModel.cxx.

References genie::SBBA2005Fit::a0, genie::SBBA2005Fit::a1, genie::SBBA2005Fit::a2, genie::SBBA2005Fit::b1, genie::SBBA2005Fit::b2, genie::SBBA2005Fit::b3, genie::SBBA2005Fit::b4, fGen, fGep, fGmn, fGmp, fMuN, fMuP, and genie::Algorithm::GetParam().

Referenced by Configure().

78 {
79  //-- load the BBA2005 fit coefficients
80  GetParam( "BBA05-Gep-a0", fGep.a0) ;
81  GetParam( "BBA05-Gep-a1", fGep.a1) ;
82  GetParam( "BBA05-Gep-a2", fGep.a2) ;
83 
84  GetParam( "BBA05-Gep-b1", fGep.b1 ) ;
85  GetParam( "BBA05-Gep-b2", fGep.b2 ) ;
86  GetParam( "BBA05-Gep-b3", fGep.b3 ) ;
87  GetParam( "BBA05-Gep-b4", fGep.b4 ) ;
88 
89  GetParam( "BBA05-Gmp-a0", fGmp.a0 ) ;
90  GetParam( "BBA05-Gmp-a1", fGmp.a1 ) ;
91  GetParam( "BBA05-Gmp-a2", fGmp.a2 ) ;
92 
93  GetParam( "BBA05-Gmp-b1", fGmp.b1 ) ;
94  GetParam( "BBA05-Gmp-b2", fGmp.b2 ) ;
95  GetParam( "BBA05-Gmp-b3", fGmp.b3 ) ;
96  GetParam( "BBA05-Gmp-b4", fGmp.b4 ) ;
97 
98  GetParam( "BBA05-Gen-a0", fGen.a0 ) ;
99  GetParam( "BBA05-Gen-a1", fGen.a1 ) ;
100  GetParam( "BBA05-Gen-a2", fGen.a2 ) ;
101 
102  GetParam( "BBA05-Gen-b1", fGen.b1 ) ;
103  GetParam( "BBA05-Gen-b2", fGen.b2 ) ;
104  GetParam( "BBA05-Gen-b3", fGen.b3 ) ;
105  GetParam( "BBA05-Gen-b4", fGen.b4 ) ;
106 
107  GetParam( "BBA05-Gmn-a0", fGmn.a0 ) ;
108  GetParam( "BBA05-Gmn-a1", fGmn.a1 ) ;
109  GetParam( "BBA05-Gmn-a2", fGmn.a2 ) ;
110 
111  GetParam( "BBA05-Gmn-b1", fGmn.b1 ) ;
112  GetParam( "BBA05-Gmn-b2", fGmn.b2 ) ;
113  GetParam( "BBA05-Gmn-b3", fGmn.b3 ) ;
114  GetParam( "BBA05-Gmn-b4", fGmn.b4 ) ;
115 
116  //-- anomalous magnetic moments
117  GetParam( "AnomMagnMoment-P", fMuP ) ;
118  GetParam( "AnomMagnMoment-N", fMuN ) ;
119 
120 }
BBA2005Fit_t fGen
BBA2005 fit coefficients for Gen.
BBA2005Fit_t fGmp
BBA2005 fit coefficients for Gmp.
BBA2005Fit_t fGep
BBA2005 fit coefficients for Gep.
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
BBA2005Fit_t fGmn
BBA2005 fit coefficients for Gmn.
double fMuP
Anomalous proton magnetic moment.
double fMuN
Anomalous neutron magnetic moment.
double BBA05ELFormFactorsModel::tau ( const Interaction interaction) const
private

Definition at line 136 of file BBA05ELFormFactorsModel.cxx.

References genie::Target::HitNucMass(), genie::Interaction::InitState(), genie::Interaction::Kine(), genie::Kinematics::q2(), and genie::InitialState::Tgt().

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

137 {
138  const Kinematics & kine = interaction->Kine();
139  const Target & target = interaction->InitState().Tgt();
140 
141  double q2 = kine.q2(); // momentum transfer, <0
142  double M2 = TMath::Power(target.HitNucMass(),2); // Mnucl^2
143 
144  double t = -q2/(4*M2);
145  return t;
146 }
double HitNucMass(void) const
Definition: Target.cxx:233
Generated/set kinematical variables for an event.
Definition: Kinematics.h:39
double q2(bool selected=false) const
Definition: Kinematics.cxx:141
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

Member Data Documentation

BBA2005Fit_t genie::BBA05ELFormFactorsModel::fGen
private

BBA2005 fit coefficients for Gen.

Definition at line 63 of file BBA05ELFormFactorsModel.h.

Referenced by Gen(), and LoadConfig().

BBA2005Fit_t genie::BBA05ELFormFactorsModel::fGep
private

BBA2005 fit coefficients for Gep.

Definition at line 62 of file BBA05ELFormFactorsModel.h.

Referenced by Gep(), and LoadConfig().

BBA2005Fit_t genie::BBA05ELFormFactorsModel::fGmn
private

BBA2005 fit coefficients for Gmn.

Definition at line 65 of file BBA05ELFormFactorsModel.h.

Referenced by Gmn(), and LoadConfig().

BBA2005Fit_t genie::BBA05ELFormFactorsModel::fGmp
private

BBA2005 fit coefficients for Gmp.

Definition at line 64 of file BBA05ELFormFactorsModel.h.

Referenced by Gmp(), and LoadConfig().

double genie::BBA05ELFormFactorsModel::fMuN
private

Anomalous neutron magnetic moment.

Definition at line 67 of file BBA05ELFormFactorsModel.h.

Referenced by Gmn(), and LoadConfig().

double genie::BBA05ELFormFactorsModel::fMuP
private

Anomalous proton magnetic moment.

Definition at line 66 of file BBA05ELFormFactorsModel.h.

Referenced by Gmp(), and LoadConfig().


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