Jpp  18.5.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | List of all members
JOSCPROB::JOscProbHelper Struct Reference

Helper class for oscillation probabilities. More...

#include <JOscProbHelper.hh>

Inheritance diagram for JOSCPROB::JOscProbHelper:
JAANET::JFluxMap JAANET::JOscFlux JOSCPROB::JOscillogram JAANET::JAtmosphericNeutrinoFlux

Public Types

typedef
JOscProbInterface::JOscParameters_t 
JOscParameters_t
 
typedef
JOscProbInterface::JParameter_t 
JParameter_t
 
typedef
JOscProbInterface::argument_type 
argument_type
 

Public Member Functions

 JOscProbHelper ()
 Default constructor. More...
 
 JOscProbHelper (JOscProbInterface *pOscProb)
 Constructor. More...
 
 JOscProbHelper (const JOscProbInterface &oscProb)
 Constructor. More...
 
void configure (const JOscProbInterface &oscProb)
 Configure oscillation probability function. More...
 
JOscProbInterfacegetOscProbInterface () const
 Get reference to oscillation probability interface. More...
 
JOscParameters_tgetParameters () const
 Get reference to oscillation parameters interface. More...
 
void set (const JOscParameters_t &parameters) const
 Set oscillation parameters. More...
 
virtual void set (const std::string &name, const argument_type &value) const
 Set value for a given oscillation parameter. More...
 
template<class... Args>
void set (const std::string &name, const argument_type &value, const Args &...args) const
 Set value for given list of oscillation parameters. More...
 
double getP (const JOscChannel &channel, const double energy, const double costh) const
 Get oscillation probability corresponding to given oscillation channel, neutrino energy and zenith angle. More...
 
double getP (const JOscParameters_t &parameters, const JOscChannel &channel, const double energy, const double costh) const
 Get oscillation probability for a given set of oscillation parameters
and a given oscillation channel. More...
 
double getP (const std::string &name, const double value, const JOscChannel &channel, const double E, const double costh) const
 Get oscillation probability for a given oscillation parameter
and a given oscillation channel. More...
 
template<class... Args>
double getP (const std::string &name, const double value, const Args &...args) const
 Get oscillation probability for a given set of oscillation parameters
and a given oscillation channel. More...
 
virtual double getCosth (const double L) const
 Get cosine zenith angle for a given baseline. More...
 
virtual double getBaseline (const double costh) const
 Get baseline for a given cosine zenith angle. More...
 

Detailed Description

Helper class for oscillation probabilities.

Definition at line 25 of file JOscProbHelper.hh.

Member Typedef Documentation

Definition at line 28 of file JOscProbHelper.hh.

Definition at line 29 of file JOscProbHelper.hh.

Definition at line 30 of file JOscProbHelper.hh.

Constructor & Destructor Documentation

JOSCPROB::JOscProbHelper::JOscProbHelper ( )
inline

Default constructor.

Definition at line 36 of file JOscProbHelper.hh.

37  {}
JOSCPROB::JOscProbHelper::JOscProbHelper ( JOscProbInterface pOscProb)
inline

Constructor.

Parameters
pOscProbpointer to oscillation probability function

Definition at line 45 of file JOscProbHelper.hh.

45  :
46  std::shared_ptr<JOscProbInterface>(pOscProb)
47  {}
JOSCPROB::JOscProbHelper::JOscProbHelper ( const JOscProbInterface oscProb)
inline

Constructor.

Parameters
oscProboscillation probability function

Definition at line 55 of file JOscProbHelper.hh.

56  {
57  configure(oscProb);
58  }
void configure(const JOscProbInterface &oscProb)
Configure oscillation probability function.

Member Function Documentation

void JOSCPROB::JOscProbHelper::configure ( const JOscProbInterface oscProb)
inline

Configure oscillation probability function.

Parameters
oscProboscillation probability function

Definition at line 66 of file JOscProbHelper.hh.

67  {
68  this->reset(oscProb.clone());
69  }
virtual clone_type clone() const override
Get clone of this object.
Definition: JClonable.hh:69
void reset(T &value)
Reset value.
JOscProbInterface& JOSCPROB::JOscProbHelper::getOscProbInterface ( ) const
inline

Get reference to oscillation probability interface.

Returns
oscillation parameters

Definition at line 77 of file JOscProbHelper.hh.

