47{
50
52
56 double E;
57 double D;
58 double cd;
63
64 try {
65
66 JParser<> zap(
"Auxiliary program to draw PDF of Cherenkov light from EM-shower or scattered light from muon.");
67
70 zap[
'e'] =
make_field(epsilon,
"precision for integration") = 1.0e-10;
73 zap[
'E'] =
make_field(E,
"shower energy [GeV]") = 1.0;
75 zap[
'c'] =
make_field(cd,
"cosine emission angle");
76 zap[
'D'] =
make_field(dir,
"(theta, phi) of PMT [rad]");
80
81 zap(argc, argv);
82 }
83 catch(const exception &error) {
84 FATAL(error.what() << endl);
85 }
86
87
89 pdf(NAMESPACE::getPhotocathodeArea(),
90 NAMESPACE::getQE,
91 NAMESPACE::getAngularAcceptance,
94 NAMESPACE::getScatteringProbability,
95 NAMESPACE::getAmbientPressure(),
99 epsilon);
100
101
103
104 for (double dt; cin >> dt; ) {
105
106 for (vector<int>::const_iterator F = function.begin(); F != function.end(); ++F) {
107
108 cout << setw(2) << *F << ' '
110 <<
FIXED(5,1) << D <<
' '
111 <<
FIXED(5,2) << cd <<
' '
114 <<
FIXED(5,1) << dt <<
' '
116 }
117 }
118
119 return 0;
120 }
121
122
124
125
126 const double t0 = 0.0;
127
129
130 if (function.size() == 1 && function[0] == DIRECT_LIGHT_FROM_MUON) {
131
133
135
136 } else {
137
139
141 }
142 }
143
145
147
148 for (int i = 1; i <= h0.GetNbinsX(); ++i) {
149
150 const double dt = h0.GetBinCenter(i) - t0;
151
152 double value = 0.0;
153
154 for (vector<int>::const_iterator F = function.begin(); F != function.end(); ++F) {
155 if (*F == SCATTERED_LIGHT_FROM_MUON_5D)
156 value += pdf.getScatteredLightFromMuon(D, cd, dir.
getTheta(), dir.
getPhi(), dt);
157 else
158 value += pdf.getLightFromEMshower(*F, D, cd, dir.
getTheta(), dir.
getPhi(), dt) * E;
159 }
160
161 h0.SetBinContent(i, value);
162
164 }
165
166 f1.setExceptionHandler(
new JSplineFunction1S_t::JDefaultResult(
JMATH::zero));
168
169 try {
170
172
173 DEBUG(
"int " << quantiles.getIntegral() << endl);
174 DEBUG(
"x " << quantiles.getX() << endl);
175 DEBUG(
"y " << quantiles.getY() << endl);
176 DEBUG(
"FWHM " << quantiles.getFWHM() << endl);
177 }
178 catch(const exception&) {}
179
180 out.Write();
181 out.Close();
182}
double getAbsorptionLength(const double lambda)
double getScatteringLength(const double lambda)
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Data structure for angles in three dimensions.
double getTheta() const
Get theta angle.
double getPhi() const
Get phi angle.
Utility class to parse command line options.
Probability Density Functions of the time response of a PMT with an implementation of the JAbstractPM...
const JPolynome f1(1.0, 2.0, 3.0)
Function.
static const JZero zero
Function object to assign zero value.
double getMinimalWavelength()
Get minimal wavelength for PDF evaluations.
double getMaximalWavelength()
Get maximal wavelength for PDF evaluations.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
Auxiliary data structure for floating point format specification.