1#ifndef __JOSCPROB__JOSCPROBINTERPOLATOR__
2#define __JOSCPROB__JOSCPROBINTERPOLATOR__
62 public JClonable<JOscProbInterface, JOscProbInterpolator <JCollection_t, JFunction1D_t, JFunctionalMaplist_t> >,
63 public JMessage <JOscProbInterpolator <JCollection_t, JFunction1D_t, JFunctionalMaplist_t> >,
110 this->
load(fileName);
126 this->
load(fileName);
147 void load(
const char*
const fileName)
154 NOTICE(
"Loading oscillation probability table from file " << fileName <<
"... " << flush);
176 const double costh)
const override final
185 const double L = this->getBaseline(costh);
190 const double* arguments = this->
buffer.
data();
193 const result_type& probabilities = this->evaluate(arguments);
195 const double& P = probabilities[index];
197 return (P > 1.0 ? 1.0 : (P < 0.0 ? 0.0 : P));
201 THROW(
JValueOutOfRange,
"JOscProbInterpolator<...>::getP(): Invalid oscillation channel " << channel << endl);
214 in >> this->Lmin >> this->Lmax;
231 out << this->Lmin << this->Lmax;
232 out << static_cast<const multifunction_type&>(*
this);
250 template<
template<
class,
class>
class JCollection_t,
class JFunction1D_t,
class JFunctionalMaplist_t>
260 template<
template<
class,
class>
class JCollection_t,
class JFunction1D_t,
class JFunctionalMaplist_t>
General purpose class for a collection of sorted elements.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Various implementations of functional maps.
General purpose messaging.
General methods for loading and storing a single object from and to a file, respectively.
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
Interface for binary input.
Forward declaration of binary output.
Interface for binary output.
Exception for reading of file.
Exception for accessing a value in a collection that is outside of its range.
Interface class for sets of oscillation parameters.
Data structure for single set of oscillation parameters.
Template definition of a multi-dimensional oscillation probability interpolation table.
multifunction_type::multimap_type multimap_type
JOscProbInterpolator()
Default constructor.
JWriter & write(JWriter &out) const override final
Write from input.
multifunction_type::super_iterator super_iterator
multifunction_type::argument_type argument_type
JOscProbInterface::JOscParameter_t JOscParameter_t
JOscProbInterpolator(const char *fileName, const JOscParameters_t ¶meters)
Constructor.
multifunction_type::abscissa_type abscissa_type
JOscProbInterface::JOscParameterReferences_t JOscParameterReferences_t
JOscProbInterface::JParameter_t JParameter_t
multifunction_type::value_type value_type
JMultiFunction< JFunction1D_t, JFunctionalMaplist_t > multifunction_type
double getP(const JOscChannel &channel, const double E, const double costh) const override final
Get oscillation probability for a given oscillation channel.
JReader & read(JReader &in) override final
Read from input.
JOscProbInterpolator(const interpolator_type &interpolator)
Copy constructor.
multifunction_type::result_type result_type
multifunction_type::super_const_iterator super_const_iterator
void load(const char *const fileName)
Load oscillation probability table from file.
multifunction_type::function_type function_type
JOscProbInterpolator(const char *fileName)
Constructor.
JOscProbInterpolator< JCollection_t, JFunction1D_t, JFunctionalMaplist_t > interpolator_type
JOscProbInterface::JOscParametersHelper_t JOscParametersHelper_t
JOscProbInterface::JOscParameters_t JOscParameters_t
General puprpose classes and methods.
void load(const std::string &file_name, T &object)
Load object from input file.
static const JOscChannel getOscChannel[]
Declare group of neutrino oscillation channels.
static const unsigned int NUMBER_OF_OSCCHANNELS
Number of neutrino oscillation channels.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary class for handling debug parameter within a class.
static int debug
debug level (default is off).
Template class for object cloning.
Neutrino oscillation channel.
Abstract base class for oscillation parameter.
void configure(const pointer_type &p)
void set(const std::string &name, const value_type &value) const