Jpp  master_rocky-40-g5f0272dcd
the software that should make you happy
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 function (PDF) of the time response of a PMT due to a muon. More...

#include <JPDFTransformer.hh>

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

Public Types

typedef JPDFTransformer_t< JArgument_t > JFunction1DTransformer_t
 
typedef 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_typearray_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 override
 Clone object. More...
 
virtual argument_type putXn (const_array_type &buffer, const argument_type xn) const override
 Evaluate arrival time. More...
 
virtual argument_type getXn (const_array_type &buffer, const argument_type xn) const override
 Evaluate arrival time. More...
 
virtual double getWeight (const_array_type &buffer) const override
 Weight function. More...
 
virtual JReaderread (JReader &in) override
 Read PDF transformer from input. More...
 
virtual JWriterwrite (JWriter &out) const override
 Write PDF transformer to output. More...
 
std::ostream & print (std::ostream &out) const
 Print PDF transformer to output stream. More...
 
virtual double getWeight (const_array_type &buffer) const=0
 Weight function. More...
 
template<class ... Args>
double getWeight (const argument_type x, const Args &...args) const
 Weight function. More...
 
template<class ... Args>
double getWeight (const argument_type x, const Args &...args) const
 Weight function. More...
 

Static Public Member Functions

static const JMultiMapTransformergetDefaultTransformer ()
 Get default transformer. More...
 
static JMultiMapTransformergetClone ()
 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 function (PDF) of the time response of a PMT due to a muon.

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. angular acceptance of PMT

Definition at line 779 of file JPDFTransformer.hh.

Member Typedef Documentation

◆ JFunction1DTransformer_t

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

Definition at line 784 of file JPDFTransformer.hh.

◆ JMultiMapTransformer_t

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

Definition at line 785 of file JPDFTransformer.hh.

◆ clone_type

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

Definition at line 787 of file JPDFTransformer.hh.

◆ argument_type

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

Definition at line 788 of file JPDFTransformer.hh.

◆ const_array_type

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

Definition at line 789 of file JPDFTransformer.hh.

◆ JFunction1D_t

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

Definition at line 791 of file JPDFTransformer.hh.

◆ multimaptransformer_type

template<unsigned int N, class JArgument_t >
typedef JMultiMapTransformer<N, JArgument_t> JTOOLS::JMultiMapTransformer< N, JArgument_t >::multimaptransformer_type
inherited

Definition at line 39 of file JMultiMapTransformer.hh.

◆ array_type

template<unsigned int N, class JArgument_t >
typedef JArray<N, argument_type> JTOOLS::JMultiMapTransformer< N, JArgument_t >::array_type
inherited

Definition at line 43 of file JMultiMapTransformer.hh.

Constructor & Destructor Documentation

◆ JPDFTransformer() [1/2]

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

Default constructor.

Definition at line 799 of file JPDFTransformer.hh.

799  :
800  transformer(),
802  {}

◆ JPDFTransformer() [2/2]

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,
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 816 of file JPDFTransformer.hh.

821  :
822  transformer(ln, alpha, kmin, kmax),
824  {
825  getAngularAcceptance.configure(JTOOLS::make_grid(1000, -1.0, +1.0), pmt);
826  getAngularAcceptance.add(amin);
827  getAngularAcceptance.compile();
828  getAngularAcceptance.setExceptionHandler(new JFunction1D_t::JDefaultResult(0.0));
829  }
void setExceptionHandler(const JSupervisor &supervisor)
Set the supervisor for handling of exceptions.
Definition: JFunctional.hh:303
JGrid< JAbscissa_t > make_grid(const int nx, const JAbscissa_t Xmin, const JAbscissa_t Xmax)
Helper method for JGrid.
Definition: JGrid.hh:209

Member Function Documentation

◆ clone()

template<class JArgument_t >
virtual clone_type JPHYSICS::JPDFTransformer< 3, JArgument_t >::clone ( ) const
inlineoverridevirtual

Clone object.

Returns
pointer to newly created transformer

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

Definition at line 837 of file JPDFTransformer.hh.

838  {
839  return new JPDFTransformer(*this);
840  }

◆ putXn()

template<class JArgument_t >
virtual argument_type JPHYSICS::JPDFTransformer< 3, JArgument_t >::putXn ( const_array_type buffer,
const argument_type  xn 
) const
inlineoverridevirtual

Evaluate arrival time.

Parameters
buffer{R_m, theta, phi}
xnold t_ns
Returns
new t_ns

Implements JTOOLS::JMultiMapTransformer< N, JArgument_t >.

Definition at line 850 of file JPDFTransformer.hh.

851  {
852  return transformer.putXn(buffer, xn);
853  }
virtual argument_type putXn(const_array_type &buffer, const argument_type xn) const override
Evaluate arrival time.

◆ getXn()

template<class JArgument_t >
virtual argument_type JPHYSICS::JPDFTransformer< 3, JArgument_t >::getXn ( const_array_type buffer,
const argument_type  xn 
) const
inlineoverridevirtual

