Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
JOSCPROB::JMixingAngle< JGrid< double > > Struct Referencefinal

Template specialization for parameter grid. More...

#include <JMixingAngle.hh>

Inheritance diagram for JOSCPROB::JMixingAngle< JGrid< double > >:
JOSCPROB::JOscParameter< JGrid< double > > JLANG::JParameter< T > JLANG::JComparable< JParameter< T > >

Public Types

typedef JGrid< double > JGrid_t
 
typedef JMixingAngle< JGrid_tJMixingAngle_t
 
typedef JOscParameter< JGrid_tJOscParameter_t
 
typedef JOscParameter_t::JParameter_t JParameter_t
 
typedef JParameter_t::argument_type argument_type
 
typedef JParameter_t::value_type value_type
 

Public Member Functions

 JMixingAngle ()
 Default constructor.
 
 JMixingAngle (const JGrid_t &grid)
 Constructor.
 
 JMixingAngle (const int nx, const double xmin, const double xmax)
 Constructor.
 
 JMixingAngle (const double value)
 Constructor.
 
JMixingAngle_toperator= (const JGrid_t &grid)
 Assignment operator.
 
bool is_valid () const override final
 Check validity of oscillation parameter.
 
void setValue (const value_type &value)
 Set parameter.
 
const value_type getValue () const
 Get value of parameter.
 
 operator const value_type () const
 Type conversion operator.
 
const bool isDefined () const
 Get status of parameter.
 
bool less (const JParameter< T > &parameter) const
 Less than method.
 

Protected Attributes

__value
 
bool is_defined
 

Detailed Description

Template specialization for parameter grid.

Definition at line 94 of file JMixingAngle.hh.

Member Typedef Documentation

◆ JGrid_t

JGrid<double> JOSCPROB::JMixingAngle< JGrid< double > >::JGrid_t

Definition at line 97 of file JMixingAngle.hh.

◆ JMixingAngle_t

JMixingAngle<JGrid_t> JOSCPROB::JMixingAngle< JGrid< double > >::JMixingAngle_t

Definition at line 98 of file JMixingAngle.hh.

◆ JOscParameter_t

JOscParameter<JGrid_t> JOSCPROB::JMixingAngle< JGrid< double > >::JOscParameter_t

Definition at line 99 of file JMixingAngle.hh.

◆ JParameter_t

Definition at line 101 of file JMixingAngle.hh.

◆ argument_type

JParameter_t::argument_type JOSCPROB::JOscParameter< JGrid< double > >::argument_type
inherited

Definition at line 33 of file JOscParameter.hh.

◆ value_type

JParameter_t::value_type JOSCPROB::JOscParameter< JGrid< double > >::value_type
inherited

Definition at line 34 of file JOscParameter.hh.

Constructor & Destructor Documentation

◆ JMixingAngle() [1/4]

JOSCPROB::JMixingAngle< JGrid< double > >::JMixingAngle ( )
inline

Default constructor.

Definition at line 107 of file JMixingAngle.hh.

108 {}

◆ JMixingAngle() [2/4]

JOSCPROB::JMixingAngle< JGrid< double > >::JMixingAngle ( const JGrid_t & grid)
inlineexplicit

Constructor.

Parameters
gridmixing angle parameter grid [rad]

Definition at line 116 of file JMixingAngle.hh.

