Jpp
Public Member Functions | Protected Attributes | List of all members
JPHYSICS::JLED Class Referenceabstract

Probability Density Functions of the time response of a PMT. More...

#include <JLED.hh>

Inheritance diagram for JPHYSICS::JLED:
JPHYSICS::JDispersionInterface JPHYSICS::JAbstractPMT JPHYSICS::JAbstractLED JPHYSICS::JAbstractMedium JPHYSICS::JLED_C

Public Member Functions

 JLED (const double lambda, const double Tmin_ns, const double Tmax_ns, const JQuadrature &engine=JCotangent(20), const int numberOfPoints=20, const double epsilon=1e-12)
 Constructor. More...
 
double getDirectLightFromLED (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 LED. More...
 
double getScatteredLightFromLED (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 LED. 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. 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 getLightFromLED (const double ct, const double phi, const double dt) const =0
 Light yield from LED (number of p.e. 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...
 

Protected Attributes

double wavelength
 
double tmin
 
double tmax
 
JQuadrature main_engine
 
JQuadrature beta_engine
 
std::vector< JElement3D_tphi_engine
 

Detailed Description

Probability Density Functions of the time response of a PMT.

Definition at line 60 of file JLED.hh.

Constructor & Destructor Documentation

◆ JLED()

JPHYSICS::JLED::JLED ( const double  lambda,
const double  Tmin_ns,
const double  Tmax_ns,
const JQuadrature engine = JCotangent(20),
const int  numberOfPoints = 20,
const double  epsilon = 1e-12 
)
inline

Constructor.

Parameters
lambdawavelength photon [nm]
Tmin_nsminimal time of emmision [ns]
Tmax_nsminimal time of emmision [ns]
enginescattering angle integrator
numberOfPointsnumber of points for integration
epsilonprecision of points for integration

Definition at line 77 of file JLED.hh.

82  :
83  wavelength(lambda),
84  tmin(Tmin_ns),
85  tmax(Tmax_ns),
86  main_engine(JGaussLegendre(numberOfPoints,epsilon)),
87  beta_engine(engine)
88  {
89  using JTOOLS::PI;
90 
91  const double dp = PI / numberOfPoints;
92 
93  for (double x = 0.5*dp; x < PI; x += dp) {
94  phi_engine.push_back(JElement3D_t(cos(x),sin(x), dp));
95  }
96  }

Member Function Documentation

◆ getDirectLightFromLED()

double JPHYSICS::JLED::getDirectLightFromLED ( 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 LED.

Parameters
D_mdistance between LED and PMT [m]
cdcosine angle LED orientation and LED - PMT position
thetazenith angle orientation PMT
phiazimuth angle orientation PMT
t_nstime difference relative to direct light [ns]
Returns
dP/dt [npe/ns]

Definition at line 109 of file JLED.hh.

114  {
115  const double sd = sqrt((1.0 + cd)*(1.0 - cd));
116  const double d = D_m; // photon path [m]
117 
118  const double A = getPhotocathodeArea();
119 
120  const double px = sin(theta)*cos(phi);
121  //const double py = sin(theta)*sin(phi);
122  const double pz = cos(theta);
123 
124  const double ct = sd*px + cd*pz; // cosine angle of incidence on PMT
125 
126  const double qe = getQE(wavelength);
127  const double l_abs = getAbsorptionLength(wavelength);
128  const double ls = getScatteringLength(wavelength);
129 
130  const double U = getAngularAcceptance(ct);
131  const double V = exp(-d/l_abs) * exp(-d/ls); // absorption & scattering
132  const double W = A/(d*d); // solid angle
133 
134  return qe * getLightFromLED(cd, 0.0, t_ns) * U * V * W;
135  }

◆ getScatteredLightFromLED()

double JPHYSICS::JLED::getScatteredLightFromLED ( 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 LED.

Parameters
D_mdistance between LED and PMT [m]
cdcosine angle LED orientation and LED - PMT position
thetazenith angle orientation PMT
phiazimuth angle orientation PMT
t_nstime difference relative to direct light [ns]
Returns
dP/dt [npe/ns]

Definition at line 148 of file JLED.hh.

153  {
154  using namespace std;
155  using JTOOLS::PI;
156  using JTOOLS::C;
157 
158  double value = 0;
159 
160  if (t_ns >= tmin) {
161 
162  const double ng = getIndexOfRefractionGroup(wavelength);
163 
164  const double sd = sqrt((1.0 + cd)*(1.0 - cd));
165  const double l = D_m; // distance [m]
166 
167  const double A = getPhotocathodeArea();
168  //const double sr = sqrt(A/PI) / D_m;
169  //const double cr = sqrt((1.0 + sr)*(1.0 - sr));
170 
171  const double px = sin(theta)*cos(phi);
172  const double py = sin(theta)*sin(phi);
173  const double pz = cos(theta);
174 
175  const double qx = cd*px + 0 - sd*pz;
176  const double qy = 1*py;
177  const double qz = sd*px + 0 + cd*pz;
178 
179  const double qe = getQE(wavelength);
180  const double l_abs = getAbsorptionLength(wavelength);
181  const double ls = getScatteringLength(wavelength);
182 
183  const double Jc = 1.0 / ls; // dN/dx
184 
185  const double xmin = tmin;
186  const double xmax = std::min(tmax, t_ns);
187 
188  JQuadrature buffer;
189 
190  if (xmax > xmin) {
191 
192  for (JQuadrature::const_iterator i = main_engine.begin(); i != main_engine.end(); ++i) {
193 
194  const double t = 0.5 * (xmax + xmin) + i->getX() * 0.5 * (xmax - xmin);
195  const double dt = i->getY() * 0.5 * (xmax - xmin);
196 
197  buffer[t] = dt;
198  }
199 
200  } else {
201 
202  buffer[tmin] = 1.0;
203  }
204 
205  for (JQuadrature::const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
206 
207  const double t = i->getX();
208  const double dt = i->getY();
209 
210  const double d = l + C*(t_ns - t)/ng; // photon path
211  const double V = exp(-d/l_abs); // absorption
212 
213  for (JQuadrature::const_iterator j = beta_engine.begin(); j != beta_engine.end(); ++j) {
214 
215  const double cb = j->getX();
216  const double dc = j->getY();
217 
218  const double sb = sqrt((1.0 + cb)*(1.0 - cb));
219 
220  const double v = 0.5 * (d + l) * (d - l) / (d - l*cb);
221  const double u = d - v;
222 
223  if (u <= 0) continue;
224  if (v <= 0) continue;
225 
226  const double cts = (l*cb - v) / u; // cosine scattering angle
227 
228  const double W = min(A/(v*v), 2.0*PI); // solid angle
229  const double Ja = getScatteringProbability(cts); // P(cos(),phi)
230  const double Jd = ng * (1.0 - cts) / C; // dt/du
231 
232  const double ca = (l - v*cb) / u;
233  const double sa = v*sb / u;
234 
235  for (std::vector<JElement3D_t>::const_iterator k = phi_engine.begin(); k != phi_engine.end(); ++k) {
236 
237  const double cp = k->getX();
238  const double sp = k->getY();
239  const double dp = k->getZ();
240 
241  const double dom = dc * dp * v*v / (u*u);
242 
243  const double ct0 = cd*ca - sd*sa*cp;
244  const double ph0 = atan2(sa*sp, cd*sa*cp + sd*ca);
245 
246  const double vx = -sb*cp * qx;
247  const double vy = -sb*sp * qy;
248  const double vz = cb * qz;
249 
250  const double U =
251  getAngularAcceptance(vx + vy + vz) * getLightFromLED(ct0, +ph0, t) +
252  getAngularAcceptance(vx - vy + vz) * getLightFromLED(ct0, -ph0, t);
253 
254  value += qe * dt * dom * Ja * Jc * U * V * W / Jd;
255  }
256  }
257  }
258  }
259 
260  return value;
261  }

◆ getIndexOfRefractionPhase()

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.

◆ getDispersionPhase()

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.

◆ getIndexOfRefractionGroup()

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  }

◆ getDispersionGroup()

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.

◆ getKappa()

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  }

◆ getKmin()

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  }

◆ getPhotocathodeArea()

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.

◆ getQE()

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.

◆ getAngularAcceptance()

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.

◆ getLightFromLED()

virtual double JPHYSICS::JAbstractLED::getLightFromLED ( const double  ct,
const double  phi,
const double  dt 
) const
pure virtualinherited

Light yield from LED (number of p.e.

per unit solid angle per unit time).

Parameters
ctzenith angle of emission
phiazimuth angle of emission
dttime of emission [ns]
Returns
d^2P / dOmega dt [npe/ns/sr]

Implemented in JPHYSICS::JLED_C, and LED.

◆ getAbsorptionLength()

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.

◆ getScatteringLength()

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.

◆ getScatteringProbability()

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

◆ wavelength

double JPHYSICS::JLED::wavelength
protected

Definition at line 264 of file JLED.hh.

◆ tmin

double JPHYSICS::JLED::tmin
protected

Definition at line 266 of file JLED.hh.

◆ tmax

double JPHYSICS::JLED::tmax
protected

Definition at line 267 of file JLED.hh.

◆ main_engine

JQuadrature JPHYSICS::JLED::main_engine
protected

Definition at line 269 of file JLED.hh.

◆ beta_engine

JQuadrature JPHYSICS::JLED::beta_engine
protected

Definition at line 270 of file JLED.hh.

◆ phi_engine

std::vector<JElement3D_t> JPHYSICS::JLED::phi_engine
protected

Definition at line 271 of file JLED.hh.


The documentation for this class was generated from the following file:
JPHYSICS::JAbstractMedium::getAbsorptionLength
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
numberOfPoints
int numberOfPoints
Definition: JResultPDF.cc:22
JPHYSICS::JAbstractMedium::getScatteringProbability
virtual double getScatteringProbability(const double ct) const =0
Model specific function to describe light scattering in water (integral over full solid angle normali...
JTOOLS::u
double u[N+1]
Definition: JPolint.hh:706
JTOOLS::n
const int n
Definition: JPolint.hh:628
std::vector
Definition: JSTDTypes.hh:12
JPHYSICS::JAbstractPMT::getAngularAcceptance
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
JTOOLS::j
int j
Definition: JPolint.hh:634
JPHYSICS::JAbstractPMT::getQE
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
JTOOLS::C
static const double C
Speed of light in vacuum [m/ns].
Definition: JConstants.hh:22
JPHYSICS::JAbstractLED::getLightFromLED
virtual double getLightFromLED(const double ct, const double phi, const double dt) const =0
Light yield from LED (number of p.e.
JPHYSICS::JAbstractPMT::getPhotocathodeArea
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
JPHYSICS::JElement3D_t
JTOOLS::JElement3D< double, double > JElement3D_t
Definition: JLED.hh:27
JPHYSICS::JLED::beta_engine
JQuadrature beta_engine
Definition: JLED.hh:270
JPHYSICS::JAbstractMedium::getScatteringLength
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
JPHYSICS::JLED::phi_engine
std::vector< JElement3D_t > phi_engine
Definition: JLED.hh:271
JTOOLS::v
data_type v[N+1][M+1]
Definition: JPolint.hh:707
JPHYSICS::JDispersionInterface::getIndexOfRefractionPhase
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
JPHYSICS::JDispersionInterface::getIndexOfRefractionGroup
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
Definition: JDispersionInterface.hh:52
std
Definition: jaanetDictionary.h:36
JPHYSICS::JLED::tmin
double tmin
Definition: JLED.hh:266
JTOOLS::PI
static const double PI
Constants.
Definition: JConstants.hh:20
JPHYSICS::JLED::main_engine
JQuadrature main_engine
Definition: JLED.hh:269
JPHYSICS::JLED::wavelength
double wavelength
Definition: JLED.hh:264
JTOOLS::JCollection< JElement2D_t >::const_iterator
container_type::const_iterator const_iterator
Definition: JCollection.hh:89
JPHYSICS::JDispersionInterface::getDispersionPhase
virtual double getDispersionPhase(const double lambda) const =0
Dispersion of light for phase velocity.
JPHYSICS::JLED::tmax
double tmax
Definition: JLED.hh:267