Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
JPHYSICS::JPDFTransformer< 2, JArgument_t > Class Template Reference

Template specialisation of transformer of the 2D Probability Density Functions of the time response of a PMT. More...

#include <JPDFTransformer.hh>

Inheritance diagram for JPHYSICS::JPDFTransformer< 2, JArgument_t >:
JTOOLS::JMultiMapTransformer< 2, JArgument_t > JLANG::JClonable< JClass_t > JIO::JSerialisable

Public Types

typedef
JTOOLS::JMultiMapTransformer
< 2, JArgument_t > 
JMultiMapTransformer_t
 
typedef
JMultiMapTransformer_t::clone_type 
clone_type
 
typedef
JMultiMapTransformer_t::argument_type 
argument_type
 
typedef
JMultiMapTransformer_t::const_array_type 
const_array_type
 
typedef JMultiMapTransformer
< N, JArgument_t > 
multimaptransformer_type
 
typedef JArray< N, argument_typearray_type
 

Public Member Functions

 JPDFTransformer ()
 Default constructor. More...
 
 JPDFTransformer (const double ln, const int alpha, const double kmin, const double kmax, const JGeant &geant, const double bmin)
 Constructor. More...
 
virtual clone_type clone () const
 Clone object. More...
 
virtual argument_type putXn (const_array_type &buffer, const argument_type xn) const
 Evaluate dt value as a function of {D, cd}. More...
 
virtual argument_type getXn (const_array_type &buffer, const argument_type xn) const
 Evaluate dt value as a function of {D, cd}. More...
 
virtual double getWeight (const_array_type &buffer) const
 Weight function. More...
 
virtual JReaderread (JReader &in)
 Read PDF transformer from input. More...
 
virtual JWriterwrite (JWriter &out) const
 Write PDF transformer to output. More...
 
std::ostream & print (std::ostream &out) const
 Print PDF transformer to output stream. More...
 
double getWeight (const argument_type x,...) const
 Weight function. More...
 

Static Public Member Functions

static double getDmin ()
 
static const JMultiMapTransformergetDefaultTransformer ()
 Get default transformer. More...
 
static JMultiMapTransformergetClone ()
 Get clone of default transformer. More...
 

Public Attributes

double __ln
 Effective attenuation length [m]. More...
 
int __alpha
 Distance dependence (power term) More...
 
double __kmin
 minimal kappa More...
 
double __kmax
 maximal kappa More...
 
JGeant getShowerProbability
 

Detailed Description

template<class JArgument_t>
class JPHYSICS::JPDFTransformer< 2, JArgument_t >

Template specialisation of transformer of the 2D Probability Density Functions of the time response of a PMT.

PDFs are evaluated by interpolation for:

  1. distance between EM shower and PMT [m]
  2. cosine angle EM shower direction and EM shower - PMT position
  3. arrival time [ns]

The evaluation of the weights is based on:

  1. effective attenuation length
  2. emission profile of the photons

Definition at line 255 of file JPDFTransformer.hh.

Member Typedef Documentation

template<class JArgument_t >
typedef JTOOLS::JMultiMapTransformer<2, JArgument_t> JPHYSICS::JPDFTransformer< 2, JArgument_t >::JMultiMapTransformer_t

Definition at line 260 of file JPDFTransformer.hh.

template<class JArgument_t >
typedef JMultiMapTransformer_t::clone_type JPHYSICS::JPDFTransformer< 2, JArgument_t >::clone_type

Definition at line 262 of file JPDFTransformer.hh.

template<class JArgument_t >
typedef JMultiMapTransformer_t::argument_type JPHYSICS::JPDFTransformer< 2, JArgument_t >::argument_type

Definition at line 263 of file JPDFTransformer.hh.

template<class JArgument_t >
typedef JMultiMapTransformer_t::const_array_type JPHYSICS::JPDFTransformer< 2, JArgument_t >::const_array_type

Definition at line 264 of file JPDFTransformer.hh.

typedef JMultiMapTransformer<N, JArgument_t> JTOOLS::JMultiMapTransformer< N, JArgument_t >::multimaptransformer_type
inherited

Definition at line 41 of file JMultiMapTransformer.hh.

typedef JArray<N, argument_type> JTOOLS::JMultiMapTransformer< N, JArgument_t >::array_type
inherited

Definition at line 45 of file JMultiMapTransformer.hh.

Constructor & Destructor Documentation

template<class JArgument_t >
JPHYSICS::JPDFTransformer< 2, JArgument_t >::JPDFTransformer ( )
inline

Default constructor.

Definition at line 274 of file JPDFTransformer.hh.

