11 #include <arich/dbobjects/ARICHSimulationPar.h>
13 #include <framework/logging/Logger.h>
19 double ARICHSimulationPar::getQE(
double e)
const
21 if (e < 0.001)
return 0;
22 if (m_qe.size() == 0) B2ERROR(
"ARICHSimulationPar: QE curve not initialized!");
23 double dlam = 1240 / e - m_lambdaFirst;
25 int i = int(dlam / m_lambdaStep);
27 if (i >
int(m_qe.size()) - 2)
return 0;
30 double qe = m_qe[i] + (m_qe[i + 1] - m_qe[i]) / m_lambdaStep * (dlam - i * m_lambdaStep);
34 void ARICHSimulationPar::setQECurve(
float lambdaFirst,
float lambdaStep,
const std::vector<float>& qe)
36 m_lambdaFirst = lambdaFirst;
37 m_lambdaStep = lambdaStep;
41 void ARICHSimulationPar::print()
const
44 cout <<
"ARICH simulation parameters" << endl;
46 cout <<
" QE curve (peak should be above QE of highest QE HAPD!)" << endl;
48 cout <<
" wl [nm] QE" << endl;
49 for (
auto qe : m_qe) {
50 float lambda = m_lambdaFirst + ipoint * m_lambdaStep;
51 cout <<
" " << lambda <<
" " << qe* m_peakQE << endl;
56 cout <<
" HAPD simulation parameters" << endl;
57 cout <<
" QE scaling for photons internally reflected in HAPD window: " << getQEScaling() << endl;
58 cout <<
" absorbtion probablity for internally reflected photons: " << getWindowAbsorbtion() << endl;
59 cout <<
" channels negative crosstalk factor: " << getChipNegativeCrosstalk() << endl;
60 cout <<
" collection efficiency: " << m_colEff << endl;