78  {
79  using namespace JPP;
80 
81  if (static_cast<const JOscProbHelper&>(*this)) {
82  return *(this->get());
83  } else {
84  THROW(JNullPointerException, "JOscProbHelper::getOscProbInterface(): Oscillation probability interface is not set.");
85  }
86  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:712
JOscParameters_t& JOSCPROB::JOscProbHelper::getParameters ( ) const
inline

Get reference to oscillation parameters interface.

Returns
reference to oscillation parameters interface

Definition at line 94 of file JOscProbHelper.hh.

95  {
97  }
JOscProbInterface & getOscProbInterface() const
Get reference to oscillation probability interface.
JOscParameters_t & getParameters() const
Get reference to oscillation parameters interface.
void JOSCPROB::JOscProbHelper::set ( const JOscParameters_t parameters) const
inline

Set oscillation parameters.

Parameters
parametersoscillation parameters

Definition at line 105 of file JOscProbHelper.hh.

106  {
107  return getParameters().set(parameters);
108  }
JOscParameters_t & getParameters() const
Get reference to oscillation parameters interface.
*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
Definition: diff-Tuna.sh:38
void set(const std::string &name, argument_type value)
Set value for a given oscillation parameter.
virtual void JOSCPROB::JOscProbHelper::set ( const std::string name,
const argument_type value 
) const
inlinevirtual

Set value for a given oscillation parameter.

Parameters
nameparameter name
valueparameter value

Definition at line 117 of file JOscProbHelper.hh.

119  {
120  getParameters().set(name, value);
121  }
JOscParameters_t & getParameters() const
Get reference to oscillation parameters interface.
then echo Enter input within $TIMEOUT_S seconds echo n User name
Definition: JCookie.sh:42
void set(const std::string &name, argument_type value)
Set value for a given oscillation parameter.
template<class... Args>
void JOSCPROB::JOscProbHelper::set ( const std::string name,
const argument_type value,
const Args &...  args 
) const
inline

Set value for given list of oscillation parameters.

Parameters
nameparameter name
valueparameter value
argsremaining pairs of parameter names and values

Definition at line 132 of file JOscProbHelper.hh.

135  {
136  getParameters().set(name, value, args...);
137  }
JOscParameters_t & getParameters() const
Get reference to oscillation parameters interface.
then echo Enter input within $TIMEOUT_S seconds echo n User name
Definition: JCookie.sh:42
void set(const std::string &name, argument_type value)
Set value for a given oscillation parameter.
double JOSCPROB::JOscProbHelper::getP ( const JOscChannel channel,
const double  energy,
const double  costh 
) const
inline

Get oscillation probability corresponding to given oscillation channel, neutrino energy and zenith angle.

Parameters
channeloscillation channel
energyneutrino energy [GeV]
costhcosine zenith angle
Returns
oscillation probability

Definition at line 149 of file JOscProbHelper.hh.

152  {
153  return getOscProbInterface().getP(channel, energy, costh);
154  }
JOscProbInterface & getOscProbInterface() const
Get reference to oscillation probability interface.
virtual double getP(const JOscChannel &channel, const double E, const double costh) const =0
Get oscillation probability for a given oscillation channel.
then for APP in event gandalf start energy
Definition: JMuonMCEvt.sh:44
double JOSCPROB::JOscProbHelper::getP ( const JOscParameters_t parameters,
const JOscChannel channel,
const double  energy,
const double  costh 
) const
inline

Get oscillation probability for a given set of oscillation parameters
and a given oscillation channel.

Parameters
channeloscillation channel
parametersoscillation parameters
energyneutrino energy [GeV]
costhcosine zenith angle
Returns
oscillation probability

Definition at line 167 of file JOscProbHelper.hh.

171  {
172  return getOscProbInterface().getP(parameters, channel, energy, costh);
173  }
JOscProbInterface & getOscProbInterface() const
Get reference to oscillation probability interface.
virtual double getP(const JOscChannel &channel, const double E, const double costh) const =0
Get oscillation probability for a given oscillation channel.
*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
Definition: diff-Tuna.sh:38
then for APP in event gandalf start energy
Definition: JMuonMCEvt.sh:44
double JOSCPROB::JOscProbHelper::getP ( const std::string name,
const double  value,
const JOscChannel channel,
const double  E,
const double  costh 
) const
inline

Get oscillation probability for a given oscillation parameter
and a given oscillation channel.

Parameters
nameparameter name
valueparameter value
channeloscillation channel
Eneutrino energy [GeV]
costhcosine zenith angle
Returns
oscillation probability

Definition at line 187 of file JOscProbHelper.hh.

192  {
193  return getOscProbInterface().getP(name, value, channel, E, costh);
194  }
JOscProbInterface & getOscProbInterface() const
Get reference to oscillation probability interface.
virtual double getP(const JOscChannel &channel, const double E, const double costh) const =0
Get oscillation probability for a given oscillation channel.
then usage $script< input file >[option[primary[working directory]]] nWhere option can be E
Definition: JMuonPostfit.sh:40
then echo Enter input within $TIMEOUT_S seconds echo n User name
Definition: JCookie.sh:42
template<class... Args>
double JOSCPROB::JOscProbHelper::getP ( const std::string name,
const double  value,
const Args &...  args 
) const
inline

Get oscillation probability for a given set of oscillation parameters
and a given oscillation channel.

Parameters
nameparameter name
valueparameter value
argsremaining arguments

Definition at line 206 of file JOscProbHelper.hh.

209  {
210  return getOscProbInterface().getP(name, value, args...);
211  }
JOscProbInterface & getOscProbInterface() const
Get reference to oscillation probability interface.
virtual double getP(const JOscChannel &channel, const double E, const double costh) const =0
Get oscillation probability for a given oscillation channel.
then echo Enter input within $TIMEOUT_S seconds echo n User name
Definition: JCookie.sh:42
virtual double JOSCPROB::JOscProbHelper::getCosth ( const double  L) const
inlinevirtual

Get cosine zenith angle for a given baseline.

Parameters
Lbaseline [km]
Returns
cosine zenith angle

Definition at line 220 of file JOscProbHelper.hh.

221  {
222  return getOscProbInterface().getCosth(L);
223  }
JOscProbInterface & getOscProbInterface() const
Get reference to oscillation probability interface.
virtual double getCosth(const double L) const =0
Get cosine zenith angle for a given baseline.
virtual double JOSCPROB::JOscProbHelper::getBaseline ( const double  costh) const
inlinevirtual

Get baseline for a given cosine zenith angle.

Parameters
costhcosine zenith angle
Returns
baseline [km]

Definition at line 232 of file JOscProbHelper.hh.

233  {
234  return getOscProbInterface().getBaseline(costh);
235  }
JOscProbInterface & getOscProbInterface() const
Get reference to oscillation probability interface.
virtual double getBaseline(const double costh) const =0
Get baseline for a given cosine zenith angle.

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