Evaluate arrival time.

Parameters
buffer{R_m, theta, phi}
xnold t_ns
Returns
new t_ns

Implements JTOOLS::JMultiMapTransformer< N, JArgument_t >.

Definition at line 863 of file JPDFTransformer.hh.

864  {
865  return transformer.getXn(buffer, xn);
866  }
virtual argument_type getXn(const_array_type &buffer, const argument_type xn) const override
Evaluate arrival time.

◆ getWeight() [1/4]

template<class JArgument_t >
virtual double JPHYSICS::JPDFTransformer< 3, JArgument_t >::getWeight ( const_array_type buffer) const
inlineoverridevirtual

Weight function.

Parameters
buffer{R_m, theta, phi}
Returns
weight

Implements JTOOLS::JMultiMapTransformer< N, JArgument_t >.

Definition at line 875 of file JPDFTransformer.hh.

876  {
877  using namespace JTOOLS;
878 
879  //const double R = buffer[0];
880  const double theta = buffer[1];
881  const double phi = buffer[2];
882 
883  const double n = getIndexOfRefraction();
884  const double ct0 = 1.0 / n;
885  const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
886 
887  const double px = sin(theta)*cos(phi);
888  //const double py = sin(theta)*sin(phi);
889  const double pz = cos(theta);
890 
891  const double ct = st0*px + ct0*pz;
892 
893  return transformer.getWeight(buffer) * getAngularAcceptance(ct);
894  }
virtual double getWeight(const_array_type &buffer) const override
Weight function.
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.
Auxiliary classes and methods for multi-dimensional interpolations and histograms.
const int n
Definition: JPolint.hh:786

◆ read()

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

Read PDF transformer from input.

Parameters
inreader
Returns
reader

Implements JIO::JSerialisable.

Definition at line 903 of file JPDFTransformer.hh.

904  {
905  in >> transformer;
906  in >> getAngularAcceptance;
907 
908  getAngularAcceptance.compile();
909 
910  return in;
911  }

◆ write()

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

Write PDF transformer to output.

Parameters
outwriter
Returns
writer

Implements JIO::JSerialisable.

Definition at line 920 of file JPDFTransformer.hh.

921  {
922  out << transformer;
923  out << getAngularAcceptance;
924 
925  return out;
926  }

◆ print()

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 935 of file JPDFTransformer.hh.

936  {
937  return transformer.print(out);
938  }
std::ostream & print(std::ostream &out) const
Print PDF transformer to output stream.

◆ getWeight() [2/4]

template<class JArgument_t >
virtual double JTOOLS::JMultiMapTransformer< N, JArgument_t >::getWeight

Weight function.

Parameters
bufferx0 - xn-1 values
Returns
weight

◆ getWeight() [3/4]

template<class JArgument_t >
template<class ... Args>
double JTOOLS::JMultiMapTransformer< N, JArgument_t >::getWeight ( class ...  Args)
inline

Weight function.

Parameters
xfirst abscissa values
argscomma seperated list of remaining abscissa values
Returns
weight

Definition at line 84 of file JMultiMapTransformer.hh.

85  {
86  return getWeight(array_type(x, args...));
87  }
virtual double getWeight(const_array_type &buffer) const=0
Weight function.
JArray< N, argument_type > array_type

◆ getWeight() [4/4]

template<unsigned int N, class JArgument_t >
template<class ... Args>
double JTOOLS::JMultiMapTransformer< N, JArgument_t >::getWeight ( const argument_type  x,
const Args &...  args 
) const
inlineinherited

Weight function.

Parameters
xfirst abscissa values
argscomma seperated list of remaining abscissa values
Returns
weight

Definition at line 84 of file JMultiMapTransformer.hh.

85  {
86  return getWeight(array_type(x, args...));
87  }
virtual double getWeight(const_array_type &buffer) const =0
Weight function.

◆ getDefaultTransformer()

template<unsigned int N, class JArgument_t >
static const JMultiMapTransformer& JTOOLS::JMultiMapTransformer< N, JArgument_t >::getDefaultTransformer ( )
inlinestaticinherited

Get default transformer.

Returns
default transformer

Definition at line 101 of file JMultiMapTransformer.hh.

102  {
103  static const JMultiMapDefaultTransformer transformer;
104 
105  return transformer;
106  }

◆ getClone()

template<unsigned int N, class JArgument_t >
static JMultiMapTransformer* JTOOLS::JMultiMapTransformer< N, JArgument_t >::getClone ( )
inlinestaticinherited

Get clone of default transformer.

Returns
pointer to newly created transformer

Definition at line 114 of file JMultiMapTransformer.hh.

115  {
116  return new JMultiMapDefaultTransformer();
117  }

Member Data Documentation

◆ transformer

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

Definition at line 941 of file JPDFTransformer.hh.

◆ getAngularAcceptance

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

Definition at line 942 of file JPDFTransformer.hh.


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