1#ifndef __JOSCPROB__JOSCPROBINTERPOLATOR__
2#define __JOSCPROB__JOSCPROBINTERPOLATOR__
67 public JClonable<JOscProbInterface, JOscProbInterpolator <JCollection_t, JFunction1D_t, JFunctionalMaplist_t> >,
68 public JMessage <JOscProbInterpolator <JCollection_t, JFunction1D_t, JFunctionalMaplist_t> >,
69 public JObjectBinaryIO <JOscProbInterpolator <JCollection_t, JFunction1D_t, JFunctionalMaplist_t> >,
115 table(*this, fileName)
160 double getCosth(
const double L)
const override final
188 const double costh)
const override final
202 const double* arguments = this->
buffer.data();
205 const result_type& probabilities = this->evaluate(arguments);
207 const double& P = probabilities[index];
209 return min(max(P, 0.0), 1.0);
213 THROW(
JValueOutOfRange,
"JOscProbInterpolator<...>::getP(): Invalid oscillation channel " << channel << endl);
226 if (!
table.empty()) {
228 NOTICE(
"Loading oscillation probability table from file " <<
table <<
"... " << flush);
278 out << static_cast<const multifunction_type&>(*
this);
320 template<
class JOscProbInterpolator_t>
329 this->
join(interpolator.getParameters().getProperties());
350 template<
template<
class,
class>
class JCollection_t,
class JFunction1D_t,
class JFunctionalMaplist_t>
360 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.
#define gmake_property(A)
macros to convert (template) parameter to JPropertiesElement object
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
Utility class to parse parameter values.
JProperties & join(const JProperties &properties)
Join properties objects.
Interface for binary input.
Forward declaration of binary output.
Interface for binary output.
Simple data structure to support I/O of equations (see class JLANG::JEquation).
Data structure for object properties which require reloading whenever the property is reread.
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.
static const char *const getTypeKey()
Get type keyword.
static JEquationParameters & getEquationParameters()
Get equation 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.
JArray< NUMBER_OF_DIMENSIONS, argument_type > buffer
Buffer for interpolation arguments.
JProperties getProperties(const JEquationParameters &eqpars=JOscProbInterface::getEquationParameters()) override final
Get properties of this class.
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.
JProperties getProperties(const JEquationParameters &eqpars=JOscProbInterface::getEquationParameters()) const override final
Get properties of this class.
multifunction_type::result_type result_type
void load()
Load oscillation probability table.
multifunction_type::super_const_iterator super_const_iterator
multifunction_type::function_type function_type
JBaselineComputer baselineComputer
Baseline computer.
JOscProbInterpolator(const char *fileName)
Constructor.
JOscProbInterpolator< JCollection_t, JFunction1D_t, JFunctionalMaplist_t > interpolator_type
JLoadProperty< interpolator_type, std::string > table
Oscillation probability table filename.
void load(const char *table)
Load oscillation probability table.
double getBaseline(const double costh) const override final
Get baseline for a given cosine zenith angle.
JOscProbInterface::JOscParametersHelper_t JOscParametersHelper_t
JOscProbInterface::JOscParameters_t JOscParameters_t
double getCosth(const double L) const override final
Get cosine zenith angle for a given baseline.
General puprpose classes and methods.
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).
Auxiliary base class for storing and loading a single object to and from a binary file,...
void load(const char *file_name)
Load from input file.
Template class for object cloning.
Auxiliary data structure for storing and calculating baselines.
double getCosth(const double L) const override final
Get cosine zenith angle for a given baseline.
double getBaseline(const double costh) const override final
Get baseline for a given cosine zenith angle.
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
Auxiliary class for I/O of oscillation probability interpolator.
JOscProbInterpolatorHelper(JOscProbInterpolator_t &interpolator, const JEquationParameters &eqpars)
Constructor.