Public Member Functions | Private Member Functions | Private Attributes | List of all members
genie::BBA07ELFormFactorsModel Class Reference

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

#include <BBA07ELFormFactorsModel.h>

Inheritance diagram for genie::BBA07ELFormFactorsModel:
genie::ELFormFactorsModelI genie::Algorithm

Public Member Functions

 BBA07ELFormFactorsModel ()
 
 BBA07ELFormFactorsModel (string config)
 
virtual ~BBA07ELFormFactorsModel ()
 
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 AN (double x, double c1, double c2, double c3, double c4, double c5, double c6, double c7) const
 

Private Attributes

BBA2007Fit_t fGep
 BBA2007 fit coefficients for Gep. More...
 
BBA2007Fit_t fGen
 BBA2007 fit coefficients for Gen. More...
 
BBA2007Fit_t fGmp
 BBA2007 fit coefficients for Gmp. More...
 
BBA2007Fit_t fGmn
 BBA2007 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)
 
- 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
 
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< boolfOwnerships
 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

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

A.Bodek, R.Bradford, H.Budd and S.Avvakumov, Euro.Phys.J.C53 (2008);[arXiv:0708.1946 [hep-ex]]

Author
Igor Kakorin kakor.nosp@m.in@j.nosp@m.inr.r.nosp@m.u Joint Institute for Nuclear Research
adapted from fortran code provided by: Konstantin Kuzmin kkuzm.nosp@m.in@t.nosp@m.heor..nosp@m.jinr.nosp@m..ru,
Joint Institute for Nuclear Research Institute for Theoretical and Experimental Physics
Vladimir Lyubushkin,
Joint Institute for Nuclear Research
Vadim Naumov vnaum.nosp@m.ov@t.nosp@m.heor..nosp@m.jinr.nosp@m..ru,
Joint Institute for Nuclear Research
based on code of: Costas Andreopoulos <constantinos.andreopoulos cern.ch>
University of Liverpool & STFC Rutherford Appleton Laboratory

Dec 01, 2017

Copyright (c) 2003-2020, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Definition at line 52 of file BBA07ELFormFactorsModel.h.

Constructor & Destructor Documentation

BBA07ELFormFactorsModel::BBA07ELFormFactorsModel ( )

Definition at line 36 of file BBA07ELFormFactorsModel.cxx.

36  :
37 ELFormFactorsModelI("genie::BBA07ELFormFactorsModel")
38 {
39 
40 }
BBA07ELFormFactorsModel::BBA07ELFormFactorsModel ( string  config)

Definition at line 42 of file BBA07ELFormFactorsModel.cxx.

42  :
43 ELFormFactorsModelI("genie::BBA07ELFormFactorsModel", config)
44 {
45 
46 }
static Config * config
Definition: config.cpp:1054
BBA07ELFormFactorsModel::~BBA07ELFormFactorsModel ( )
virtual

Definition at line 48 of file BBA07ELFormFactorsModel.cxx.

49 {
50 
51 }

Member Function Documentation

double BBA07ELFormFactorsModel::AN ( double  x,
double  c1,
double  c2,
double  c3,
double  c4,
double  c5,
double  c6,
double  c7 
) const
private

Definition at line 161 of file BBA07ELFormFactorsModel.cxx.

