Jpp  15.0.3
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_t< JArgument_t > Class Template Reference

Transformer for the 1D probability density function (PDF) of the time response of a PMT to a muon. More...

#include <JPDFTransformer.hh>

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

Public Types

typedef JMultiMapTransformer
< 1, 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 JMultiMapTransformer
< N, JArgument_t > 
multimaptransformer_type
 
typedef JArray< N, argument_typearray_type
 

Public Member Functions

 JPDFTransformer_t ()
 Default constructor. More...
 
 JPDFTransformer_t (const double ln, const int alpha, const double kmin, const double kmax)
 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...
 
template<class... Args>
double getWeight (const argument_type x, const Args &...args) const
 Weight function. More...
 

Static Public Member Functions

static double getRmin ()
 Get shortest distance of approach. More...
 
static const JMultiMapTransformergetDefaultTransformer ()
 Get default transformer. More...
 
static JMultiMapTransformergetClone ()
 Get clone of default transformer. More...
 

Public Attributes

double ln
 Effective attenuation length [m]. More...
 
int alpha
 Distance dependence (power term) More...
 
double kmin
 minimal kappa More...
 
double kmax
 maximal kappa More...
 

Detailed Description

template<class JArgument_t>
class JPHYSICS::JPDFTransformer_t< JArgument_t >

Transformer for the 1D probability density function (PDF) of the time response of a PMT to a muon.

PDFs are evaluated by interpolation for:

  1. distance of closest approach of the muon to the PMT [m]
  2. arrival time [ns]

The evaluation of the weights is based on:

  1. effective attenuation length

Definition at line 40 of file JPDFTransformer.hh.

Member Typedef Documentation

template<class JArgument_t >
typedef JMultiMapTransformer<1, JArgument_t> JPHYSICS::JPDFTransformer_t< JArgument_t >::JMultiMapTransformer_t

Definition at line 45 of file JPDFTransformer.hh.

template<class JArgument_t >
typedef JMultiMapTransformer_t::clone_type JPHYSICS::JPDFTransformer_t< JArgument_t >::clone_type

Definition at line 47 of file JPDFTransformer.hh.

template<class JArgument_t >
typedef JMultiMapTransformer_t::argument_type JPHYSICS::JPDFTransformer_t< JArgument_t >::argument_type

Definition at line 48 of file JPDFTransformer.hh.

template<class JArgument_t >
typedef JMultiMapTransformer_t::const_array_type JPHYSICS::JPDFTransformer_t< JArgument_t >::const_array_type

Definition at line 49 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_t< JArgument_t >::JPDFTransformer_t ( )
inline

Default constructor.

Definition at line 67 of file JPDFTransformer.hh.

67  :
68  ln (0.0),
69  alpha(0),
70  kmin (0.0),
71  kmax (0.0)
72  {}
double kmax
maximal kappa
int alpha
Distance dependence (power term)
double ln
Effective attenuation length [m].
double kmin
minimal kappa
template<class JArgument_t >
JPHYSICS::JPDFTransformer_t< JArgument_t >::JPDFTransformer_t ( const double  ln,
const int  alpha,
const double  kmin,
const double  kmax 
)
inline

Constructor.

Parameters
lnEffective attenuation length [m]
alphaDistance dependence (power term)
kminMinimal kappa
kmaxMaximal kappa

Definition at line 83 of file JPDFTransformer.hh.

86  :
87  ln (ln),
88  alpha(alpha),
89  kmin (kmin),
90  kmax (kmax)
91  {}
double kmax
maximal kappa
int alpha
Distance dependence (power term)
double ln
Effective attenuation length [m].
double kmin
minimal kappa

Member Function Documentation

template<class JArgument_t >
static double JPHYSICS::JPDFTransformer_t< JArgument_t >::getRmin ( )
inlinestatic

Get shortest distance of approach.

Returns
distance [m]

Definition at line 58 of file JPDFTransformer.hh.

59  {
60  return 0.01;
61  }
template<class JArgument_t >
virtual clone_type JPHYSICS::JPDFTransformer_t< JArgument_t >::clone ( ) const
inlineoverridevirtual

Clone object.

Returns
pointer to newly created transformer

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

Definition at line 99 of file JPDFTransformer.hh.

100  {
101  return new JPDFTransformer_t(*this);
102  }
JPDFTransformer_t()
Default constructor.
template<class JArgument_t >
virtual argument_type JPHYSICS::JPDFTransformer_t< JArgument_t >::putXn ( const_array_type buffer,
const argument_type  xn 
) const
inlineoverridevirtual

Evaluate arrival time.

Parameters
buffer{R_m}
xnold t_ns
Returns
new t_ns

Implements JTOOLS::JMultiMapTransformer< N, JArgument_t >.

Definition at line 112 of file JPDFTransformer.hh.

113  {
114  using namespace JTOOLS;
115 
116  const double R = buffer[0];
117 
118  double x = xn;
119 
120  const double t0 = R * getTanThetaC() * getInverseSpeedOfLight();
121  const double t1 = R * kmin * getInverseSpeedOfLight();
122 
123  x -= t1 - t0;
124 
125  if (kmax > kmin) {
126  x /= R * (kmax - kmin) * getInverseSpeedOfLight();
127  }
128 
129  return x;
130  }
double kmax
maximal kappa
then usage $script[distance] fi case set_variable R
Definition: JDrawLED.sh:43
const double getInverseSpeedOfLight()
Get inverse speed of light.
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
double kmin
minimal kappa
template<class JArgument_t >
virtual argument_type JPHYSICS::JPDFTransformer_t< JArgument_t >::getXn ( const_array_type buffer,
const argument_type  xn 
) const
inlineoverridevirtual

