Jpp  17.3.2
the software that should make you happy
 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 function (PDF) of the time response of a PMT due to an EM shower. More...

#include <JPDFTransformer.hh>

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

Public Types

typedef JPDGTransformer_t
< JArgument_t > 
JFunction2DTransformer_t
 
typedef 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_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, const JGeant_t &geant, const double bmin, 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 transfomer to output stream. 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

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 function (PDF) of the time response of a PMT due to an EM shower.

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. emission profile of the photons
  3. angular acceptance of PMT

Definition at line 962 of file JPDFTransformer.hh.

Member Typedef Documentation

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

Definition at line 967 of file JPDFTransformer.hh.

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

Definition at line 968 of file JPDFTransformer.hh.

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

Definition at line 970 of file JPDFTransformer.hh.

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

Definition at line 971 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 972 of file JPDFTransformer.hh.

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

Definition at line 974 of file JPDFTransformer.hh.

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.

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

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

Default constructor.

Definition at line 982 of file JPDFTransformer.hh.

982  :
983  transformer(),
985  {}
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_t 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 1001 of file JPDFTransformer.hh.

1008  :
1009  transformer(ln, alpha, kmin, kmax, geant, bmin),
1011  {
1012  getAngularAcceptance.configure(JTOOLS::make_grid(1000, -1.0, +1.0), pmt);
1013  getAngularAcceptance.add(amin);
1014  getAngularAcceptance.compile();
1015  getAngularAcceptance.setExceptionHandler(new JFunction1D_t::JDefaultResult(0.0));
1016  }
void setExceptionHandler(const JSupervisor &supervisor)
Set the supervisor for handling of exceptions.
Definition: JFunctional.hh:288
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

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

Clone object.

Returns
pointer to newly created transformer

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

Definition at line 1024 of file JPDFTransformer.hh.

1025  {
1026  return new JPDFTransformer(*this);
1027  }
template<class JArgument_t >
virtual argument_type JPHYSICS::JPDFTransformer< 4, JArgument_t >::putXn ( const_array_type buffer,
const argument_type  xn 
) const
inlineoverridevirtual

Evaluate arrival time.

Parameters
buffer{D_m, cd, theta, phi}
xnold t_ns
Returns
new t_ns

Implements JTOOLS::JMultiMapTransformer< N, JArgument_t >.

Definition at line 1037 of file JPDFTransformer.hh.

1038  {
1039  return transformer.putXn(buffer, xn);
1040  }
virtual argument_type putXn(const_array_type &buffer, const argument_type xn) const override
Evaluate arrival time.
template<class JArgument_t >
virtual argument_type JPHYSICS::JPDFTransformer< 4, JArgument_t >::getXn ( const_array_type buffer,
const argument_type  xn 
) const
inlineoverridevirtual

Evaluate arrival time.

Parameters
buffer{D_m, cd, theta, phi}
xnold t_ns
Returns
new t_ns

Implements JTOOLS::JMultiMapTransformer< N, JArgument_t >.

Definition at line 1050 of file JPDFTransformer.hh.

1051  {
1052  return transformer.getXn(buffer, xn);
1053  }
virtual argument_type getXn(const_array_type &buffer, const argument_type xn) const override
Evaluate arrival time.
template<class JArgument_t >
virtual double JPHYSICS::JPDFTransformer< 4, JArgument_t >::getWeight ( const_array_type buffer) const
inlineoverridevirtual

Weight function.

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

Implements JTOOLS::JMultiMapTransformer< N, JArgument_t >.

Definition at line 1062 of file JPDFTransformer.hh.

1063  {
1064  const double cd = buffer[1];
1065  const double theta = buffer[2];
1066  const double phi = buffer[3];
1067 
1068  const double ct0 = (cd > -1.0 ? cd < +1.0 ? cd : +1.0 : -1.0);
1069  const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
1070 
1071  const double px = sin(theta)*cos(phi);
1072  //const double py = sin(theta)*sin(phi);
1073  const double pz = cos(theta);
1074 
1075  const double ct = st0*px + ct0*pz;
1076 
1077  return transformer.getWeight(buffer) * getAngularAcceptance(ct);
1078  }
then usage set_variable ACOUSTICS_WORKDIR $WORKDIR set_variable FORMULA sin([0]+2 *$PI *([1]+[2]*x)*x)" set_variable DY 1.0e-8 mkdir $WORKDIR for DETECTOR in $DETECTORS[*]
virtual double getWeight(const_array_type &buffer) const override
Weight function.
template<class JArgument_t >
virtual JReader& JPHYSICS::JPDFTransformer< 4, JArgument_t >::read ( JReader in)
inlineoverridevirtual

Read PDF transformer from input.

Parameters
inreader
Returns
reader

Implements JIO::JSerialisable.

Definition at line 1087 of file JPDFTransformer.hh.

1088  {
1089  in >> transformer;
1091 
1092  getAngularAcceptance.compile();
1093 
1094  return in;
1095  }
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Definition: JCanberra.sh:46
template<class JArgument_t >
virtual JWriter& JPHYSICS::JPDFTransformer< 4, JArgument_t >::write ( JWriter out) const
inlineoverridevirtual

Write PDF transformer to output.

Parameters
outwriter
Returns
writer

Implements JIO::JSerialisable.

Definition at line 1104 of file JPDFTransformer.hh.

1105  {
1106  out << transformer;
1107  out << getAngularAcceptance;
1108 
1109  return out;
1110  }
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 1119 of file JPDFTransformer.hh.

1120  {
1121  return transformer.print(out);
1122  }
std::ostream & print(std::ostream &out) const
Print PDF transformer to output stream.
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  }
JArray< N, argument_type > array_type
virtual double getWeight(const_array_type &buffer) const =0
Weight function.
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  }
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

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

Definition at line 1125 of file JPDFTransformer.hh.

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

Definition at line 1126 of file JPDFTransformer.hh.


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