1 #ifndef __JOSCPROB__JOSCPROBINTERPOLATOR__
2 #define __JOSCPROB__JOSCPROBINTERPOLATOR__
33 namespace JPP {
using namespace JOSCPROB; }
63 public JClonable<JOscProbInterface, JOscProbInterpolator <JCollection_t, JFunction1D_t, JFunctionalMaplist_t> >,
64 public JMessage <JOscProbInterpolator <JCollection_t, JFunction1D_t, JFunctionalMaplist_t> >,
121 this->
load(fileName);
140 this->
load(fileName);
149 void load(
const char* fileName)
156 NOTICE(
"loading oscillation probability table from file " << fileName <<
"... " << flush);
162 catch(
const JException& error) {
163 THROW(JFileReadException,
"JOscProbInterpolator::load(): Error reading file " << fileName);
181 JProperties::iterator
i = properties.find(name);
183 if (i != properties.end()) {
189 const int index =
distance(properties.begin(),
i);
191 this->
buffer[index] = value;
195 "JOscProbInterpolator<...>::set(): Given oscillation parameter " << name <<
196 " is inconsistent with the parameter set of this oscillation probability interpolator");
211 const double costh)
const override
228 const result_type& probabilities = this->evaluate(arguments);
230 const double&
P = probabilities[index];
232 return (P > 1.0 ? 1.0 : (P < 0.0 ? 0.0 : P));
236 THROW(
JValueOutOfRange,
"JOscProbInterpolator<...>::getP(): Invalid oscillation channel " << channel << endl);
293 out << static_cast<const multifunction_type&>(*this);
313 template<
template<
class,
class>
class JCollection_t,
class JFunction1D_t,
class JFunctionalMaplist_t>
323 template<
template<
class,
class>
class JCollection_t,
class JFunction1D_t,
class JFunctionalMaplist_t>
static int debug
debug level (default is off).
Abstract base class for oscillation parameter.
Interface for binary output.
JOscProbInterpolator()
Default constructor.
then usage $script< input file >[option[primary[working directory]]] nWhere option can be E
Neutrino oscillation channel.
multifunction_type::argument_type argument_type
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
void set(const std::string &name, argument_type value) const override
Set value for a given oscillation parameter.
static const unsigned int NUMBER_OF_OSCCHANNELS
Number of neutrino oscillation channels.
JOscProbInterpolator(const char *fileName, const JOscParameters_t ¶meters)
Constructor.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
JBaselineComputer baselineComputer
then echo Enter input within $TIMEOUT_S seconds echo n User name
Utility class to parse parameter values.
*fatal Wrong number of arguments
JOscProbInterface::JOscParameters_t JOscParameters_t
JMultiFunction< JFunction1D_t, JFunctionalMaplist_t > multifunction_type
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
JOscProbInterpolator(const char *fileName)
Constructor.
void setValue(argument_type value)
Set parameter.
Utility class to parse parameter values.
double getCosth(const double L) const override
Get cosine zenith angle for a given baseline.
Various implementations of functional maps.
JOscProbInterface::JOscParametersHelper_t JOscParametersHelper_t
Forward declaration of binary output.
virtual void set(const std::string &name, argument_type value) const
Set value for a given oscillation parameter.
double getBaseline(const double costh) const override
Get baseline for a given cosine zenith angle.
void load(const char *fileName)
Load oscillation probability table from file.
static int debug
Default verbosity for oscillation probability interpolators.
static const JOscChannel getOscChannel[]
Declare group of neutrino oscillation channels.
multifunction_type::value_type value_type
Template class for object cloning.
double getCosth(const double L) const override
Get cosine zenith angle for a given baseline.
double getBaseline(const double costh) const override
Get baseline for a given cosine zenith angle.
multifunction_type::multimap_type multimap_type
General purpose class for a collection of sorted elements.
Interface for binary input.
General purpose messaging.
virtual void configure(const JOscParameters_t ¶meters)
Configure oscillation parameters.
Auxiliary data structure for storing and calculating baselines.
JOscProbInterface::JParameter_t JParameter_t
multifunction_type::function_type function_type
JWriter & write(JWriter &out) const override
Write from input.
multifunction_type::result_type result_type
Data structure for single set of oscillation parameters.
virtual JProperties getProperties(const JEquationParameters &equation=JOscParametersInterface_t::getEquationParameters())=0
Get properties of this class.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
multifunction_type::super_const_iterator super_const_iterator
JOscProbInterface::JOscParameter_t JOscParameter_t
const T & getValue() const
Get value of parameter.
multifunction_type::abscissa_type abscissa_type
JReader & read(JReader &in) override
Read from input.
Exception for accessing a value in a collection that is outside of its range.
General methods for loading and storing a single object from and to a file, respectively.
Interface class for sets of oscillation parameters.
double getP(const JOscChannel &channel, const double E, const double costh) const override
Get oscillation probability for a given oscillation channel.
multifunction_type::super_iterator super_iterator
Template definition of a multi-dimensional oscillation probability interpolation table.
JOscProbInterpolator< JCollection_t, JFunction1D_t, JFunctionalMaplist_t > interpolator_type
Auxiliary class for handling debug parameter within a class.