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

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

#include <JPDFTransformer.hh>

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

Public Types

typedef JPDFTransformer
< 1, JArgument_t > 
JFunction1DTransformer_t
 
typedef
JTOOLS::JMultiMapTransformer
< 3, 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, 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 {R, theta, phi}. More...
 
virtual argument_type getXn (const_array_type &buffer, const argument_type xn) const
 Evaluate dt value as a function of {R, 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 transformer to output stream. More...
 
double getWeight (const argument_type x,...) const
 Weight function. More...
 

Static Public Member Functions

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

Public Attributes

JFunction1DTransformer_t transformer
 
JFunction1D_t getAngularAcceptance
 

Detailed Description

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

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

PDFs are evaluated by interpolation for:

  1. distance of closest approach of the muon to the PMT [m]
  2. zenith angle of the PMT
  3. azimuthal angle of the PMT
  4. arrival time [ns]

The evaluation of the weights is based on:

  1. effective attenuation length
  2. emission profile of the photons
  3. angular acceptance of PMT

Definition at line 476 of file JPDFTransformer.hh.

Member Typedef Documentation

template<class JArgument_t >
typedef JPDFTransformer<1, JArgument_t> JPHYSICS::JPDFTransformer< 3, JArgument_t >::JFunction1DTransformer_t

Definition at line 481 of file JPDFTransformer.hh.

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

Definition at line 482 of file JPDFTransformer.hh.

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

Definition at line 484 of file JPDFTransformer.hh.

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

Definition at line 485 of file JPDFTransformer.hh.

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

Definition at line 486 of file JPDFTransformer.hh.

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

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

Default constructor.

Definition at line 498 of file JPDFTransformer.hh.

498  :
499  transformer(),
501  {}
template<class JArgument_t >
template<class T >
JPHYSICS::JPDFTransformer< 3, JArgument_t >::JPDFTransformer ( const double  ln,
const int  alpha,
const double  kmin,
const double  kmax,
T  pmt,
const double  amin 
)
inline

Constructor.

Parameters
lnEffective attenuation length [m]
alphaDistance dependence (power term)
kminMinimal kappa
kmaxMaximal kappa
pmtFunction angular acceptance of PMT
aminBaseline angular acceptance of PMT

Definition at line 515 of file JPDFTransformer.hh.

520  :
521  transformer(ln, alpha, kmin, kmax),
523  {
524  getAngularAcceptance.configure(JTOOLS::make_grid(1000, -1.0, +1.0), pmt);
525  getAngularAcceptance.add(amin);
526  getAngularAcceptance.compile();
527  getAngularAcceptance.setExceptionHandler(new JFunction1D_t::JDefaultResult(0.0));
528  }
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< 3, JArgument_t >::getRmin ( )
inlinestatic

Definition at line 492 of file JPDFTransformer.hh.

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

Clone object.

Returns
pointer to newly created JPDFTransformer

Implements JLANG::JClonable< JClass_t >.

Definition at line 536 of file JPDFTransformer.hh.

537  {
538  return new JPDFTransformer(*this);
539  }
template<class JArgument_t >
virtual argument_type JPHYSICS::JPDFTransformer< 3, JArgument_t >::putXn ( const_array_type &  buffer,
const argument_type  xn 
) const
inlinevirtual

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

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

Implements JTOOLS::JMultiMapTransformer< 3, JArgument_t >.

Definition at line 549 of file JPDFTransformer.hh.

550  {
551  return transformer.putXn(buffer, xn);
552  }
virtual argument_type putXn(const_array_type &buffer, const argument_type xn) const
Evaluate dt value as a function of {R}.
template<class JArgument_t >
virtual argument_type JPHYSICS::JPDFTransformer< 3, JArgument_t >::getXn ( const_array_type &  buffer,
const argument_type  xn 
) const
inlinevirtual

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

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

Implements JTOOLS::JMultiMapTransformer< 3, JArgument_t >.

Definition at line 562 of file JPDFTransformer.hh.

563  {
564  return transformer.getXn(buffer, xn);
565  }
virtual argument_type getXn(const_array_type &buffer, const argument_type xn) const
Evaluate dt value as a function of {R}.
template<class JArgument_t >
virtual double JPHYSICS::JPDFTransformer< 3, JArgument_t >::getWeight ( const_array_type &  buffer) const
inlinevirtual

Weight function.

Parameters
buffer{R, theta, phi}
Returns
weight

Implements JTOOLS::JMultiMapTransformer< 3, JArgument_t >.

Definition at line 574 of file JPDFTransformer.hh.

575  {
576  using namespace JTOOLS;
577 
578  const double theta = buffer[1];
579  const double phi = buffer[2];
580 
581  const double n = getIndexOfRefraction();
582  const double ct0 = 1.0 / n;
583  const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
584 
585  const double px = sin(theta)*cos(phi);
586  //const double py = sin(theta)*sin(phi);
587  const double pz = cos(theta);
588 
589  const double ct = st0*px + ct0*pz;
590 
592  }
double getIndexOfRefraction()
Get average index of refraction of water.
Definition: JConstants.hh:111
virtual double getWeight(const_array_type &buffer) const
Weight function.
template<class JArgument_t >
virtual JReader& JPHYSICS::JPDFTransformer< 3, JArgument_t >::read ( JReader &  in)
inlinevirtual

Read PDF transformer from input.

Parameters
inreader
Returns
reader

Implements JIO::JSerialisable.

Definition at line 601 of file JPDFTransformer.hh.

602  {
603  in >> transformer;
604  in >> getAngularAcceptance;
605 
606  getAngularAcceptance.compile();
607 
608  return in;
609  }
template<class JArgument_t >
virtual JWriter& JPHYSICS::JPDFTransformer< 3, JArgument_t >::write ( JWriter &  out) const
inlinevirtual

Write PDF transformer to output.

Parameters
outwriter
Returns
writer

Implements JIO::JSerialisable.

Definition at line 618 of file JPDFTransformer.hh.

619  {
620  out << transformer;
621  out << getAngularAcceptance;
622 
623  return out;
624  }
template<class JArgument_t >
std::ostream& JPHYSICS::JPDFTransformer< 3, JArgument_t >::print ( std::ostream &  out) const
inline

Print PDF transformer to output stream.

Parameters
outoutput stream
Returns
output stream

Definition at line 633 of file JPDFTransformer.hh.

634  {
635  return transformer.print(out);
636  }
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 >
JFunction1DTransformer_t JPHYSICS::JPDFTransformer< 3, JArgument_t >::transformer

Definition at line 639 of file JPDFTransformer.hh.

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

Definition at line 640 of file JPDFTransformer.hh.


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