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 including shower profile.");
67
70 zap[
'e'] =
make_field(epsilon,
"precision for integration") = 1.0e-10;
73 zap[
'E'] =
make_field(E,
"shower energy [GeV]");
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_EMSHOWER) {
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 value += pdf.getLightFromEMshower(*F, E, D, cd, dir.
getTheta(), dir.
getPhi(), dt);
158 }
159
160 h0.SetBinContent(i, value);
161
162 f1[dt] = value;
163 }
164
165 f1.compile();
166
167 try {
168
170
171 DEBUG(
"int " << quantiles.getIntegral() << endl);
172 DEBUG(
"x " << quantiles.getX() << endl);
173 DEBUG(
"y " << quantiles.getY() << endl);
174 DEBUG(
"FWHM " << quantiles.getFWHM() << endl);
175 }
176 catch(const exception&) {}
177
178 out.Write();
179 out.Close();
180}
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...
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.