47{
50
52
55 double epsilon;
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.");
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 cout << "enter time (^C to exit) > " << flush;
105
106 for (double dt; cin >> dt; ) {
107
108 for (vector<int>::const_iterator F = function.begin(); F != function.end(); ++F) {
109
110 cout << setw(2) << *F << ' '
112 <<
FIXED(5,1) << D <<
' '
113 <<
FIXED(5,2) << cd <<
' '
116 <<
FIXED(5,1) << dt <<
' '
118 }
119 }
120
121 return 0;
122 }
123
124
126
127
128 const double t0 = 0.0;
129
131
132 if (function.size() == 1 && function[0] == DIRECT_LIGHT_FROM_MUON) {
133
135
137
138 } else {
139
141
143 }
144 }
145
147
149
150 for (int i = 1; i <= h0.GetNbinsX(); ++i) {
151
152 const double dt = h0.GetBinCenter(i) - t0;
153
154 double value = 0.0;
155
156 for (vector<int>::const_iterator F = function.begin(); F != function.end(); ++F) {
157 if (*F == SCATTERED_LIGHT_FROM_MUON_5D)
158 value += pdf.getScatteredLightFromMuon(D, cd, dir.
getTheta(), dir.
getPhi(), dt);
159 else
160 value += pdf.getLightFromEMshower(*F, D, cd, dir.
getTheta(), dir.
getPhi(), dt) * E;
161 }
162
163 h0.SetBinContent(i, value);
164
165 f1[dt] = value;
166 }
167
169 f1.compile();
170
171 try {
172
174
175 DEBUG(
"int " << quantiles.getIntegral() << endl);
176 DEBUG(
"x " << quantiles.getX() << endl);
177 DEBUG(
"y " << quantiles.getY() << endl);
178 DEBUG(
"FWHM " << quantiles.getFWHM() << endl);
179 }
180 catch(const exception&) {}
181
182 out.Write();
183 out.Close();
184}
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...
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.