162 {
163  const double d1 = (0.0-1.0/6)*(0.0-2.0/6)*(0.0-3.0/6)*(0.0-4.0/6)*(0.0-5.0/6)*(0.0-1.0);
164  const double d2 = (1.0/6-0.0)*(1.0/6-2.0/6)*(1.0/6-3.0/6)*(1.0/6-4.0/6)*(1.0/6-5.0/6)*(1.0/6-1.0);
165  const double d3 = (2.0/6-0.0)*(2.0/6-1.0/6)*(2.0/6-3.0/6)*(2.0/6-4.0/6)*(2.0/6-5.0/6)*(2.0/6-1.0);
166  const double d4 = (3.0/6-0.0)*(3.0/6-1.0/6)*(3.0/6-2.0/6)*(3.0/6-4.0/6)*(3.0/6-5.0/6)*(3.0/6-1.0);
167  const double d5 = (4.0/6-0.0)*(4.0/6-1.0/6)*(4.0/6-2.0/6)*(4.0/6-3.0/6)*(4.0/6-5.0/6)*(4.0/6-1.0);
168  const double d6 = (5.0/6-0.0)*(5.0/6-1.0/6)*(5.0/6-2.0/6)*(5.0/6-3.0/6)*(5.0/6-4.0/6)*(5.0/6-1.0);
169  const double d7 = (1.0-0.0)*(1.0-1.0/6)*(1.0-2.0/6)*(1.0-3.0/6)*(1.0-4.0/6)*(1.0-5.0/6);
170 
171  return c1* (x-1.0/6)*(x-2.0/6)*(x-3.0/6)*(x-4.0/6)*(x-5.0/6)*(x-1.0)/d1+
172  c2*(x-0.0)* (x-2.0/6)*(x-3.0/6)*(x-4.0/6)*(x-5.0/6)*(x-1.0)/d2+
173  c3*(x-0.0)*(x-1.0/6)* (x-3.0/6)*(x-4.0/6)*(x-5.0/6)*(x-1.0)/d3+
174  c4*(x-0.0)*(x-1.0/6)*(x-2.0/6)* (x-4.0/6)*(x-5.0/6)*(x-1.0)/d4+
175  c5*(x-0.0)*(x-1.0/6)*(x-2.0/6)*(x-3.0/6)* (x-5.0/6)*(x-1.0)/d5+
176  c6*(x-0.0)*(x-1.0/6)*(x-2.0/6)*(x-3.0/6)*(x-4.0/6)* (x-1.0)/d6+
177  c7*(x-0.0)*(x-1.0/6)*(x-2.0/6)*(x-3.0/6)*(x-4.0/6)*(x-5.0/6) /d7;
178 }
list x
Definition: train.py:276
void BBA07ELFormFactorsModel::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 103 of file BBA07ELFormFactorsModel.cxx.

104 {
105  Algorithm::Configure(config);
106  this->LoadConfig();
107 }
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
void BBA07ELFormFactorsModel::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 109 of file BBA07ELFormFactorsModel.cxx.

110 {
112  this->LoadConfig();
113 }
static Config * config
Definition: config.cpp:1054
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
double BBA07ELFormFactorsModel::Gen ( const Interaction interaction) const
virtual

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

Implements genie::ELFormFactorsModelI.

Definition at line 78 of file BBA07ELFormFactorsModel.cxx.

79 {
80  const Kinematics & kine = interaction->Kine();
81  double q2 = kine.q2();
82  double M2 = kNeutronMass*kNeutronMass;
83  double tn = -q2/(4*M2);
84  double xn = 2.0/(1.0+TMath::Sqrt(1.0+1.0/tn));
85  double gep = this->Gep(interaction);
86  double gen = AN(xn,fGen.p1,fGen.p2,fGen.p3,fGen.p4,fGen.p5,fGen.p6,fGen.p7)*gep*1.7*tn/(1+3.3*tn);
87  return gen;
88 }
BBA2007Fit_t fGen
BBA2007 fit coefficients for Gen.
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
static const double kNeutronMass
Definition: Constants.h:76
gen
Definition: demo.py:24
double AN(double x, double c1, double c2, double c3, double c4, double c5, double c6, double c7) const
double Gep(const Interaction *interaction) const
Compute the elastic form factor G_{ep} for the input interaction.
double BBA07ELFormFactorsModel::Gep ( const Interaction interaction) const
virtual

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

Implements genie::ELFormFactorsModelI.

Definition at line 53 of file BBA07ELFormFactorsModel.cxx.

