MARLEY (Model of Argon Reaction Low Energy Yields) v2.0.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
Loading...
Searching...
No Matches
marley::NucleonFormFactors Class Reference

Calculates nucleon form factors for both vector and axial currents. More...

#include <NucleonFormFactors.hh>

Public Member Functions

 NucleonFormFactors (const JSON &config)
 
const AxialFormFactorsaxial_ff () const
 Get const access to the owned axial form factors.
 
double F1 (double Q2) const
 
double F1n (double Q2) const
 
double F1p (double Q2) const
 
double F2 (double Q2) const
 
double F2n (double Q2) const
 
double F2p (double Q2) const
 
double FA (double Q2) const
 
double FP (double Q2) const
 
const SachsFormFactorssachs_ff () const
 Get const access to the owned Sachs form factors.
 

Protected Attributes

std::shared_ptr< AxialFormFactorsaxial_ff_
 
std::shared_ptr< SachsFormFactorssachs_ff_
 

Detailed Description

Calculates nucleon form factors for both vector and axial currents.

Definition at line 150 of file NucleonFormFactors.hh.

Constructor & Destructor Documentation

◆ NucleonFormFactors()

marley::NucleonFormFactors::NucleonFormFactors ( const JSON & config)

Definition at line 140 of file NucleonFormFactors.cc.

140 {
141
142 // Flag used to ensure that we send information about the form factor
143 // configuration to the logger exactly once when this function is first
144 // called
145 static bool need_to_log = true;
146
147 // If the user has requested use of the allowed approximation, then
148 // configure trivial form factor models and return without logging this
149 // choice (it will be handled elsewhere)
151 sachs_ff_ = std::make_shared< TrivialSachsFormFactors >();
152 axial_ff_ = std::make_shared< TrivialAxialFormFactors >();
153 need_to_log = false;
154 return;
155 }
156
157 if ( !config.has_key("sachs_model") ) {
158 throw marley::Error( "Missing Sachs form factor model configuration" );
159 }
160 const auto& sachs_json = config.at( "sachs_model" );
161 if ( !sachs_json.is_string() ) {
162 throw marley::Error( "Invalid Sachs form factor model "
163 + sachs_json.dump_string() );
164 }
165 std::string sachs_ff_model = sachs_json.to_string();
166
167 if ( !config.has_key("axial_model") ) {
168 throw marley::Error( "Missing axial form factor model configuration" );
169 }
170 const auto& axial_json = config.at( "axial_model" );
171 if ( !axial_json.is_string() ) {
172 throw marley::Error( "Invalid axial form factor model "
173 + axial_json.dump_string() );
174 }
175 std::string axial_ff_model = axial_json.to_string();
176
177 // Choose the model to use for the Sachs form factors
178 if ( sachs_ff_model == "trivial" ) {
179 sachs_ff_ = std::make_shared< TrivialSachsFormFactors >();
180 if ( need_to_log ) {
181 MARLEY_LOG( INFO, "physics.formfactor" ) << "Using trivial Sachs form factors";
182 }
183 }
184 else if ( sachs_ff_model == "dipole" ) {
185 sachs_ff_ = std::make_shared< DipoleSachsFormFactors >( marley_utils::M_V );
186 if ( need_to_log ) {
187 MARLEY_LOG( INFO, "physics.formfactor" ) << "Using dipole Sachs form factors";
188 }
189 }
190 else if ( sachs_ff_model == "bbba05" ) {
191 sachs_ff_ = std::make_shared< BBBA05SachsFormFactors >();
192 if ( need_to_log ) {
193 MARLEY_LOG( INFO, "physics.formfactor" ) << "Using BBBA05 Sachs form factors";
194 }
195 }
196 else throw marley::Error( "Unrecognized Sachs form factor model name \""
197 + sachs_ff_model + "\" in constructor of marley::NucleonFormFactors" );
198
199 // Choose the model to use for the axial form factors
200 if ( axial_ff_model == "trivial" ) {
201 axial_ff_ = std::make_shared< TrivialAxialFormFactors >();
202 if ( need_to_log ) {
203 MARLEY_LOG( INFO, "physics.formfactor" ) << "Using trivial axial form factors";
204 }
205 }
206 else if ( axial_ff_model == "dipole" ) {
207 axial_ff_ = std::make_shared< DipoleAxialFormFactors >( marley_utils::g_A,
208 marley_utils::M_A );
209 if ( need_to_log ) {
210 MARLEY_LOG( INFO, "physics.formfactor" ) << "Using dipole axial form factors";
211 }
212 }
213 else throw marley::Error( "Unrecognized axial form factor model name \""
214 + axial_ff_model + "\" in constructor of marley::NucleonFormFactors" );
215
216 need_to_log = false;
217}
static bool check_for_allowed_approximation(const marley::JSON &ff_config)

Member Function Documentation

◆ axial_ff()

const AxialFormFactors * marley::NucleonFormFactors::axial_ff ( ) const
inline

Get const access to the owned axial form factors.

