1 #ifndef __JOSCPROB__JOSCPROBINTERPOLATOR2D__
2 #define __JOSCPROB__JOSCPROBINTERPOLATOR2D__
21 namespace JOSCPROB {};
22 namespace JPP {
using namespace JOSCPROB; }
36 template<
class JDistance_t = JTOOLS::JDistance<
typename JOscProbTable2D_t::JFunction2D_t::argument_type> >
71 const double costh)
const
82 const double L =
getL(costh);
83 const double sinth = (fabs(costh) < 1.0 ? sqrt((1 - costh) * (1 + costh)) : 0.0);
86 const data_type& probabilities = (*pTable)(L/
E, sinth);
88 return probabilities[index];
92 THROW(
JValueOutOfRange,
"JOscProbInterpolator2D::operator(): Invalid oscillation channel " << channel << endl);
Neutrino oscillation channel.
Auxiliary class for interpolating an oscillation probability table in 8 dimensions in terms of: ...
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
JOscProbInterpolator2D(const table_type *pTable)
Constructor.
JOscProbInterpolator2D()
Default constructor.
JOscProbTable2D< JDistance_t > table_type
Exception for null pointer operation.
static const JOscChannel getOscChannel[]
Declare group of neutrino oscillation channels.
double getL(const double costh)
Get baseline for a given cosine zenith angle.
General purpose messaging.
Explicit template specialization for 2D interpolation table in:
const table_type * pTable
Pointer to 2D oscillation probability table.
double operator()(const JOscChannel &channel, const double E, const double costh) const
Get oscillation probability for given oscillation channel.
Exception for accessing a value in a collection that is outside of its range.
table_type::data_type data_type
static const int NUMBER_OF_OSCCHANNELS
Number of neutrino oscillation channels.