GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | Friends | List of all members
genie::MKSPPPXSec2020::HelicityBkgAmp< T > Class Template Reference

Public Member Functions

 HelicityBkgAmp ()
 
 HelicityBkgAmp (const HelicityBkgAmp &ha)
 
 ~HelicityBkgAmp ()
 
T & operator() (Current hatype, BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1)
 
template<typename S = T, enable_if_t< is_complex< S >{}> * = nullptr>
auto Re (Current hatype, BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1) -> typename S::value_type
 
template<typename S = T, enable_if_t< is_complex< S >{}> * = nullptr>
auto Im (Current hatype, BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1) -> typename S::value_type
 
template<typename S = T, enable_if_t<!is_complex< S >{}> * = nullptr>
auto Re (Current hatype, BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1) -> S
 
template<typename S = T, enable_if_t<!is_complex< S >{}> * = nullptr>
auto Im (Current hatype, BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1) -> S
 
HelicityBkgAmpoperator*= (double factor)
 
HelicityBkgAmpoperator/= (double factor)
 
HelicityBkgAmpoperator+= (const HelicityBkgAmp &ha)
 
HelicityBkgAmpoperator-= (const HelicityBkgAmp &ha)
 
HelicityBkgAmpoperator= (const HelicityBkgAmp &ha)
 

Private Attributes

std::vector< T > array
 

Friends

HelicityBkgAmp operator+ (HelicityBkgAmp lhs, const HelicityBkgAmp &rhs)
 
HelicityBkgAmp operator- (HelicityBkgAmp lhs, const HelicityBkgAmp &rhs)
 
HelicityBkgAmp operator* (HelicityBkgAmp ha, double factor)
 
HelicityBkgAmp operator* (double factor, HelicityBkgAmp ha)
 
HelicityBkgAmp operator/ (HelicityBkgAmp ha, double factor)
 
HelicityBkgAmp operator/ (double factor, HelicityBkgAmp ha)
 

Detailed Description

template<typename T>
class genie::MKSPPPXSec2020::HelicityBkgAmp< T >

Definition at line 167 of file MKSPPPXSec2020.h.

Constructor & Destructor Documentation

template<typename T>
genie::MKSPPPXSec2020::HelicityBkgAmp< T >::HelicityBkgAmp ( )
inline

Definition at line 171 of file MKSPPPXSec2020.h.

171 : array(32) {}
template<typename T>
genie::MKSPPPXSec2020::HelicityBkgAmp< T >::HelicityBkgAmp ( const HelicityBkgAmp< T > &  ha)
inline

Definition at line 172 of file MKSPPPXSec2020.h.

References genie::MKSPPPXSec2020::HelicityBkgAmp< T >::array.

173  {
174  array = ha.array;
175  }
template<typename T>
genie::MKSPPPXSec2020::HelicityBkgAmp< T >::~HelicityBkgAmp ( )
inline

Definition at line 176 of file MKSPPPXSec2020.h.

176 {}

Member Function Documentation

template<typename T>
template<typename S = T, enable_if_t< is_complex< S >{}> * = nullptr>
auto genie::MKSPPPXSec2020::HelicityBkgAmp< T >::Im ( Current  hatype,
BosonPolarization  lambda_k,
NucleonPolarization  lambda_2,
NucleonPolarization  lambda_1 
) -> typename S::value_type
inline

Definition at line 188 of file MKSPPPXSec2020.h.

References genie::MKSPPPXSec2020::HelicityBkgAmp< T >::operator()().

189  {
190  return this->operator()(hatype, lambda_k, lambda_2, lambda_1).imag();
191  }
T & operator()(Current hatype, BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1)
template<typename T>
template<typename S = T, enable_if_t<!is_complex< S >{}> * = nullptr>
auto genie::MKSPPPXSec2020::HelicityBkgAmp< T >::Im ( Current  hatype,
BosonPolarization  lambda_k,
NucleonPolarization  lambda_2,
NucleonPolarization  lambda_1 
) -> S
inline

Definition at line 198 of file MKSPPPXSec2020.h.

199  {
200  return 0;
201  }
template<typename T>
T& genie::MKSPPPXSec2020::HelicityBkgAmp< T >::operator() ( Current  hatype,
BosonPolarization  lambda_k,
NucleonPolarization  lambda_2,
NucleonPolarization  lambda_1 
)
inline

Definition at line 177 of file MKSPPPXSec2020.h.

References genie::MKSPPPXSec2020::HelicityBkgAmp< T >::array.

Referenced by genie::MKSPPPXSec2020::HelicityBkgAmp< T >::Im(), and genie::MKSPPPXSec2020::HelicityBkgAmp< T >::Re().

178  {
179  int indx = 2*(2*(4*hatype+lambda_k)+lambda_2)+lambda_1;
180  return array[indx];
181  }
template<typename T>
HelicityBkgAmp& genie::MKSPPPXSec2020::HelicityBkgAmp< T >::operator*= ( double  factor)
inline

Definition at line 202 of file MKSPPPXSec2020.h.

References genie::MKSPPPXSec2020::HelicityBkgAmp< T >::array.

