#include <algorithm>
#include <cassert>
#include "GetQuantumEfficiency.h"
Go to the source code of this file.
◆ GetQuantumEfficiency()
| double GetQuantumEfficiency |
( |
double | lambda, |
|
|
L2QE const * | first, |
|
|
L2QE const * | last ) |
Definition at line 80 of file GetQuantumEfficiency.cxx.
80 {
81
82 double const lambda_min =
first->lambda;
83 double const lambda_max = (last - 1)->lambda;
84
85 if (lambda < lambda_min || lambda > lambda_max) return 0;
86
87 L2QE
const*
const p(std::lower_bound(first, last, lambda, less_than));
88
89 if (p == first)
return p->qe;
90 else {
91
92 L2QE
const*
const q =
p - 1;
93 return (lambda -
q->lambda)*(
p->qe -
q->qe)/(
p->lambda -
q->lambda) +
q->qe;
94 }
95}
◆ GetQuantumEfficiencyR762()
| double GetQuantumEfficiencyR762 |
( |
double | lambda | ) |
|
Definition at line 97 of file GetQuantumEfficiency.cxx.
double GetQuantumEfficiency(double lambda, L2QE const *first, L2QE const *last)