116 :
117 JOscParameter_t(grid)
118 {
119 using namespace JPP;
120
121 if (!is_valid()) {
122 THROW(JValueOutOfRange, "JMixingAngle::JMixingAngle(): Invalid mixing angle parameter grid " << grid);
123 }
124 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Exception for accessing a value in a collection that is outside of its range.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
JOscParameter< JGrid_t > JOscParameter_t
bool is_valid() const override final
Check validity of oscillation parameter.

◆ JMixingAngle() [3/4]

JOSCPROB::JMixingAngle< JGrid< double > >::JMixingAngle ( const int nx,
const double xmin,
const double xmax )
inline

Constructor.

Parameters
nxnumber of elements
xminlower limit
xmaxupper limit

Definition at line 134 of file JMixingAngle.hh.

136 :
137 JOscParameter_t(JGrid_t(nx, xmin, xmax))
138 {}

◆ JMixingAngle() [4/4]

JOSCPROB::JMixingAngle< JGrid< double > >::JMixingAngle ( const double value)
inlineexplicit

Constructor.

Parameters
valuevalue

Definition at line 146 of file JMixingAngle.hh.

146 :
147 JMixingAngle(1, value, value)
148 {}

Member Function Documentation

◆ operator=()

JMixingAngle_t & JOSCPROB::JMixingAngle< JGrid< double > >::operator= ( const JGrid_t & grid)
inline

Assignment operator.

Parameters
gridmixing angle parameter grid [rad]
Returns
mixing angle

Definition at line 157 of file JMixingAngle.hh.

158 {
159 this->setValue(grid);
160
161 return *this;
162 }
void setValue(const value_type &value)

◆ is_valid()

bool JOSCPROB::JMixingAngle< JGrid< double > >::is_valid ( ) const
inlinefinaloverridevirtual

Check validity of oscillation parameter.

Returns
true if valid; else false

Implements JOSCPROB::JOscParameter< JGrid< double > >.

Definition at line 170 of file JMixingAngle.hh.

171 {
172 const double minAngle = this->getValue().getXmin();
173 const double maxAngle = this->getValue().getXmax();
174
175 return (this->isDefined() ? !(minAngle < 0.0 || minAngle > M_PI / 2.0 ||
176 maxAngle < 0.0 || maxAngle > M_PI / 2.0) : true);
177 }
const value_type getValue() const
Get value of parameter.
Definition JParameter.hh:82
const bool isDefined() const
Get status of parameter.

◆ setValue()

void JOSCPROB::JOscParameter< JGrid< double > >::setValue ( const value_type & value)
inlineinherited

Set parameter.

Parameters
valueoscillation parameter value

Definition at line 74 of file JOscParameter.hh.

75 {
76 using namespace JPP;
77
79
80 if (!this->is_valid()) {
81 THROW(JValueOutOfRange, "JOscParameter<T>::setValue(): Given oscillation parameter is invalid " << value);
82 }
83 }
void setValue(const value_type &value)
Set value.
Definition JParameter.hh:93

◆ getValue()

template<class T >
const value_type JLANG::JParameter< T >::getValue ( ) const
inlineinherited

Get value of parameter.

Returns
value

Definition at line 82 of file JParameter.hh.

83 {
84 return __value;
85 }

◆ operator const value_type()

template<class T >
JLANG::JParameter< T >::operator const value_type ( ) const
inlineinherited

Type conversion operator.

Returns
value

Definition at line 105 of file JParameter.hh.

106 {
107 return getValue();
108 }

◆ isDefined()

template<class T >
const bool JLANG::JParameter< T >::isDefined ( ) const
inlineinherited

Get status of parameter.

Returns
true if value has been defined (by read or assignment); else false

Definition at line 116 of file JParameter.hh.

117 {
118 return is_defined;
119 }

◆ less()

template<class T >
bool JLANG::JParameter< T >::less ( const JParameter< T > & parameter) const
inlineinherited

Less than method.

This method evaluates to true if both parameter values are defined and this value is less than the value of the given parameter object.

Parameters
parameterparameter
Returns
true if both defined and first value less than second value; else false

Definition at line 131 of file JParameter.hh.

132 {
133 return this->isDefined() && parameter.isDefined() && this->getValue() < parameter.getValue();
134 }

Member Data Documentation

◆ __value

template<class T >
T JLANG::JParameter< T >::__value
protectedinherited

Definition at line 172 of file JParameter.hh.

◆ is_defined

template<class T >
bool JLANG::JParameter< T >::is_defined
protectedinherited

Definition at line 173 of file JParameter.hh.


The documentation for this struct was generated from the following file: