31{
34
36
39 double epsilon;
41 double E;
42 double D;
43 double cd;
48
49 try {
50
52
53 JParser<> zap(
"Auxiliary program to draw PDF of Cherenkov light from EM-shower.");
54
58 zap[
'e'] =
make_field(epsilon,
"precision for integration") = 1.0e-10;
59 zap[
'E'] =
make_field(E,
"shower energy [GeV]") = 1.0;
61 zap[
'c'] =
make_field(cd,
"cosine emission angle");
62 zap[
'D'] =
make_field(dir,
"(theta, phi) of PMT [rad]");
66
67 zap(argc, argv);
68 }
69 catch(const exception &error) {
70 FATAL(error.what() << endl);
71 }
72
73
75 pdf(NAMESPACE::getPhotocathodeArea(),
76 PDF::getQE,
77 PDF::getAngularAcceptance,
78 PDF::getAbsorptionLength,
79 PDF::getScatteringLength,
80 PDF::getScatteringProbability,
81 NAMESPACE::getAmbientPressure(),
85 epsilon);
86
87
89
90 cout << "enter time (^C to exit) > " << flush;
91
92 for (double dt; cin >> dt; ) {
93
94 for (vector<int>::const_iterator F = function.begin(); F != function.end(); ++F) {
95
96 cout << setw(2) << *F << ' '
98 <<
FIXED(5,1) << D <<
' '
99 <<
FIXED(5,2) << cd <<
' '
102 <<
FIXED(5,1) << dt <<
' '
104 }
105 }
106
107 return 0;
108 }
109
110
112
113
114 const double t0 = 0.0;
115
117
118 if (function.size() == 1 && function[0] == DIRECT_LIGHT_FROM_MUON) {
119
121
123
124 } else {
125
127
129 }
130 }
131
133
135
136 for (int i = 1; i <= h0.GetNbinsX(); ++i) {
137
138 const double dt = h0.GetBinCenter(i) - t0;
139
140 double value = 0.0;
141
142 for (vector<int>::const_iterator F = function.begin(); F != function.end(); ++F) {
143 if (*F == SCATTERED_LIGHT_FROM_MUON_5D)
144 value += pdf.getScatteredLightFromMuon(D, cd, dir.
getTheta(), dir.
getPhi(), dt);
145 else
146 value += pdf.getLightFromEMshower(*F, D, cd, dir.
getTheta(), dir.
getPhi(), dt) * E;
147 }
148
149 h0.SetBinContent(i, value);
150
151 f1[dt] = value;
152 }
153
155 f1.compile();
156
157 try {
158
160
161 DEBUG(
"int " << quantiles.getIntegral() << endl);
162 DEBUG(
"x " << quantiles.getX() << endl);
163 DEBUG(
"y " << quantiles.getY() << endl);
164 DEBUG(
"FWHM " << quantiles.getFWHM() << endl);
165 }
166 catch(const exception&) {}
167
168 out.Write();
169 out.Close();
170}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Utility class to parse parameter values.
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.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Auxiliary data structure for complete configuration.
JProperties getProperties()
Get properties.
Manipulator for help output.
Auxiliary data structure for floating point format specification.