54 {
55  const Kinematics & kine = interaction->Kine();
56  double q2 = kine.q2();
57  double M2 = kProtonMass*kProtonMass;
58  double tp = -q2/(4*M2);
59  double xp = 2.0/(1.0+TMath::Sqrt(1.0+1.0/tp));
60  double GEp = (1.0+fGep.a1*tp)/(1.0+tp*(fGep.b1+tp*(fGep.b2+fGep.b3*tp)));
61  double gep = AN(xp,fGep.p1,fGep.p2,fGep.p3,fGep.p4,fGep.p5,fGep.p6,fGep.p7)*GEp;
62  return gep;
63 }
Generated/set kinematical variables for an event.
Definition: Kinematics.h:39
BBA2007Fit_t fGep
BBA2007 fit coefficients for Gep.
double q2(bool selected=false) const
Definition: Kinematics.cxx:141
const Kinematics & Kine(void) const
Definition: Interaction.h:71
double AN(double x, double c1, double c2, double c3, double c4, double c5, double c6, double c7) const
static const double kProtonMass
Definition: Constants.h:75
double BBA07ELFormFactorsModel::Gmn ( const Interaction interaction) const
virtual

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

Implements genie::ELFormFactorsModelI.

Definition at line 90 of file BBA07ELFormFactorsModel.cxx.

91 {
92  const Kinematics & kine = interaction->Kine();
93  double q2 = kine.q2();
94  double M2 = kNeutronMass*kNeutronMass;
95  double tn = -q2/(4*M2);
96  double xn = 2.0/(1.0+TMath::Sqrt(1.0+1.0/tn));
97  double gmp = this->Gmp(interaction);
98  double gmn = AN(xn,fGmn.p1,fGmn.p2,fGmn.p3,fGmn.p4,fGmn.p5,fGmn.p6,fGmn.p7)*gmp;
99  gmn *= fMuN/fMuP;
100  return gmn;
101 }
Generated/set kinematical variables for an event.
Definition: Kinematics.h:39
double Gmp(const Interaction *interaction) const
Compute the elastic form factor G_{mp} for the input interaction.
double q2(bool selected=false) const
Definition: Kinematics.cxx:141
const Kinematics & Kine(void) const
Definition: Interaction.h:71
static const double kNeutronMass
Definition: Constants.h:76
BBA2007Fit_t fGmn
BBA2007 fit coefficients for Gmn.
double AN(double x, double c1, double c2, double c3, double c4, double c5, double c6, double c7) const
double fMuN
Anomalous neutron magnetic moment.
double fMuP
Anomalous proton magnetic moment.
double BBA07ELFormFactorsModel::Gmp ( const Interaction interaction) const
virtual

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

Implements genie::ELFormFactorsModelI.

Definition at line 65 of file BBA07ELFormFactorsModel.cxx.

66 {
67  const Kinematics & kine = interaction->Kine();
68  double q2 = kine.q2();
69  double M2 = kProtonMass*kProtonMass;
70  double tp = -q2/(4*M2);
71  double xp = 2.0/(1.0+TMath::Sqrt(1.0+1.0/tp));
72  double GMp = (1.0+fGmp.a1*tp)/(1.0+tp*(fGmp.b1+tp*(fGmp.b2+fGmp.b3*tp)));
73  double gmp = AN(xp,fGmp.p1,fGmp.p2,fGmp.p3,fGmp.p4,fGmp.p5,fGmp.p6,fGmp.p7)*GMp;
74  gmp *= fMuP;
75  return gmp;
76 }
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
BBA2007Fit_t fGmp
BBA2007 fit coefficients for Gmp.
double AN(double x, double c1, double c2, double c3, double c4, double c5, double c6, double c7) const
double fMuP
Anomalous proton magnetic moment.
static const double kProtonMass
Definition: Constants.h:75
void BBA07ELFormFactorsModel::LoadConfig ( void  )
private

Definition at line 115 of file BBA07ELFormFactorsModel.cxx.