Definition at line 202 of file NucleonFormFactors.hh.

203 { return axial_ff_.get(); }

◆ F1()

double marley::NucleonFormFactors::F1 ( double Q2) const
inline

Charged-current vector form factor

Parameters
Q2Negative square \( Q^{2} \) of the four-momentum transfer (MeV 2)

Definition at line 158 of file NucleonFormFactors.hh.

159 { return this->F1p( Q2 ) - this->F1n( Q2 ); }
double F1p(double Q2) const
double F1n(double Q2) const

References F1n(), and F1p().

◆ F1n()

double marley::NucleonFormFactors::F1n ( double Q2) const

Neutron vector form factor

Parameters
Q2Negative square \( Q^{2} \) of the four-momentum transfer (MeV 2)

Definition at line 116 of file NucleonFormFactors.cc.

116 {
117 double tau = sachs_ff_->tau( Q2 );
118 double GEn = sachs_ff_->GEn( Q2 );
119 double GMn = sachs_ff_->GMn( Q2 );
120 double F1n = ( GEn + tau*GMn ) / ( 1. + tau );
121 return F1n;
122}

References F1n().

Referenced by F1(), and F1n().

◆ F1p()

double marley::NucleonFormFactors::F1p ( double Q2) const

Proton vector form factor

Parameters
Q2Negative square \( Q^{2} \) of the four-momentum transfer (MeV 2)

Definition at line 108 of file NucleonFormFactors.cc.

108 {
109 double tau = sachs_ff_->tau( Q2 );
110 double GEp = sachs_ff_->GEp( Q2 );
111 double GMp = sachs_ff_->GMp( Q2 );
112 double F1p = ( GEp + tau*GMp ) / ( 1. + tau );
113 return F1p;
114}

References F1p().

Referenced by F1(), and F1p().

◆ F2()

double marley::NucleonFormFactors::F2 ( double Q2) const
inline

Charged-current weak magnetic form factor

Parameters
Q2Negative square \( Q^{2} \) of the four-momentum transfer (MeV 2)

Definition at line 164 of file NucleonFormFactors.hh.

165 { return this->F2p( Q2 ) - this->F2n( Q2 ); }
double F2n(double Q2) const
double F2p(double Q2) const

References F2n(), and F2p().

◆ F2n()

double marley::NucleonFormFactors::F2n ( double Q2) const

Neutron weak magnetic form factor

Parameters
Q2Negative square \( Q^{2} \) of the four-momentum transfer (MeV 2)

Definition at line 132 of file NucleonFormFactors.cc.

132 {
133 double tau = sachs_ff_->tau( Q2 );
134 double GEn = sachs_ff_->GEn( Q2 );
135 double GMn = sachs_ff_->GMn( Q2 );
136 double F2n = ( GMn - GEn ) / ( 1. + tau ) / 2. / marley_utils::m_nucleon;
137 return F2n;
138}

References F2n().

Referenced by F2(), and F2n().

◆ F2p()

double marley::NucleonFormFactors::F2p ( double Q2) const

Proton weak magnetic form factor

Parameters
Q2Negative square \( Q^{2} \) of the four-momentum transfer (MeV 2)

Definition at line 124 of file NucleonFormFactors.cc.

124 {
125 double tau = sachs_ff_->tau( Q2 );
126 double GEp = sachs_ff_->GEp( Q2 );
127 double GMp = sachs_ff_->GMp( Q2 );
128 double F2p = ( GMp - GEp ) / ( 1. + tau ) / 2. / marley_utils::m_nucleon;
129 return F2p;
130}

References F2p().

Referenced by F2(), and F2p().

◆ FA()

double marley::NucleonFormFactors::FA ( double Q2) const
inline

Charged-current axial-vector form factor

Parameters
Q2Negative square \( Q^{2} \) of the four-momentum transfer (MeV 2)

Definition at line 190 of file NucleonFormFactors.hh.

190{ return axial_ff_->FA( Q2 ); }

◆ FP()

double marley::NucleonFormFactors::FP ( double Q2) const
inline

Charged-current pseudoscalar form factor

Parameters
Q2Negative square \( Q^{2} \) of the four-momentum transfer (MeV 2)

Definition at line 195 of file NucleonFormFactors.hh.

195{ return axial_ff_->FP( Q2 ); }

◆ sachs_ff()

const SachsFormFactors * marley::NucleonFormFactors::sachs_ff ( ) const
inline

Get const access to the owned Sachs form factors.

Definition at line 198 of file NucleonFormFactors.hh.

199 { return sachs_ff_.get(); }

Member Data Documentation

◆ axial_ff_

std::shared_ptr< AxialFormFactors > marley::NucleonFormFactors::axial_ff_
protected

Definition at line 208 of file NucleonFormFactors.hh.

◆ sachs_ff_

std::shared_ptr< SachsFormFactors > marley::NucleonFormFactors::sachs_ff_
protected

Definition at line 207 of file NucleonFormFactors.hh.


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