Jpp
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes | List of all members
JPHYSICS::JPDFTransformer< 5, JArgument_t > Class Template Referenceabstract

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

#include <JPDFTransformer.hh>

Inheritance diagram for JPHYSICS::JPDFTransformer< 5, JArgument_t >:
JTOOLS::JMultiMapTransformer< 5, JArgument_t > JLANG::JClonable< JClonable_t, JDerived_t > JIO::JSerialisable

Public Types

typedef JPDFTransformer< 4, JArgument_t > JFunction4DTransformer_t
 
typedef JPDFTransformer< 2, JArgument_t > JFunction2DTransformer_t
 
typedef JTOOLS::JMultiMapTransformer< 5, 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 JTOOLS::JGridPolint1Function1D_t JFunction1D_t
 
typedef JMultiMapTransformer< N, JArgument_t > multimaptransformer_type
 
typedef JArray< N, argument_type > array_type
 

Public Member Functions

 JPDFTransformer ()
 Default constructor. More...
 
template<class T >
 JPDFTransformer (const double ln, const int alpha, const double kmin, const double kmax, const JGeant geant, const double bmin, T pmt, const double amin)
 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 {E, D, cd, theta, phi}. More...
 
virtual argument_type getXn (const_array_type &buffer, const argument_type xn) const
 Evaluate dt value as a function of {E, D, cd, theta, phi}. More...
 
virtual double getWeight (const_array_type &buffer) const
 Weight function. More...
 
virtual JReader & read (JReader &in)
 Read PDF transformer from input. More...
 
virtual JWriter & write (JWriter &out) const
 Write PDF transformer to output. More...
 
std::ostream & print (std::ostream &out) const
 Print PDF transfomer to output stream. More...
 
virtual argument_type putXn (const_array_type &buffer, const argument_type xn) const=0
 Evaluate xn value as a function of {x0, ..., xn-1}. More...
 
virtual argument_type getXn (const_array_type &buffer, const argument_type xn) const=0
 Evaluate xn value as a function of {x0, ..., xn-1}. More...
 
virtual double getWeight (const_array_type &buffer) const=0
 Weight function. More...
 
double getWeight (const argument_type x,...) const
 Weight function. More...
 

Static Public Member Functions

static double getDmin ()
 
static const JMultiMapTransformer & getDefaultTransformer ()
 Get default transformer. More...
 
static JMultiMapTransformer * getClone ()
 Get clone of default transformer. More...
 

Public Attributes

JFunction4DTransformer_t transformer
 

Private Attributes

va_list ap
 
JArray< N, argument_type > buffer
 

Detailed Description

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

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

PDFs are evaluated by interpolation for:

  1. energy of the track
  2. distance between EM shower and PMT [m]
  3. cosine angle EM shower direction and EM shower - PMT position
  4. zenith angle of the PMT
  5. azimuthal angle of the PMT
  6. arrival time [ns]

The evaluation of the weights is based on:

  1. effective attenuation length
  2. angular acceptance of PMT

Definition at line 845 of file JPDFTransformer.hh.

Member Typedef Documentation

◆ JFunction4DTransformer_t

template<class JArgument_t >
typedef JPDFTransformer<4, JArgument_t> JPHYSICS::JPDFTransformer< 5, JArgument_t >::JFunction4DTransformer_t

Definition at line 850 of file JPDFTransformer.hh.

◆ JFunction2DTransformer_t

template<class JArgument_t >
typedef JPDFTransformer<2, JArgument_t> JPHYSICS::JPDFTransformer< 5, JArgument_t >::JFunction2DTransformer_t

Definition at line 851 of file JPDFTransformer.hh.

◆ JMultiMapTransformer_t

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

Definition at line 852 of file JPDFTransformer.hh.

◆ clone_type

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

Definition at line 854 of file JPDFTransformer.hh.

◆ argument_type

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

Definition at line 855 of file JPDFTransformer.hh.

◆ const_array_type

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

Definition at line 856 of file JPDFTransformer.hh.

◆ JFunction1D_t