116 {
117 
118  //-- load the BBA2007 fit coefficients
119  GetParam( "BBA07-Gep-a1", fGep.a1) ;
120  GetParam( "BBA07-Gep-b1", fGep.b1) ;
121  GetParam( "BBA07-Gep-b2", fGep.b2) ;
122  GetParam( "BBA07-Gep-b3", fGep.b3) ;
123  GetParam( "BBA07-Gmp-a1", fGmp.a1) ;
124  GetParam( "BBA07-Gmp-b1", fGmp.b1) ;
125  GetParam( "BBA07-Gmp-b2", fGmp.b2) ;
126  GetParam( "BBA07-Gmp-b3", fGmp.b3) ;
127  GetParam( "BBA07-Gep-p1", fGep.p1) ;
128  GetParam( "BBA07-Gep-p2", fGep.p2) ;
129  GetParam( "BBA07-Gep-p3", fGep.p3) ;
130  GetParam( "BBA07-Gep-p4", fGep.p4) ;
131  GetParam( "BBA07-Gep-p5", fGep.p5) ;
132  GetParam( "BBA07-Gep-p6", fGep.p6) ;
133  GetParam( "BBA07-Gep-p7", fGep.p7) ;
134  GetParam( "BBA07-Gen-p1", fGen.p1) ;
135  GetParam( "BBA07-Gen-p2", fGen.p2) ;
136  GetParam( "BBA07-Gen-p3", fGen.p3) ;
137  GetParam( "BBA07-Gen-p4", fGen.p4) ;
138  GetParam( "BBA07-Gen-p5", fGen.p5) ;
139  GetParam( "BBA07-Gen-p6", fGen.p6) ;
140  GetParam( "BBA07-Gen-p7", fGen.p7) ;
141  GetParam( "BBA07-Gmp-p1", fGmp.p1) ;
142  GetParam( "BBA07-Gmp-p2", fGmp.p2) ;
143  GetParam( "BBA07-Gmp-p3", fGmp.p3) ;
144  GetParam( "BBA07-Gmp-p4", fGmp.p4) ;
145  GetParam( "BBA07-Gmp-p5", fGmp.p5) ;
146  GetParam( "BBA07-Gmp-p6", fGmp.p6) ;
147  GetParam( "BBA07-Gmp-p7", fGmp.p7) ;
148  GetParam( "BBA07-Gmn-p1", fGmn.p1) ;
149  GetParam( "BBA07-Gmn-p2", fGmn.p2) ;
150  GetParam( "BBA07-Gmn-p3", fGmn.p3) ;
151  GetParam( "BBA07-Gmn-p4", fGmn.p4) ;
152  GetParam( "BBA07-Gmn-p5", fGmn.p5) ;
153  GetParam( "BBA07-Gmn-p6", fGmn.p6) ;
154  GetParam( "BBA07-Gmn-p7", fGmn.p7) ;
155 
156  //-- anomalous magnetic moments
157  GetParam( "AnomMagnMoment-P", fMuP ) ;
158  GetParam( "AnomMagnMoment-N", fMuN ) ;
159 }
BBA2007Fit_t fGen
BBA2007 fit coefficients for Gen.
BBA2007Fit_t fGep
BBA2007 fit coefficients for Gep.
BBA2007Fit_t fGmn
BBA2007 fit coefficients for Gmn.
BBA2007Fit_t fGmp
BBA2007 fit coefficients for Gmp.
double fMuN
Anomalous neutron magnetic moment.
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
double fMuP
Anomalous proton magnetic moment.

Member Data Documentation

BBA2007Fit_t genie::BBA07ELFormFactorsModel::fGen
private

BBA2007 fit coefficients for Gen.

Definition at line 82 of file BBA07ELFormFactorsModel.h.

BBA2007Fit_t genie::BBA07ELFormFactorsModel::fGep
private

BBA2007 fit coefficients for Gep.

Definition at line 81 of file BBA07ELFormFactorsModel.h.

BBA2007Fit_t genie::BBA07ELFormFactorsModel::fGmn
private

BBA2007 fit coefficients for Gmn.

Definition at line 84 of file BBA07ELFormFactorsModel.h.

BBA2007Fit_t genie::BBA07ELFormFactorsModel::fGmp
private

BBA2007 fit coefficients for Gmp.

Definition at line 83 of file BBA07ELFormFactorsModel.h.

double genie::BBA07ELFormFactorsModel::fMuN
private

Anomalous neutron magnetic moment.

Definition at line 86 of file BBA07ELFormFactorsModel.h.

double genie::BBA07ELFormFactorsModel::fMuP
private

Anomalous proton magnetic moment.

Definition at line 85 of file BBA07ELFormFactorsModel.h.


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