Jpp  18.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 | Static Public Member Functions | Protected Attributes | List of all members
JASTRONOMY::JStarTrek Struct Referenceabstract

Auxiliary class for source tracking. More...

#include <JAstronomyToolkit.hh>

Inheritance diagram for JASTRONOMY::JStarTrek:
JTOOLS::JGridPolint1Function1D_t JTOOLS::JGridPolintFunction1D_t< 1 > JTOOLS::JPolintFunction1D< N, JElement2D< double, double >, JGridCollection, double > JTOOLS::JPolintFunction< N, JElement2D< double, double >, JGridCollection, double, JDistance< typename JElement2D< double, double >::abscissa_type > > JTOOLS::JFunction1D< JElement2D< double, double >::abscissa_type, double > JTOOLS::JFunction< JElement2D< double, double >::abscissa_type, double > JTOOLS::JFunctional< JElement2D< double, double >::abscissa_type, double >

Public Types

typedef JGridCollection
< JElement2D< double, double >
, JDistance< typename
JElement2D< double, double >
::abscissa_type > > 
collection_type
 
typedef
collection_type::abscissa_type 
abscissa_type
 
typedef
collection_type::ordinate_type 
ordinate_type
 
typedef collection_type::value_type value_type
 
typedef
collection_type::distance_type 
distance_type
 
typedef
collection_type::const_iterator 
const_iterator
 
typedef
collection_type::const_reverse_iterator 
const_reverse_iterator
 
typedef collection_type::iterator iterator
 
typedef
collection_type::reverse_iterator 
reverse_iterator
 
typedef JFunction1D
< abscissa_type, double > 
function_type
 
typedef
function_type::argument_type 
argument_type
 
typedef function_type::result_type result_type
 
typedef
function_type::JExceptionHandler 
exceptionhandler_type
 
enum  
 
typedef JFunctional
< JElement2D< double, double >
::abscissa_type, double > 
functional_type
 
typedef JSupervisor supervisor_type
 

Public Member Functions

 JStarTrek (const JAstronomy &telescope, const JSourceLocation &source, const int number_of_bins=401, const int number_of_samples=20000)
 Constructor. More...
 
result_type operator() (const argument_type x) const
 Function value evaluation. More...
 
virtual result_type evaluate (const argument_type *pX) const =0
 Recursive function value evaluation. More...
 
JSupervisor getSupervisor () const
 Get supervisor. More...
 
const JExceptionHandler & getExceptionHandler () const
 Get exception handler. More...
 
void setExceptionHandler (const JSupervisor &supervisor)
 Set the supervisor for handling of exceptions. More...
 

Static Public Member Functions

static result_type getValue (const JFunctional &function, const argument_type *pX)
 Recursive function value evaluation. More...
 
static JClass< result_type >
::argument_type 
getValue (typename JClass< result_type >::argument_type value, const argument_type *pX)
 Termination of recursive function value evaluation. More...
 

Protected Attributes

JSupervisor supervisor
 

Detailed Description

Auxiliary class for source tracking.

This class constitutes a function object corresponding to the normalised probability

\[ \frac{dP}{d\Omega}(cos\theta) \]

for a source to be at an observed zenith angle, $ \theta $, in local coordinates. A simulation of a diffuse flux of neutrinos can thus be used to determine the number of detected events from an astrophysical source with the given telescope.

Definition at line 36 of file JAstronomyToolkit.hh.

Member Typedef Documentation

typedef JGridCollection <JElement2D< double, double > , JDistance<typename JElement2D< double, double > ::abscissa_type> > JTOOLS::JPolintFunction1D< N, JElement2D< double, double > , JGridCollection , double , JDistance<typename JElement2D< double, double > ::abscissa_type> >::collection_type
inherited

Definition at line 1009 of file JPolint.hh.

typedef collection_type::abscissa_type JTOOLS::JPolintFunction1D< N, JElement2D< double, double > , JGridCollection , double , JDistance<typename JElement2D< double, double > ::abscissa_type> >::abscissa_type
inherited

Definition at line 1011 of file JPolint.hh.

