30{
33
35
38 double epsilon;
40 double E;
41 double D;
42 double ct;
46
47 try {
48
50
51 JParser<> zap(
"Auxiliary program to draw PDF of Cherenkov light from bright point.");
52
56 zap[
'e'] =
make_field(epsilon,
"precision for integration") = 1.0e-10;
57 zap[
'E'] =
make_field(E,
"shower energy [GeV]");
63
64 zap(argc, argv);
65 }
66 catch(const exception &error) {
67 FATAL(error.what() << endl);
68 }
69
70
72 pdf(NAMESPACE::getPhotocathodeArea(),
73 PDF::getQE,
74 PDF::getAngularAcceptance,
75 PDF::getAbsorptionLength,
76 PDF::getScatteringLength,
77 PDF::getScatteringProbability,
78 NAMESPACE::getAmbientPressure(),
82 epsilon);
83
84
86
87 cout << "enter time (^C to exit) > " << flush;
88
89 for (double dt; cin >> dt; ) {
90
91 for (vector<int>::const_iterator F = function.begin(); F != function.end(); ++F) {
92
93 cout << setw(2) << *F << ' '
95 <<
FIXED(5,1) << D <<
' '
96 <<
FIXED(5,2) << ct <<
' '
97 <<
FIXED(5,1) << dt <<
' '
98 <<
SCIENTIFIC(9,3) << pdf.getLightFromBrightPoint(*F, D, ct, dt) * E << endl;
99 }
100 }
101
102 return 0;
103 }
104
105
107
108
109 const double t0 = 0.0;
110
112
113 if (function.size() == 1 && function[0] == DIRECT_LIGHT_FROM_BRIGHT_POINT) {
114
116
118
119 } else {
120
122
124 }
125 }
126
128
130
131 for (int i = 1; i <= h0.GetNbinsX(); ++i) {
132
133 const double dt = h0.GetBinCenter(i) - t0;
134
135 double value = 0.0;
136
137 for (vector<int>::const_iterator F = function.begin(); F != function.end(); ++F) {
138 value += pdf.getLightFromBrightPoint(*F, D, ct, dt) * E;
139 }
140
141 h0.SetBinContent(i, value);
142
143 f1[dt] = value;
144 }
145
146 f1.compile();
147
148 try {
149
151
152 DEBUG(
"int " << quantiles.getIntegral() << endl);
153 DEBUG(
"x " << quantiles.getX() << endl);
154 DEBUG(
"y " << quantiles.getY() << endl);
155 DEBUG(
"FWHM " << quantiles.getFWHM() << endl);
156 }
157 catch(const exception&) {}
158
159 out.Write();
160 out.Close();
161}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Utility class to parse parameter values.
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.
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.