Jpp  master_rocky-40-g5f0272dcd
the software that should make you happy
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
JPHYSICS::JGeant_t Class Referenceabstract

Base class for the probability density function of photon emission from EM-shower as a function of the index of refraction and the cosine of the emission angle. More...

#include <JGeant_t.hh>

Inheritance diagram for JPHYSICS::JGeant_t:
JTOOLS::JGridPolint1Function1D_t JTOOLS::JGridPolintFunction1D_t< 1 > JTOOLS::JPolintFunction1D< N, JElement2D< double, double >, JGridCollection, double > JTOOLS::JPolintFunction< N, JElement_t, JCollection_t, JResult_t, JDistance_t > JTOOLS::JFunction1D< JArgument_t, JResult_t > JTOOLS::JFunctional< JArgument_t, JResult_t > JPHYSICS::JGeant

Public Types

typedef JGridCollection< JElement2D< double, double >, JDistance< typename JElement_t::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  { NUMBER_OF_DIMENSIONS = 1 }
 
typedef JFunctional< JArgument_t, JResult_t > functional_type
 
typedef JSupervisor supervisor_type
 

Public Member Functions

 JGeant_t ()
 Default constructor. More...
 
double operator() (const double n, const double ct) const
 Number of photons from EM-shower as a function of emission angle. More...
 
double operator() (const double n, const double xmin, const double xmax) const
 Integral number of photons from EM-shower between two emission angles. 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 JExceptionHandlergetExceptionHandler () 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 Member Functions

virtual void do_compile () override
 Function compilation. More...
 

Protected Attributes

double a0
 offset of the normalisation dependence More...
 
double a1
 slope of the normalisation dependence More...
 
JGeantFunction1D_t buffer
 
JSupervisor supervisor
 

Friends

JReaderoperator>> (JReader &in, JGeant_t &geant)
 Read geant from input. More...
 
JWriteroperator<< (JWriter &out, const JGeant_t &geant)
 Write geant to output. More...
 

Detailed Description

Base class for the probability density function of photon emission from EM-shower as a function of the index of refraction and the cosine of the emission angle.

The implementation of this function is based on a linear interpolation of tabulated values. In this, a linear approximation of the dependence of the normalisation constant on the index of refraction is assumed. This assumption is valid to within 10^-3.

Definition at line 32 of file JGeant_t.hh.

Member Typedef Documentation

◆ collection_type

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

Definition at line 1098 of file JPolint.hh.

◆ abscissa_type

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

Definition at line 1100 of file JPolint.hh.

◆ ordinate_type

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

Definition at line 1101 of file JPolint.hh.

◆ value_type

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

Definition at line 1102 of file JPolint.hh.

◆ distance_type

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

Definition at line 1103 of file JPolint.hh.

◆ const_iterator

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

Definition at line 1105 of file JPolint.hh.

◆ const_reverse_iterator

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

Definition at line 1106 of file JPolint.hh.

◆ iterator

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

Definition at line 1107 of file JPolint.hh.

◆ reverse_iterator

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

Definition at line 1108 of file JPolint.hh.

◆ function_type

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

Definition at line 1110 of file JPolint.hh.

◆ argument_type

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

Definition at line 1112 of file JPolint.hh.

◆ result_type

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

Definition at line 1113 of file JPolint.hh.

◆ exceptionhandler_type

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

Definition at line 1114 of file JPolint.hh.

◆ functional_type

template<class JArgument_t , class JResult_t >
typedef JFunctional<JArgument_t, JResult_t> JTOOLS::JFunction1D< JArgument_t, JResult_t >::functional_type
inherited

Definition at line 337 of file JFunctional.hh.

◆ supervisor_type

template<class JArgument_t , class JResult_t >
typedef JSupervisor JTOOLS::JFunctional< JArgument_t, JResult_t >::supervisor_type
inherited

Definition at line 89 of file JFunctional.hh.

Member Enumeration Documentation

◆ anonymous enum

template<class JArgument_t , class JResult_t >
anonymous enum
inherited
Enumerator
NUMBER_OF_DIMENSIONS 

Definition at line 335 of file JFunctional.hh.

Constructor & Destructor Documentation

◆ JGeant_t()

JPHYSICS::JGeant_t::JGeant_t ( )
inline

Default constructor.

Definition at line 39 of file JGeant_t.hh.

40  {}

Member Function Documentation

◆ operator()() [1/3]

double JPHYSICS::JGeant_t::operator() ( const double  n,
const double  ct 
) const
inline

Number of photons from EM-shower as a function of emission angle.

The integral over full solid angle is normalised to one.

Parameters
nindex of refraction
ctcosine angle of emmision
Returns
d^2P/dcos()dphi

