BBA05ELFormFactorsModel.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2019, The GENIE Collaboration
4  For the full text of the license visit http://copyright.genie-mc.org
5  or see $GENIE/LICENSE
6 
7  Author: Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk>
8  University of Liverpool & STFC Rutherford Appleton Lab
9 
10  For the class documentation see the corresponding header file.
11 
12  Important revisions after version 2.0.0 :
13  @ Sep 19, 2009 - CA
14  Moved into the ElFF package from its previous location
15 
16 */
17 //____________________________________________________________________________
18 
22 
23 using namespace genie;
24 
25 //____________________________________________________________________________
27 ELFormFactorsModelI("genie::BBA05ELFormFactorsModel")
28 {
29 
30 }
31 //____________________________________________________________________________
33 ELFormFactorsModelI("genie::BBA05ELFormFactorsModel", config)
34 {
35 
36 }
37 //____________________________________________________________________________
39 {
40 
41 }
42 //____________________________________________________________________________
43 double BBA05ELFormFactorsModel::Gep(const Interaction * interaction) const
44 {
45  double t = this->tau(interaction);
46  double gep = this->BBA05Fit(t,fGep);
47  return gep;
48 }
49 //____________________________________________________________________________
50 double BBA05ELFormFactorsModel::Gmp(const Interaction * interaction) const
51 {
52  double t = this->tau(interaction);
53  double gmp = this->BBA05Fit(t,fGmp);
54  gmp *= fMuP;
55  return gmp;
56 }
57 //____________________________________________________________________________
58 double BBA05ELFormFactorsModel::Gen(const Interaction * interaction) const
59 {
60  double t = this->tau(interaction);
61  double gen = this->BBA05Fit(t,fGen);
62  return gen;
63 }
64 //____________________________________________________________________________
65 double BBA05ELFormFactorsModel::Gmn(const Interaction * interaction) const
66 {
67  double t = this->tau(interaction);
68  double gmn = this->BBA05Fit(t,fGmn);
69  gmn *= fMuN;
70  return gmn;
71 }
72 //____________________________________________________________________________
74 {
75  Algorithm::Configure(config);
76  this->LoadConfig();
77 }
78 //____________________________________________________________________________
80 {
81  Algorithm::Configure(config);
82  this->LoadConfig();
83 }
84 //____________________________________________________________________________
86 {
87  //-- load the BBA2005 fit coefficients
88  GetParam( "BBA05-Gep-a0", fGep.a0) ;
89  GetParam( "BBA05-Gep-a1", fGep.a1) ;
90  GetParam( "BBA05-Gep-a2", fGep.a2) ;
91 
92  GetParam( "BBA05-Gep-b1", fGep.b1 ) ;
93  GetParam( "BBA05-Gep-b2", fGep.b2 ) ;
94  GetParam( "BBA05-Gep-b3", fGep.b3 ) ;
95  GetParam( "BBA05-Gep-b4", fGep.b4 ) ;
96 
97  GetParam( "BBA05-Gmp-a0", fGmp.a0 ) ;
98  GetParam( "BBA05-Gmp-a1", fGmp.a1 ) ;
99  GetParam( "BBA05-Gmp-a2", fGmp.a2 ) ;
100 
101  GetParam( "BBA05-Gmp-b1", fGmp.b1 ) ;
102  GetParam( "BBA05-Gmp-b2", fGmp.b2 ) ;
103  GetParam( "BBA05-Gmp-b3", fGmp.b3 ) ;
104  GetParam( "BBA05-Gmp-b4", fGmp.b4 ) ;
105 
106  GetParam( "BBA05-Gen-a0", fGen.a0 ) ;
107  GetParam( "BBA05-Gen-a1", fGen.a1 ) ;
108  GetParam( "BBA05-Gen-a2", fGen.a2 ) ;
109 
110  GetParam( "BBA05-Gen-b1", fGen.b1 ) ;
111  GetParam( "BBA05-Gen-b2", fGen.b2 ) ;
112  GetParam( "BBA05-Gen-b3", fGen.b3 ) ;
113  GetParam( "BBA05-Gen-b4", fGen.b4 ) ;
114 
115  GetParam( "BBA05-Gmn-a0", fGmn.a0 ) ;
116  GetParam( "BBA05-Gmn-a1", fGmn.a1 ) ;
117  GetParam( "BBA05-Gmn-a2", fGmn.a2 ) ;
118 
119  GetParam( "BBA05-Gmn-b1", fGmn.b1 ) ;
120  GetParam( "BBA05-Gmn-b2", fGmn.b2 ) ;
121  GetParam( "BBA05-Gmn-b3", fGmn.b3 ) ;
122  GetParam( "BBA05-Gmn-b4", fGmn.b4 ) ;
123 
124  //-- anomalous magnetic moments
125  GetParam( "AnomMagnMoment-P", fMuP ) ;
126  GetParam( "AnomMagnMoment-N", fMuN ) ;
127 
128 }
129 //____________________________________________________________________________
131  double t, const BBA2005Fit_t & fp) const
132 {
133  double t2 = TMath::Power(t, 2);
134  double t3 = TMath::Power(t, 3);
135  double t4 = TMath::Power(t2,2);
136 
137  double Gn = (fp.a0) + (fp.a1*t) + (fp.a2*t2);
138  double Gd = 1 + (fp.b1*t) + (fp.b2*t2) + (fp.b3*t3) + (fp.b4*t4);
139 
140  double G = Gn/Gd;
141  return G;
142 }
143 //____________________________________________________________________________
144 double BBA05ELFormFactorsModel::tau(const Interaction * interaction) const
145 {
146  const Kinematics & kine = interaction->Kine();
147  const Target & target = interaction->InitState().Tgt();
148 
149  double q2 = kine.q2(); // momentum transfer, <0
150  double M2 = TMath::Power(target.HitNucMass(),2); // Mnucl^2
151 
152  double t = -q2/(4*M2);
153  return t;
154 }
155 //____________________________________________________________________________
BBA2005Fit_t fGen
BBA2005 fit coefficients for Gen.
const XML_Char * target
Definition: expat.h:268
BBA2005Fit_t fGmp
BBA2005 fit coefficients for Gmp.
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
BBA2005Fit_t fGep
BBA2005 fit coefficients for Gep.
double HitNucMass(void) const
Definition: Target.cxx:250
Generated/set kinematical variables for an event.
Definition: Kinematics.h:40
Definition: config.py:1
Double_t q2[12][num]
Definition: f2_nu.C:137
Summary information for an interaction.
Definition: Interaction.h:56
double q2(bool selected=false) const
Definition: Kinematics.cxx:151
Pure abstract base class. Defines the ELFormFactorsModelI interface to be implemented by any algorith...
double BBA05Fit(double tau, const BBA2005Fit_t &fp) const
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:41
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:70
double t2
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 Gmn(const Interaction *interaction) const
Compute the elastic form factor G_{mn} for the input interaction.
double tau(const Interaction *interaction) const
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:66
void Configure(const Registry &config)
const InitialState & InitState(void) const
Definition: Interaction.h:69
FILE * fp
double Gen(const Interaction *interaction) const
Compute the elastic form factor G_{en} for the input interaction.
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
const Target & Tgt(void) const
Definition: InitialState.h:67
BBA2005Fit_t fGmn
BBA2005 fit coefficients for Gmn.
double fMuP
Anomalous proton magnetic moment.
double fMuN
Anomalous neutron magnetic moment.