Jpp  17.1.1
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 Member Functions | Protected Attributes | List of all members
JPHYSICS::JGeant Class Referenceabstract

Function object 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.hh>

Inheritance diagram for JPHYSICS::JGeant:
JPHYSICS::JGeant_t 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

 JGeant ()
 Default constructor. More...
 
 JGeant (const JGeanx &geanx, const double dx=0.0001)
 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 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 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
 

Detailed Description

Function object 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.

Definition at line 30 of file JGeant.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

JPHYSICS::JGeant::JGeant ( )
inline

Default constructor.

Definition at line 37 of file JGeant.hh.

38  {}
JPHYSICS::JGeant::JGeant ( const JGeanx geanx,
const double  dx = 0.0001 
)
inline

Constructor.

Parameters
geanxPDF of EM-shower
dxstep size for interpolation of function values

Definition at line 47 of file JGeant.hh.

49  {
50  using JTOOLS::PI;
51 
52  const double n0 = geanx.n - 0.02;
53  const double n1 = geanx.n + 0.02;
54 
55  const JGeanx g0(geanx.a, geanx.b, n0);
56  const JGeanx g1(geanx.a, geanx.b, n1);
57 
58  const double y0 = g0.evaluate(-1.0, +1.0);
59  const double y1 = g1.evaluate(-1.0, +1.0);
60 
61  const double c = 1.0 / (y0 * 2*PI);
62 
63  // following range corresponds to n = 1 to n = infinity
64 
65  for (double x = -2.0; x < 1.0; x += dx) {
66  (*this)[x] = c * g0.evaluate(x + 1.0/n0);
67  }
68 
69  this->compile();
70 
71  // linear approximation of dependence normalisation constant on index of refraction
72 
73  this->a1 = (y1 - y0) / y0 / (n1 - n0);
74  this->a0 = 1.0 + a1*n0;
75  }
double a1
slope of the normalisation dependence
Definition: JGeant_t.hh:135
const double b
slope
Definition: JGeanx.hh:134
double a0
offset of the normalisation dependence
Definition: JGeant_t.hh:134
const double n
index of refraction
Definition: JGeanx.hh:135
static const double PI
Mathematical constants.
Probability density function of photon emission from EM-shower as a function of cosine of the emissio...
Definition: JGeanx.hh:31
$WORKDIR ev_configure_domsimulator txt echo process $DOM_SIMULATOR $i $SOURCE_HOST[$index] csh c(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&($DOM_SIMULATOR\-u\$NAME\$\-H\$SERVER\$\-M\$LOGGER\$\-d $DEBUG</dev/null > &/dev/null &))'
const double a
power
Definition: JGeanx.hh:133
Double_t g1(const Double_t x)
Function.
Definition: JQuantiles.cc:25

Member Function Documentation

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

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  }
result_type operator()(const argument_type x) const
Function value evaluation.
Definition: JFunctional.hh:333
double a1
slope of the normalisation dependence
Definition: JGeant_t.hh:135
const int n
Definition: JPolint.hh:697
double a0
offset of the normalisation dependence
Definition: JGeant_t.hh:134
double JPHYSICS::JGeant_t::operator() ( const double  n,
const double  xmin,
const double  xmax 
) const
inlineinherited

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  }
const double xmax
Definition: JQuadrature.cc:24
double a1
slope of the normalisation dependence
Definition: JGeant_t.hh:135
const int n
Definition: JPolint.hh:697
double a0
offset of the normalisation dependence
Definition: JGeant_t.hh:134
const double xmin
Definition: JQuadrature.cc:23
JGeantFunction1D_t buffer
Definition: JGeant_t.hh:136
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 void JPHYSICS::JGeant_t::do_compile ( )
inlineoverrideprotectedvirtualinherited

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  }
virtual void do_compile() override
Function compilation.
Definition: JPolint.hh:771
JGeantFunction1D_t buffer
Definition: JGeant_t.hh:136
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 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

double JPHYSICS::JGeant_t::a0
protectedinherited

offset of the normalisation dependence

Definition at line 134 of file JGeant_t.hh.

double JPHYSICS::JGeant_t::a1
protectedinherited

slope of the normalisation dependence

Definition at line 135 of file JGeant_t.hh.

JGeantFunction1D_t JPHYSICS::JGeant_t::buffer
protectedinherited

Definition at line 136 of file JGeant_t.hh.

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

Definition at line 295 of file JFunctional.hh.


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