Jpp  17.0.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 | Private Attributes | List of all members
JOSCPROB::JOscProbInterpolator2D< JDistance_t > Struct Template Reference

Auxiliary class for interpolating an oscillation probability table in 8 dimensions in terms of: More...

#include <JOscProbInterpolator2D.hh>

Public Types

typedef JOscProbTable2D
< JDistance_t > 
table_type
 
typedef table_type::data_type data_type
 

Public Member Functions

 JOscProbInterpolator2D ()
 Default constructor. More...
 
 JOscProbInterpolator2D (const table_type *pTable)
 Constructor. More...
 
double operator() (const JOscChannel &channel, const double E, const double costh) const
 Get oscillation probability for given oscillation channel. More...
 

Private Attributes

const table_typepTable
 Pointer to 2D oscillation probability table. More...
 

Detailed Description

template<class JDistance_t = JTOOLS::JDistance<typename JOscProbTable2D_t::JFunction2D_t::argument_type>>
struct JOSCPROB::JOscProbInterpolator2D< JDistance_t >

Auxiliary class for interpolating an oscillation probability table in 8 dimensions in terms of:

  1. $ E \left[\mathrm{GeV}\right] $
  2. $ \sin(\theta)$

Definition at line 37 of file JOscProbInterpolator2D.hh.

Member Typedef Documentation

template<class JDistance_t = JTOOLS::JDistance<typename JOscProbTable2D_t::JFunction2D_t::argument_type>>
typedef JOscProbTable2D<JDistance_t> JOSCPROB::JOscProbInterpolator2D< JDistance_t >::table_type

Definition at line 39 of file JOscProbInterpolator2D.hh.

template<class JDistance_t = JTOOLS::JDistance<typename JOscProbTable2D_t::JFunction2D_t::argument_type>>
typedef table_type::data_type JOSCPROB::JOscProbInterpolator2D< JDistance_t >::data_type

Definition at line 40 of file JOscProbInterpolator2D.hh.

Constructor & Destructor Documentation

template<class JDistance_t = JTOOLS::JDistance<typename JOscProbTable2D_t::JFunction2D_t::argument_type>>
JOSCPROB::JOscProbInterpolator2D< JDistance_t >::JOscProbInterpolator2D ( )
inline

Default constructor.

Definition at line 46 of file JOscProbInterpolator2D.hh.

46  :
47  pTable()
48  {}
const table_type * pTable
Pointer to 2D oscillation probability table.
template<class JDistance_t = JTOOLS::JDistance<typename JOscProbTable2D_t::JFunction2D_t::argument_type>>
JOSCPROB::JOscProbInterpolator2D< JDistance_t >::JOscProbInterpolator2D ( const table_type pTable)
inline

Constructor.

Parameters
pTablepointer to 2D oscillation probability table

Definition at line 56 of file JOscProbInterpolator2D.hh.

56  :
57  pTable(pTable)
58  {}
const table_type * pTable
Pointer to 2D oscillation probability table.

Member Function Documentation

template<class JDistance_t = JTOOLS::JDistance<typename JOscProbTable2D_t::JFunction2D_t::argument_type>>
double JOSCPROB::JOscProbInterpolator2D< JDistance_t >::operator() ( const JOscChannel channel,
const double  E,
const double  costh 
) const
inline

Get oscillation probability for given oscillation channel.

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

Definition at line 69 of file JOscProbInterpolator2D.hh.

72  {
73  using namespace std;
74  using namespace JPP;
75 
76  if (pTable != NULL) {
77 
78  const JOscChannel* p = find(getOscChannel, getOscChannel + NUMBER_OF_OSCCHANNELS, channel);
79 
80  if (p != end(getOscChannel)) {
81 
82  const double L = getL(costh);
83  const double sinth = (fabs(costh) < 1.0 ? sqrt((1 - costh) * (1 + costh)) : 0.0);
84 
85  const size_t index = distance(getOscChannel, p);
86  const data_type& probabilities = (*pTable)(L/E, sinth);
87 
88  return probabilities[index];
89 
90  } else {
91 
92  THROW(JValueOutOfRange, "JOscProbInterpolator2D::operator(): Invalid oscillation channel " << channel << endl);
93  }
94 
95  } else {
96 
97  THROW(JNullPointerException, "JOscProbInterpolator2D::operator(): Unspecified oscillation probability table." << endl);
98  }
99  }
then usage E
Definition: JMuonPostfit.sh:35
Neutrino oscillation channel.
Definition: JOscChannel.hh:29
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:696
static const JOscChannel getOscChannel[]
Declare group of neutrino oscillation channels.
Definition: JOscChannel.hh:340
double getL(const double costh)
Get baseline for a given cosine zenith angle.
const table_type * pTable
Pointer to 2D oscillation probability table.
static const int NUMBER_OF_OSCCHANNELS
Number of neutrino oscillation channels.
Definition: JOscChannel.hh:365

Member Data Documentation

template<class JDistance_t = JTOOLS::JDistance<typename JOscProbTable2D_t::JFunction2D_t::argument_type>>
const table_type* JOSCPROB::JOscProbInterpolator2D< JDistance_t >::pTable
private

Pointer to 2D oscillation probability table.

Definition at line 104 of file JOscProbInterpolator2D.hh.


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