1 #ifndef _gal_GMF_HMR_ASS_A_h
2 #define _gal_GMF_HMR_ASS_A_h
14 namespace HMRConstants {
34 template<
typename PositionVector,
typename FieldVector>
39 using namespace HMRConstants;
41 const double& x = position[0];
42 const double& y = position[1];
43 const double& z = position[2];
45 const double rho2 = x*x + y*y;
46 const double r =
sqrt(rho2 + z*z);
56 const double rho =
sqrt(rho2);
61 pow(cos(atan2(y, x) - log(rho /
kPsi)/tan(
kPitch) - M_PI), 2) *
62 (0.5 / cosh(z /
kZ1) + 0.5 / cosh(z /
kZ2)) * tanh(z /
kZ3);
64 const double sinp = sin(
kPitch);
65 const double cosp = cos(
kPitch);
66 b[0] = b_rho * (sinp * x - cosp * y);
67 b[1] = b_rho * (sinp * y + cosp * x);
79 template<
typename PositionVector,
typename FieldVector>
84 using namespace HMRConstants;
86 const double& x = position[0];
87 const double& y = position[1];
88 const double& z = position[2];
90 const double rho2 = x*x + y*y;
91 const double r =
sqrt(rho2 + z*z);
101 const double rho =
sqrt(rho2);
106 cos(atan2(y, x) - log(rho /
kPsi)/tan(
kPitch) - M_PI) *
107 (0.5 / cosh(z /
kZ1) + 0.5 / cosh(z /
kZ2));
109 const double sinp = sin(
kPitch);
110 const double cosp = cos(
kPitch);
111 b[0] = b_rho * (sinp * x - cosp * y);
112 b[1] = b_rho * (sinp * y + cosp * x);
double pow(const double x, const unsigned int i)
void operator()(const PositionVector &position, FieldVector &b)
void operator()(const PositionVector &position, FieldVector &b)