203  {
204  std::transform(array.begin(), array.end(), array.begin(), std::bind(std::multiplies<T>(), std::placeholders::_1, factor));
205  return *this;
206  }
template<typename T>
HelicityBkgAmp& genie::MKSPPPXSec2020::HelicityBkgAmp< T >::operator+= ( const HelicityBkgAmp< T > &  ha)
inline

Definition at line 214 of file MKSPPPXSec2020.h.

References genie::MKSPPPXSec2020::HelicityBkgAmp< T >::array.

215  {
216  std::transform(ha.array.begin(), ha.array.end(), array.begin(), array.begin(), std::bind(std::plus<T>(), std::placeholders::_1, std::placeholders::_2));
217  return *this;
218  }
template<typename T>
HelicityBkgAmp& genie::MKSPPPXSec2020::HelicityBkgAmp< T >::operator-= ( const HelicityBkgAmp< T > &  ha)
inline

Definition at line 220 of file MKSPPPXSec2020.h.

References genie::MKSPPPXSec2020::HelicityBkgAmp< T >::array.

221  {
222  std::transform(ha.array.begin(), ha.array.end(), array.begin(), array.begin(), std::bind(std::minus<T>(), std::placeholders::_2, std::placeholders::_1));
223  return *this;
224  }
template<typename T>
HelicityBkgAmp& genie::MKSPPPXSec2020::HelicityBkgAmp< T >::operator/= ( double  factor)
inline

Definition at line 208 of file MKSPPPXSec2020.h.

References genie::MKSPPPXSec2020::HelicityBkgAmp< T >::array.

209  {
210  std::transform(array.begin(), array.end(), array.begin(), std::bind(std::multiplies<T>(), std::placeholders::_1, 1./factor));
211  return *this;
212  }
template<typename T>
HelicityBkgAmp& genie::MKSPPPXSec2020::HelicityBkgAmp< T >::operator= ( const HelicityBkgAmp< T > &  ha)
inline

Definition at line 226 of file MKSPPPXSec2020.h.

References genie::MKSPPPXSec2020::HelicityBkgAmp< T >::array.

227  {
228  if (this != &ha)
229  array = ha.array;
230  return *this;
231  }
template<typename T>
template<typename S = T, enable_if_t< is_complex< S >{}> * = nullptr>
auto genie::MKSPPPXSec2020::HelicityBkgAmp< T >::Re ( Current  hatype,
BosonPolarization  lambda_k,
NucleonPolarization  lambda_2,
NucleonPolarization  lambda_1 
) -> typename S::value_type
inline

Definition at line 183 of file MKSPPPXSec2020.h.

References genie::MKSPPPXSec2020::HelicityBkgAmp< T >::operator()().

184  {
185  return this->operator()(hatype, lambda_k, lambda_2, lambda_1).real();
186  }
T & operator()(Current hatype, BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1)
template<typename T>
template<typename S = T, enable_if_t<!is_complex< S >{}> * = nullptr>
auto genie::MKSPPPXSec2020::HelicityBkgAmp< T >::Re ( Current  hatype,
BosonPolarization  lambda_k,
NucleonPolarization  lambda_2,
NucleonPolarization  lambda_1 
) -> S
inline

Definition at line 193 of file MKSPPPXSec2020.h.

References genie::MKSPPPXSec2020::HelicityBkgAmp< T >::operator()().

194  {
195  return this->operator()(hatype, lambda_k, lambda_2, lambda_1);
196  }
T & operator()(Current hatype, BosonPolarization lambda_k, NucleonPolarization lambda_2, NucleonPolarization lambda_1)

Friends And Related Function Documentation

template<typename T>
HelicityBkgAmp operator* ( HelicityBkgAmp< T >  ha,
double  factor 
)
friend

Definition at line 245 of file MKSPPPXSec2020.h.

246  {
247  ha *= factor;
248  return ha;
249  }
template<typename T>
HelicityBkgAmp operator* ( double  factor,
HelicityBkgAmp< T >  ha 
)
friend

Definition at line 251 of file MKSPPPXSec2020.h.

252  {
253  ha *= factor;
254  return ha;
255  }
template<typename T>
HelicityBkgAmp operator+ ( HelicityBkgAmp< T >  lhs,
const HelicityBkgAmp< T > &  rhs 
)
friend

Definition at line 233 of file MKSPPPXSec2020.h.

234  {
235  lhs += rhs;
236  return lhs;
237  }
template<typename T>
HelicityBkgAmp operator- ( HelicityBkgAmp< T >  lhs,
const HelicityBkgAmp< T > &  rhs 
)
friend

Definition at line 239 of file MKSPPPXSec2020.h.

240  {
241  lhs -= rhs;
242  return lhs;
243  }
template<typename T>
HelicityBkgAmp operator/ ( HelicityBkgAmp< T >  ha,
double  factor 
)
friend

Definition at line 257 of file MKSPPPXSec2020.h.

258  {
259  ha /= factor;
260  return ha;
261  }
template<typename T>
HelicityBkgAmp operator/ ( double  factor,
HelicityBkgAmp< T >  ha 
)
friend

Definition at line 263 of file MKSPPPXSec2020.h.

264  {
265  ha /= factor;
266  return ha;
267  }

Member Data Documentation

template<typename T>
std::vector<T> genie::MKSPPPXSec2020::HelicityBkgAmp< T >::array
private

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