Definition at line 51 of file JGeant_t.hh.

53  {
54  const double y = JGeantFunction1D_t::operator()(ct - 1.0/n);
55 
56  return y * (a0 - a1*n);
57  }
double a0
offset of the normalisation dependence
Definition: JGeant_t.hh:134
double a1
slope of the normalisation dependence
Definition: JGeant_t.hh:135
const int n
Definition: JPolint.hh:786
result_type operator()(const argument_type x) const
Function value evaluation.
Definition: JFunctional.hh:348

◆ operator()() [2/3]

double JPHYSICS::JGeant_t::operator() ( const double  n,
const double  xmin,
const double  xmax 
) const
inline

Integral number of photons from EM-shower between two emission angles.

The integral over full solid angle is normalised to one.

Parameters
nindex of refraction
xminminimal cosine angle of emmision
xmaxmaximal cosine angle of emmision
Returns
dnpe/dphi

Definition at line 69 of file JGeant_t.hh.

72  {
73  const double x_min = std::max(xmin - 1.0/n, buffer. begin()->getX());
74  const double x_max = std::min(xmax - 1.0/n, buffer.rbegin()->getX());
75 
76  const double y = buffer(x_max) - buffer(x_min);
77 
78  return y * (a0 - a1*n);
79  }
JGeantFunction1D_t buffer
Definition: JGeant_t.hh:136
const double xmax
Definition: JQuadrature.cc:24
const double xmin
Definition: JQuadrature.cc:23

◆ do_compile()

virtual void JPHYSICS::JGeant_t::do_compile ( )
inlineoverrideprotectedvirtual

Function compilation.

Definition at line 122 of file JGeant_t.hh.

123  {
125 
126  buffer.clear();
127 
128  JTOOLS::integrate(*this, buffer);
129 
130  buffer.compile();
131  }
JElement_t::ordinate_type integrate(const JCollection< JElement_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
Conversion of data points to integral values.
Definition: JCollection.hh:812
virtual void do_compile() override
Function compilation.
Definition: JPolint.hh:860

◆ operator()() [3/3]

template<class JArgument_t , class JResult_t >
result_type JTOOLS::JFunction1D< JArgument_t, JResult_t >::operator() ( const argument_type  x) const
inlineinherited

Function value evaluation.

Parameters
xargument value
Returns
function value

Definition at line 348 of file JFunctional.hh.

349  {
350  return this->evaluate(&x);
351  }
virtual result_type evaluate(const argument_type *pX) const =0
Recursive function value evaluation.

◆ evaluate()

template<class JArgument_t , class JResult_t >
virtual result_type JTOOLS::JFunctional< JArgument_t, JResult_t >::evaluate ( const argument_type pX) const
pure virtualinherited

Recursive function value evaluation.

Parameters
pXpointer to abscissa values
Returns
function value

Implemented in JTOOLS::JSplineMap< JKey_t, JValue_t, JMap_t, JResult_t, JDistance_t >, JTOOLS::JSplineMap< JKey_t, JValue_t, JGridMap, JResultType< JValue_t >::result_type, JDistance< JKey_t > >, JTOOLS::JSplineMap< JKey_t, JValue_t, JMap, JResultDerivative< JResultType< JValue_t >::result_type >, JDistance< JKey_t > >, JTOOLS::JSplineMap< JKey_t, JValue_t, JMap, JResultType< JValue_t >::result_type, JDistance< JKey_t > >, JTOOLS::JSplineMap< JKey_t, JValue_t, JGridMap, JResultDerivative< JResultType< JValue_t >::result_type >, JDistance< JKey_t > >, JTOOLS::JSplineFunction< JElement_t, JCollection_t, JResultPDF< typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >, JTOOLS::JSplineFunction< JElement_t, JCollection_t, JResultDerivative< typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >, JTOOLS::JSplineFunction< JElement_t, JCollection_t, typename JResultType< typename JElement_t::ordinate_type >::result_type, JDistance_t >, JTOOLS::JPolintFunction< N, JElement_t, JCollection_t, JResultHesse< typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >, JTOOLS::JPolintFunction< N, JElement_t, JCollection_t, JResultDerivative< typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >, JTOOLS::JPolintFunction< N, JElement_t, JCollection_t, JResultPolynome< M, typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >, JTOOLS::JPolintFunction< N, JElement_t, JCollection_t, JResultPDF< typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >, JTOOLS::JPolintFunction< 1, JElement_t, JCollection_t, typename JResultType< typename JElement_t::ordinate_type >::result_type, JDistance_t >, JTOOLS::JPolintFunction< 0, JElement_t, JCollection_t, typename JResultType< typename JElement_t::ordinate_type >::result_type, JDistance_t >, JTOOLS::JPolintFunction< N, JElement_t, JCollection_t, typename JResultType< typename JElement_t::ordinate_type >::result_type, JDistance_t >, JTOOLS::JPolfitFunction< N, M, JElement_t, JCollection_t, JResult_t, JDistance_t >, JTOOLS::JPolfitFunction< N, M, JElement_t, JCollection_t, typename JElement_t::ordinate_type, JDistance< typename JElement_t::abscissa_type > >, JTOOLS::JHermiteSplineMap< JKey_t, JValue_t, JMap_t, JResult_t, JDistance_t >, JTOOLS::JHermiteSplineFunction< JElement_t, JCollection_t, JResultPDF< typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >, JTOOLS::JHermiteSplineFunction< JElement_t, JCollection_t, JResultDerivative< typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >, JTOOLS::JHermiteSplineFunction< JElement_t, JCollection_t, typename JResultType< typename JElement_t::ordinate_type >::result_type, JDistance_t >, JTOOLS::JFunctionObject1D< JArgument_t, JResult_t >, JTOOLS::JExternalFunction1D< JArgument_t, JResult_t >, and JTOOLS::JConstantFunction1D< JArgument_t, JResult_t >.

◆ getValue() [1/2]

template<class JArgument_t , class JResult_t >
static result_type JTOOLS::JFunctional< JArgument_t, JResult_t >::getValue ( const JFunctional< JArgument_t, JResult_t > &  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  }

◆ getValue() [2/2]

template<class JArgument_t , class JResult_t >
static JClass<result_type>::argument_type JTOOLS::JFunctional< JArgument_t, JResult_t >::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  }

