9 #include <arich/dbobjects/ARICHSimulationPar.h>
11 #include <framework/logging/Logger.h>
17 double ARICHSimulationPar::getQE(
double e)
const
19 if (e < 0.001)
return 0;
20 if (m_qe.size() == 0) B2ERROR(
"ARICHSimulationPar: QE curve not initialized!");
21 double dlam = 1240 / e - m_lambdaFirst;
23 int i = int(dlam / m_lambdaStep);
25 if (i >
int(m_qe.size()) - 2)
return 0;
28 double qe = m_qe[i] + (m_qe[i + 1] - m_qe[i]) / m_lambdaStep * (dlam - i * m_lambdaStep);
32 void ARICHSimulationPar::setQECurve(
float lambdaFirst,
float lambdaStep,
const std::vector<float>& qe)
34 m_lambdaFirst = lambdaFirst;
35 m_lambdaStep = lambdaStep;
39 void ARICHSimulationPar::print()
const
42 cout <<
"ARICH simulation parameters" << endl;
44 cout <<
" QE curve (peak should be above QE of highest QE HAPD!)" << endl;
46 cout <<
" wl [nm] QE" << endl;
47 for (
auto qe : m_qe) {
48 float lambda = m_lambdaFirst + ipoint * m_lambdaStep;
49 cout <<
" " << lambda <<
" " << qe* m_peakQE << endl;
54 cout <<
" HAPD simulation parameters" << endl;
55 cout <<
" QE scaling for photons internally reflected in HAPD window: " << getQEScaling() << endl;
56 cout <<
" absorbtion probablity for internally reflected photons: " << getWindowAbsorbtion() << endl;
57 cout <<
" channels negative crosstalk factor: " << getChipNegativeCrosstalk() << endl;
58 cout <<
" collection efficiency: " << m_colEff << endl;
Abstract base class for different kinds of events.