GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BBA05ELFormFactorsModel.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2024, The GENIE Collaboration
4  For the full text of the license visit http://copyright.genie-mc.org
5 
6  Costas Andreopoulos <c.andreopoulos \at cern.ch>
7  University of Liverpool
8 */
9 //____________________________________________________________________________
10 
14 
15 using namespace genie;
16 
17 //____________________________________________________________________________
19 ELFormFactorsModelI("genie::BBA05ELFormFactorsModel")
20 {
21 
22 }
23 //____________________________________________________________________________
25 ELFormFactorsModelI("genie::BBA05ELFormFactorsModel", config)
26 {
27 
28 }
29 //____________________________________________________________________________
31 {
32 
33 }
34 //____________________________________________________________________________
35 double BBA05ELFormFactorsModel::Gep(const Interaction * interaction) const
36 {
37  double t = this->tau(interaction);
38  double gep = this->BBA05Fit(t,fGep);
39  return gep;
40 }
41 //____________________________________________________________________________
42 double BBA05ELFormFactorsModel::Gmp(const Interaction * interaction) const
43 {
44  double t = this->tau(interaction);
45  double gmp = this->BBA05Fit(t,fGmp);
46  gmp *= fMuP;
47  return gmp;
48 }
49 //____________________________________________________________________________
50 double BBA05ELFormFactorsModel::Gen(const Interaction * interaction) const
51 {
52  double t = this->tau(interaction);
53  double gen = this->BBA05Fit(t,fGen);
54  return gen;
55 }
56 //____________________________________________________________________________
57 double BBA05ELFormFactorsModel::Gmn(const Interaction * interaction) const
58 {
59  double t = this->tau(interaction);
60  double gmn = this->BBA05Fit(t,fGmn);
61  gmn *= fMuN;
62  return gmn;
63 }
64 //____________________________________________________________________________
66 {
67  Algorithm::Configure(config);
68  this->LoadConfig();
69 }
70 //____________________________________________________________________________
72 {
73  Algorithm::Configure(config);
74  this->LoadConfig();
75 }
76 //____________________________________________________________________________
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 }
121 //____________________________________________________________________________
123  double t, const BBA2005Fit_t & fp) const
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 }
135 //____________________________________________________________________________
136 double BBA05ELFormFactorsModel::tau(const Interaction * interaction) const
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 }
147 //____________________________________________________________________________
BBA2005Fit_t fGen
BBA2005 fit coefficients for Gen.
BBA2005Fit_t fGmp
BBA2005 fit coefficients for Gmp.
BBA2005Fit_t fGep
BBA2005 fit coefficients for Gep.
double HitNucMass(void) const
Definition: Target.cxx:233
Generated/set kinematical variables for an event.
Definition: Kinematics.h:39
std::mt19937 gen(rd())
Summary information for an interaction.
Definition: Interaction.h:56
double q2(bool selected=false) const
Definition: Kinematics.cxx:141
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:40
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
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:65
void Configure(const Registry &config)
const InitialState & InitState(void) const
Definition: Interaction.h:69
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:66
BBA2005Fit_t fGmn
BBA2005 fit coefficients for Gmn.
double fMuP
Anomalous proton magnetic moment.
double fMuN
Anomalous neutron magnetic moment.