1#ifndef __JOSCPROB__JBASELINECOMPUTER__
2#define __JOSCPROB__JBASELINECOMPUTER__
107 double getCosth(
const double L)
const override final
112 return (R*R - r*r - L*L) / (2*L*r);
127 const double ct = (fabs(costh) < 1.0 ? costh : (costh < 0 ? -1.0 : 1.0));
129 return (-r * ct + sqrt(R*R - r*r * (1 - ct) * (1 + ct)));
178 return in >>
object.Lmin >>
object.Lmax;
193 return out <<
FIXED(15,5) <<
object.Lmin <<
FIXED(15,5) <<
object.Lmax;
Interface for binary input.
Forward declaration of binary output.
Interface for binary output.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
Low-level interface for oscillation baseline calculators.
Auxiliary data structure for storing and calculating baselines.
double operator()(const double costh) const
Get baseline for a given cosine zenith angle.
JWriter & write(JWriter &out) const override final
Binary stream output of oscillation parameters.
double getInnerRadius() const
Get inner radius.
double getOuterRadius() const
Get outer radius.
friend std::istream & operator>>(std::istream &in, JBaselineComputer &object)
Stream input of baseline calculator.
JReader & read(JReader &in) override final
Binary stream input of baseline extrema.
JBaselineComputer()
Default constructor.
JBaselineComputer(const double Lmin, const double Lmax)
Constructor.
double getCosth(const double L) const override final
Get cosine zenith angle for a given baseline.
double getMinimumBaseline() const
Get minimum baseline.
double getMaximumBaseline() const
Get maximum baseline.
double Lmax
Maximum baseline [km].
friend std::ostream & operator<<(std::ostream &out, const JBaselineComputer &object)
Stream output of baseline calculator.
double getBaseline(const double costh) const override final
Get baseline for a given cosine zenith angle.
double Lmin
Minimum baseline [km].