Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
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.
 
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.
 
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.
 
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 getIndexOfRefractionGroup (const double lambda) const
 Index of refraction for group velocity.
 
virtual double getDispersionGroup (const double lambda) const =0
 Dispersion of light for group velocity.
 
double getKappa (const double lambda) const
 Get effective index of refraction for muon light.
 
double getKmin (const double lambda) const
 Get smallest index of refraction for Bremsstrahlung light (i.e. point at which dt/dz = 0).
 
virtual double getPhotocathodeArea () const =0
 Photo-cathode area of PMT.
 
virtual double getQE (const double lambda) const =0
 Quantum efficiency of PMT (incl.
 
virtual double getAngularAcceptance (const double ct) const =0
 Angular acceptence of PMT.
 
virtual double getLightFromLED (const double ct, const double phi, const double dt) const =0
 Light yield from LED (number of p.e.
 
virtual double getAbsorptionLength (const double lambda) const =0
 Absorption length.
 
virtual double getScatteringLength (const double lambda) const =0
 Scattering length.
 
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).
 

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 61 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 78 of file JLED.hh.

83 :
84 wavelength(lambda),
85 tmin(Tmin_ns),
86 tmax(Tmax_ns),
87 main_engine(JGaussLegendre(numberOfPoints,epsilon)),
88 beta_engine(engine)
89 {
90 const double dp = PI / numberOfPoints;
91
92 for (double x = 0.5*dp; x < PI; x += dp) {
93 phi_engine.push_back(JElement3D_t(cos(x),sin(x), dp));
94 }
95 }
int numberOfPoints
Definition JResultPDF.cc:22
JQuadrature main_engine
Definition JLED.hh:266
double tmin
Definition JLED.hh:263
JQuadrature beta_engine
Definition JLED.hh:267
double tmax
Definition JLED.hh:264
std::vector< JElement3D_t > phi_engine
Definition JLED.hh:268
double wavelength
Definition JLED.hh:261
JTOOLS::JElement3D< double, double > JElement3D_t
Definition JLED.hh:28

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 108 of file JLED.hh.

113 {
114 const double sd = sqrt((1.0 + cd)*(1.0 - cd));
115 const double d = D_m; // photon path [m]
116
117 const double A = getPhotocathodeArea();
118
119 const double px = sin(theta)*cos(phi);
120 //const double py = sin(theta)*sin(phi);
121 const double pz = cos(theta);
122
123 const double ct = sd*px + cd*pz; // cosine angle of incidence on PMT
124
125 const double qe = getQE(wavelength);
126 const double l_abs = getAbsorptionLength(wavelength);
127 const double ls = getScatteringLength(wavelength);
128
129 const double U = getAngularAcceptance(ct);
130 const double V = exp(-d/l_abs) * exp(-d/ls); // absorption & scattering
131 const double W = A/(d*d); // solid angle
132
133 return qe * getLightFromLED(cd, 0.0, t_ns) * U * V * W;
134 }
virtual double getLightFromLED(const double ct, const double phi, const double dt) const =0
Light yield from LED (number of p.e.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.

◆ 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 147 of file JLED.hh.

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

◆ 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 }
virtual double getDispersionPhase(const double lambda) const =0
Dispersion of light for phase velocity.
double getIndexOfRefractionPhase()
Get average index of refraction of water corresponding to phase velocity.
const int n
Definition JPolint.hh:791

◆ 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::JLED_C, and JPHYSICS::JPDF_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::JLED_C, and JPHYSICS::JPDF_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::JLED_C, and JPHYSICS::JPDF_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::JLED_C, and JPHYSICS::JPDF_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::JLED_C, and JPHYSICS::JPDF_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::JLED_C, and JPHYSICS::JPDF_C.

Member Data Documentation

◆ wavelength

double JPHYSICS::JLED::wavelength
protected

Definition at line 261 of file JLED.hh.

◆ tmin

double JPHYSICS::JLED::tmin
protected

Definition at line 263 of file JLED.hh.

◆ tmax

double JPHYSICS::JLED::tmax
protected

Definition at line 264 of file JLED.hh.

◆ main_engine

JQuadrature JPHYSICS::JLED::main_engine
protected

Definition at line 266 of file JLED.hh.

◆ beta_engine

JQuadrature JPHYSICS::JLED::beta_engine
protected

Definition at line 267 of file JLED.hh.

◆ phi_engine

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

Definition at line 268 of file JLED.hh.


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