typedef collection_type::ordinate_type JTOOLS::JPolintFunction1D< N, JElement2D< double, double > , JGridCollection , double , JDistance<typename JElement2D< double, double > ::abscissa_type> >::ordinate_type
inherited

Definition at line 1012 of file JPolint.hh.

typedef collection_type::value_type JTOOLS::JPolintFunction1D< N, JElement2D< double, double > , JGridCollection , double , JDistance<typename JElement2D< double, double > ::abscissa_type> >::value_type
inherited

Definition at line 1013 of file JPolint.hh.

typedef collection_type::distance_type JTOOLS::JPolintFunction1D< N, JElement2D< double, double > , JGridCollection , double , JDistance<typename JElement2D< double, double > ::abscissa_type> >::distance_type
inherited

Definition at line 1014 of file JPolint.hh.

typedef collection_type::const_iterator JTOOLS::JPolintFunction1D< N, JElement2D< double, double > , JGridCollection , double , JDistance<typename JElement2D< double, double > ::abscissa_type> >::const_iterator
inherited

Definition at line 1016 of file JPolint.hh.

Definition at line 1017 of file JPolint.hh.

typedef collection_type::iterator JTOOLS::JPolintFunction1D< N, JElement2D< double, double > , JGridCollection , double , JDistance<typename JElement2D< double, double > ::abscissa_type> >::iterator
inherited

Definition at line 1018 of file JPolint.hh.

typedef collection_type::reverse_iterator JTOOLS::JPolintFunction1D< N, JElement2D< double, double > , JGridCollection , double , JDistance<typename JElement2D< double, double > ::abscissa_type> >::reverse_iterator
inherited

Definition at line 1019 of file JPolint.hh.

typedef JFunction1D<abscissa_type, double > JTOOLS::JPolintFunction1D< N, JElement2D< double, double > , JGridCollection , double , JDistance<typename JElement2D< double, double > ::abscissa_type> >::function_type
inherited

Definition at line 1021 of file JPolint.hh.

typedef function_type::argument_type JTOOLS::JPolintFunction1D< N, JElement2D< double, double > , JGridCollection , double , JDistance<typename JElement2D< double, double > ::abscissa_type> >::argument_type
inherited

Definition at line 1023 of file JPolint.hh.

typedef function_type::result_type JTOOLS::JPolintFunction1D< N, JElement2D< double, double > , JGridCollection , double , JDistance<typename JElement2D< double, double > ::abscissa_type> >::result_type
inherited

Definition at line 1024 of file JPolint.hh.

typedef function_type::JExceptionHandler JTOOLS::JPolintFunction1D< N, JElement2D< double, double > , JGridCollection , double , JDistance<typename JElement2D< double, double > ::abscissa_type> >::exceptionhandler_type
inherited

Definition at line 1025 of file JPolint.hh.

typedef JFunctional<JElement2D< double, double >::abscissa_type , double > JTOOLS::JFunction1D< JElement2D< double, double >::abscissa_type , double >::functional_type
inherited

Definition at line 322 of file JFunctional.hh.

typedef JSupervisor JTOOLS::JFunctional< JElement2D< double, double >::abscissa_type , double >::supervisor_type
inherited

Definition at line 89 of file JFunctional.hh.

Member Enumeration Documentation

anonymous enum
inherited

Constructor & Destructor Documentation

JASTRONOMY::JStarTrek::JStarTrek ( const JAstronomy telescope,
const JSourceLocation source,
const int  number_of_bins = 401,
const int  number_of_samples = 20000 
)
inline

Constructor.

Parameters
telescopetelescope
sourceastrophysical source
number_of_binsnumber of bins
number_of_samplesnumber of samples

Definition at line 47 of file JAstronomyToolkit.hh.