template<class JArgument_t >
typedef JTOOLS::JGridPolint1Function1D_t JPHYSICS::JPDFTransformer< 5, JArgument_t >::JFunction1D_t

Definition at line 858 of file JPDFTransformer.hh.

◆ multimaptransformer_type

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

Definition at line 41 of file JMultiMapTransformer.hh.

◆ array_type

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

Definition at line 45 of file JMultiMapTransformer.hh.

Constructor & Destructor Documentation

◆ JPDFTransformer() [1/2]

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

Default constructor.

Definition at line 868 of file JPDFTransformer.hh.

868  :
869  transformer()
870  {}

◆ JPDFTransformer() [2/2]

template<class JArgument_t >
template<class T >
JPHYSICS::JPDFTransformer< 5, JArgument_t >::JPDFTransformer ( const double  ln,
const int  alpha,
const double  kmin,
const double  kmax,
const JGeant  geant,
const double  bmin,
T  pmt,
const double  amin 
)
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
pmtFunction angular acceptance of PMT
aminBaseline angular acceptance of PMT

Definition at line 887 of file JPDFTransformer.hh.

894  :
895  transformer(ln, alpha, kmin, kmax, geant, bmin, pmt, amin)
896  {}

Member Function Documentation

◆ getDmin()

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

Definition at line 862 of file JPDFTransformer.hh.

862 { return 0.01; } // shortest distance [m]

◆ clone()

template<class JArgument_t >
virtual clone_type JPHYSICS::JPDFTransformer< 5, JArgument_t >::clone ( ) const
inlinevirtual

Clone object.

Returns
pointer to newly created JPDFTransformer

Reimplemented from JLANG::JClonable< JClonable_t, JDerived_t >.

Definition at line 903 of file JPDFTransformer.hh.

904  {
905  return new JPDFTransformer(*this);
906  }

◆ putXn() [1/2]

template<class JArgument_t >
virtual argument_type JPHYSICS::JPDFTransformer< 5, JArgument_t >::putXn ( const_array_type &  buffer,
const argument_type  xn 
) const
inlinevirtual

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

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

Definition at line 916 of file JPDFTransformer.hh.

917  {
918  return transformer.putXn(buffer.pop_front(), xn);
919  }

◆ getXn() [1/2]

template<class JArgument_t >
virtual argument_type JPHYSICS::JPDFTransformer< 5, JArgument_t >::getXn ( const_array_type &  buffer,
const argument_type  xn 
) const
inlinevirtual

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

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

Definition at line 929 of file JPDFTransformer.hh.

930  {
931  return transformer.getXn(buffer.pop_front(), xn);
932  }

◆ getWeight() [1/3]

template<class JArgument_t >
virtual double JPHYSICS::JPDFTransformer< 5, JArgument_t >::getWeight ( const_array_type &  buffer) const
inlinevirtual

Weight function.

Parameters
buffer{E, D, cd, theta, phi}
Returns
weight

Definition at line 941 of file JPDFTransformer.hh.

942  {
943  const double E = buffer[0];
944  return transformer.getWeight(buffer.pop_front()) / E;
945  }

◆ read()

template<class JArgument_t >
virtual JReader& JPHYSICS::JPDFTransformer< 5, JArgument_t >::read ( JReader &  in)
inlinevirtual

Read PDF transformer from input.

Parameters
inreader
Returns
reader

Implements JIO::JSerialisable.

Definition at line 954 of file JPDFTransformer.hh.

955  {
956  in >> transformer;
957 
958  return in;
959  }

◆ write()

template<class JArgument_t >
virtual JWriter& JPHYSICS::JPDFTransformer< 5, JArgument_t >::write ( JWriter &  out) const
inlinevirtual

Write PDF transformer to output.

Parameters
outwriter
Returns
writer

Implements JIO::JSerialisable.

Definition at line 968 of file JPDFTransformer.hh.

969  {
970  out << transformer;
971 
972  return out;
973  }

◆ print()

template<class JArgument_t >
std::ostream& JPHYSICS::JPDFTransformer< 5, JArgument_t >::print ( std::ostream &  out) const
inline

Print PDF transfomer to output stream.

Parameters
outoutput stream
Returns
output stream

