30{
33
35
38 double epsilon;
42 double E;
43 double D;
44 double ct;
48
49 try {
50
52
56
57 JParser<> zap(
"Auxiliary program to draw PDF of Cherenkov light from bright point.");
58
60 <<
"possible options absorptionLength: " <<
get_keys(absorptionLength) << endl
61 <<
"possible options scatteringLength: " <<
get_keys(scatteringLength) << endl
65 zap[
'e'] =
make_field(epsilon,
"precision for integration") = 1.0e-10;
66 zap[
'E'] =
make_field(E,
"shower energy [GeV]");
72
73 zap(argc, argv);
74 }
75 catch(const exception &error) {
76 FATAL(error.what() << endl);
77 }
78
79
81 pdf(NAMESPACE::getPhotocathodeArea(),
82 NAMESPACE::getQE,
83 NAMESPACE::getAngularAcceptance,
84 JAbsorptionLength::getAbsorptionLength,
85 JScatteringLength::getScatteringLength,
86 JScatteringProbability::getScatteringProbability,
87 NAMESPACE::getAmbientPressure(),
91 epsilon);
92
93
95
96 cout << "enter time (^C to exit) > " << flush;
97
98 for (double dt; cin >> dt; ) {
99
100 for (vector<int>::const_iterator F = function.begin(); F != function.end(); ++F) {
101
102 cout << setw(2) << *F << ' '
104 <<
FIXED(5,1) << D <<
' '
105 <<
FIXED(5,2) << ct <<
' '
106 <<
FIXED(5,1) << dt <<
' '
107 <<
SCIENTIFIC(9,3) << pdf.getLightFromBrightPoint(*F, D, ct, dt) * E << endl;
108 }
109 }
110
111 return 0;
112 }
113
114
116
117
118 const double t0 = 0.0;
119
121
122 if (function.size() == 1 && function[0] == DIRECT_LIGHT_FROM_BRIGHT_POINT) {
123
125
127
128 } else {
129
131
133 }
134 }
135
137
139
140 for (int i = 1; i <= h0.GetNbinsX(); ++i) {
141
142 const double dt = h0.GetBinCenter(i) - t0;
143
144 double value = 0.0;
145
146 for (vector<int>::const_iterator F = function.begin(); F != function.end(); ++F) {
147 value += pdf.getLightFromBrightPoint(*F, D, ct, dt) * E;
148 }
149
150 h0.SetBinContent(i, value);
151
152 f1[dt] = value;
153 }
154
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
#define gmake_property(A)
macros to convert (template) parameter to JPropertiesElement 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...
const array_type< JKey_t > & get_keys(const std::map< JKey_t, JValue_t, JComparator_t, JAllocator_t > &data)
Method to create array of keys of map.
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 to customize absorption length.
Auxiliary data structure to customize scattering length.
Auxiliary data structure to customize scattering probability.
Auxiliary data structure for floating point format specification.