51  {
52  using namespace JPP;
53 
54  const double epsilon = 0.005;
55  const double W = 1.0 / (double) (number_of_samples * 2*PI); // dP/dphi
56 
57  JGridHistogram1D_t histogram(make_grid(number_of_bins, -1.0 - epsilon, +1.0 + epsilon));
58 
59  for (int i = 0; i != number_of_samples; ++i) {
60 
61  const double t1 = (double) i * NUMBER_OF_SECONDS_PER_SEDERIAL_DAY / (double) number_of_samples;
62  const double ct = cos(telescope.getDirectionOfNeutrino(t1, source).getZenith());
63 
64  histogram.fill(ct, W);
65  }
66 
67  makePDF(histogram, *this); // dP/dOmega
68 
69  this->setExceptionHandler(new JGridPolint1Function1D_t::JDefaultResult(0.0));
70  this->compile();
71  }
JHistogram1D< JElement2D< double, double >, JGridCollection > JGridHistogram1D_t
Type definition of a 1 dimensional histogram based on a JGridCollection.
JNeutrinoDirection getDirectionOfNeutrino(const double &t1, const JSourceLocation &pos) const
Get direction pointing to source.
Definition: JAstronomy.hh:299
const double & getZenith() const
Definition: JAstronomy.hh:206
void makePDF(const JHistogram1D< JElement_t, JContainer_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
Conversion of histogram to probability density function (PDF).
static const double PI
Mathematical constants.
void setExceptionHandler(const JSupervisor &supervisor)
Set the supervisor for handling of exceptions.
Definition: JFunctional.hh:288
static const double NUMBER_OF_SECONDS_PER_SEDERIAL_DAY
Definition: JAstronomy.hh:86
JGrid< JAbscissa_t > make_grid(const int nx, const JAbscissa_t Xmin, const JAbscissa_t Xmax)
Helper method for JGrid.
Definition: JGrid.hh:209
const double epsilon
Definition: JQuadrature.cc:21

Member Function Documentation

result_type JTOOLS::JFunction1D< JElement2D< double, double >::abscissa_type , double >::operator() ( const argument_type  x) const
inlineinherited

Function value evaluation.

Parameters
xargument value
Returns
function value

Definition at line 333 of file JFunctional.hh.

334  {
335  return this->evaluate(&x);
336  }
virtual result_type evaluate(const argument_type *pX) const =0
Recursive function value evaluation.
virtual result_type JTOOLS::JFunctional< JElement2D< double, double >::abscissa_type , double >::evaluate ( const argument_type pX) const
pure virtualinherited

Recursive function value evaluation.

Parameters
pXpointer to abscissa values
Returns
function value
static result_type JTOOLS::JFunctional< JElement2D< double, double >::abscissa_type , double >::getValue ( const JFunctional< JElement2D< double, double >::abscissa_type, double > &  function,
const argument_type pX 
)
inlinestaticinherited

Recursive function value evaluation.

Parameters
functionfunction
pXpointer to abscissa values

Definition at line 107 of file JFunctional.hh.

109  {
110  return function.evaluate(pX);
111  }
static JClass<result_type>::argument_type JTOOLS::JFunctional< JElement2D< double, double >::abscissa_type , double >::getValue ( typename JClass< result_type >::argument_type  value,
const argument_type pX 
)
inlinestaticinherited

Termination of recursive function value evaluation.

Parameters
valueresult
pXpointer to abscissa values

Definition at line 121 of file JFunctional.hh.

123  {
124  return value;
125  }
JSupervisor JTOOLS::JFunctional< JElement2D< double, double >::abscissa_type , double >::getSupervisor ( ) const
inlineinherited

Get supervisor.

Returns
supervisor

Definition at line 266 of file JFunctional.hh.

const JExceptionHandler& JTOOLS::JFunctional< JElement2D< double, double >::abscissa_type , double >::getExceptionHandler ( ) const
inlineinherited

Get exception handler.

Returns
exception handler

Definition at line 277 of file JFunctional.hh.

void JTOOLS::JFunctional< JElement2D< double, double >::abscissa_type , double >::setExceptionHandler ( const JSupervisor &  supervisor)
inlineinherited

Set the supervisor for handling of exceptions.

Parameters
supervisorsupervisor

Definition at line 288 of file JFunctional.hh.

Member Data Documentation

JSupervisor JTOOLS::JFunctional< JElement2D< double, double >::abscissa_type , double >::supervisor
protectedinherited

Definition at line 295 of file JFunctional.hh.


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