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< 4, JArgument_t > Class Template Reference

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

#include <JPDFTransformer.hh>

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

Public Types

typedef JPDFTransformer
< 2, JArgument_t > 
JFunction2DTransformer_t
 
typedef
JTOOLS::JMultiMapTransformer
< 4, 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 {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 {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...
 
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

JFunction2DTransformer_t transformer
 
JFunction1D_t getAngularAcceptance
 

Detailed Description

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

Template specialisation of transformer of the 4D 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. zenith angle of the PMT
  4. azimuthal angle of the PMT
  5. arrival time [ns]

The evaluation of the weights is based on:

  1. effective attenuation length
  2. angular acceptance of PMT

Definition at line 659 of file JPDFTransformer.hh.

Member Typedef Documentation

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

Definition at line 664 of file JPDFTransformer.hh.

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

Definition at line 665 of file JPDFTransformer.hh.

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

Definition at line 667 of file JPDFTransformer.hh.

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

Definition at line 668 of file JPDFTransformer.hh.

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

Definition at line 669 of file JPDFTransformer.hh.

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

Definition at line 671 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< 4, JArgument_t >::JPDFTransformer ( )
inline

Default constructor.

Definition at line 681 of file JPDFTransformer.hh.

681  :
682  transformer(),
684  {}
template<class JArgument_t >
template<class T >
JPHYSICS::JPDFTransformer< 4, 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 700 of file JPDFTransformer.hh.

707  :
708  transformer(ln, alpha, kmin, kmax, geant, bmin),
710  {
711  getAngularAcceptance.configure(JTOOLS::make_grid(1000, -1.0, +1.0), pmt);
712  getAngularAcceptance.add(amin);
713  getAngularAcceptance.compile();
714  getAngularAcceptance.setExceptionHandler(new JFunction1D_t::JDefaultResult(0.0));
715  }
void setExceptionHandler(const JSupervisor &supervisor)
Set the supervisor for handling of exceptions.
Definition: JFunctional.hh:286
JGrid< JAbscissa_t > make_grid(const int nx, const JAbscissa_t Xmin, const JAbscissa_t Xmax)
Helper method for JGrid.
Definition: JGrid.hh:177

Member Function Documentation

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

Definition at line 675 of file JPDFTransformer.hh.

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

Clone object.

Returns
pointer to newly created JPDFTransformer

Implements JLANG::JClonable< JClass_t >.

Definition at line 723 of file JPDFTransformer.hh.

724  {
725  return new JPDFTransformer(*this);
726  }
template<class JArgument_t >
virtual argument_type JPHYSICS::JPDFTransformer< 4, JArgument_t >::putXn ( const_array_type &  buffer,
const argument_type  xn 
) const
inlinevirtual

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

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

Implements JTOOLS::JMultiMapTransformer< 4, JArgument_t >.

Definition at line 736 of file JPDFTransformer.hh.

737  {
738  return transformer.putXn(buffer, xn);
739  }
virtual argument_type putXn(const_array_type &buffer, const argument_type xn) const
Evaluate dt value as a function of {D, cd}.
template<class JArgument_t >
virtual argument_type JPHYSICS::JPDFTransformer< 4, JArgument_t >::getXn ( const_array_type &  buffer,
const argument_type  xn 
) const
inlinevirtual

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

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

Implements JTOOLS::JMultiMapTransformer< 4, JArgument_t >.

Definition at line 749 of file JPDFTransformer.hh.

750  {
751  return transformer.getXn(buffer, xn);
752  }
virtual argument_type getXn(const_array_type &buffer, const argument_type xn) const
Evaluate dt value as a function of {D, cd}.
template<class JArgument_t >
virtual double JPHYSICS::JPDFTransformer< 4, JArgument_t >::getWeight ( const_array_type &  buffer) const
inlinevirtual

Weight function.

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

Implements JTOOLS::JMultiMapTransformer< 4, JArgument_t >.

Definition at line 761 of file JPDFTransformer.hh.

762  {
763  const double cd = buffer[1];
764  const double theta = buffer[2];
765  const double phi = buffer[3];
766 
767  const double ct0 = cd;
768  const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
769 
770  const double px = sin(theta)*cos(phi);
771  //const double py = sin(theta)*sin(phi);
772  const double pz = cos(theta);
773 
774  const double ct = st0*px + ct0*pz;
775 
777  }
virtual double getWeight(const_array_type &buffer) const
Weight function.
template<class JArgument_t >
virtual JReader& JPHYSICS::JPDFTransformer< 4, JArgument_t >::read ( JReader &  in)
inlinevirtual

Read PDF transformer from input.

Parameters
inreader
Returns
reader

Implements JIO::JSerialisable.

Definition at line 786 of file JPDFTransformer.hh.

787  {
788  in >> transformer;
789  in >> getAngularAcceptance;
790 
791  getAngularAcceptance.compile();
792 
793  return in;
794  }
template<class JArgument_t >
virtual JWriter& JPHYSICS::JPDFTransformer< 4, JArgument_t >::write ( JWriter &  out) const
inlinevirtual

Write PDF transformer to output.

Parameters
outwriter
Returns
writer

Implements JIO::JSerialisable.

Definition at line 803 of file JPDFTransformer.hh.

804  {
805  out << transformer;
806  out << getAngularAcceptance;
807 
808  return out;
809  }
template<class JArgument_t >
std::ostream& JPHYSICS::JPDFTransformer< 4, JArgument_t >::print ( std::ostream &  out) const
inline

Print PDF transfomer to output stream.

Parameters
outoutput stream
Returns
output stream

Definition at line 818 of file JPDFTransformer.hh.

819  {
820  return transformer.print(out);
821  }
std::ostream & print(std::ostream &out) const
Print PDF transformer to output stream.
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 >
JFunction2DTransformer_t JPHYSICS::JPDFTransformer< 4, JArgument_t >::transformer

Definition at line 824 of file JPDFTransformer.hh.

template<class JArgument_t >
JFunction1D_t JPHYSICS::JPDFTransformer< 4, JArgument_t >::getAngularAcceptance

Definition at line 825 of file JPDFTransformer.hh.


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