274  :
275  __ln (0.0),
276  __alpha(0),
277  __kmin (0.0),
278  __kmax (0.0),
280  {}
double __ln
Effective attenuation length [m].
int __alpha
Distance dependence (power term)
template<class JArgument_t >
JPHYSICS::JPDFTransformer< 2, JArgument_t >::JPDFTransformer ( const double  ln,
const int  alpha,
const double  kmin,
const double  kmax,
const JGeant geant,
const double  bmin 
)
inline

Constructor.

Parameters
lnEffective attenuation length [m]
alphaDistance dependence (power term)
kminMinimal kappa
kmaxMaximal kappa
geantFunction photon emission from EM-shower
bminBaseline photon emission from EM-shower

Definition at line 293 of file JPDFTransformer.hh.

298  :
299  __ln (ln),
300  __alpha(alpha),
301  __kmin (kmin),
302  __kmax (kmax),
303  getShowerProbability(geant)
304  {
305  getShowerProbability.add(bmin);
307  }
double __ln
Effective attenuation length [m].
virtual void compile()
Function compilation.
Definition: JGeant.hh:88
int __alpha
Distance dependence (power term)

Member Function Documentation

template<class JArgument_t >
static double JPHYSICS::JPDFTransformer< 2, JArgument_t >::getDmin ( )
inlinestatic

Definition at line 268 of file JPDFTransformer.hh.

268 { return 0.01; } // shortest distance [m]
template<class JArgument_t >
virtual clone_type JPHYSICS::JPDFTransformer< 2, JArgument_t >::clone ( ) const
inlinevirtual

Clone object.

Returns
pointer to newly created JPDFTransformer

Implements JLANG::JClonable< JClass_t >.

Definition at line 315 of file JPDFTransformer.hh.

316  {
317  return new JPDFTransformer(*this);
318  }
template<class JArgument_t >
virtual argument_type JPHYSICS::JPDFTransformer< 2, JArgument_t >::putXn ( const_array_type buffer,
const argument_type  xn 
) const
inlinevirtual

Evaluate dt value as a function of {D, cd}.

Parameters
buffer{D, cd}
xnold dt value
Returns
new dt value

Implements JTOOLS::JMultiMapTransformer< 2, JArgument_t >.

Definition at line 328 of file JPDFTransformer.hh.

329  {
330  using namespace JTOOLS;
331 
332  const double D = buffer[0];
333  //const double cd = buffer[1];
334 
335  double x = xn;
336 
337  const double t0 = D * getIndexOfRefraction() * getInverseSpeedOfLight();
338  const double t1 = D * __kmin * getInverseSpeedOfLight();
339 
340  x -= t1 - t0;
341 
342  if (__kmax > __kmin) {
343  x /= D * (__kmax - __kmin) * getInverseSpeedOfLight();
344  }
345 
346  return x;
347  }
double getIndexOfRefraction()
Get average index of refraction of water.
Definition: JConstants.hh:111
const double getInverseSpeedOfLight()
Get inverse speed of light.
Definition: JConstants.hh:100
template<class JArgument_t >
virtual argument_type JPHYSICS::JPDFTransformer< 2, JArgument_t >::getXn ( const_array_type buffer,
const argument_type  xn 
) const
inlinevirtual

Evaluate dt value as a function of {D, cd}.

Parameters
buffer{D, cd}
xnold dt value
Returns
new dt value

Implements JTOOLS::JMultiMapTransformer< 2, JArgument_t >.

Definition at line 357 of file JPDFTransformer.hh.

358  {
359  using namespace JTOOLS;
360 
361  const double D = buffer[0];
362  //const double cd = buffer[1];
363 
364  double x = xn;
365 
366  if (__kmax > __kmin) {
367  x *= D * (__kmax - __kmin) * getInverseSpeedOfLight();
368  }
369 
370  const double t0 = D * getIndexOfRefraction() * getInverseSpeedOfLight();
371  const double t1 = D * __kmin * getInverseSpeedOfLight();
372 
373  x += t1 - t0;
374 
375  return x;
376  }
double getIndexOfRefraction()
Get average index of refraction of water.
Definition: JConstants.hh:111
const double getInverseSpeedOfLight()
Get inverse speed of light.
Definition: JConstants.hh:100
template<class JArgument_t >
virtual double JPHYSICS::JPDFTransformer< 2, JArgument_t >::getWeight ( const_array_type buffer) const
inlinevirtual

Weight function.

Parameters
buffer{D, cd}
Returns
weight

Implements JTOOLS::JMultiMapTransformer< 2, JArgument_t >.

Definition at line 385 of file JPDFTransformer.hh.