Evaluate arrival time.

Parameters
buffer{R_m}
xnold t_ns
Returns
new t_ns

Implements JTOOLS::JMultiMapTransformer< N, JArgument_t >.

Definition at line 140 of file JPDFTransformer.hh.

141  {
142  using namespace JTOOLS;
143 
144  const double R = buffer[0];
145 
146  double x = xn;
147 
148  if (kmax > kmin) {
149  x *= R * (kmax - kmin) * getInverseSpeedOfLight();
150  }
151 
152  const double t0 = R * getTanThetaC() * getInverseSpeedOfLight();
153  const double t1 = R * kmin * getInverseSpeedOfLight();
154 
155  x += t1 - t0;
156 
157  return x;
158  }
double kmax
maximal kappa
then usage $script[distance] fi case set_variable R
Definition: JDrawLED.sh:43
const double getInverseSpeedOfLight()
Get inverse speed of light.
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
double kmin
minimal kappa
template<class JArgument_t >
virtual double JPHYSICS::JPDFTransformer_t< JArgument_t >::getWeight ( const_array_type buffer) const
inlineoverridevirtual

Weight function.

Parameters
buffer{R_m}
Returns
weight

Implements JTOOLS::JMultiMapTransformer< N, JArgument_t >.

Definition at line 167 of file JPDFTransformer.hh.

168  {
169  using namespace JTOOLS;
170 
171  const double R = buffer[0];
172 
173  const double n = getIndexOfRefraction();
174  const double ct0 = 1.0 / n;
175  const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
176 
177  const double d = sqrt(getRmin()*getRmin() + R*R) / st0;
178 
179  return exp(-d/ln) / pow(d,alpha);
180  }
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable STRING $argv[2] set_array QUANTILES set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"` source JAcoustics.sh -- typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
const int n
Definition: JPolint.hh:660
T pow(const T &x, const double y)
Power .
Definition: JMath.hh:98
then usage $script[distance] fi case set_variable R
Definition: JDrawLED.sh:43
int alpha
Distance dependence (power term)
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
static double getRmin()
Get shortest distance of approach.
double ln
Effective attenuation length [m].
template<class JArgument_t >
virtual JReader& JPHYSICS::JPDFTransformer_t< JArgument_t >::read ( JReader in)
inlineoverridevirtual

Read PDF transformer from input.

Parameters
inreader
Returns
reader

Implements JIO::JSerialisable.

Definition at line 189 of file JPDFTransformer.hh.

190  {
191  in >> ln;
192  in >> alpha;
193  in >> kmin;
194  in >> kmax;
195 
196  return in;
197  }
double kmax
maximal kappa
int alpha
Distance dependence (power term)
double ln
Effective attenuation length [m].
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 source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:42
double kmin
minimal kappa
template<class JArgument_t >
virtual JWriter& JPHYSICS::JPDFTransformer_t< JArgument_t >::write ( JWriter out) const
inlineoverridevirtual

Write PDF transformer to output.

Parameters
outwriter
Returns
writer

Implements JIO::JSerialisable.

Definition at line 206 of file JPDFTransformer.hh.

207  {
208  out << ln;
209  out << alpha;
210  out << kmin;
211  out << kmax;
212 
213  return out;
214  }
double kmax
maximal kappa
int alpha
Distance dependence (power term)
double ln
Effective attenuation length [m].
double kmin
minimal kappa
template<class JArgument_t >
std::ostream& JPHYSICS::JPDFTransformer_t< JArgument_t >::print ( std::ostream &  out) const
inline

Print PDF transformer to output stream.

Parameters
outoutput stream
Returns
output stream

Definition at line 223 of file JPDFTransformer.hh.

224  {
225  using namespace std;
226 
227  out << "Effective attenuation length [m] " << ln << endl;
228  out << "Distance dependence (power term) " << alpha << endl;
229  out << "Minimal kappa " << kmin << endl;
230  out << "Maximal kappa " << kmax << endl;
231 
232  return out;
233  }
double kmax
maximal kappa
int alpha
Distance dependence (power term)
double ln
Effective attenuation length [m].
double kmin
minimal kappa
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 >
double JPHYSICS::JPDFTransformer_t< JArgument_t >::ln

Effective attenuation length [m].

Definition at line 236 of file JPDFTransformer.hh.

template<class JArgument_t >
int JPHYSICS::JPDFTransformer_t< JArgument_t >::alpha

Distance dependence (power term)

Definition at line 237 of file JPDFTransformer.hh.

template<class JArgument_t >
double JPHYSICS::JPDFTransformer_t< JArgument_t >::kmin

minimal kappa

Definition at line 238 of file JPDFTransformer.hh.

template<class JArgument_t >
double JPHYSICS::JPDFTransformer_t< JArgument_t >::kmax

maximal kappa

Definition at line 239 of file JPDFTransformer.hh.


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