45 DIRECT_LIGHT_FROM_MUON,
46 SCATTERED_LIGHT_FROM_MUON,
47 DIRECT_LIGHT_FROM_DELTARAYS,
48 SCATTERED_LIGHT_FROM_DELTARAYS,
49 DIRECT_LIGHT_FROM_EMSHOWERS,
50 SCATTERED_LIGHT_FROM_EMSHOWERS
53 const int N =
sizeof(pdf_t) /
sizeof(pdf_t[0]);
57 double> JFunction1D_t;
61 const JNPE_t::JSupervisor supervisor(
new JNPE_t::JDefaultResult(zero));
63 for (
int i = 0; i != N; ++i) {
68 const string file_name = getFilename(fileDescriptor, type);
70 cout <<
"loading PDF from file " << file_name <<
"... " << flush;
72 pdf.load(file_name.c_str());
76 pdf.setExceptionHandler(supervisor);
78 if (is_bremsstrahlung(type))
80 else if (is_deltarays(type))
88 cout <<
"adding PDFs... " << flush;
90 Y1[1].add(
Y1[0]);
Y1.erase(
Y1.begin());
91 YA[1].add(
YA[0]);
YA.erase(
YA.begin());
92 YB[1].add(
YB[0]);
YB.erase(
YB.begin());
113 const double phi)
const
117 const double y1 =
getNPE(
Y1, R, theta, phi);
118 const double yA =
getNPE(
YA, R, theta, phi);
119 const double yB =
getNPE(
YB, R, theta, phi);
121 if (E >= MASS_MUON * INDEX_OF_REFRACTION_WATER)
122 return y1 + JDeltaRays::getEnergyLossFromMuon(E) * yA + E * yB;
151 for (vector<JNPE_t>::const_iterator i = NPE.begin(); i != NPE.end(); ++i) {
153 if (R <= i->getXmax()) {
157 const double y = get_value((*i)(std::max(R, i->getXmin()), theta, phi));
163 catch(
const exception& error) {
164 cerr << error.what() << endl;
202 SCATTERED_LIGHT_FROM_EMSHOWER,
203 DIRECT_LIGHT_FROM_EMSHOWER
206 const int N =
sizeof(pdf_t) /
sizeof(pdf_t[0]);
210 double> JFunction1D_t;
214 const JNPE_t::JSupervisor supervisor(
new JNPE_t::JDefaultResult(zero));
216 for (
int i = 0; i != N; ++i) {
218 const string file_name = getFilename(fileDescriptor, pdf_t[i]);
220 cout <<
"loading input from file " << file_name <<
"... " << flush;
224 pdf.load(file_name.c_str());
226 pdf.setExceptionHandler(supervisor);
235 cout <<
"OK" << endl;
257 const double phi)
const
270 const double z = geanz.getLength(E, (i + 0.5) / (
double)
numberOfPoints);
272 const double __D = sqrt(D*D - 2.0*(D*cd)*z + z*z);
273 const double __cd = (D * cd - z) / __D;
276 Y += W *
npe (__D, __cd, theta, phi);
278 catch(
const exception& error) {
286 Y =
npe(D, cd, theta, phi);
288 catch(
const exception& error) {
General purpose class for a collection of sorted elements.
The elements in a collection are sorted according to their abscissa values and a given distance opera...
Longitudinal emission profile EM-shower.
Numbering scheme for PDF types.
Definition of zero value for any class.
Custom class for integrated values of the PDF of the arrival time of Cherenkov light.
void add(const JNPETable &input)
Add NPE table.
Multi-dimensional PDF table for arrival time of Cherenkov light.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
std::vector< JNPE_t > YA
light from delta-rays
std::vector< JNPE_t > YB
light from EM showers
JPP::JNPETable< double, double, JNPEMaplist_t > JNPE_t
double calculate(const double E, const double R, const double theta, const double phi) const
Get PDF.
JPP::JMAPLIST< JPP::JPolint1FunctionalMap, JPP::JPolint1FunctionalGridMap, JPP::JPolint1FunctionalGridMap >::maplist JNPEMaplist_t
static double getNPE(const std::vector< JNPE_t > &NPE, const double R, const double theta, const double phi)
Get number of photo-electrons.
JMuonNPE_t(const std::string &fileDescriptor)
Constructor.
std::vector< JNPE_t > Y1
light from muon
Auxiliary data structure for shower PDF.
JNPE_t npe
PDF for shower.
JNPE_t F[2]
PDF for shower.
JShowerNPE_t(const std::string &fileDescriptor, const int numberOfPoints=0)
Constructor.
JPP::JNPETable< double, double, JNPEMaplist_t > JNPE_t
JPP::JMAPLIST< JPP::JPolint1FunctionalMap, JPP::JPolint1FunctionalMap, JPP::JPolint1FunctionalGridMap, JPP::JPolint1FunctionalGridMap >::maplist JNPEMaplist_t
double calculate(const double E, const double D, const double cd, const double theta, const double phi) const
Get PDF.