386  {
387  using namespace JTOOLS;
388 
389  const double D = buffer[0];
390  const double cd = buffer[1];
391 
392  const double d = sqrt(getDmin()*getDmin() + D*D);
393 
394  return getShowerProbability(getIndexOfRefraction(), cd) * exp(-d/__ln) / pow(d,__alpha);
395  }
double getIndexOfRefraction()
Get average index of refraction of water.
Definition: JConstants.hh:111
double __ln
Effective attenuation length [m].
int __alpha
Distance dependence (power term)
template<class JArgument_t >
virtual JReader& JPHYSICS::JPDFTransformer< 2, JArgument_t >::read ( JReader in)
inlinevirtual

Read PDF transformer from input.

Parameters
inreader
Returns
reader

Implements JIO::JSerialisable.

Definition at line 404 of file JPDFTransformer.hh.

405  {
406  in >> __ln;
407  in >> __alpha;
408  in >> __kmin;
409  in >> __kmax;
410  in >> getShowerProbability;
411 
412  return in;
413  }
double __ln
Effective attenuation length [m].
int __alpha
Distance dependence (power term)
template<class JArgument_t >
virtual JWriter& JPHYSICS::JPDFTransformer< 2, JArgument_t >::write ( JWriter out) const
inlinevirtual

Write PDF transformer to output.

Parameters
outwriter
Returns
writer

Implements JIO::JSerialisable.

Definition at line 422 of file JPDFTransformer.hh.

423  {
424  out << __ln;
425  out << __alpha;
426  out << __kmin;
427  out << __kmax;
428  out << getShowerProbability;
429 
430  return out;
431  }
double __ln
Effective attenuation length [m].
int __alpha
Distance dependence (power term)
template<class JArgument_t >
std::ostream& JPHYSICS::JPDFTransformer< 2, JArgument_t >::print ( std::ostream &  out) const
inline

Print PDF transformer to output stream.

Parameters
outoutput stream
Returns
output stream

Definition at line 440 of file JPDFTransformer.hh.

441  {
442  using std::endl;
443 
444  out << "Effective attenuation length [m] " << __ln << endl;
445  out << "Distance dependence (power term) " << __alpha << endl;
446  out << "Minimal kappa " << __kmin << endl;
447  out << "Maximal kappa " << __kmax << endl;
448 
449  return out;
450  }
double __ln
Effective attenuation length [m].
int __alpha
Distance dependence (power term)
double JTOOLS::JMultiMapTransformer< N, JArgument_t >::getWeight ( const argument_type  x,
  ... 
) const
inlineinherited

Weight function.

Parameters
xcomma seperated list of abscissa values
Returns
weight

Definition at line 84 of file JMultiMapTransformer.hh.

85  {
86  va_start(ap, x);
87 
88  buffer[0] = x;
89 
90  for (int i = 1; i != N; ++i) {
91  buffer[i] = va_arg(ap, argument_type);
92  }
93 
94  va_end(ap);
95 
96  return getWeight(buffer);
97  }
virtual double getWeight(const_array_type &buffer) const =0
Weight function.
static const JMultiMapTransformer& JTOOLS::JMultiMapTransformer< N, JArgument_t >::getDefaultTransformer ( )
inlinestaticinherited

Get default transformer.

Returns
default transformer

Definition at line 111 of file JMultiMapTransformer.hh.

112  {
113  static const JMultiMapDefaultTransformer transformer;
114 
115  return transformer;
116  }
static JMultiMapTransformer* JTOOLS::JMultiMapTransformer< N, JArgument_t >::getClone ( )
inlinestaticinherited

Get clone of default transformer.

Returns
pointer to newly created transformer

Definition at line 124 of file JMultiMapTransformer.hh.

125  {
126  return new JMultiMapDefaultTransformer();
127  }

Member Data Documentation

template<class JArgument_t >
double JPHYSICS::JPDFTransformer< 2, JArgument_t >::__ln

Effective attenuation length [m].

Definition at line 453 of file JPDFTransformer.hh.

template<class JArgument_t >
int JPHYSICS::JPDFTransformer< 2, JArgument_t >::__alpha

Distance dependence (power term)

Definition at line 454 of file JPDFTransformer.hh.

template<class JArgument_t >
double JPHYSICS::JPDFTransformer< 2, JArgument_t >::__kmin

minimal kappa

Definition at line 455 of file JPDFTransformer.hh.

template<class JArgument_t >
double JPHYSICS::JPDFTransformer< 2, JArgument_t >::__kmax

maximal kappa

Definition at line 456 of file JPDFTransformer.hh.

template<class JArgument_t >
JGeant JPHYSICS::JPDFTransformer< 2, JArgument_t >::getShowerProbability

Definition at line 457 of file JPDFTransformer.hh.


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