Jpp  18.0.1-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Types | List of all members
JPHYSICS::JPDF Class Referenceabstract

Low level interface for the calculation of the Probability Density Functions (PDFs) of the arrival time of Cherenkov light from a muon or an EM-shower on a photo-multiplier tube (PMT). More...

#include <JPDF.hh>

Inheritance diagram for JPHYSICS::JPDF:
JTOOLS::JGaussLegendre JPHYSICS::JDispersionInterface JPHYSICS::JAbstractPMT JPHYSICS::JAbstractMedium JTOOLS::JQuadrature JTOOLS::JCollection< JElement2D_t > std::vector< JElement_t, JAllocator_t > JTOOLS::JMappableCollection< JKey_t, JValue_t > JTOOLS::JAbstractCollection< JAbscissa_t > JMATH::JMath< JFirst_t, JSecond_t > JPHYSICS::JAbstractPDF JPHYSICS::JPDF_C

Classes

class  JRoot
 Auxiliary class to find solution(s) to $ z $ of the square root expression:

\begin{eqnarray*} ct(z=0) & = & z + n \sqrt(z^2 + R^2) \end{eqnarray*}

where $ n = 1/\cos(\theta_{c}) $ is the index of refraction. More...

 

Public Types

typedef JElement2D_t::abscissa_type abscissa_type
 
typedef JElement2D_t::ordinate_type ordinate_type
 
typedef JElement2D_t value_type
 
typedef JDistance< typename
JElement2D_t::abscissa_type
distance_type
 
typedef JCollection
< JElement2D_t, JDistance
< typename
JElement2D_t::abscissa_type > > 
collection_type
 
typedef std::vector< value_typecontainer_type
 
typedef
container_type::const_iterator 
const_iterator
 
typedef
container_type::const_reverse_iterator 
const_reverse_iterator
 
typedef container_type::iterator iterator
 
typedef
container_type::reverse_iterator 
reverse_iterator
 
typedef
JCollectionElementTransformer
< value_type
transformer_type
 
typedef std::pair
< const_iterator, bool > 
pair_type
 
typedef JKey_t key_type
 
typedef JValue_t mapped_type
 

Public Member Functions

 JPDF (const double Wmin, const double Wmax, const int numberOfPoints=20, const double epsilon=1e-12)
 Constructor. More...
 
virtual ~JPDF ()
 Virtual destructor. More...
 
double getNumberOfPhotons () const
 Number of Cherenkov photons per unit track length. More...
 
double getDirectLightFromMuon (const double R_m, const double theta, const double phi) const
 Number of photo-electrons from direct Cherenkov light from muon. More...
 
double getDirectLightFromMuon (const double R_m, const double theta, const double phi, const double t_ns) const
 Probability density function for direct light from muon. More...
 
double getScatteredLightFromMuon (const double R_m, const double theta, const double phi, const double t_ns) const
 Probability density function for scattered light from muon. More...
 
double getDirectLightFromEMshowers (const double R_m, const double theta, const double phi, const double t_ns) const
 Probability density function for direct light from EM-showers. More...
 
double getScatteredLightFromEMshowers (const double R_m, const double theta, const double phi, const double t_ns) const
 Probability density function for scattered light from EM-showers. More...
 