◆ getSupervisor()

template<class JArgument_t , class JResult_t >
JSupervisor JTOOLS::JFunctional< JArgument_t, JResult_t >::getSupervisor ( ) const
inlineinherited

Get supervisor.

Returns
supervisor

Definition at line 281 of file JFunctional.hh.

282  {
283  return supervisor;
284  }
JSupervisor supervisor
Definition: JFunctional.hh:310

◆ getExceptionHandler()

template<class JArgument_t , class JResult_t >
const JExceptionHandler& JTOOLS::JFunctional< JArgument_t, JResult_t >::getExceptionHandler ( ) const
inlineinherited

Get exception handler.

Returns
exception handler

Definition at line 292 of file JFunctional.hh.

293  {
294  return *supervisor;
295  }

◆ setExceptionHandler()

template<class JArgument_t , class JResult_t >
void JTOOLS::JFunctional< JArgument_t, JResult_t >::setExceptionHandler ( const JSupervisor supervisor)
inlineinherited

Set the supervisor for handling of exceptions.

Parameters
supervisorsupervisor

Definition at line 303 of file JFunctional.hh.

304  {
305  this->supervisor = supervisor;
306  }

Friends And Related Function Documentation

◆ operator>>

JReader& operator>> ( JReader in,
JGeant_t geant 
)
friend

Read geant from input.

Parameters
inreader
geantgeant
Returns
reader

Definition at line 89 of file JGeant_t.hh.

90  {
91  in >> geant.a0;
92  in >> geant.a1;
93  in >> static_cast<JGeantFunction1D_t&>(geant);
94 
95  geant.compile();
96 
97  return in;
98  }
static const JGeant geant(geanx, 0.0001)
Function object for the number of photons from EM-shower as a function of emission angle.
Type definition of a 1st degree polynomial interpolation based on a JGridCollection with result type ...

◆ operator<<

JWriter& operator<< ( JWriter out,
const JGeant_t geant 
)
friend

Write geant to output.

Parameters
outwriter
geantgeant
Returns
writer

Definition at line 108 of file JGeant_t.hh.

109  {
110  out << geant.a0;
111  out << geant.a1;
112  out << static_cast<const JGeantFunction1D_t&>(geant);
113 
114  return out;
115  }

Member Data Documentation

◆ a0

double JPHYSICS::JGeant_t::a0
protected

offset of the normalisation dependence

Definition at line 134 of file JGeant_t.hh.

◆ a1

double JPHYSICS::JGeant_t::a1
protected

slope of the normalisation dependence

Definition at line 135 of file JGeant_t.hh.

◆ buffer

JGeantFunction1D_t JPHYSICS::JGeant_t::buffer
protected

Definition at line 136 of file JGeant_t.hh.

◆ supervisor

template<class JArgument_t , class JResult_t >
JSupervisor JTOOLS::JFunctional< JArgument_t, JResult_t >::supervisor
protectedinherited

Definition at line 310 of file JFunctional.hh.


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