Definition at line 982 of file JPDFTransformer.hh.

983  {
984  return transformer.print(out);
985  }

◆ putXn() [2/2]

virtual argument_type JTOOLS::JMultiMapTransformer< N, JArgument_t >::putXn ( const_array_type &  buffer,
const argument_type  xn 
) const
pure virtualinherited

Evaluate xn value as a function of {x0, ..., xn-1}.

Parameters
bufferx0 - xn-1 values
xnxn value
Returns
xn value

◆ getXn() [2/2]

virtual argument_type JTOOLS::JMultiMapTransformer< N, JArgument_t >::getXn ( const_array_type &  buffer,
const argument_type  xn 
) const
pure virtualinherited

Evaluate xn value as a function of {x0, ..., xn-1}.

Parameters
bufferx0 - xn-1 values
xnxn value
Returns
xn value

◆ getWeight() [2/3]

virtual double JTOOLS::JMultiMapTransformer< N, JArgument_t >::getWeight ( const_array_type &  buffer) const
pure virtualinherited

Weight function.

Parameters
bufferx0 - xn-1 values
Returns
weight

◆ getWeight() [3/3]

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  }

◆ getDefaultTransformer()

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  }

◆ getClone()

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

◆ transformer

template<class JArgument_t >
JFunction4DTransformer_t JPHYSICS::JPDFTransformer< 5, JArgument_t >::transformer

Definition at line 987 of file JPDFTransformer.hh.

◆ ap

va_list JTOOLS::JMultiMapTransformer< N, JArgument_t >::ap
mutableprivateinherited

Definition at line 131 of file JMultiMapTransformer.hh.

◆ buffer

JArray<N, argument_type> JTOOLS::JMultiMapTransformer< N, JArgument_t >::buffer
mutableprivateinherited

Definition at line 132 of file JMultiMapTransformer.hh.


The documentation for this class was generated from the following file:
JTOOLS::JMultiMapTransformer< 5, JArgument_t >::ap
va_list ap
Definition: JMultiMapTransformer.hh:131
JPHYSICS::JPDFTransformer< 4, JArgument_t >::putXn
virtual argument_type putXn(const_array_type &buffer, const argument_type xn) const
Evaluate dt value as a function of {D, cd, theta, phi}.
Definition: JPDFTransformer.hh:736
JTOOLS::JMultiMapTransformer< 5, JArgument_t >::buffer
JArray< N, argument_type > buffer
Definition: JMultiMapTransformer.hh:132
JPHYSICS::JPDFTransformer< 4, JArgument_t >::getXn
virtual argument_type getXn(const_array_type &buffer, const argument_type xn) const
Evaluate dt value as a function of {D, cd, theta, phi}.
Definition: JPDFTransformer.hh:749
JPHYSICS::JPDFTransformer< 4, JArgument_t >::print
std::ostream & print(std::ostream &out) const
Print PDF transfomer to output stream.
Definition: JPDFTransformer.hh:818
JPHYSICS::JPDFTransformer< 4, JArgument_t >::getWeight
virtual double getWeight(const_array_type &buffer) const
Weight function.
Definition: JPDFTransformer.hh:761
JPHYSICS::JPDFTransformer< 5, JArgument_t >::JPDFTransformer
JPDFTransformer()
Default constructor.
Definition: JPDFTransformer.hh:868
JTOOLS::JArray::pop_front
JArray< N-1, T > pop_front() const
Make a copy in which the first element is removed.
Definition: JArray.hh:296
JTOOLS::JMultiMapTransformer< 5, JArgument_t >::getWeight
virtual double getWeight(const_array_type &buffer) const=0
Weight function.
JTOOLS::JMultiMapTransformer< 5, JArgument_t >::argument_type
JArgument_t argument_type
Definition: JMultiMapTransformer.hh:44
JPHYSICS::geant
static const JGeant geant(geanx, 0.0001)
Function object for the number of photons from EM-shower as a function of emission angle.
JPHYSICS::JPDFTransformer< 5, JArgument_t >::transformer
JFunction4DTransformer_t transformer
Definition: JPDFTransformer.hh:987