74 #ifndef _MK_SPP_PXSEC2020_H_
75 #define _MK_SPP_PXSEC2020_H_
81 #include <type_traits>
97 class XSecIntegratorI;
133 template <
typename C, C beginVal, C endVal>
135 typedef typename std::underlying_type<C>::type
val_t;
163 template<
bool C,
typename T =
void>
166 template <
typename T>
179 int indx = 2*(2*(4*hatype+lambda_k)+lambda_2)+lambda_1;
182 template<
typename S = T, enable_if_t<is_complex<S>{}>* =
nullptr>
185 return this->
operator()(hatype, lambda_k, lambda_2, lambda_1).real();
187 template<
typename S = T, enable_if_t<is_complex<S>{}>* =
nullptr>
190 return this->
operator()(hatype, lambda_k, lambda_2, lambda_1).imag();
192 template<
typename S = T, enable_if_t<!is_complex<S>{}>* =
nullptr>
195 return this->
operator()(hatype, lambda_k, lambda_2, lambda_1);
197 template<
typename S = T, enable_if_t<!is_complex<S>{}>* =
nullptr>
204 std::transform(
array.begin(),
array.end(),
array.begin(), std::bind(std::multiplies<T>(), std::placeholders::_1, factor));
210 std::transform(
array.begin(),
array.end(),
array.begin(), std::bind(std::multiplies<T>(), std::placeholders::_1, 1./factor));
216 std::transform(ha.
array.begin(), ha.
array.end(),
array.begin(),
array.begin(), std::bind(std::plus<T>(), std::placeholders::_1, std::placeholders::_2));
222 std::transform(ha.
array.begin(), ha.
array.end(),
array.begin(),
array.begin(), std::bind(std::minus<T>(), std::placeholders::_2, std::placeholders::_1));
274 template <
typename T>
290 LOG(
"MKSPPPXSec2020",
pFATAL) <<
"Unknown resonance " << res;
293 int indx = 2*(2*(4*res+lambda_k)+lambda_2)+lambda_1;
297 template<
typename S = T, enable_if_t<is_complex<S>{}>* =
nullptr>
300 return this->
operator()(res, lambda_k, lambda_2, lambda_1).real();
302 template<
typename S = T, enable_if_t<is_complex<S>{}>* =
nullptr>
305 return this->
operator()(res, lambda_k, lambda_2, lambda_1).imag();
307 template<
typename S = T, enable_if_t<!is_complex<S>{}>* =
nullptr>
310 return this->
operator()(res, lambda_k, lambda_2, lambda_1);
312 template<
typename S = T, enable_if_t<!is_complex<S>{}>* =
nullptr>
323 template <
typename T>
332 int indx = 2*(2*lambda_k+lambda_2)+lambda_1;
336 template<
typename S = T, enable_if_t<is_complex<S>{}>* =
nullptr>
339 return this->
operator()(lambda_k, lambda_2, lambda_1).real();
341 template<
typename S = T, enable_if_t<is_complex<S>{}>* =
nullptr>
344 return this->
operator()(lambda_k, lambda_2, lambda_1).imag();
346 template<
typename S = T, enable_if_t<!is_complex<S>{}>* =
nullptr>
349 return this->
operator()(lambda_k, lambda_2, lambda_1);
351 template<
typename S = T, enable_if_t<!is_complex<S>{}>* =
nullptr>
426 #endif // _MK_SPP_PXSEC2020_H_
auto Re(Current hatype, BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1) -> typename S::value_type
Cross Section Calculation Interface.
HelicityBkgAmp & operator+=(const HelicityBkgAmp &ha)
const XSecIntegratorI * fXSecIntegrator
Cross Section Integrator Interface.
auto Re(Resonance_t res, BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1) -> S
Simple struct-like class holding the Feynmann-Kislinger-Ravndall (FKR) baryon excitation model parame...
friend HelicityBkgAmp operator/(HelicityBkgAmp ha, double factor)
T & operator()(Resonance_t res, BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1)
double fSin2Wein
sin^2(Weingberg angle)
friend HelicityBkgAmp operator-(HelicityBkgAmp lhs, const HelicityBkgAmp &rhs)
Encapsulates a list of baryon resonances.
const RSHelicityAmplModelI * fHAmplModelCC
auto Re(BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1) -> S
HelicityBkgAmp & operator/=(double factor)
enum genie::EKinePhaseSpace KinePhaseSpace_t
bool fUseRFGParametrization
Use parametrization for fermi momentum insted of table?
double fWmax
The value above which the partial cross section is set to zero (if negative then not appliciable) ...
double fMa2
(axial mass)^2
double fXSecScaleNC
External NC xsec scaling factor.
enum genie::EResonance Resonance_t
auto Im(BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1) -> typename S::value_type
double Integral(const Interaction *i) const
double fCA50
FKR parameter Zeta.
friend HelicityBkgAmp operator+(HelicityBkgAmp lhs, const HelicityBkgAmp &rhs)
Summary information for an interaction.
auto Re(Current hatype, BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1) -> S
Class calculate differental cross-sections or for specific neutrino energy (in lab frame)...
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
double XSec(const Interaction *i, KinePhaseSpace_t k) const
Compute the cross section for the input interaction.
friend HelicityBkgAmp operator*(double factor, HelicityBkgAmp ha)
int Lambda(NucleonPolarization l) const
const RSHelicityAmplModelI * fHAmplModelNCp
double fRho770Mass
Mass of rho(770) meson.
double fMv2
(vector mass)^2
bool operator!=(const Iterator &i)
const RSHelicityAmplModelI * fHAmplModelNCn
typename std::enable_if< C, T >::type enable_if_t
double FA0
Axial coupling (value of axial form factor at Q2=0)
const QELFormFactorsModelI * fEMFormFactorsModel
Electromagnetic form factors model for background contribution.
HelicityBkgAmp & operator-=(const HelicityBkgAmp &ha)
double f_pi
Constant for pion-nucleon interaction.
Pure abstract base class. Defines the RSHelicityAmplModelI interface.
void Configure(const Registry &config)
string fKFTable
Table of Fermi momentum (kF) constants for various nuclei.
const ELFormFactorsModelI * fElFFModel
Elastic form facors model for background contribution.
HelicityBkgAmp(const HelicityBkgAmp &ha)
virtual ~MKSPPPXSec2020()
friend HelicityBkgAmp operator*(HelicityBkgAmp ha, double factor)
SumHelicityAmpVminusARes()
double fCv3
GV calculation coeffs.
bool fUsePauliBlocking
Account for Pauli blocking?
auto Re(Resonance_t res, BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1) -> typename S::value_type
A registry. Provides the container for algorithm configuration parameters.
T & operator()(Current hatype, BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1)
double fOmega
FKR parameter Omega.
double fVud
|Vud| (magnitude ud-element of CKM-matrix)
auto Im(BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1) -> S
int PhaseFactor(BosonPolarization lk, NucleonPolarization l1, NucleonPolarization l2) const
std::underlying_type< C >::type val_t
T & operator()(BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1)
bool fUseAuthorCode
Use author code?
auto Im(Resonance_t res, BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1) -> S
HelicityBkgAmp & operator=(const HelicityBkgAmp &ha)
auto Im(Current hatype, BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1) -> S
QELFormFactors fFormFactors
Quasielastic form facors for background contribution.
double fXSecScaleCC
External CC xsec scaling factor.
auto Re(BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1) -> typename S::value_type
QELFormFactors fEMFormFactors
Electromagnetic form facors for background contribution.
HelicityBkgAmp & operator*=(double factor)
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
const QELFormFactorsModelI * fFormFactorsModel
Quasielastic form facors model for background contribution.
bool ValidKinematics(const Interaction *interaction) const
Is the input kinematical point a physically allowed one?
auto Im(Current hatype, BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1) -> typename S::value_type
~SumHelicityAmpVminusARes()
friend HelicityBkgAmp operator/(double factor, HelicityBkgAmp ha)
auto Im(Resonance_t res, BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1) -> typename S::value_type