double getScatteredLightFromMuon (const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
 Probability density function for scattered light from muon. More...
 
double getDirectLightFromEMshower (const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
 Probability density function for direct light from EM-shower. More...
 
double getScatteredLightFromEMshower (const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
 Probability density function for scattered light from EM-shower. More...
 
double getDirectLightFromEMshower (const double E, const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
 Probability density function for direct light from EM-shower. More...
 
double getScatteredLightFromEMshower (const double E, const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
 Probability density function for scattered light from EM-shower. More...
 
double getDirectLightFromDeltaRays (const double R_m, const double theta, const double phi, const double t_ns) const
 Probability density function for direct light from delta-rays. More...
 
double getScatteredLightFromDeltaRays (const double R_m, const double theta, const double phi, const double t_ns) const
 Probability density function for direct light from delta-rays. More...
 
double getDirectLightFromBrightPoint (const double D_m, const double ct, const double t_ns) const
 Probability density function for direct light from isotropic light source. More...
 
double getScatteredLightFromBrightPoint (const double D_m, const double ct, const double t_ns) const
 Probability density function for scattered light from isotropic light source. More...
 
double getLightFromMuon (const int type, const double E_GeV, const double R_m, const double theta, const double phi, const double t_ns) const
 Probability density function for light from muon. More...
 
double getLightFromMuon (const double E_GeV, const double R_m, const double theta, const double phi, const double t_ns) const
 Probability density function for light from muon. More...
 
double getLightFromEMshower (const int type, const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
 Probability density function for light from EM-shower. More...
 
double getLightFromEMshower (const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
 Probability density function for light from EM-shower. More...
 
double getLightFromEMshower (const int type, const double E_GeV, const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
 Probability density function for light from EM-shower. More...
 
double getLightFromEMshower (const double E_GeV, const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
 Probability density function for light from EM-shower. More...
 
double getLightFromBrightPoint (const int type, const double D_m, const double ct, const double t_ns) const
 Probability density function for direct light from isotropic light source. More...
 
double getLightFromBrightPoint (const double D_m, const double ct, const double t_ns) const
 Probability density function for direct light from isotropic light source. More...
 
virtual void clear () override
 Clear. More...
 
virtual const ordinate_typeget (typename JClass< abscissa_type >::argument_type x) const override
 Get ordinate value. More...
 
virtual ordinate_typeget (typename JClass< abscissa_type >::argument_type x) override
 Get ordinate value. More...
 
virtual const mapped_typeget (typename JClass< key_type >::argument_type key) const =0
 Get mapped value. More...
 
virtual mapped_typeget (typename JClass< key_type >::argument_type key)=0
 Get mapped value. More...
 
virtual int getSize () const override
 Get number of elements. More...
 
virtual abscissa_type getX (int index) const override
 Get abscissa value. More...
 
virtual abscissa_type getXmin () const override
 Get minimal abscissa value. More...
 
virtual abscissa_type getXmax () const override
 Get maximal abscissa value. More...
 
const ordinate_typegetY (int index) const
 Get ordinate value. More...
 
ordinate_typegetY (int index)
 Get ordinate value. More...
 
void transform (const transformer_type &transformer)
 Transform collection. More...
 
void sort ()
 Sort elements. More...
 
const_iterator lower_bound (typename JClass< abscissa_type >::argument_type x) const
 Get first position of element i, where x >= i->getX(). More...
 
iterator lower_bound (typename JClass< abscissa_type >::argument_type x)
 Get first position of element i, where x >= i->getX(). More...
 
pair_type insert (const value_type &element)
 Insert element. More...
 
void configure (const JAbstractCollection< abscissa_type > &bounds)
 Configure collection. More...
 
void configure (const JAbstractCollection< abscissa_type > &bounds, typename JClass< ordinate_type >::argument_type value)
 Configure collection. More...
 
void configure (const JAbstractCollection< abscissa_type > &bounds, const JFunction1D_t &function)
 Configure collection. More...
 
bool is_compatible (const JCollection &collection) const
 Test whether collections are compatible. More...
 
JCollectionnegate ()
 Negate collection. More...
 
JCollectionadd (const JCollection &collection)
 Add collection. More...
 
JCollectionadd (typename JClass< ordinate_type >::argument_type value)
 Add offset. More...
 
JCollectionadd (const JFunction1D_t &function)
 Add function. More...
 
JCollectionsub (const JCollection &collection)
 Subtract collection. More...
 
JCollectionsub (typename JClass< ordinate_type >::argument_type value)
 Subtract offset. More...
 
JCollectionsub (const JFunction1D_t &function)
 Subtract function. More...
 
JCollectionmul (const double value)
 Scale contents. More...
 
JFirst_t & mul (const JSecond_t &object)
 Multiply with object. More...
 
JCollectiondiv (const double value)
 Scale contents. More...
 
const JComparatorgetComparator () const
 Get comparator. More...
 
const mapped_typeoperator[] (typename JClass< key_type >::argument_type key) const
 Get mapped value. More...
 
mapped_typeoperator[] (typename JClass< key_type >::argument_type key)
 Get mapped value. More...
 
void put (typename JClass< key_type >::argument_type key, typename JClass< mapped_type >::argument_type value)
 Put pair-wise element (key,value) into collection. More...
 
bool is_equal (const JAbstractCollection &collection) const
 Test whether abstract collections are equal. More...
 
virtual double getIndexOfRefractionPhase (const double lambda) const =0
 Index of refraction for phase velocity. More...
 
virtual double getDispersionPhase (const double lambda) const =0
 Dispersion of light for phase velocity. More...
 
virtual double getIndexOfRefractionGroup (const double lambda) const
 Index of refraction for group velocity. More...
 
virtual double getDispersionGroup (const double lambda) const =0
 Dispersion of light for group velocity. More...
 
double getKappa (const double lambda) const
 Get effective index of refraction for muon light. More...
 
double getKmin (const double lambda) const
 Get smallest index of refraction for Bremsstrahlung light (i.e. point at which dt/dz = 0). More...
 
virtual double getPhotocathodeArea () const =0
 Photo-cathode area of PMT. More...
 
virtual double getQE (const double lambda) const =0
 Quantum efficiency of PMT (incl. More...
 
virtual double getAngularAcceptance (const double ct) const =0
 Angular acceptence of PMT. More...
 
virtual double getAbsorptionLength (const double lambda) const =0
 Absorption length. More...
 
virtual double getScatteringLength (const double lambda) const =0
 Scattering length. More...
 
virtual double getScatteringProbability (const double ct) const =0
 Model specific function to describe light scattering in water (integral over full solid angle normalised to unity). More...
 

Public Attributes

JDistance< typename
JElement2D_t::abscissa_type
getDistance
 Function object for distance evaluation. More...
 

Protected Member Functions

virtual double getWavelength (const double n, const double eps=1.0e-10) const
 Determine wavelength for a given index of refraction corresponding to the group velocity. More...
 
virtual double getWavelength (const double n, const double w, const double eps) const
 Determine wavelength for a given index of refraction corresponding to the group velocity. More...
 
virtual double getInverseAttenuationLength (const double l_abs, const double ls, const double cts) const
 Get the inverse of the attenuation length. More...
 
void resize (typename container_type::size_type size)
 Resize collection. More...
 

Static Protected Member Functions

static double getRmin ()
 minimal distance of approach of muon to PMT [m] More...
 

Protected Attributes

const double wmin
 Integration limits. More...
 
const double wmax
 maximal wavelength for integration [nm] More...
 
std::vector< element_typephd
 fast evaluation of phi integral More...
 
JComparator compare
 Function object for comparison. More...
 

Private Types

typedef JTOOLS::JElement2D
< double, double > 
element_type
 

Detailed Description

Low level interface for the calculation of the Probability Density Functions (PDFs) of the arrival time of Cherenkov light from a muon or an EM-shower on a photo-multiplier tube (PMT).

The calculation of the PDF covers direct light light and single-scattered light. The direct light is attenuated by absorption and any form of light scattering.
The attenuation length is defined as:

\[ \frac{1}{\lambda_{att}} ~\equiv~ \frac{1}{\lambda_{abs}} + \frac{1}{\lambda_{s}} \]

where $ \lambda_{abs} $ and $ \lambda_{s} $ refer to the absorption and scattering length, respectively.
The scattered light is attenuated by absorption and light scattering weighed with the scattering angle $ \theta_{s} $. The attenuation length is in this case defined as:

\[ \frac{1}{\lambda_{att}} ~\equiv~ \frac{1}{\lambda_{abs}} + \frac{1-\left<\cos\theta_s\right>}{\lambda_{s}} \]

The PDFs of a muon are evaluated as a function of:

The PDFs of an EM-shower are evaluated as a function of:

The intensity of light from an EM-shower is assumed to be proportional to the energy of the shower.
For a given energy of the EM-shower, the longitudinal profile of the EM-shower is taken into account.

The coordinate system is defined such that z-axis corresponds to the muon trajectory (EM-shower).
The orientation of the PMT (i.e. zenith and azimuth angle) are defined following a rotation around the z-axis, such that the PMT is located in the x-z plane.

Schematics of the PDF of direct light from a muon:

\begin{center}\setlength{\unitlength}{0.7cm}\begin{picture}(8,12) \put( 1.0, 0.5){\vector(0,1){9}} \put( 1.0,10.0){\makebox(0,0){$z$}} \put( 1.0, 0.0){\makebox(0,0){muon}} \put( 1.0, 8.0){\line(1,0){6}} \put( 4.0, 8.5){\makebox(0,0)[c]{$R$}} \multiput( 1.0, 2.0)(0.5, 0.5){12}{\qbezier(0.0,0.0)(-0.1,0.35)(0.25,0.25)\qbezier(0.25,0.25)(0.6,0.15)(0.5,0.5)} \put( 4.5, 4.5){\makebox(0,0)[l]{photon}} \put( 1.0, 2.0){\circle*{0.2}} \put( 0.5, 2.0){\makebox(0,0)[r]{$(0,0,z,t_{0})$}} \put( 1.0, 8.0){\circle*{0.2}} \put( 0.5, 8.0){\makebox(0,0)[r]{$(0,0,0)$}} \put( 7.0, 8.0){\circle*{0.2}} \put( 7.0, 9.0){\makebox(0,0)[c]{PMT}} \put( 7.5, 8.0){\makebox(0,0)[l]{$(R,0,0,t_{1})$}} \put( 1.1, 2.1){ \put(0.0,1.00){\vector(-1,0){0.1}} \qbezier(0.0,1.0)(0.25,1.0)(0.5,0.75) \put(0.5,0.75){\vector(1,-1){0.1}} \put(0.4,1.5){\makebox(0,0){$\theta_{c}$}} } \end{picture} \end{center}

For the PDF of a muon, the time is defined such that $ t ~=~ 0 $ refers to the time when the muon passes through the point at minimal approach to the PMT (i.e. position $ (0,0,0) $ in the above figure).

The delay for the Cherenkov cone to actually pass through the PMT is defined as

\[ \Delta t ~\equiv~ R \tan(\theta_{c}) / c \]

where $ \tan(\theta_{c}) $ is given by method getTanThetaC.

Given a measured hit time, $ t_{hit} $, the PDF should be probed at $ (t_{hit} - t_1) $, where $ t_1 $ is given by:

\[ ct_1 = ct_0 - z + R \tan(\theta_{c}) \]

In this, $ t_0 $ refers to the time the muon passes through point $ (0,0,z) $.

Schematics of single scattered light from a muon:

\begin{center}\setlength{\unitlength}{0.7cm}\begin{picture}(8,12) \put( 1.0, 0.5){\vector(0,1){9}} \put( 1.0,10.0){\makebox(0,0){$z$}} \put( 1.0, 0.0){\makebox(0,0){muon}} \put( 1.0, 8.0){\line(1,0){2}} \put( 2.0, 8.5){\makebox(0,0)[c]{$R$}} \multiput( 1.0, 2.0)( 0.5, 0.5){8}{\qbezier(0.0,0.0)(-0.1,0.35)( 0.25,0.25)\qbezier( 0.25,0.25)( 0.6,0.15)( 0.5,0.5)} \multiput( 5.0, 6.0)(-0.5, 0.5){4}{\qbezier(0.0,0.0)(+0.1,0.35)(-0.25,0.25)\qbezier(-0.25,0.25)(-0.6,0.15)(-0.5,0.5)} \put( 5.0, 6.0){\circle*{0.2}} \put( 3.5, 3.5){\makebox(0,0)[c]{$\bar{u}$}} \put( 5.0, 7.0){\makebox(0,0)[c]{$\bar{v}$}} \put( 1.0, 2.0){\circle*{0.2}} \put( 0.5, 2.0){\makebox(0,0)[r]{$(0,0,z,t_0)$}} \put( 1.0, 8.0){\circle*{0.2}} \put( 0.5, 8.0){\makebox(0,0)[r]{$(0,0,0)$}} \put( 3.0, 8.0){\circle*{0.2}} \put( 3.0, 9.0){\makebox(0,0)[c]{PMT}} \put( 3.5, 8.0){\makebox(0,0)[l]{$(R,0,0,t_1)$}} \end{picture} \end{center}

In this,

\begin{math} \bar{u} ~\equiv~ u ~ \hat{u} ~\equiv~ u \left(\begin{array}{c} \sin(\theta_{0}) \cos(\phi_{0}) \\ \sin(\theta_{0}) \sin(\phi_{0}) \\ \cos(\theta_{0})\end{array}\right) \textrm{ and } \bar{v} ~\equiv~ v ~ \hat{v} ~\equiv~ v \left(\begin{array}{c} \sin(\theta_{1}) \cos(\phi_{1}) \\ \sin(\theta_{1}) \sin(\phi_{1}) \\ \cos(\theta_{1})\end{array}\right) \end{math}

The vectors $ \bar{u} $ and $ \bar{v} $ are subject to the following constraint:

\begin{math} \begin{array}{ccccccc} \begin{array}{c} \mathrm{start}\\ \mathrm{point} \end{array} && \begin{array}{c} \mathrm{before}\\ \mathrm{scattering} \end{array} && \begin{array}{c} \mathrm{after}\\ \mathrm{scattering} \end{array} && \mathrm{PMT} \\ \\ \left(\begin{array}{c} 0 \\ 0 \\ z \end{array}\right) & + & u \left(\begin{array}{c} \sin(\theta_{0}) \cos(\phi_{0}) \\ \sin(\theta_{0}) \sin(\phi_{0}) \\ \cos(\theta_{0})\end{array}\right) & + & v \left(\begin{array}{c} \sin(\theta_{1}) \cos(\phi_{1}) \\ \sin(\theta_{1}) \sin(\phi_{1}) \\ \cos(\theta_{1})\end{array}\right) & = & \left(\begin{array}{c} R \\ 0 \\ 0 \end{array}\right) \end{array} \end{math}

Note that an expression for the cosine of the scattering angle, $ \cos(\theta_s) ~\equiv~ \hat{u} \cdot \hat{v} $, can directly be obtained by multiplying the left hand side and the right hand side with $ \hat{u} $:

\[ \cos\theta_s = \frac{R\sin\theta_0\cos\phi_0 - z\cos\theta_0 - u}{v} \]

The arrival time of the single scattered light can be expressed as:

\[ ct_1 = ct_0 + n (u + v) \]

where $ n $ is the index of refraction.

Schematics of direct light from a EM-shower:

\begin{center}\setlength{\unitlength}{0.7cm}\begin{picture}(8,12) \put( 1.0, 2.0){\vector(0,1){1}} \put( 1.0, 3.5){\multiput(0,0)(0,0.5){12}{\line(0,1){0.2}}} \put( 1.0,10.0){\makebox(0,0){$z$}} \put( 1.0, 1.0){\makebox(0,0){EM-shower}} \put( 1.0, 8.0){\line(1,0){6}} \put( 4.0, 8.5){\makebox(0,0)[c]{$R$}} \multiput( 1.0, 2.0)(0.5, 0.5){12}{\qbezier(0.0,0.0)(-0.1,0.35)(0.25,0.25)\qbezier(0.25,0.25)(0.6,0.15)(0.5,0.5)} \put( 4.5, 4.5){\makebox(0,0)[l]{photon}} \put( 1.0, 2.0){\circle*{0.2}} \put( 0.5, 2.0){\makebox(0,0)[r]{$(0,0,z,t_0)$}} \put( 1.0, 8.0){\circle*{0.2}} \put( 0.5, 8.0){\makebox(0,0)[r]{$(0,0,0)$}} \put( 7.0, 8.0){\circle*{0.2}} \put( 7.0, 9.0){\makebox(0,0)[c]{PMT}} \put( 7.5, 8.0){\makebox(0,0)[l]{$(R,0,0,t_1)$}} \put( 1.1, 2.1){ \put(0.0,1.00){\vector(-1,0){0.1}} \qbezier(0.0,1.0)(0.25,1.0)(0.5,0.75) \put(0.5,0.75){\vector(1,-1){0.1}} \put(0.4,1.5){\makebox(0,0){$\theta_0$}} } \end{picture} \end{center}

Note that the emission angle $ \theta_0 $ is in general not equal to the Cherenkov angle $ \theta_c $.
For an EM-shower, the arrival time of the light can be expressed as:

\[ ct_1 = ct_0 + n D \]

where $ D $ is the total distance traveled by the photon from its emission point to the PMT, including possible scattering.

For the computation of the various integrals, it is assumed that the index of refraction decreases monotonously as a function of the wavelength of the light.

Definition at line 277 of file JPDF.hh.

Member Typedef Documentation

typedef JTOOLS::JElement2D<double, double> JPHYSICS::JPDF::element_type
private

Definition at line 284 of file JPDF.hh.

Definition at line 82 of file JCollection.hh.

Definition at line 83 of file JCollection.hh.

Definition at line 84 of file JCollection.hh.

Definition at line 85 of file JCollection.hh.

Definition at line 87 of file JCollection.hh.

Definition at line 89 of file JCollection.hh.

typedef container_type::const_iterator JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::const_iterator
inherited

Definition at line 91 of file JCollection.hh.

typedef container_type::const_reverse_iterator JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::const_reverse_iterator
inherited

Definition at line 92 of file JCollection.hh.

typedef container_type::iterator JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::iterator
inherited

Definition at line 93 of file JCollection.hh.

typedef container_type::reverse_iterator JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::reverse_iterator
inherited

Definition at line 94 of file JCollection.hh.

Definition at line 96 of file JCollection.hh.

Definition at line 97 of file JCollection.hh.

template<class JKey_t, class JValue_t>
typedef JKey_t JTOOLS::JMappableCollection< JKey_t, JValue_t >::key_type
inherited

Definition at line 33 of file JMappableCollection.hh.

template<class JKey_t, class JValue_t>
typedef JValue_t JTOOLS::JMappableCollection< JKey_t, JValue_t >::mapped_type
inherited

Definition at line 34 of file JMappableCollection.hh.

Constructor & Destructor Documentation

JPHYSICS::JPDF::JPDF ( const double  Wmin,
const double  Wmax,
const int  numberOfPoints = 20,
const double  epsilon = 1e-12 
)
inline

Constructor.

Parameters
Wminminimal wavelength for integration [nm]
Wmaxmaximal wavelength for integration [nm]
numberOfPointsnumber of points for integration
epsilonprecision of points for integration

Definition at line 295 of file JPDF.hh.

298  :
300  wmin(Wmin),
301  wmax(Wmax)
302  {
303  // phi integration points
304 
305  const double dx = PI / numberOfPoints;
306 
307  for (double x = 0.5*dx; x < PI; x += dx) {
308  phd.push_back(element_type(cos(x),sin(x)));
309  }
310  }
Numerical integrator for .
Definition: JQuadrature.hh:111
JTOOLS::JElement2D< double, double > element_type
Definition: JPDF.hh:284
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[*]
std::vector< element_type > phd
fast evaluation of phi integral
Definition: JPDF.hh:2146
static const double PI
Mathematical constants.
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2144
int numberOfPoints
Definition: JResultPDF.cc:22
const double wmin
Integration limits.
Definition: JPDF.hh:2143
const double epsilon
Definition: JQuadrature.cc:21
virtual JPHYSICS::JPDF::~JPDF ( )
inlinevirtual

Virtual destructor.

Definition at line 316 of file JPDF.hh.

317  {}

Member Function Documentation

double JPHYSICS::JPDF::getNumberOfPhotons ( ) const
inline

Number of Cherenkov photons per unit track length.

Returns
number of photons per unit track length [m^-1]

Definition at line 325 of file JPDF.hh.

326  {
327  double value = 0.0;
328 
329  const double xmin = 1.0 / wmax;
330  const double xmax = 1.0 / wmin;
331 
332  for (const_iterator i = begin(); i != end(); ++i) {
333 
334  const double x = 0.5 * (xmax + xmin) + i->getX() * 0.5 * (xmax - xmin);
335  const double dx = i->getY() * 0.5 * (xmax - xmin);
336 
337  const double w = 1.0 / x;
338  const double dw = dx * w*w;
339 
340  const double n = getIndexOfRefractionPhase(w);
341 
342  value += cherenkov(w,n) * dw;
343  }
344 
345  return value;
346  }
const double xmax
Definition: JQuadrature.cc:24
data_type w[N+1][M+1]
Definition: JPolint.hh:778
const int n
Definition: JPolint.hh:697
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2144
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
const double xmin
Definition: JQuadrature.cc:23
const double wmin
Integration limits.
Definition: JPDF.hh:2143
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
double JPHYSICS::JPDF::getDirectLightFromMuon ( const double  R_m,
const double  theta,
const double  phi 
) const
inline

Number of photo-electrons from direct Cherenkov light from muon.

Parameters
R_mdistance between muon and PMT [m]
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
Returns
P [npe]

Definition at line 357 of file JPDF.hh.

360  {
361  double value = 0;
362 
363  const double R = std::max(R_m, getRmin());
364  const double A = getPhotocathodeArea();
365 
366  const double px = sin(theta)*cos(phi);
367  const double pz = cos(theta);
368 
369  for (const_iterator m = begin(); m != end(); ++m) {
370 
371  const double w = 0.5 * (wmax + wmin) + m->getX() * 0.5 * (wmax - wmin);
372  const double dw = m->getY() * 0.5 * (wmax - wmin);
373 
374  const double n = getIndexOfRefractionPhase(w);
375 
376  const double l_abs = getAbsorptionLength(w);
377  const double ls = getScatteringLength(w);
378 
379  const double npe = cherenkov(w,n) * dw * getQE(w);
380 
381  const double ct0 = 1.0 / n;
382  const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
383 
384  const double d = R / st0; // distance traveled by photon
385  const double ct = st0*px + ct0*pz; // cosine angle of incidence on PMT
386 
387  const double U = getAngularAcceptance(ct); // PMT angular acceptance
388  const double V = exp(-d/l_abs) * exp(-d/ls); // absorption & scattering
389  const double W = A / (2.0*PI*R*st0); // solid angle
390 
391  value += npe * U * V * W;
392  }
393 
394  return value;
395  }
data_type w[N+1][M+1]
Definition: JPolint.hh:778
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
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[*]
const int n
Definition: JPolint.hh:697
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
static const double PI
Mathematical constants.
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2099
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2144
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
then JCookie sh JDataQuality D $DETECTOR_ID R
Definition: JDataQuality.sh:41
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
const double wmin
Integration limits.
Definition: JPDF.hh:2143
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
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 JAcousticsToolkit.sh typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
double JPHYSICS::JPDF::getDirectLightFromMuon ( const double  R_m,
const double  theta,
const double  phi,
const double  t_ns 
) const
inline

Probability density function for direct light from muon.

Parameters
R_mdistance between muon and PMT [m]
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
dP/dt [npe/ns]

Definition at line 407 of file JPDF.hh.

411  {
412  static const int N = 100; // maximal number of iterations
413  static const double eps = 1.0e-6; // precision index of refraction
414 
415  const double R = std::max(R_m, getRmin());
416  const double t = R * getTanThetaC() / C + t_ns; // time [ns]
417  const double a = C*t/R; // target value
418  const double A = getPhotocathodeArea();
419 
420  const double px = sin(theta)*cos(phi);
421  const double pz = cos(theta);
422 
423  // check validity range for index of refraction
424 
425  for (double buffer[] = { wmin, wmax, 0.0 }, *p = buffer; *p != 0.0; ++p) {
426 
427  const double n = getIndexOfRefractionPhase(*p);
428  const double ng = getIndexOfRefractionGroup(*p);
429 
430  const double ct0 = 1.0 / n;
431  const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
432 
433  const double b = (ng - ct0) / st0; // running value
434 
435  if (*p == wmin && b < a) { return 0.0; }
436  if (*p == wmax && b > a) { return 0.0; }
437  }
438 
439 
440  double umin = wmin;
441  double umax = wmax;
442 
443  for (int i = 0; i != N; ++i) { // binary search for wavelength
444 
445  const double w = 0.5 * (umin + umax);
446 
447  const double n = getIndexOfRefractionPhase(w);
448  const double ng = getIndexOfRefractionGroup(w);
449 
450  const double ct0 = 1.0 / n;
451  const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
452 
453  const double b = (ng - ct0) / st0; // running value
454 
455  if (fabs(b-a) < a*eps) {
456 
457  const double np = getDispersionPhase(w);
458  const double ngp = getDispersionGroup(w);
459 
460  const double l_abs = getAbsorptionLength(w);
461  const double ls = getScatteringLength(w);
462 
463  const double d = R / st0; // distance traveled by photon
464  const double ct = st0*px + ct0*pz; // cosine angle of incidence on PMT
465 
466  const double i3 = ct0*ct0*ct0 / (st0*st0*st0);
467 
468  const double U = getAngularAcceptance(ct); // PMT angular acceptance
469  const double V = exp(-d/l_abs - d/ls); // absorption & scattering
470  const double W = A / (2.0*PI*R*st0); // solid angle
471 
472  const double Ja = R * (ngp/st0 + np*(n-ng)*i3) / C; // dt/dlambda
473 
474  return cherenkov(w,n) * getQE(w) * U * V * W / fabs(Ja);
475  }
476 
477  if (b > a)
478  umin = w;
479  else
480  umax = w;
481  }
482 
483  return 0.0;
484  }
data_type w[N+1][M+1]
Definition: JPolint.hh:778
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
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[*]
static const double C
Physics constants.
const int n
Definition: JPolint.hh:697
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
then JCalibrateToT a
Definition: JTuneHV.sh:116
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
static const double PI
Mathematical constants.
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2099
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2144
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
then JCookie sh JDataQuality D $DETECTOR_ID R
Definition: JDataQuality.sh:41
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
then usage $script< input file >[option[primary[working directory]]] nWhere option can be N
Definition: JMuonPostfit.sh:40
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
const double wmin
Integration limits.
Definition: JPDF.hh:2143
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
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 JAcousticsToolkit.sh typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
virtual double getDispersionPhase(const double lambda) const =0
Dispersion of light for phase velocity.
double JPHYSICS::JPDF::getScatteredLightFromMuon ( const double  R_m,
const double  theta,
const double  phi,
const double  t_ns 
) const
inline

Probability density function for scattered light from muon.

Parameters
R_mdistance between muon and PMT [m]
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
dP/dt [npe/ns]

Definition at line 496 of file JPDF.hh.

500  {
501  static const double eps = 1.0e-10;
502 
503  double value = 0;
504 
505  const double R = std::max(R_m, getRmin());
506  const double t = R * getTanThetaC() / C + t_ns; // time [ns]
507  const double A = getPhotocathodeArea();
508 
509  const double px = sin(theta)*cos(phi);
510  const double py = sin(theta)*sin(phi);
511  const double pz = cos(theta);
512 
513  const double n0 = getIndexOfRefractionGroup(wmax);
514  const double n1 = getIndexOfRefractionGroup(wmin);
515  const double ni = sqrt(R*R + C*t*C*t) / R; // maximal index of refraction
516 
517  if (n0 >= ni) {
518  return value;
519  }
520 
521  const double nj = std::min(ni,n1);
522 
523  double w = wmax;
524 
525  for (const_iterator i = begin(); i != end(); ++i) {
526 
527  const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
528  const double dn = i->getY() * 0.5 * (nj - n0);
529 
530  w = getWavelength(ng, w, 1.0e-5);
531 
532  const double dw = dn / fabs(getDispersionGroup(w));
533 
534  const double n = getIndexOfRefractionPhase(w);
535 
536  const double l_abs = getAbsorptionLength(w);
537  const double ls = getScatteringLength(w);
538 
539  const double npe = cherenkov(w,n) * dw * getQE(w);
540 
541  if (npe <= 0) { continue; }
542 
543  const double Jc = 1.0 / ls; // dN/dx
544 
545  const double ct0 = 1.0 / n; // photon direction before scattering
546  const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
547 
548  JRoot rz(R, ng, t); // square root
549 
550  if (!rz.is_valid) { continue; }
551 
552  const double zmin = rz.first;
553  const double zmax = rz.second;
554 
555  const double zap = 1.0 / l_abs;
556 
557  const double xmin = exp(zap*zmax);
558  const double xmax = exp(zap*zmin);
559 
560  for (const_iterator j = begin(); j != end(); ++j) {
561 
562  const double x = 0.5 * (xmax + xmin) + j->getX() * 0.5 * (xmax - xmin);
563  const double dx = j->getY() * 0.5 * (xmax - xmin);
564 
565  const double z = log(x) / zap;
566  const double dz = -dx / (zap*x);
567 
568  const double D = sqrt(z*z + R*R);
569  const double cd = -z / D;
570  const double sd = R / D;
571 
572  const double d = (C*t - z) / ng; // photon path
573 
574  //const double V = exp(-d/l_abs); // absorption
575 
576  const double cta = cd*ct0 + sd*st0;
577  const double dca = d - 0.5*(d+D)*(d-D) / (d - D*cta);
578  const double tip = -log(D*D/(dca*dca) + eps) / PI;
579 
580  const double ymin = exp(tip*PI);
581  const double ymax = 1.0;
582 
583  for (const_iterator k = begin(); k != end(); ++k) {
584 
585  const double y = 0.5 * (ymax + ymin) + k->getX() * 0.5 * (ymax - ymin);
586  const double dy = k->getY() * 0.5 * (ymax - ymin);
587 
588  const double phi = log(y) / tip;
589  const double dp = -dy / (tip*y);
590 
591  const double cp0 = cos(phi);
592  const double sp0 = sin(phi);
593 
594  const double u = (R*R + z*z - d*d) / (2*R*st0*cp0 - 2*z*ct0 - 2*d);
595  const double v = d - u;
596 
597  if (u <= 0) { continue; }
598  if (v <= 0) { continue; }
599 
600  const double vi = 1.0 / v;
601  const double cts = (R*st0*cp0 - z*ct0 - u)*vi; // cosine scattering angle
602 
603  const double V = exp(-d*getInverseAttenuationLength(l_abs, ls, cts));
604 
605  if (cts < 0.0 && v * sqrt((1.0 + cts) * (1.0 - cts)) < MODULE_RADIUS_M) { continue; }
606 
607  const double vx = R - u*st0*cp0;
608  const double vy = - u*st0*sp0;
609  const double vz = -z - u*ct0;
610 
611  const double ct[] = { // cosine angle of incidence on PMT
612  (vx*px + vy*py + vz*pz) * vi,
613  (vx*px - vy*py + vz*pz) * vi
614  };
615 
616  const double U =
617  getAngularAcceptance(ct[0]) +
618  getAngularAcceptance(ct[1]); // PMT angular acceptance
619  const double W = std::min(A*vi*vi, 2.0*PI); // solid angle
620 
621  const double Ja = getScatteringProbability(cts); // d^2P/dcos/dphi
622  const double Jd = ng * (1.0 - cts) / C; // dt/du
623 
624  value += (npe * dz * dp / (2*PI)) * U * V * W * Ja * Jc / fabs(Jd);
625  }
626  }
627  }
628 
629  return value;
630  }
const double xmax
Definition: JQuadrature.cc:24
data_type w[N+1][M+1]
Definition: JPolint.hh:778
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
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[*]
static const double C
Physics constants.
const int n
Definition: JPolint.hh:697
static double MODULE_RADIUS_M
Radius of optical module [m].
Definition: JPDF.hh:40
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
virtual double getWavelength(const double n, const double eps=1.0e-10) const
Determine wavelength for a given index of refraction corresponding to the group velocity.
Definition: JPDF.hh:2038
static const double PI
Mathematical constants.
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2099
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2144
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
then set_variable DIR else fatal Wrong number of arguments fi for INPUT_FILE in ls rt $DIR stage * log
then JCookie sh JDataQuality D $DETECTOR_ID R
Definition: JDataQuality.sh:41
const double xmin
Definition: JQuadrature.cc:23
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
virtual double getInverseAttenuationLength(const double l_abs, const double ls, const double cts) const
Get the inverse of the attenuation length.
Definition: JPDF.hh:2110
const double wmin
Integration limits.
Definition: JPDF.hh:2143
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
int j
Definition: JPolint.hh:703
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
data_type v[N+1][M+1]
Definition: JPolint.hh:777
double u[N+1]
Definition: JPolint.hh:776
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
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 JAcousticsToolkit.sh typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
virtual double getScatteringProbability(const double ct) const =0
Model specific function to describe light scattering in water (integral over full solid angle normali...
double JPHYSICS::JPDF::getDirectLightFromEMshowers ( const double  R_m,
const double  theta,
const double  phi,
const double  t_ns 
) const
inline

Probability density function for direct light from EM-showers.

Parameters
R_mdistance between muon and PMT [m]
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
dP/dt [npe/ns/GeV]

Definition at line 642 of file JPDF.hh.

646  {
647  double value = 0;
648 
649  const double R = std::max(R_m, getRmin());
650  const double t = R * getTanThetaC() / C + t_ns; // time [ns]
651  const double A = getPhotocathodeArea();
652  const double D = 2.0*sqrt(A/PI);
653 
654  const double px = sin(theta)*cos(phi);
655  //const double py = sin(theta)*sin(phi);
656  const double pz = cos(theta);
657 
658  const double n0 = getIndexOfRefractionGroup(wmax);
659  const double n1 = getIndexOfRefractionGroup(wmin);
660  const double ni = sqrt(R*R + C*t*C*t) / R; // maximal index of refraction
661 
662  if (n0 >= ni) {
663  return value;
664  }
665 
666  const double nj = std::min(n1, ni);
667 
668  double w = wmax;
669 
670  for (const_iterator i = begin(); i != end(); ++i) {
671 
672  const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
673  const double dn = i->getY() * 0.5 * (nj - n0);
674 
675  w = getWavelength(ng, w, 1.0e-5);
676 
677  const double dw = dn / fabs(getDispersionGroup(w));
678 
679  const double n = getIndexOfRefractionPhase(w);
680 
681  const double l_abs = getAbsorptionLength(w);
682  const double ls = getScatteringLength(w);
683 
684  const double npe = cherenkov(w,n) * dw * getQE(w);
685 
686  JRoot rz(R, ng, t); // square root
687 
688  if (!rz.is_valid) { continue; }
689 
690  for (int j = 0; j != 2; ++j) {
691 
692  const double z = rz[j];
693 
694  if (C*t <= z) continue;
695 
696  const double d = sqrt(z*z + R*R); // distance traveled by photon
697 
698  const double ct0 = -z / d;
699  const double st0 = R / d;
700 
701  const double dz = D / st0; // average track length
702 
703  const double ct = st0*px + ct0*pz; // cosine angle of incidence on PMT
704 
705  const double U = getAngularAcceptance(ct); // PMT angular acceptance
706  const double V = exp(-d/l_abs - d/ls); // absorption & scattering
707  const double W = A/(d*d); // solid angle
708 
709  const double Ja = geant(n,ct0); // d^2N/dcos/dphi
710  const double Jd = (1.0 - ng*ct0) / C; // d t/ dz
711  const double Je = ng*st0*st0*st0 / (R*C); // d^2t/(dz)^2
712 
713  value += gWater() * npe * U * V * W * Ja / (fabs(Jd) + 0.5*Je*dz);
714  }
715  }
716 
717  return value;
718  }
data_type w[N+1][M+1]
Definition: JPolint.hh:778
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
static const JGeaneWater gWater
Function object for energy loss of muon in sea water.
Definition: JGeane.hh:381
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
static const JGeant geant(geanx, 0.0001)
Function object for the number of photons from EM-shower as a function of emission angle...
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[*]
static const double C
Physics constants.
const int n
Definition: JPolint.hh:697
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
virtual double getWavelength(const double n, const double eps=1.0e-10) const
Determine wavelength for a given index of refraction corresponding to the group velocity.
Definition: JPDF.hh:2038
static const double PI
Mathematical constants.
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2099
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2144
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
then JCookie sh JDataQuality D $DETECTOR_ID R
Definition: JDataQuality.sh:41
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
const double wmin
Integration limits.
Definition: JPDF.hh:2143
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
int j
Definition: JPolint.hh:703
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
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 JAcousticsToolkit.sh typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
double JPHYSICS::JPDF::getScatteredLightFromEMshowers ( const double  R_m,
const double  theta,
const double  phi,
const double  t_ns 
) const
inline

Probability density function for scattered light from EM-showers.

Parameters
R_mdistance between muon and PMT [m]
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
dP/dt [npe/ns/GeV]

Definition at line 730 of file JPDF.hh.

734  {
735  double value = 0;
736 
737  const double R = std::max(R_m, getRmin());
738  const double t = R * getTanThetaC() / C + t_ns; // time [ns]
739  const double A = getPhotocathodeArea();
740 
741  const double px = sin(theta)*cos(phi);
742  const double py = sin(theta)*sin(phi);
743  const double pz = cos(theta);
744 
745  const double n0 = getIndexOfRefractionGroup(wmax);
746  const double n1 = getIndexOfRefractionGroup(wmin);
747  const double ni = sqrt(R*R + C*t*C*t) / R; // maximal index of refraction
748 
749  if (n0 >= ni) {
750  return value;
751  }
752 
753  const double nj = std::min(ni,n1);
754 
755  double w = wmax;
756 
757  for (const_iterator i = begin(); i != end(); ++i) {
758 
759  const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
760  const double dn = i->getY() * 0.5 * (nj - n0);
761 
762  w = getWavelength(ng, w, 1.0e-5);
763 
764  const double dw = dn / fabs(getDispersionGroup(w));
765 
766  const double n = getIndexOfRefractionPhase(w);
767 
768  const double l_abs = getAbsorptionLength(w);
769  const double ls = getScatteringLength(w);
770 
771  const double npe = cherenkov(w,n) * dw * getQE(w);
772 
773  if (npe <= 0) { continue; }
774 
775  const double Jc = 1.0 / ls; // dN/dx
776 
777  JRoot rz(R, ng, t); // square root
778 
779  if (!rz.is_valid) { continue; }
780 
781  const double zmin = rz.first;
782  const double zmax = rz.second;
783 
784  const double zap = 1.0 / l_abs;
785 
786  const double xmin = exp(zap*zmax);
787  const double xmax = exp(zap*zmin);
788 
789  for (const_iterator j = begin(); j != end(); ++j) {
790 
791  const double x = 0.5 * (xmax + xmin) + j->getX() * 0.5 * (xmax - xmin);
792  const double dx = j->getY() * 0.5 * (xmax - xmin);
793 
794  const double z = log(x) / zap;
795  const double dz = -dx / (zap*x);
796 
797  const double D = sqrt(z*z + R*R);
798  const double cd = -z / D;
799  const double sd = R / D;
800 
801  const double qx = cd*px + 0 - sd*pz;
802  const double qy = 1*py;
803  const double qz = sd*px + 0 + cd*pz;
804 
805  const double d = (C*t - z) / ng; // photon path
806 
807  //const double V = exp(-d/l_abs); // absorption
808 
809  const double ds = 2.0 / (size() + 1);
810 
811  for (double sb = 0.5*ds; sb < 1.0 - 0.25*ds; sb += ds) {
812 
813  for (int buffer[] = { -1, +1, 0}, *k = buffer; *k != 0; ++k) {
814 
815  const double cb = (*k) * sqrt((1.0 + sb)*(1.0 - sb));
816  const double dcb = (*k) * ds*sb/cb;
817 
818  const double v = 0.5 * (d + D) * (d - D) / (d - D*cb);
819  const double u = d - v;
820 
821  if (u <= 0) { continue; }
822  if (v <= 0) { continue; }
823 
824  const double cts = (D*cb - v) / u; // cosine scattering angle
825 
826  const double V = exp(-d*getInverseAttenuationLength(l_abs, ls, cts));
827 
828  if (cts < 0.0 && v * sqrt((1.0 + cts) * (1.0 - cts)) < MODULE_RADIUS_M) { continue; }
829 
830  const double W = std::min(A/(v*v), 2.0*PI); // solid angle
831  const double Ja = getScatteringProbability(cts); // d^2P/dcos/dphi
832  const double Jd = ng * (1.0 - cts) / C; // dt/du
833 
834  const double ca = (D - v*cb) / u;
835  const double sa = v*sb / u;
836 
837  const double dp = PI / phd.size();
838  const double dom = dcb*dp * v*v / (u*u);
839 
840  for (const_iterator l = phd.begin(); l != phd.end(); ++l) {
841 
842  const double cp = l->getX();
843  const double sp = l->getY();
844 
845  const double ct0 = cd*ca - sd*sa*cp;
846 
847  const double vx = sb*cp * qx;
848  const double vy = sb*sp * qy;
849  const double vz = cb * qz;
850 
851  const double U =
852  getAngularAcceptance(vx + vy + vz) +
853  getAngularAcceptance(vx - vy + vz); // PMT angular acceptance
854 
855  const double Jb = geant(n,ct0); // d^2N/dcos/dphi
856 
857  value += dom * gWater() * npe * dz * U * V * W * Ja * Jb * Jc / fabs(Jd);
858  }
859  }
860  }
861  }
862  }
863 
864  return value;
865  }
const double xmax
Definition: JQuadrature.cc:24
data_type w[N+1][M+1]
Definition: JPolint.hh:778
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
static const JGeaneWater gWater
Function object for energy loss of muon in sea water.
Definition: JGeane.hh:381
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
static const JGeant geant(geanx, 0.0001)
Function object for the number of photons from EM-shower as a function of emission angle...
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[*]
static const double C
Physics constants.
const int n
Definition: JPolint.hh:697
std::vector< element_type > phd
fast evaluation of phi integral
Definition: JPDF.hh:2146
static double MODULE_RADIUS_M
Radius of optical module [m].
Definition: JPDF.hh:40
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
virtual double getWavelength(const double n, const double eps=1.0e-10) const
Determine wavelength for a given index of refraction corresponding to the group velocity.
Definition: JPDF.hh:2038
static const double PI
Mathematical constants.
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2099
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2144
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
then set_variable DIR else fatal Wrong number of arguments fi for INPUT_FILE in ls rt $DIR stage * log
then JCookie sh JDataQuality D $DETECTOR_ID R
Definition: JDataQuality.sh:41
const double xmin
Definition: JQuadrature.cc:23
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
virtual double getInverseAttenuationLength(const double l_abs, const double ls, const double cts) const
Get the inverse of the attenuation length.
Definition: JPDF.hh:2110
const double wmin
Integration limits.
Definition: JPDF.hh:2143
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
then cp
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
int j
Definition: JPolint.hh:703
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
data_type v[N+1][M+1]
Definition: JPolint.hh:777
double u[N+1]
Definition: JPolint.hh:776
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
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 JAcousticsToolkit.sh typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
virtual double getScatteringProbability(const double ct) const =0
Model specific function to describe light scattering in water (integral over full solid angle normali...
double JPHYSICS::JPDF::getScatteredLightFromMuon ( const double  D_m,
const double  cd,
const double  theta,
const double  phi,
const double  t_ns 
) const
inline

Probability density function for scattered light from muon.

Parameters
D_mdistance between track segment and PMT [m]
cdcosine angle muon direction and track segment - PMT position
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dx [npe/ns/m]

Definition at line 878 of file JPDF.hh.

883  {
884  static const double eps = 1.0e-10;
885 
886  double value = 0;
887 
888  const double sd = sqrt((1.0 + cd)*(1.0 - cd));
889  const double D = std::max(D_m, getRmin());
890  const double R = sd * D; // minimal distance of approach [m]
891  const double Z = -cd * D; // photon emission point
892  const double L = D;
893  const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
894  const double A = getPhotocathodeArea();
895 
896  const double px = sin(theta)*cos(phi);
897  const double py = sin(theta)*sin(phi);
898  const double pz = cos(theta);
899 
900  const double n0 = getIndexOfRefractionGroup(wmax);
901  const double n1 = getIndexOfRefractionGroup(wmin);
902 
903  const double ni = C*t / L; // maximal index of refraction
904 
905  if (n0 >= ni) {
906  return value;
907  }
908 
909  const double nj = std::min(ni,n1);
910 
911  double w = wmax;
912 
913  for (const_iterator i = begin(); i != end(); ++i) {
914 
915  const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
916  const double dn = i->getY() * 0.5 * (nj - n0);
917 
918  w = getWavelength(ng, w, 1.0e-5);
919 
920  const double dw = dn / fabs(getDispersionGroup(w));
921 
922  const double n = getIndexOfRefractionPhase(w);
923 
924  const double l_abs = getAbsorptionLength(w);
925  const double ls = getScatteringLength(w);
926 
927  const double npe = cherenkov(w,n) * dw * getQE(w);
928 
929  if (npe <= 0) { continue; }
930 
931  const double Jc = 1.0 / ls; // dN/dx
932 
933  const double ct0 = 1.0 / n; // photon direction before scattering
934  const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
935 
936  const double d = C*t / ng; // photon path
937 
938  //const double V = exp(-d/l_abs); // absorption
939 
940  const double cta = cd*ct0 + sd*st0;
941  const double dca = d - 0.5*(d+L)*(d-L) / (d - L*cta);
942  const double tip = -log(L*L/(dca*dca) + eps) / PI;
943 
944  const double ymin = exp(tip*PI);
945  const double ymax = 1.0;
946 
947  for (const_iterator j = begin(); j != end(); ++j) {
948 
949  const double y = 0.5 * (ymax + ymin) + j->getX() * 0.5 * (ymax - ymin);
950  const double dy = j->getY() * 0.5 * (ymax - ymin);
951 
952  const double phi = log(y) / tip;
953  const double dp = -dy / (tip*y);
954 
955  const double cp0 = cos(phi);
956  const double sp0 = sin(phi);
957 
958  const double u = (R*R + Z*Z - d*d) / (2*R*st0*cp0 - 2*Z*ct0 - 2*d);
959  const double v = d - u;
960 
961  if (u <= 0) { continue; }
962  if (v <= 0) { continue; }
963 
964  const double vi = 1.0 / v;
965  const double cts = (R*st0*cp0 - Z*ct0 - u)*vi; // cosine scattering angle
966 
967  const double V = exp(-d*getInverseAttenuationLength(l_abs, ls, cts));
968 
969  if (cts < 0.0 && v * sqrt((1.0 + cts) * (1.0 - cts)) < MODULE_RADIUS_M) { continue; }
970 
971  const double vx = R - u*st0*cp0;
972  const double vy = - u*st0*sp0;
973  const double vz = -Z - u*ct0;
974 
975  const double ct[] = { // cosine angle of incidence on PMT
976  (vx*px + vy*py + vz*pz) * vi,
977  (vx*px - vy*py + vz*pz) * vi
978  };
979 
980  const double U =
981  getAngularAcceptance(ct[0]) +
982  getAngularAcceptance(ct[1]); // PMT angular acceptance
983  const double W = std::min(A*vi*vi, 2.0*PI); // solid angle
984 
985  const double Ja = getScatteringProbability(cts); // d^2P/dcos/dphi
986  const double Jd = ng * (1.0 - cts) / C; // dt/du
987 
988  value += (npe * dp / (2*PI)) * U * V * W * Ja * Jc / fabs(Jd);
989  }
990  }
991 
992  return value;
993  }
data_type w[N+1][M+1]
Definition: JPolint.hh:778
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
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[*]
static const double C
Physics constants.
const int n
Definition: JPolint.hh:697
static double MODULE_RADIUS_M
Radius of optical module [m].
Definition: JPDF.hh:40
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
virtual double getWavelength(const double n, const double eps=1.0e-10) const
Determine wavelength for a given index of refraction corresponding to the group velocity.
Definition: JPDF.hh:2038
static const double PI
Mathematical constants.
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2099
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2144
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
then set_variable DIR else fatal Wrong number of arguments fi for INPUT_FILE in ls rt $DIR stage * log
then JCookie sh JDataQuality D $DETECTOR_ID R
Definition: JDataQuality.sh:41
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
virtual double getInverseAttenuationLength(const double l_abs, const double ls, const double cts) const
Get the inverse of the attenuation length.
Definition: JPDF.hh:2110
const double wmin
Integration limits.
Definition: JPDF.hh:2143
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
do set_variable MODULE getModule a $WORKDIR detector_a datx L $STRING JEditDetector a $WORKDIR detector_a datx M $MODULE setz o $WORKDIR detector_a datx JEditDetector a $WORKDIR detector_b datx M $MODULE setz o $WORKDIR detector_b datx done echo Output stored at $WORKDIR detector_a datx and $WORKDIR tripod_a txt JDrawDetector2D a $WORKDIR detector_a datx a $WORKDIR detector_b datx L BL o detector $FORMAT $BATCH JDrawDetector2D T $WORKDIR tripod_a txt T $WORKDIR tripod_b txt L BL o tripod $FORMAT $BATCH JCompareDetector a $WORKDIR detector_a datx b $WORKDIR detector_b datx o $WORKDIR abc root &dev null for KEY in X Y Z
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
int j
Definition: JPolint.hh:703
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
data_type v[N+1][M+1]
Definition: JPolint.hh:777
double u[N+1]
Definition: JPolint.hh:776
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
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 JAcousticsToolkit.sh typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
virtual double getScatteringProbability(const double ct) const =0
Model specific function to describe light scattering in water (integral over full solid angle normali...
double JPHYSICS::JPDF::getDirectLightFromEMshower ( const double  D_m,
const double  cd,
const double  theta,
const double  phi,
const double  t_ns 
) const
inline

Probability density function for direct light from EM-shower.

Parameters
D_mdistance between EM-shower and PMT [m]
cdcosine angle EM-shower direction and EM-shower - PMT position
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dE [npe/ns/GeV]

Definition at line 1006 of file JPDF.hh.

1011  {
1012  const double ct0 = cd;
1013  const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
1014 
1015  const double D = std::max(D_m, getRmin());
1016  const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
1017  const double A = getPhotocathodeArea();
1018 
1019  const double px = sin(theta)*cos(phi);
1020  const double pz = cos(theta);
1021 
1022  const double n0 = getIndexOfRefractionGroup(wmax);
1023  const double n1 = getIndexOfRefractionGroup(wmin);
1024  const double ng = C*t/D; // index of refraction
1025 
1026  if (n0 >= ng) { return 0.0; }
1027  if (n1 <= ng) { return 0.0; }
1028 
1029  const double w = getWavelength(ng);
1030  const double n = getIndexOfRefractionPhase(w);
1031 
1032  const double l_abs = getAbsorptionLength(w);
1033  const double ls = getScatteringLength(w);
1034 
1035  const double npe = cherenkov(w,n) * getQE(w);
1036 
1037  const double ct = st0*px + ct0*pz; // cosine angle of incidence on PMT
1038 
1039  const double U = getAngularAcceptance(ct); // PMT angular acceptance
1040  const double V = exp(-D/l_abs - D/ls); // absorption & scattering
1041  const double W = A/(D*D); // solid angle
1042 
1043  const double ngp = getDispersionGroup(w);
1044 
1045  const double Ja = D * ngp / C; // dt/dlambda
1046  const double Jb = geant(n,ct0); // d^2N/dcos/dphi
1047 
1048  return npe * geanc() * U * V * W * Jb / fabs(Ja);
1049  }
data_type w[N+1][M+1]
Definition: JPolint.hh:778
double geanc()
Equivalent muon track length per unit shower energy.
Definition: JGeane.hh:28
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
static const JGeant geant(geanx, 0.0001)
Function object for the number of photons from EM-shower as a function of emission angle...
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[*]
static const double C
Physics constants.
const int n
Definition: JPolint.hh:697
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
virtual double getWavelength(const double n, const double eps=1.0e-10) const
Determine wavelength for a given index of refraction corresponding to the group velocity.
Definition: JPDF.hh:2038
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2099
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2144
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
const double wmin
Integration limits.
Definition: JPDF.hh:2143
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
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 JAcousticsToolkit.sh typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
double JPHYSICS::JPDF::getScatteredLightFromEMshower ( const double  D_m,
const double  cd,
const double  theta,
const double  phi,
const double  t_ns 
) const
inline

Probability density function for scattered light from EM-shower.

Parameters
D_mdistance between EM-shower and PMT [m]
cdcosine angle EM-shower direction and EM-shower - PMT position
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dE [npe/ns/GeV]

Definition at line 1062 of file JPDF.hh.

1067  {
1068  double value = 0;
1069 
1070  const double sd = sqrt((1.0 + cd)*(1.0 - cd));
1071  const double D = std::max(D_m, getRmin());
1072  const double L = D;
1073  const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
1074 
1075  const double A = getPhotocathodeArea();
1076 
1077  const double px = sin(theta)*cos(phi);
1078  const double py = sin(theta)*sin(phi);
1079  const double pz = cos(theta);
1080 
1081  const double qx = cd*px + 0 - sd*pz;
1082  const double qy = 1*py;
1083  const double qz = sd*px + 0 + cd*pz;
1084 
1085  const double n0 = getIndexOfRefractionGroup(wmax);
1086  const double n1 = getIndexOfRefractionGroup(wmin);
1087 
1088  const double ni = C*t / L; // maximal index of refraction
1089 
1090  if (n0 >= ni) {
1091  return value;
1092  }
1093 
1094  const double nj = std::min(ni,n1);
1095 
1096  double w = wmax;
1097 
1098  for (const_iterator i = begin(); i != end(); ++i) {
1099 
1100  const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
1101  const double dn = i->getY() * 0.5 * (nj - n0);
1102 
1103  w = getWavelength(ng, w, 1.0e-5);
1104 
1105  const double dw = dn / fabs(getDispersionGroup(w));
1106 
1107  const double n = getIndexOfRefractionPhase(w);
1108 
1109  const double l_abs = getAbsorptionLength(w);
1110  const double ls = getScatteringLength(w);
1111 
1112  const double npe = cherenkov(w,n) * dw * getQE(w);
1113 
1114  if (npe <= 0) { continue; }
1115 
1116  const double Jc = 1.0 / ls; // dN/dx
1117 
1118  const double d = C*t / ng; // photon path
1119 
1120  //const double V = exp(-d/l_abs); // absorption
1121 
1122  const double ds = 2.0 / (size() + 1);
1123 
1124  for (double sb = 0.5*ds; sb < 1.0 - 0.25*ds; sb += ds) {
1125 
1126  for (int buffer[] = { -1, +1, 0}, *k = buffer; *k != 0; ++k) {
1127 
1128  const double cb = (*k) * sqrt((1.0 + sb)*(1.0 - sb));
1129  const double dcb = (*k) * ds*sb/cb;
1130 
1131  const double v = 0.5 * (d + L) * (d - L) / (d - L*cb);
1132  const double u = d - v;
1133 
1134  if (u <= 0) { continue; }
1135  if (v <= 0) { continue; }
1136 
1137  const double cts = (L*cb - v) / u; // cosine scattering angle
1138 
1139  const double V = exp(-d*getInverseAttenuationLength(l_abs, ls, cts));
1140 
1141  if (cts < 0.0 && v * sqrt((1.0 + cts) * (1.0 - cts)) < MODULE_RADIUS_M) { continue; }
1142 
1143  const double W = std::min(A/(v*v), 2.0*PI); // solid angle
1144  const double Ja = getScatteringProbability(cts); // d^2P/dcos/dphi
1145  const double Jd = ng * (1.0 - cts) / C; // dt/du
1146 
1147  const double ca = (L - v*cb) / u;
1148  const double sa = v*sb / u;
1149 
1150  const double dp = PI / phd.size();
1151  const double dom = dcb*dp * v*v / (u*u);
1152  const double dos = sqrt(dom);
1153 
1154  for (const_iterator l = phd.begin(); l != phd.end(); ++l) {
1155 
1156  const double cp = l->getX();
1157  const double sp = l->getY();
1158 
1159  const double ct0 = cd*ca - sd*sa*cp;
1160 
1161  const double vx = -sb*cp * qx;
1162  const double vy = -sb*sp * qy;
1163  const double vz = cb * qz;
1164 
1165  const double U =
1166  getAngularAcceptance(vx + vy + vz) +
1167  getAngularAcceptance(vx - vy + vz); // PMT angular acceptance
1168 
1169  //const double Jb = geant(n,ct0); // d^2N/dcos/dphi
1170 
1171  //value += npe * geanc() * dom * U * V * W * Ja * Jb * Jc / fabs(Jd);
1172 
1173  const double Jb = geant(n,
1174  ct0 - 0.5*dos,
1175  ct0 + 0.5*dos); // dN/dphi
1176 
1177  value += npe * geanc() * dos * U * V * W * Ja * Jb * Jc / fabs(Jd);
1178  }
1179  }
1180  }
1181  }
1182 
1183  return value;
1184  }
data_type w[N+1][M+1]
Definition: JPolint.hh:778
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
double geanc()
Equivalent muon track length per unit shower energy.
Definition: JGeane.hh:28
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
static const JGeant geant(geanx, 0.0001)
Function object for the number of photons from EM-shower as a function of emission angle...
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[*]
static const double C
Physics constants.
const int n
Definition: JPolint.hh:697
std::vector< element_type > phd
fast evaluation of phi integral
Definition: JPDF.hh:2146
static double MODULE_RADIUS_M
Radius of optical module [m].
Definition: JPDF.hh:40
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
virtual double getWavelength(const double n, const double eps=1.0e-10) const
Determine wavelength for a given index of refraction corresponding to the group velocity.
Definition: JPDF.hh:2038
static const double PI
Mathematical constants.
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2099
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2144
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
virtual double getInverseAttenuationLength(const double l_abs, const double ls, const double cts) const
Get the inverse of the attenuation length.
Definition: JPDF.hh:2110
const double wmin
Integration limits.
Definition: JPDF.hh:2143
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
then cp
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
data_type v[N+1][M+1]
Definition: JPolint.hh:777
double u[N+1]
Definition: JPolint.hh:776
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
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 JAcousticsToolkit.sh typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
virtual double getScatteringProbability(const double ct) const =0
Model specific function to describe light scattering in water (integral over full solid angle normali...
double JPHYSICS::JPDF::getDirectLightFromEMshower ( const double  E,
const double  D_m,
const double  cd,
const double  theta,
const double  phi,
const double  t_ns 
) const
inline

Probability density function for direct light from EM-shower.

Parameters
EEM-shower energy [GeV]
D_mdistance between EM-shower and PMT [m]
cdcosine angle EM-shower direction and EM-shower - PMT position
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
dP/dt [npe/ns]

Definition at line 1198 of file JPDF.hh.

1204  {
1205  double value = 0;
1206 
1207  const double sd = sqrt((1.0 + cd)*(1.0 - cd));
1208  const double D = std::max(D_m, getRmin());
1209  const double R = D * sd; // minimal distance of approach [m]
1210  const double Z = -D * cd;
1211  const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
1212 
1213  const double n0 = getIndexOfRefractionGroup(wmax);
1214  const double n1 = getIndexOfRefractionGroup(wmin);
1215 
1216  double zmin = 0.0; // minimal shower length [m]
1217  double zmax = geanz.getLength(E, 1.0); // maximal shower length [m]
1218 
1219  const double d = sqrt((Z+zmax)*(Z+zmax) + R*R);
1220 
1221  if (C*t > std::max(n1*D, zmax + n1*d)) {
1222  return value;
1223  }
1224 
1225  if (C*t < n0*D) {
1226 
1227  JRoot rz(R, n0, t + Z/C); // square root
1228 
1229  if (!rz.is_valid) {
1230  return value;
1231  }
1232 
1233  if (rz.second > Z) { zmin = rz.second - Z; }
1234  if (rz.first > Z) { zmin = rz.first - Z; }
1235  }
1236 
1237  if (C*t > n1*D) {
1238 
1239  JRoot rz(R, n1, t + Z/C); // square root
1240 
1241  if (!rz.is_valid) {
1242  return value;
1243  }
1244 
1245  if (rz.second > Z) { zmin = rz.second - Z; }
1246  if (rz.first > Z) { zmin = rz.first - Z; }
1247  }
1248 
1249  if (C*t < zmax + n0*d) {
1250 
1251  JRoot rz(R, n0, t + Z/C); // square root
1252 
1253  if (!rz.is_valid) {
1254  return value;
1255  }
1256 
1257  if (rz.first > Z) { zmax = rz.first - Z; }
1258  if (rz.second > Z) { zmax = rz.second - Z; }
1259  }
1260 
1261  if (zmin < 0.0) {
1262  zmin = 0.0;
1263  }
1264 
1265  if (zmax > zmin) {
1266 
1267  const double ymin = geanz.getIntegral(E, zmin);
1268  const double ymax = geanz.getIntegral(E, zmax);
1269  const double dy = (ymax - ymin) / size();
1270 
1271  if (dy > 2*std::numeric_limits<double>::epsilon()) {
1272 
1273  for (double y = ymin + 0.5*dy; y < ymax; y += dy) {
1274 
1275  const double z = Z + geanz.getLength(E, y);
1276  const double d = sqrt(R*R + z*z);
1277  const double t1 = t + (Z - z) / C - d * getIndexOfRefraction() / C;
1278 
1279  value += dy * E * getDirectLightFromEMshower(d, -z/d, theta, phi, t1);
1280  }
1281 
1282  }
1283  }
1284 
1285  return value;
1286  }
double getDirectLightFromEMshower(const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
Probability density function for direct light from EM-shower.
Definition: JPDF.hh:1006
then usage $script< input file >[option[primary[working directory]]] nWhere option can be E
Definition: JMuonPostfit.sh:40
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.
static const double C
Physics constants.
static const JGeanz geanz(1.85, 0.62, 0.54)
Function object for longitudinal EM-shower profile.
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2099
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2144
then JCookie sh JDataQuality D $DETECTOR_ID R
Definition: JDataQuality.sh:41
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
double getIntegral(const double E, const double z) const
Integral of PDF (starting from 0).
Definition: JGeanz.hh:95
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
const double wmin
Integration limits.
Definition: JPDF.hh:2143
do set_variable MODULE getModule a $WORKDIR detector_a datx L $STRING JEditDetector a $WORKDIR detector_a datx M $MODULE setz o $WORKDIR detector_a datx JEditDetector a $WORKDIR detector_b datx M $MODULE setz o $WORKDIR detector_b datx done echo Output stored at $WORKDIR detector_a datx and $WORKDIR tripod_a txt JDrawDetector2D a $WORKDIR detector_a datx a $WORKDIR detector_b datx L BL o detector $FORMAT $BATCH JDrawDetector2D T $WORKDIR tripod_a txt T $WORKDIR tripod_b txt L BL o tripod $FORMAT $BATCH JCompareDetector a $WORKDIR detector_a datx b $WORKDIR detector_b datx o $WORKDIR abc root &dev null for KEY in X Y Z
double getLength(const double E, const double P, const double eps=1.0e-3) const
Get shower length for a given integrated probability.
Definition: JGeanz.hh:122
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
const double epsilon
Definition: JQuadrature.cc:21
double JPHYSICS::JPDF::getScatteredLightFromEMshower ( const double  E,
const double  D_m,
const double  cd,
const double  theta,
const double  phi,
const double  t_ns 
) const
inline

Probability density function for scattered light from EM-shower.

Parameters
EEM-shower energy [GeV]
D_mdistance between EM-shower and PMT [m]
cdcosine angle EM-shower direction and EM-shower - PMT position
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
dP/dt [npe/ns]

Definition at line 1300 of file JPDF.hh.

1306  {
1307  double value = 0;
1308 
1309  const double sd = sqrt((1.0 + cd)*(1.0 - cd));
1310  const double D = std::max(D_m, getRmin());
1311  const double R = D * sd; // minimal distance of approach [m]
1312  const double Z = -D * cd;
1313  const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
1314 
1315  const double n0 = getIndexOfRefractionGroup(wmax);
1316 
1317  double zmin = 0.0; // minimal shower length [m]
1318  double zmax = geanz.getLength(E, 1.0); // maximal shower length [m]
1319 
1320  const double d = sqrt((Z+zmax)*(Z+zmax) + R*R);
1321 
1322  if (C*t < n0*D) {
1323 
1324  JRoot rz(R, n0, t + Z/C); // square root
1325 
1326  if (!rz.is_valid) {
1327  return value;
1328  }
1329 
1330  if (rz.second > Z) { zmin = rz.second - Z; }
1331  if (rz.first > Z) { zmin = rz.first - Z; }
1332  }
1333 
1334  if (C*t < zmax + n0*d) {
1335 
1336  JRoot rz(R, n0, t + Z/C); // square root
1337 
1338  if (!rz.is_valid) {
1339  return value;
1340  }
1341 
1342  if (rz.first > Z) { zmax = rz.first - Z; }
1343  if (rz.second > Z) { zmax = rz.second - Z; }
1344  }
1345 
1346  const double ymin = geanz.getIntegral(E, zmin);
1347  const double ymax = geanz.getIntegral(E, zmax);
1348  const double dy = (ymax - ymin) / size();
1349 
1350  if (dy > 2*std::numeric_limits<double>::epsilon()) {
1351 
1352  for (double y = ymin + 0.5*dy; y < ymax; y += dy) {
1353 
1354  const double z = Z + geanz.getLength(E, y);
1355  const double d = sqrt(R*R + z*z);
1356  const double t1 = t + (Z - z) / C - d * getIndexOfRefraction() / C;
1357 
1358  value += dy * E * getScatteredLightFromEMshower(d, -z/d, theta, phi, t1);
1359  }
1360  }
1361 
1362  return value;
1363  }
double getScatteredLightFromEMshower(const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
Probability density function for scattered light from EM-shower.
Definition: JPDF.hh:1062
then usage $script< input file >[option[primary[working directory]]] nWhere option can be E
Definition: JMuonPostfit.sh:40
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.
static const double C
Physics constants.
static const JGeanz geanz(1.85, 0.62, 0.54)
Function object for longitudinal EM-shower profile.
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2099
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2144
then JCookie sh JDataQuality D $DETECTOR_ID R
Definition: JDataQuality.sh:41
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
double getIntegral(const double E, const double z) const
Integral of PDF (starting from 0).
Definition: JGeanz.hh:95
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
do set_variable MODULE getModule a $WORKDIR detector_a datx L $STRING JEditDetector a $WORKDIR detector_a datx M $MODULE setz o $WORKDIR detector_a datx JEditDetector a $WORKDIR detector_b datx M $MODULE setz o $WORKDIR detector_b datx done echo Output stored at $WORKDIR detector_a datx and $WORKDIR tripod_a txt JDrawDetector2D a $WORKDIR detector_a datx a $WORKDIR detector_b datx L BL o detector $FORMAT $BATCH JDrawDetector2D T $WORKDIR tripod_a txt T $WORKDIR tripod_b txt L BL o tripod $FORMAT $BATCH JCompareDetector a $WORKDIR detector_a datx b $WORKDIR detector_b datx o $WORKDIR abc root &dev null for KEY in X Y Z
double getLength(const double E, const double P, const double eps=1.0e-3) const
Get shower length for a given integrated probability.
Definition: JGeanz.hh:122
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
const double epsilon
Definition: JQuadrature.cc:21
double JPHYSICS::JPDF::getDirectLightFromDeltaRays ( const double  R_m,
const double  theta,
const double  phi,
const double  t_ns 
) const
inline

Probability density function for direct light from delta-rays.

Parameters
R_mdistance between muon and PMT [m]
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dE [npe/ns x m/GeV]

Definition at line 1375 of file JPDF.hh.

1379  {
1380  double value = 0;
1381 
1382  const double R = std::max(R_m, getRmin());
1383  const double t = R * getTanThetaC() / C + t_ns; // time [ns]
1384  const double A = getPhotocathodeArea();
1385  const double D = 2.0*sqrt(A/PI);
1386 
1387  const double px = sin(theta)*cos(phi);
1388  const double pz = cos(theta);
1389 
1390  const double n0 = getIndexOfRefractionGroup(wmax);
1391  const double n1 = getIndexOfRefractionGroup(wmin);
1392  const double ni = sqrt(R*R + C*t*C*t) / R; // maximal index of refraction
1393 
1394  if (n0 >= ni) {
1395  return value;
1396  }
1397 
1398  const double nj = std::min(n1, ni);
1399 
1400  double w = wmax;
1401 
1402  for (const_iterator i = begin(); i != end(); ++i) {
1403 
1404  const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
1405  const double dn = i->getY() * 0.5 * (nj - n0);
1406 
1407  w = getWavelength(ng, w, 1.0e-5);
1408 
1409  const double dw = dn / fabs(getDispersionGroup(w));
1410 
1411  const double n = getIndexOfRefractionPhase(w);
1412 
1413  const double l_abs = getAbsorptionLength(w);
1414  const double ls = getScatteringLength(w);
1415 
1416  const double npe = cherenkov(w,n) * dw * getQE(w);
1417 
1418  JRoot rz(R, ng, t); // square root
1419 
1420  if (!rz.is_valid) { continue; }
1421 
1422  for (int j = 0; j != 2; ++j) {
1423 
1424  const double z = rz[j];
1425 
1426  if (C*t <= z) continue;
1427 
1428  const double d = sqrt(z*z + R*R); // distance traveled by photon
1429 
1430  const double ct0 = -z / d;
1431  const double st0 = R / d;
1432 
1433  const double dz = D / st0; // average track length
1434  const double ct = st0*px + ct0*pz; // cosine angle of incidence on PMT
1435 
1436  const double U = getAngularAcceptance(ct); // PMT angular acceptance
1437  const double V = exp(-d/l_abs - d/ls); // absorption & scattering
1438  const double W = A/(d*d); // solid angle
1439 
1440  const double Ja = getDeltaRayProbability(ct0); // d^2N/dcos/dphi
1441  const double Jd = (1.0 - ng*ct0) / C; // d t/ dz
1442  const double Je = ng*st0*st0*st0 / (R*C); // d^2t/(dz)^2
1443 
1444  value += npe * geanc() * U * V * W * Ja / (fabs(Jd) + 0.5*Je*dz);
1445  }
1446  }
1447 
1448  return value;
1449  }
data_type w[N+1][M+1]
Definition: JPolint.hh:778
double geanc()
Equivalent muon track length per unit shower energy.
Definition: JGeane.hh:28
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
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[*]
static const double C
Physics constants.
const int n
Definition: JPolint.hh:697
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
virtual double getWavelength(const double n, const double eps=1.0e-10) const
Determine wavelength for a given index of refraction corresponding to the group velocity.
Definition: JPDF.hh:2038
static const double PI
Mathematical constants.
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2099
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2144
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
then JCookie sh JDataQuality D $DETECTOR_ID R
Definition: JDataQuality.sh:41
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
const double wmin
Integration limits.
Definition: JPDF.hh:2143
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
double getDeltaRayProbability(const double x)
Emission profile of photons from delta-rays.
Definition: JPDFToolkit.hh:123
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
int j
Definition: JPolint.hh:703
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
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 JAcousticsToolkit.sh typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
double JPHYSICS::JPDF::getScatteredLightFromDeltaRays ( const double  R_m,
const double  theta,
const double  phi,
const double  t_ns 
) const
inline

Probability density function for direct light from delta-rays.

Parameters
R_mdistance between muon and PMT [m]
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dx [npe/ns x m/GeV]

Definition at line 1461 of file JPDF.hh.

1465  {
1466  double value = 0;
1467 
1468  const double R = std::max(R_m, getRmin());
1469  const double t = R * getTanThetaC() / C + t_ns; // time [ns]
1470  const double A = getPhotocathodeArea();
1471 
1472  const double px = sin(theta)*cos(phi);
1473  const double py = sin(theta)*sin(phi);
1474  const double pz = cos(theta);
1475 
1476  const double n0 = getIndexOfRefractionGroup(wmax);
1477  const double n1 = getIndexOfRefractionGroup(wmin);
1478  const double ni = sqrt(R*R + C*t*C*t) / R; // maximal index of refraction
1479 
1480  if (n0 >= ni) {
1481  return value;
1482  }
1483 
1484  const double nj = std::min(ni,n1);
1485 
1486  double w = wmax;
1487 
1488  for (const_iterator i = begin(); i != end(); ++i) {
1489 
1490  const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
1491  const double dn = i->getY() * 0.5 * (nj - n0);
1492 
1493  w = getWavelength(ng, w, 1.0e-5);
1494 
1495  const double dw = dn / fabs(getDispersionGroup(w));
1496 
1497  const double n = getIndexOfRefractionPhase(w);
1498 
1499  const double l_abs = getAbsorptionLength(w);
1500  const double ls = getScatteringLength(w);
1501 
1502  const double npe = cherenkov(w,n) * dw * getQE(w);
1503 
1504  if (npe <= 0) { continue; }
1505 
1506  const double Jc = 1.0 / ls; // dN/dx
1507 
1508  JRoot rz(R, ng, t); // square root
1509 
1510  if (!rz.is_valid) { continue; }
1511 
1512  const double zmin = rz.first;
1513  const double zmax = rz.second;
1514 
1515  const double zap = 1.0 / l_abs;
1516 
1517  const double xmin = exp(zap*zmax);
1518  const double xmax = exp(zap*zmin);
1519 
1520  for (const_iterator j = begin(); j != end(); ++j) {
1521 
1522  const double x = 0.5 * (xmax + xmin) + j->getX() * 0.5 * (xmax - xmin);
1523  const double dx = j->getY() * 0.5 * (xmax - xmin);
1524 
1525  const double z = log(x) / zap;
1526  const double dz = -dx / (zap*x);
1527 
1528  const double D = sqrt(z*z + R*R);
1529  const double cd = -z / D;
1530  const double sd = R / D;
1531 
1532  const double qx = cd*px + 0 - sd*pz;
1533  const double qy = 1*py;
1534  const double qz = sd*px + 0 + cd*pz;
1535 
1536  const double d = (C*t - z) / ng; // photon path
1537 
1538  //const double V = exp(-d/l_abs); // absorption
1539 
1540  const double ds = 2.0 / (size() + 1);
1541 
1542  for (double sb = 0.5*ds; sb < 1.0 - 0.25*ds; sb += ds) {
1543 
1544  for (int buffer[] = { -1, +1, 0}, *k = buffer; *k != 0; ++k) {
1545 
1546  const double cb = (*k) * sqrt((1.0 + sb)*(1.0 - sb));
1547  const double dcb = (*k) * ds*sb/cb;
1548 
1549  const double v = 0.5 * (d + D) * (d - D) / (d - D*cb);
1550  const double u = d - v;
1551 
1552  if (u <= 0) { continue; }
1553  if (v <= 0) { continue; }
1554 
1555  const double cts = (D*cb - v) / u; // cosine scattering angle
1556 
1557  const double V = exp(-d*getInverseAttenuationLength(l_abs, ls, cts));
1558 
1559  if (cts < 0.0 && v * sqrt((1.0 + cts) * (1.0 - cts)) < MODULE_RADIUS_M) { continue; }
1560 
1561  const double W = std::min(A/(v*v), 2.0*PI); // solid angle
1562  const double Ja = getScatteringProbability(cts); // d^2P/dcos/dphi
1563  const double Jd = ng * (1.0 - cts) / C; // dt/du
1564 
1565  const double ca = (D - v*cb) / u;
1566  const double sa = v*sb / u;
1567 
1568  const double dp = PI / phd.size();
1569  const double dom = dcb*dp * v*v / (u*u);
1570 
1571  for (const_iterator l = phd.begin(); l != phd.end(); ++l) {
1572 
1573  const double cp = l->getX();
1574  const double sp = l->getY();
1575 
1576  const double ct0 = cd*ca - sd*sa*cp;
1577 
1578  const double vx = sb*cp * qx;
1579  const double vy = sb*sp * qy;
1580  const double vz = cb * qz;
1581 
1582  const double U =
1583  getAngularAcceptance(vx + vy + vz) +
1584  getAngularAcceptance(vx - vy + vz); // PMT angular acceptance
1585 
1586  const double Jb = getDeltaRayProbability(ct0); // d^2N/dcos/dphi
1587 
1588  value += dom * npe * geanc() * dz * U * V * W * Ja * Jb * Jc / fabs(Jd);
1589  }
1590  }
1591  }
1592  }
1593  }
1594 
1595  return value;
1596  }
const double xmax
Definition: JQuadrature.cc:24
data_type w[N+1][M+1]
Definition: JPolint.hh:778
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
double geanc()
Equivalent muon track length per unit shower energy.
Definition: JGeane.hh:28
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
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[*]
static const double C
Physics constants.
const int n
Definition: JPolint.hh:697
std::vector< element_type > phd
fast evaluation of phi integral
Definition: JPDF.hh:2146
static double MODULE_RADIUS_M
Radius of optical module [m].
Definition: JPDF.hh:40
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
virtual double getWavelength(const double n, const double eps=1.0e-10) const
Determine wavelength for a given index of refraction corresponding to the group velocity.
Definition: JPDF.hh:2038
static const double PI
Mathematical constants.
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2099
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2144
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
then set_variable DIR else fatal Wrong number of arguments fi for INPUT_FILE in ls rt $DIR stage * log
then JCookie sh JDataQuality D $DETECTOR_ID R
Definition: JDataQuality.sh:41
const double xmin
Definition: JQuadrature.cc:23
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
virtual double getInverseAttenuationLength(const double l_abs, const double ls, const double cts) const
Get the inverse of the attenuation length.
Definition: JPDF.hh:2110
const double wmin
Integration limits.
Definition: JPDF.hh:2143
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
then cp
double getDeltaRayProbability(const double x)
Emission profile of photons from delta-rays.
Definition: JPDFToolkit.hh:123
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
int j
Definition: JPolint.hh:703
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
data_type v[N+1][M+1]
Definition: JPolint.hh:777
double u[N+1]
Definition: JPolint.hh:776
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
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 JAcousticsToolkit.sh typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
virtual double getScatteringProbability(const double ct) const =0
Model specific function to describe light scattering in water (integral over full solid angle normali...
double JPHYSICS::JPDF::getDirectLightFromBrightPoint ( const double  D_m,
const double  ct,
const double  t_ns 
) const
inline

Probability density function for direct light from isotropic light source.

Parameters
D_mdistance between light source and PMT [m]
ctcosine angle PMT
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dE [npe/ns/GeV]

Definition at line 1607 of file JPDF.hh.

1610  {
1611  const double D = std::max(D_m, getRmin());
1612  const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
1613  const double A = getPhotocathodeArea();
1614 
1615  const double n0 = getIndexOfRefractionGroup(wmax);
1616  const double n1 = getIndexOfRefractionGroup(wmin);
1617  const double ng = C*t/D; // index of refraction
1618 
1619  if (n0 >= ng) { return 0.0; }
1620  if (n1 <= ng) { return 0.0; }
1621 
1622  const double w = getWavelength(ng);
1623  const double n = getIndexOfRefractionPhase(w);
1624 
1625  const double l_abs = getAbsorptionLength(w);
1626  const double ls = getScatteringLength(w);
1627 
1628  const double npe = cherenkov(w,n) * getQE(w);
1629 
1630  const double U = getAngularAcceptance(ct); // PMT angular acceptance
1631  const double V = exp(-D/l_abs - D/ls); // absorption & scattering
1632  const double W = A/(D*D); // solid angle
1633 
1634  const double ngp = getDispersionGroup(w);
1635 
1636  const double Ja = D * ngp / C; // dt/dlambda
1637  const double Jb = 1.0 / (4.0*PI); // d^2N/dOmega
1638 
1639  return npe * geanc() * U * V * W * Jb / fabs(Ja);
1640  }
data_type w[N+1][M+1]
Definition: JPolint.hh:778
double geanc()
Equivalent muon track length per unit shower energy.
Definition: JGeane.hh:28
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
static const double C
Physics constants.
const int n
Definition: JPolint.hh:697
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
virtual double getWavelength(const double n, const double eps=1.0e-10) const
Determine wavelength for a given index of refraction corresponding to the group velocity.
Definition: JPDF.hh:2038
static const double PI
Mathematical constants.
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2099
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2144
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
const double wmin
Integration limits.
Definition: JPDF.hh:2143
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
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 JAcousticsToolkit.sh typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
double JPHYSICS::JPDF::getScatteredLightFromBrightPoint ( const double  D_m,
const double  ct,
const double  t_ns 
) const
inline

Probability density function for scattered light from isotropic light source.

Parameters
D_mdistance between light source and PMT [m]
ctcosine angle PMT
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dE [npe/ns/GeV]

Definition at line 1651 of file JPDF.hh.

1654  {
1655  double value = 0;
1656 
1657  const double D = std::max(D_m, getRmin());
1658  const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
1659  const double st = sqrt((1.0 + ct)*(1.0 - ct));
1660 
1661  const double A = getPhotocathodeArea();
1662 
1663  const double n0 = getIndexOfRefractionGroup(wmax);
1664  const double n1 = getIndexOfRefractionGroup(wmin);
1665 
1666  const double ni = C*t / D; // maximal index of refraction
1667 
1668  if (n0 >= ni) {
1669  return value;
1670  }
1671 
1672  const double nj = std::min(ni,n1);
1673 
1674  double w = wmax;
1675 
1676  for (const_iterator i = begin(); i != end(); ++i) {
1677 
1678  const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
1679  const double dn = i->getY() * 0.5 * (nj - n0);
1680 
1681  w = getWavelength(ng, w, 1.0e-5);
1682 
1683  const double dw = dn / fabs(getDispersionGroup(w));
1684 
1685  const double n = getIndexOfRefractionPhase(w);
1686 
1687  const double npe = cherenkov(w,n) * dw * getQE(w);
1688 
1689  if (npe <= 0) { continue; }
1690 
1691  const double l_abs = getAbsorptionLength(w);
1692  const double ls = getScatteringLength(w);
1693 
1694  const double Jc = 1.0 / ls; // dN/dx
1695  const double Jb = 1.0 / (4.0*PI); // d^2N/dcos/dphi
1696 
1697  const double d = C*t / ng; // photon path
1698 
1699  const double dcb = 2.0 / (size() + 1);
1700 
1701  for (double cb = -1.0 + 0.5*dcb; cb < +1.0; cb += dcb) {
1702 
1703  const double sb = sqrt((1.0 + cb)*(1.0 - cb));
1704 
1705  const double v = 0.5 * (d + D) * (d - D) / (d - D*cb);
1706  const double u = d - v;
1707 
1708  if (u <= 0) { continue; }
1709  if (v <= 0) { continue; }
1710 
1711  const double cts = (D*cb - v) / u; // cosine scattering angle
1712 
1713  const double V = exp(-d*getInverseAttenuationLength(l_abs, ls, cts));
1714 
1715  if (cts < 0.0 && v * sqrt((1.0 + cts) * (1.0 - cts)) < MODULE_RADIUS_M) { continue; }
1716 
1717  const double W = std::min(A/(v*v), 2.0*PI); // solid angle
1718  const double Ja = getScatteringProbability(cts); // d^2P/dcos/dphi
1719  const double Jd = ng * (1.0 - cts) / C; // dt/du
1720 
1721  const double dp = PI / phd.size();
1722  const double dom = dcb*dp * v*v / (u*u); // dOmega
1723 
1724  for (const_iterator l = phd.begin(); l != phd.end(); ++l) {
1725 
1726  const double cp = l->getX();
1727  const double dot = cb*ct + sb*cp*st;
1728 
1729  const double U = 2 * getAngularAcceptance(dot); // PMT angular acceptance
1730 
1731  value += npe * geanc() * dom * U * V * W * Ja * Jb * Jc / fabs(Jd);
1732  }
1733  }
1734  }
1735 
1736  return value;
1737  }
data_type w[N+1][M+1]
Definition: JPolint.hh:778
double geanc()
Equivalent muon track length per unit shower energy.
Definition: JGeane.hh:28
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
static const double C
Physics constants.
const int n
Definition: JPolint.hh:697
std::vector< element_type > phd
fast evaluation of phi integral
Definition: JPDF.hh:2146
static double MODULE_RADIUS_M
Radius of optical module [m].
Definition: JPDF.hh:40
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
virtual double getWavelength(const double n, const double eps=1.0e-10) const
Determine wavelength for a given index of refraction corresponding to the group velocity.
Definition: JPDF.hh:2038
static const double PI
Mathematical constants.
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2099
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2144
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
virtual double getInverseAttenuationLength(const double l_abs, const double ls, const double cts) const
Get the inverse of the attenuation length.
Definition: JPDF.hh:2110
const double wmin
Integration limits.
Definition: JPDF.hh:2143
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
then cp
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
data_type v[N+1][M+1]
Definition: JPolint.hh:777
double u[N+1]
Definition: JPolint.hh:776
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
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 JAcousticsToolkit.sh typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
virtual double getScatteringProbability(const double ct) const =0
Model specific function to describe light scattering in water (integral over full solid angle normali...
double JPHYSICS::JPDF::getLightFromMuon ( const int  type,
const double  E_GeV,
const double  R_m,
const double  theta,
const double  phi,
const double  t_ns 
) const
inline

Probability density function for light from muon.

Parameters
typePDF type
E_GeVmuon energy [GeV]
R_mdistance between muon and PMT [m]
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dx [npe/ns]

Definition at line 1751 of file JPDF.hh.

1757  {
1758  switch (type) {
1759 
1761  return getDirectLightFromMuon (R_m, theta, phi, t_ns);
1762 
1764  return getScatteredLightFromMuon (R_m, theta, phi, t_ns);
1765 
1767  return getDirectLightFromEMshowers (R_m, theta, phi, t_ns) * E_GeV;
1768 
1770  return getScatteredLightFromEMshowers(R_m, theta, phi, t_ns) * E_GeV;
1771 
1773  return getDirectLightFromDeltaRays (R_m, theta, phi, t_ns) * getDeltaRaysFromMuon(E_GeV);
1774 
1776  return getScatteredLightFromDeltaRays(R_m, theta, phi, t_ns) * getDeltaRaysFromMuon(E_GeV);
1777 
1778  default:
1779  return 0.0;
1780  }
1781  }
double getDirectLightFromMuon(const double R_m, const double theta, const double phi) const
Number of photo-electrons from direct Cherenkov light from muon.
Definition: JPDF.hh:357
direct light from EM showers
Definition: JPDFTypes.hh:29
double getScatteredLightFromEMshowers(const double R_m, const double theta, const double phi, const double t_ns) const
Probability density function for scattered light from EM-showers.
Definition: JPDF.hh:730
direct light from muon
Definition: JPDFTypes.hh:26
double getScatteredLightFromMuon(const double R_m, const double theta, const double phi, const double t_ns) const
Probability density function for scattered light from muon.
Definition: JPDF.hh:496
scattered light from muon
Definition: JPDFTypes.hh:27
scattered light from delta-rays
Definition: JPDFTypes.hh:33
scattered light from EM showers
Definition: JPDFTypes.hh:30
double getDirectLightFromDeltaRays(const double R_m, const double theta, const double phi, const double t_ns) const
Probability density function for direct light from delta-rays.
Definition: JPDF.hh:1375
direct light from delta-rays
Definition: JPDFTypes.hh:32
double getDeltaRaysFromMuon(const double E)
Equivalent EM-shower energy due to delta-rays per unit muon track length.
Definition: JPDFToolkit.hh:67
double getScatteredLightFromDeltaRays(const double R_m, const double theta, const double phi, const double t_ns) const
Probability density function for direct light from delta-rays.
Definition: JPDF.hh:1461
double getDirectLightFromEMshowers(const double R_m, const double theta, const double phi, const double t_ns) const
Probability density function for direct light from EM-showers.
Definition: JPDF.hh:642
double JPHYSICS::JPDF::getLightFromMuon ( const double  E_GeV,
const double  R_m,
const double  theta,
const double  phi,
const double  t_ns 
) const
inline

Probability density function for light from muon.

Parameters
E_GeVmuon energy [GeV]
R_mdistance between muon and PMT [m]
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dx [npe/ns]

Definition at line 1794 of file JPDF.hh.

1799  {
1800  return (getDirectLightFromMuon (R_m, theta, phi, t_ns) +
1801  getScatteredLightFromMuon (R_m, theta, phi, t_ns) +
1802  getDirectLightFromEMshowers (R_m, theta, phi, t_ns) * E_GeV +
1803  getScatteredLightFromEMshowers(R_m, theta, phi, t_ns) * E_GeV +
1804  getDirectLightFromDeltaRays (R_m, theta, phi, t_ns) * getDeltaRaysFromMuon(E_GeV) +
1805  getScatteredLightFromDeltaRays(R_m, theta, phi, t_ns) * getDeltaRaysFromMuon(E_GeV));
1806  }
double getDirectLightFromMuon(const double R_m, const double theta, const double phi) const
Number of photo-electrons from direct Cherenkov light from muon.
Definition: JPDF.hh:357
double getScatteredLightFromEMshowers(const double R_m, const double theta, const double phi, const double t_ns) const
Probability density function for scattered light from EM-showers.
Definition: JPDF.hh:730
double getScatteredLightFromMuon(const double R_m, const double theta, const double phi, const double t_ns) const
Probability density function for scattered light from muon.
Definition: JPDF.hh:496
double getDirectLightFromDeltaRays(const double R_m, const double theta, const double phi, const double t_ns) const
Probability density function for direct light from delta-rays.
Definition: JPDF.hh:1375
double getDeltaRaysFromMuon(const double E)
Equivalent EM-shower energy due to delta-rays per unit muon track length.
Definition: JPDFToolkit.hh:67
double getScatteredLightFromDeltaRays(const double R_m, const double theta, const double phi, const double t_ns) const
Probability density function for direct light from delta-rays.
Definition: JPDF.hh:1461
double getDirectLightFromEMshowers(const double R_m, const double theta, const double phi, const double t_ns) const
Probability density function for direct light from EM-showers.
Definition: JPDF.hh:642
double JPHYSICS::JPDF::getLightFromEMshower ( const int  type,
const double  D_m,
const double  cd,
const double  theta,
const double  phi,
const double  t_ns 
) const
inline

Probability density function for light from EM-shower.

Parameters
typePDF type
D_mdistance between EM-shower and PMT [m]
cdcosine angle EM-shower direction and EM-shower - PMT position
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dE [npe/ns/GeV]

Definition at line 1820 of file JPDF.hh.

1826  {
1827  switch (type) {
1828 
1830  return getDirectLightFromEMshower (D_m, cd, theta, phi, t_ns);
1831 
1833  return getScatteredLightFromEMshower(D_m, cd, theta, phi, t_ns);
1834 
1835  default:
1836  return 0.0;
1837  }
1838  }
double getDirectLightFromEMshower(const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
Probability density function for direct light from EM-shower.
Definition: JPDF.hh:1006
double getScatteredLightFromEMshower(const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
Probability density function for scattered light from EM-shower.
Definition: JPDF.hh:1062
scattered light from EM shower
Definition: JPDFTypes.hh:38
direct light from EM shower
Definition: JPDFTypes.hh:37
double JPHYSICS::JPDF::getLightFromEMshower ( const double  D_m,
const double  cd,
const double  theta,
const double  phi,
const double  t_ns 
) const
inline

Probability density function for light from EM-shower.

Parameters
D_mdistance between EM-shower and PMT [m]
cdcosine angle EM-shower direction and EM-shower - PMT position
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dE [npe/ns/GeV]

Definition at line 1851 of file JPDF.hh.

1856  {
1857  return (getDirectLightFromEMshower (D_m, cd, theta, phi, t_ns) +
1858  getScatteredLightFromEMshower(D_m, cd, theta, phi, t_ns));
1859  }
double getDirectLightFromEMshower(const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
Probability density function for direct light from EM-shower.
Definition: JPDF.hh:1006
double getScatteredLightFromEMshower(const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
Probability density function for scattered light from EM-shower.
Definition: JPDF.hh:1062
double JPHYSICS::JPDF::getLightFromEMshower ( const int  type,
const double  E_GeV,
const double  D_m,
const double  cd,
const double  theta,
const double  phi,
const double  t_ns 
) const
inline

Probability density function for light from EM-shower.

Parameters
typePDF type
E_GeVEM-shower energy [GeV]
D_mdistance between EM-shower and PMT [m]
cdcosine angle EM-shower direction and EM-shower - PMT position
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dE [npe/ns/GeV]

Definition at line 1874 of file JPDF.hh.

1881  {
1882  switch (type) {
1883 
1885  return getDirectLightFromEMshower (E_GeV, D_m, cd, theta, phi, t_ns);
1886 
1888  return getScatteredLightFromEMshower(E_GeV, D_m, cd, theta, phi, t_ns);
1889 
1890  default:
1891  return 0.0;
1892  }
1893  }
double getDirectLightFromEMshower(const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
Probability density function for direct light from EM-shower.
Definition: JPDF.hh:1006
double getScatteredLightFromEMshower(const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
Probability density function for scattered light from EM-shower.
Definition: JPDF.hh:1062
scattered light from EM shower
Definition: JPDFTypes.hh:38
direct light from EM shower
Definition: JPDFTypes.hh:37
double JPHYSICS::JPDF::getLightFromEMshower ( const double  E_GeV,
const double  D_m,
const double  cd,
const double  theta,
const double  phi,
const double  t_ns 
) const
inline

Probability density function for light from EM-shower.

Parameters
E_GeVEM-shower energy [GeV]
D_mdistance between EM-shower and PMT [m]
cdcosine angle EM-shower direction and EM-shower - PMT position
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dE [npe/ns/GeV]

Definition at line 1907 of file JPDF.hh.

1913  {
1914  return (getDirectLightFromEMshower (E_GeV, D_m, cd, theta, phi, t_ns) +
1915  getScatteredLightFromEMshower(E_GeV, D_m, cd, theta, phi, t_ns));
1916  }
double getDirectLightFromEMshower(const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
Probability density function for direct light from EM-shower.
Definition: JPDF.hh:1006
double getScatteredLightFromEMshower(const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
Probability density function for scattered light from EM-shower.
Definition: JPDF.hh:1062
double JPHYSICS::JPDF::getLightFromBrightPoint ( const int  type,
const double  D_m,
const double  ct,
const double  t_ns 
) const
inline

Probability density function for direct light from isotropic light source.

Parameters
typePDF type
D_mdistance between light source and PMT [m]
ctcosine angle PMT
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dE [npe/ns/GeV]

Definition at line 1928 of file JPDF.hh.

1932  {
1933  switch (type) {
1934 
1936  return getDirectLightFromBrightPoint (D_m, ct, t_ns);
1937 
1939  return getScatteredLightFromBrightPoint(D_m, ct, t_ns);
1940 
1941  default:
1942  return 0.0;
1943  }
1944  }
direct light from bright point
Definition: JPDFTypes.hh:42
scattered light from bright point
Definition: JPDFTypes.hh:43
double getScatteredLightFromBrightPoint(const double D_m, const double ct, const double t_ns) const
Probability density function for scattered light from isotropic light source.
Definition: JPDF.hh:1651
double getDirectLightFromBrightPoint(const double D_m, const double ct, const double t_ns) const
Probability density function for direct light from isotropic light source.
Definition: JPDF.hh:1607
double JPHYSICS::JPDF::getLightFromBrightPoint ( const double  D_m,
const double  ct,
const double  t_ns 
) const
inline

Probability density function for direct light from isotropic light source.

Parameters
D_mdistance between light source and PMT [m]
ctcosine angle PMT
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dE [npe/ns/GeV]

Definition at line 1955 of file JPDF.hh.

1958  {
1959  return (getDirectLightFromBrightPoint (D_m, ct, t_ns) +
1960  getScatteredLightFromBrightPoint(D_m, ct, t_ns));
1961  }
double getScatteredLightFromBrightPoint(const double D_m, const double ct, const double t_ns) const
Probability density function for scattered light from isotropic light source.
Definition: JPDF.hh:1651
double getDirectLightFromBrightPoint(const double D_m, const double ct, const double t_ns) const
Probability density function for direct light from isotropic light source.
Definition: JPDF.hh:1607
virtual double JPHYSICS::JPDF::getWavelength ( const double  n,
const double  eps = 1.0e-10 
) const
inlineprotectedvirtual

Determine wavelength for a given index of refraction corresponding to the group velocity.

Parameters
nindex of refraction
epsprecision index of refraction
Returns
wavelength [nm]

Definition at line 2038 of file JPDF.hh.

2040  {
2041  //return getWavelength(n, 0.5*(wmin + wmax), eps);
2042 
2043  double vmin = wmin;
2044  double vmax = wmax;
2045 
2046  for (int i = 0; i != 1000; ++i) {
2047 
2048  const double v = 0.5 * (vmin + vmax);
2049  const double y = getIndexOfRefractionGroup(v);
2050 
2051  if (fabs(y - n) < eps) {
2052  return v;
2053  }
2054 
2055  if (y < n)
2056  vmax = v;
2057  else
2058  vmin = v;
2059  }
2060 
2061  return 0.5 * (vmin + vmax);
2062  }
const int n
Definition: JPolint.hh:697
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2144
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
const double wmin
Integration limits.
Definition: JPDF.hh:2143
data_type v[N+1][M+1]
Definition: JPolint.hh:777
virtual double JPHYSICS::JPDF::getWavelength ( const double  n,
const double  w,
const double  eps 
) const
inlineprotectedvirtual

Determine wavelength for a given index of refraction corresponding to the group velocity.

The estimate of the wavelength is made by successive linear extrapolations. The procedure starts from the given wavelength and terminates if the index of refraction is equal to the target value within the given precision.

Parameters
nindex of refraction
wstart value wavelength [nm]
epsprecision index of refraction
Returns
return value wavelength [nm]

Definition at line 2076 of file JPDF.hh.

2079  {
2080  double v = w;
2081 
2082  // determine wavelength by linear extrapolation
2083 
2084  for ( ; ; ) {
2085 
2086  const double y = getIndexOfRefractionGroup(v);
2087 
2088  if (fabs(y - n) < eps) {
2089  break;
2090  }
2091 
2092  v += (n - y) / getDispersionGroup(v);
2093  }
2094 
2095  return v;
2096  }
data_type w[N+1][M+1]
Definition: JPolint.hh:778
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
const int n
Definition: JPolint.hh:697
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
data_type v[N+1][M+1]
Definition: JPolint.hh:777
static double JPHYSICS::JPDF::getRmin ( )
inlinestaticprotected

minimal distance of approach of muon to PMT [m]

Definition at line 2099 of file JPDF.hh.

virtual double JPHYSICS::JPDF::getInverseAttenuationLength ( const double  l_abs,
const double  ls,
const double  cts 
) const
inlineprotectedvirtual

Get the inverse of the attenuation length.

Parameters
l_absabsorption length [m]
lsscattering length [m]
ctscosine scattering angle
Returns
inverse attenuation length [m^-1]

Definition at line 2110 of file JPDF.hh.

2111  {
2113 
2114  if (f1.empty()) {
2115 
2116  const int nx = 100000;
2117  const double xmin = -1.0;
2118  const double xmax = +1.0;
2119 
2120  const double dx = (xmax - xmin) / (nx - 1);
2121 
2122  for (double x = xmin, W = 0.0; x < xmax; x += dx) {
2123 
2124  f1[x] = W;
2125 
2126  W += 2*PI * dx * getScatteringProbability(x + 0.5*dx);
2127  }
2128 
2129  f1[xmin] = 0.0;
2130  f1[xmax] = 1.0;
2131 
2132  f1.compile();
2133  }
2134 
2135  return 1.0/l_abs + f1(cts)/ls;
2136  }
const double xmax
Definition: JQuadrature.cc:24
Type definition of a 1st degree polynomial interpolation based on a JGridCollection with result type ...
const JPolynome f1(1.0, 2.0, 3.0)
Function.
static const double PI
Mathematical constants.
const double xmin
Definition: JQuadrature.cc:23
virtual double getScatteringProbability(const double ct) const =0
Model specific function to describe light scattering in water (integral over full solid angle normali...
virtual void JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::clear ( )
inlineoverridevirtualinherited

Clear.

Implements JTOOLS::JMappableCollection< JKey_t, JValue_t >.

Definition at line 150 of file JCollection.hh.

151  {
152  container_type::clear();
153  }
virtual const ordinate_type& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::get ( typename JClass< abscissa_type >::argument_type  x) const
inlineoverridevirtualinherited

Get ordinate value.

Parameters
xabscissa value
Returns
ordinate value

Definition at line 162 of file JCollection.hh.

163  {
164  const_iterator i = this->lower_bound(x);
165 
166  if (i == this->end() || this->getDistance(x, i->getX()) > distance_type::precision) {
167  THROW(JValueOutOfRange, "Invalid abscissa value " << x);
168  }
169 
170  return i->getY();
171  }
JDistance< typename JElement2D_t::abscissa_type > getDistance
Function object for distance evaluation.
Definition: JCollection.hh:773
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:696
const_iterator lower_bound(typename JClass< abscissa_type >::argument_type x) const
Get first position of element i, where x &gt;= i-&gt;getX().
Definition: JCollection.hh:292
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
Exception for accessing a value in a collection that is outside of its range.
Definition: JException.hh:162
virtual ordinate_type& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::get ( typename JClass< abscissa_type >::argument_type  x)
inlineoverridevirtualinherited

Get ordinate value.

Parameters
xabscissa value
Returns
ordinate value

Definition at line 180 of file JCollection.hh.

181  {
182  iterator i = this->lower_bound(x);
183 
184  if (i == this->end() || this->getDistance(x, i->getX()) > distance_type::precision) {
185  i = container_type::insert(i, value_type(x, JMATH::getZero<ordinate_type>()));
186  }
187 
188  return i->getY();
189  }
JDistance< typename JElement2D_t::abscissa_type > getDistance
Function object for distance evaluation.
Definition: JCollection.hh:773
const_iterator lower_bound(typename JClass< abscissa_type >::argument_type x) const
Get first position of element i, where x &gt;= i-&gt;getX().
Definition: JCollection.hh:292
container_type::iterator iterator
Definition: JCollection.hh:93
template<class JKey_t, class JValue_t>
virtual const mapped_type& JTOOLS::JMappableCollection< JKey_t, JValue_t >::get ( typename JClass< key_type >::argument_type  key) const
pure virtualinherited
template<class JKey_t, class JValue_t>
virtual mapped_type& JTOOLS::JMappableCollection< JKey_t, JValue_t >::get ( typename JClass< key_type >::argument_type  key)
pure virtualinherited
virtual int JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::getSize ( ) const
inlineoverridevirtualinherited

Get number of elements.

Returns
number of elements

Implements JTOOLS::JAbstractCollection< JAbscissa_t >.

Definition at line 197 of file JCollection.hh.

198  {
199  return (int) this->size();
200  }
virtual abscissa_type JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::getX ( int  index) const
inlineoverridevirtualinherited

Get abscissa value.

Parameters
indexindex
Returns
abscissa value

Implements JTOOLS::JAbstractCollection< JAbscissa_t >.

Definition at line 209 of file JCollection.hh.

210  {
211  return this->at(index).getX();
212  }
virtual abscissa_type JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::getXmin ( ) const
inlineoverridevirtualinherited

Get minimal abscissa value.

Returns
abscissa value

Implements JTOOLS::JAbstractCollection< JAbscissa_t >.

Definition at line 220 of file JCollection.hh.

221  {
222  return this->begin()->getX();
223  }
virtual abscissa_type JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::getXmax ( ) const
inlineoverridevirtualinherited

Get maximal abscissa value.

Returns
abscissa value

Implements JTOOLS::JAbstractCollection< JAbscissa_t >.

Definition at line 231 of file JCollection.hh.

232  {
233  return this->rbegin()->getX();
234  }
const ordinate_type& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::getY ( int  index) const
inlineinherited

Get ordinate value.

Parameters
indexindex
Returns
ordinate value

Definition at line 244 of file JCollection.hh.

245  {
246  return this->at(index).getY();
247  }
ordinate_type& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::getY ( int  index)
inlineinherited

Get ordinate value.

Parameters
indexindex
Returns
ordinate value

Definition at line 256 of file JCollection.hh.

257  {
258  return this->at(index).getY();
259  }
void JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::transform ( const transformer_type transformer)
inlineinherited

Transform collection.

Parameters
transformerelement transformer

Definition at line 267 of file JCollection.hh.

268  {
269  for (iterator i = this->begin(); i != this->end(); ++i) {
270  *i = transformer(*i);
271  }
272 
273  sort();
274  }
container_type::iterator iterator
Definition: JCollection.hh:93
void JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::sort ( )
inlineinherited

Sort elements.

Definition at line 280 of file JCollection.hh.

281  {
282  std::sort(this->begin(), this->end(), compare);
283  }
JComparator compare
Function object for comparison.
Definition: JCollection.hh:780
const_iterator JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::lower_bound ( typename JClass< abscissa_type >::argument_type  x) const
inlineinherited

Get first position of element i, where x >= i->getX().

Parameters
xabscissa value
Returns
position of corresponding element

Definition at line 292 of file JCollection.hh.

293  {
294  return std::lower_bound(this->begin(), this->end(), x, compare);
295  }
JComparator compare
Function object for comparison.
Definition: JCollection.hh:780
iterator JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::lower_bound ( typename JClass< abscissa_type >::argument_type  x)
inlineinherited

Get first position of element i, where x >= i->getX().

Parameters
xabscissa value
Returns
position of corresponding element

Definition at line 304 of file JCollection.hh.

305  {
306  return std::lower_bound(this->begin(), this->end(), x, compare);
307  }
JComparator compare
Function object for comparison.
Definition: JCollection.hh:780
pair_type JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::insert ( const value_type element)
inlineinherited

Insert element.

Parameters
elementelement
Returns
(iterator, status), where status is true if inserted; else false

Definition at line 316 of file JCollection.hh.

317  {
318  iterator i = this->lower_bound(element.getX());
319 
320  if (i == this->end() || this->getDistance(element.getX(), i->getX()) > 0.0)
321  return pair_type(container_type::insert(i, element), true);
322  else
323  return pair_type(this->end(), false);
324  }
std::pair< const_iterator, bool > pair_type
Definition: JCollection.hh:97
JDistance< typename JElement2D_t::abscissa_type > getDistance
Function object for distance evaluation.
Definition: JCollection.hh:773
const_iterator lower_bound(typename JClass< abscissa_type >::argument_type x) const
Get first position of element i, where x &gt;= i-&gt;getX().
Definition: JCollection.hh:292
container_type::iterator iterator
Definition: JCollection.hh:93
void JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::configure ( const JAbstractCollection< abscissa_type > &  bounds)
inlineinherited

Configure collection.

Parameters
boundsabscissa values

Definition at line 332 of file JCollection.hh.

333  {
334  configure(bounds, JMATH::getZero<ordinate_type>());
335  }
void configure(const JAbstractCollection< abscissa_type > &bounds)
Configure collection.
Definition: JCollection.hh:332
void JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::configure ( const JAbstractCollection< abscissa_type > &  bounds,
typename JClass< ordinate_type >::argument_type  value 
)
inlineinherited

Configure collection.

Parameters
boundsabscissa values
valueordinate value

Definition at line 344 of file JCollection.hh.

346  {
347  this->resize(bounds.getSize());
348 
349  for (iterator i = this->begin(); i != this->end(); ++i) {
350 
351  const abscissa_type x = bounds.getX(std::distance(this->begin(),i));
352 
353  *i = value_type(x,value);
354  }
355  }
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
void resize(typename container_type::size_type size)
Resize collection.
Definition: JCollection.hh:788
JElement2D_t::abscissa_type abscissa_type
Definition: JCollection.hh:82
container_type::iterator iterator
Definition: JCollection.hh:93
virtual abscissa_type getX(int index) const =0
Get abscissa value.
virtual int getSize() const =0
Get number of elements.
void JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::configure ( const JAbstractCollection< abscissa_type > &  bounds,
const JFunction1D_t &  function 
)
inlineinherited

Configure collection.

Parameters
boundsabscissa values
functionfunction

Definition at line 365 of file JCollection.hh.

367  {
368  using namespace JLANG;
369 
370  collection_type* out = (is_identical(*this, function) ? new collection_type() : this);
371 
372  for (int i = 0; i != bounds.getSize(); ++i) {
373 
374  const abscissa_type x = bounds.getX(i);
375 
376  out->put(x, function(x));
377  }
378 
379  if (is_identical(*this, function)) {
380 
381  this->swap(*out);
382 
383  delete out;
384  }
385  }
JCollection< JElement2D_t, JDistance< typename JElement2D_t::abscissa_type > > collection_type
Definition: JCollection.hh:87
then usage $script< detector file >< detectorfile > nIf the range of floors is the first detector file is aligned to the second before the comparison nIn this
JElement2D_t::abscissa_type abscissa_type
Definition: JCollection.hh:82
bool is_identical(JFirst_t &first, JSecond_t &second)
Check if two objects are indentical.
Definition: JLangToolkit.hh:46
virtual abscissa_type getX(int index) const =0
Get abscissa value.
virtual int getSize() const =0
Get number of elements.
bool JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::is_compatible ( const JCollection< JElement2D_t > &  collection) const
inlineinherited

Test whether collections are compatible.

Parameters
collectioncollection
Returns
true if collections are compatible; else false

Definition at line 394 of file JCollection.hh.

395  {
396  if (this->empty() || collection.empty()) {
397 
398  return true;
399 
400  } else {
401 
402  const double precision = JDistance<abscissa_type>::precision;
403 
404  const_iterator p = this->begin();
405  const_iterator q = collection.begin();
406 
407  if (getDistance(p->getX(), q->getX()) > precision) {
408 
409  do {
410  ++p;
411  } while (p != this->end() && getDistance(p->getX(), q->getX()) > precision);
412 
413  } else if (getDistance(q->getX(), p->getX()) > precision) {
414 
415  do {
416  ++q;
417  } while (q != collection.end() && getDistance(q->getX(), p->getX()) > precision);
418  }
419 
420  for ( ; p != this->end() && q != collection.end(); ++p, ++q) {
421  if (fabs(getDistance(p->getX(), q->getX())) > precision) {
422  return false;
423  }
424  }
425 
426  return true;
427  }
428  }
Template class for distance evaluation.
Definition: JDistance.hh:24
JDistance< typename JElement2D_t::abscissa_type > getDistance
Function object for distance evaluation.
Definition: JCollection.hh:773
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
JCollection& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::negate ( )
inlineinherited

Negate collection.

Returns
this collection

Definition at line 436 of file JCollection.hh.

437  {
438  for (iterator i = this->begin(); i != this->end(); ++i) {
439  i->getY() = -i->getY();
440  }
441 
442  return *this;
443  }
container_type::iterator iterator
Definition: JCollection.hh:93
JCollection& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::add ( const JCollection< JElement2D_t > &  collection)
inlineinherited

Add collection.

Parameters
collectioncollection
Returns
this collection

Definition at line 452 of file JCollection.hh.

453  {
454  if (!collection.empty()) {
455 
456  if (this->empty()) {
457 
458  for (const_iterator i = collection.begin(); i != collection.end(); ++i) {
459  this->put(i->getX(), +i->getY());
460  }
461 
462  } else if (this->is_compatible(collection)) {
463 
464  const double precision = JDistance<abscissa_type>::precision;
465 
466  iterator p = this->begin();
467  const_iterator q = collection.begin();
468 
469  if (getDistance(p->getX(), q->getX()) > precision) {
470 
471  do {
472  ++p;
473  } while (p != this->end() && getDistance(p->getX(), q->getX()) > precision);
474 
475  } else if (getDistance(q->getX(), p->getX()) > precision) {
476 
477  do {
478  ++q;
479  } while (q != collection.end() && getDistance(q->getX(), p->getX()) > precision);
480  }
481 
482  const_iterator i = q;
483 
484  for ( ; p != this->end() && i != collection.end(); ++p, ++i) {
485  p->getY() += i->getY();
486  }
487 
488  for ( ; i != collection.end(); ++i) {
489  this->put(i->getX(), +i->getY());
490  }
491 
492  for (i = collection.begin(); i != q; ++i) {
493  this->put(i->getX(), +i->getY());
494  }
495  }
496  }
497 
498  return *this;
499  }
Template class for distance evaluation.
Definition: JDistance.hh:24
JDistance< typename JElement2D_t::abscissa_type > getDistance
Function object for distance evaluation.
Definition: JCollection.hh:773
bool is_compatible(const JCollection &collection) const
Test whether collections are compatible.
Definition: JCollection.hh:394
container_type::iterator iterator
Definition: JCollection.hh:93
void put(typename JClass< key_type >::argument_type key, typename JClass< mapped_type >::argument_type value)
Put pair-wise element (key,value) into collection.
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
JCollection& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::add ( typename JClass< ordinate_type >::argument_type  value)
inlineinherited

Add offset.

Parameters
valueoffset
Returns
this collection

Definition at line 600 of file JCollection.hh.

601  {
602  for (iterator i = this->begin(); i != this->end(); ++i) {
603  i->getY() += value;
604  }
605 
606  return *this;
607  }
container_type::iterator iterator
Definition: JCollection.hh:93
JCollection& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::add ( const JFunction1D_t &  function)
inlineinherited

Add function.

Parameters
functionfunction
Returns
this collection

Definition at line 633 of file JCollection.hh.

634  {
635  for (iterator i = this->begin(); i != this->end(); ++i) {
636  i->getY() += function(i->getX());
637  }
638 
639  return *this;
640  }
container_type::iterator iterator
Definition: JCollection.hh:93
JCollection& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::sub ( const JCollection< JElement2D_t > &  collection)
inlineinherited

Subtract collection.

Parameters
collectioncollection
Returns
this collection

Definition at line 508 of file JCollection.hh.

509  {
510  if (!collection.empty()) {
511 
512  if (this->empty()) {
513 
514  for (const_iterator i = collection.begin(); i != collection.end(); ++i) {
515  this->put(i->getX(), -i->getY());
516  }
517 
518  } else if (this->is_compatible(collection)) {
519 
520  const double precision = JDistance<abscissa_type>::precision;
521 
522  iterator p = this->begin();
523  const_iterator q = collection.begin();
524 
525  if (getDistance(p->getX(), q->getX()) > precision) {
526 
527  do {
528  ++p;
529  } while (p != this->end() && getDistance(p->getX(), q->getX()) > precision);
530 
531  } else if (getDistance(q->getX(), p->getX()) > precision) {
532 
533  do {
534  ++q;
535  } while (q != collection.end() && getDistance(q->getX(), p->getX()) > precision);
536  }
537 
538  const_iterator i = q;
539 
540  for ( ; p != this->end() && i != collection.end(); ++p, ++i) {
541  p->getY() -= i->getY();
542  }
543 
544  for ( ; i != collection.end(); ++i) {
545  this->put(i->getX(), -i->getY());
546  }
547 
548  for (i = collection.begin(); i != q; ++i) {
549  this->put(i->getX(), -i->getY());
550  }
551 
552  } else {
553 
554  THROW(JException, "JCollection::add() collections incompatible.");
555  }
556  }
557 
558  return *this;
559  }
General exception.
Definition: JException.hh:23
Template class for distance evaluation.
Definition: JDistance.hh:24
JDistance< typename JElement2D_t::abscissa_type > getDistance
Function object for distance evaluation.
Definition: JCollection.hh:773
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:696
bool is_compatible(const JCollection &collection) const
Test whether collections are compatible.
Definition: JCollection.hh:394
container_type::iterator iterator
Definition: JCollection.hh:93
void put(typename JClass< key_type >::argument_type key, typename JClass< mapped_type >::argument_type value)
Put pair-wise element (key,value) into collection.
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
JCollection& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::sub ( typename JClass< ordinate_type >::argument_type  value)
inlineinherited

Subtract offset.

Parameters
valueoffset
Returns
this collection

Definition at line 616 of file JCollection.hh.

617  {
618  for (iterator i = this->begin(); i != this->end(); ++i) {
619  i->getY() -= value;
620  }
621 
622  return *this;
623  }
container_type::iterator iterator
Definition: JCollection.hh:93
JCollection& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::sub ( const JFunction1D_t &  function)
inlineinherited

Subtract function.

Parameters
functionfunction
Returns
this collection

Definition at line 650 of file JCollection.hh.

651  {
652  for (iterator i = this->begin(); i != this->end(); ++i) {
653  i->getY() -= function(i->getX());
654  }
655 
656  return *this;
657  }
container_type::iterator iterator
Definition: JCollection.hh:93
JCollection& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::mul ( const double  value)
inlineinherited

Scale contents.

Parameters
valuemultiplication factor
Returns
this collection

Definition at line 568 of file JCollection.hh.

569  {
570  for (iterator i = this->begin(); i != this->end(); ++i) {
571  i->getY() *= value;
572  }
573 
574  return *this;
575  }
container_type::iterator iterator
Definition: JCollection.hh:93
template<class JFirst_t, class JSecond_t = JNullType>
JFirst_t& JMATH::JMath< JFirst_t, JSecond_t >::mul ( const JSecond_t &  object)
inlineinherited

Multiply with object.

Parameters
objectobject
Returns
result object

Definition at line 354 of file JMath.hh.

355  {
356  return static_cast<JFirst_t&>(*this) = JFirst_t().mul(static_cast<const JFirst_t&>(*this), object);
357  }
JCollection& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::div ( const double  value)
inlineinherited

Scale contents.

Parameters
valuedivision factor
Returns
this collection

Definition at line 584 of file JCollection.hh.

585  {
586  for (iterator i = this->begin(); i != this->end(); ++i) {
587  i->getY() /= value;
588  }
589 
590  return *this;
591  }
container_type::iterator iterator
Definition: JCollection.hh:93
const JComparator& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::getComparator ( ) const
inlineinherited

Get comparator.

Returns
comparator

Definition at line 764 of file JCollection.hh.

765  {
766  return compare;
767  }
JComparator compare
Function object for comparison.
Definition: JCollection.hh:780
void JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::resize ( typename container_type::size_type  size)
inlineprotectedinherited

Resize collection.

Parameters
sizesize

Definition at line 788 of file JCollection.hh.

789  {
790  container_type::resize(size);
791  }
template<class JKey_t, class JValue_t>
const mapped_type& JTOOLS::JMappableCollection< JKey_t, JValue_t >::operator[] ( typename JClass< key_type >::argument_type  key) const
inlineinherited

Get mapped value.

Parameters
keykey
Returns
value

Definition at line 73 of file JMappableCollection.hh.

74  {
75  return get(key);
76  }
template<class JKey_t, class JValue_t>
mapped_type& JTOOLS::JMappableCollection< JKey_t, JValue_t >::operator[] ( typename JClass< key_type >::argument_type  key)
inlineinherited

Get mapped value.

Parameters
keykey
Returns
value

Definition at line 85 of file JMappableCollection.hh.

86  {
87  return get(key);
88  }
template<class JKey_t, class JValue_t>
void JTOOLS::JMappableCollection< JKey_t, JValue_t >::put ( typename JClass< key_type >::argument_type  key,
typename JClass< mapped_type >::argument_type  value 
)
inlineinherited

Put pair-wise element (key,value) into collection.

Parameters
keykey
valuevalue

Definition at line 97 of file JMappableCollection.hh.

99  {
100  get(key) = value;
101  }
template<class JAbscissa_t>
bool JTOOLS::JAbstractCollection< JAbscissa_t >::is_equal ( const JAbstractCollection< JAbscissa_t > &  collection) const
inlineinherited

Test whether abstract collections are equal.

Parameters
collectionabstract collection
Returns
true if collections are equals; else false

Definition at line 72 of file JAbstractCollection.hh.

73  {
74  if (this->getSize() == collection.getSize()) {
75 
76  for (int i = 0; i != this->getSize(); ++i) {
77 
78  if (this->getX(i) != collection.getX(i)) {
79  return false;
80  }
81  }
82 
83  return true;
84  }
85 
86  return false;
87  }
virtual abscissa_type getX(int index) const =0
Get abscissa value.
virtual int getSize() const =0
Get number of elements.
virtual double JPHYSICS::JDispersionInterface::getIndexOfRefractionPhase ( const double  lambda) const
pure virtualinherited

Index of refraction for phase velocity.

Parameters
lambdawavelenth [nm]
Returns
index of refraction

Implemented in JPHYSICS::JDispersion.

virtual double JPHYSICS::JDispersionInterface::getDispersionPhase ( const double  lambda) const
pure virtualinherited

Dispersion of light for phase velocity.

Parameters
lambdawavelength of light [nm]
Returns
dn/dlambda

Implemented in JPHYSICS::JDispersion.

virtual double JPHYSICS::JDispersionInterface::getIndexOfRefractionGroup ( const double  lambda) const
inlinevirtualinherited

Index of refraction for group velocity.

Parameters
lambdawavelenth [nm]
Returns
index of refraction

Definition at line 52 of file JDispersionInterface.hh.

53  {
54  const double n = getIndexOfRefractionPhase(lambda);
55  const double y = getDispersionPhase(lambda);
56 
57  return n / (1.0 + y*lambda/n);
58  }
const int n
Definition: JPolint.hh:697
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getDispersionPhase(const double lambda) const =0
Dispersion of light for phase velocity.
virtual double JPHYSICS::JDispersionInterface::getDispersionGroup ( const double  lambda) const
pure virtualinherited

Dispersion of light for group velocity.

Parameters
lambdawavelength of light [nm]
Returns
dn/dlambda

Implemented in JPHYSICS::JDispersion.

double JPHYSICS::JDispersionInterface::getKappa ( const double  lambda) const
inlineinherited

Get effective index of refraction for muon light.

Parameters
lambdawavelength of light [nm]
Returns
index of refraction

Definition at line 76 of file JDispersionInterface.hh.

77  {
78  const double n = getIndexOfRefractionPhase(lambda);
79  const double ng = getIndexOfRefractionGroup(lambda);
80 
81  return (ng * n - 1.0) / sqrt(n*n - 1.0);
82  }
const int n
Definition: JPolint.hh:697
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
double JPHYSICS::JDispersionInterface::getKmin ( const double  lambda) const
inlineinherited

Get smallest index of refraction for Bremsstrahlung light (i.e. point at which dt/dz = 0).

Parameters
lambdawavelength of light [nm]
Returns
index of refraction

Definition at line 91 of file JDispersionInterface.hh.

92  {
93  const double ng = getIndexOfRefractionGroup(lambda);
94 
95  return sqrt(ng*ng - 1.0);
96  }
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
virtual double JPHYSICS::JAbstractPMT::getPhotocathodeArea ( ) const
pure virtualinherited

Photo-cathode area of PMT.

Returns
photo-cathode area [m^2]

Implemented in JPHYSICS::JPDF_C, and JPHYSICS::JLED_C.

virtual double JPHYSICS::JAbstractPMT::getQE ( const double  lambda) const
pure virtualinherited

Quantum efficiency of PMT (incl.

absorption in glass, gel, etc.).

Parameters
lambdawavelenth [nm]
Returns
QE

Implemented in JPHYSICS::JPDF_C, and JPHYSICS::JLED_C.

virtual double JPHYSICS::JAbstractPMT::getAngularAcceptance ( const double  ct) const
pure virtualinherited

Angular acceptence of PMT.

Parameters
ctcosine angle of incidence
Returns
acceptance

Implemented in JPHYSICS::JPDF_C, and JPHYSICS::JLED_C.

virtual double JPHYSICS::JAbstractMedium::getAbsorptionLength ( const double  lambda) const
pure virtualinherited

Absorption length.

Parameters
lambdawavelenth [nm]
Returns
absorption length [m]

Implemented in JPHYSICS::JPDF_C, and JPHYSICS::JLED_C.

virtual double JPHYSICS::JAbstractMedium::getScatteringLength ( const double  lambda) const
pure virtualinherited

Scattering length.

Parameters
lambdawavelenth [nm]
Returns
scattering length [m]

Implemented in JPHYSICS::JPDF_C, and JPHYSICS::JLED_C.

virtual double JPHYSICS::JAbstractMedium::getScatteringProbability ( const double  ct) const
pure virtualinherited

Model specific function to describe light scattering in water (integral over full solid angle normalised to unity).

Parameters
ctcosine scattering angle
Returns
probability

Implemented in JPHYSICS::JPDF_C, and JPHYSICS::JLED_C.

Member Data Documentation

const double JPHYSICS::JPDF::wmin
protected

Integration limits.

minimal wavelength for integration [nm]

Definition at line 2143 of file JPDF.hh.

const double JPHYSICS::JPDF::wmax
protected

maximal wavelength for integration [nm]

Definition at line 2144 of file JPDF.hh.

std::vector<element_type> JPHYSICS::JPDF::phd
protected

fast evaluation of phi integral

Definition at line 2146 of file JPDF.hh.

Function object for distance evaluation.

Definition at line 773 of file JCollection.hh.

JComparator JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::compare
protectedinherited

Function object for comparison.

Definition at line 780 of file JCollection.hh.


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