31{
34
36
39 double epsilon;
43 double E;
44 double D;
45 double cd;
50
51 try {
52
54
58
59 JParser<> zap(
"Auxiliary program to draw PDF of Cherenkov light from EM-shower including shower profile.");
60
62 <<
"possible options absorptionLength: " <<
get_keys(absorptionLength) << endl
63 <<
"possible options scatteringLength: " <<
get_keys(scatteringLength) << endl
67 zap[
'e'] =
make_field(epsilon,
"precision for integration") = 1.0e-10;
68 zap[
'E'] =
make_field(E,
"shower energy [GeV]");
70 zap[
'c'] =
make_field(cd,
"cosine emission angle");
71 zap[
'D'] =
make_field(dir,
"(theta, phi) of PMT [rad]");
75
76 zap(argc, argv);
77 }
78 catch(const exception &error) {
79 FATAL(error.what() << endl);
80 }
81
82
84 pdf(NAMESPACE::getPhotocathodeArea(),
85 NAMESPACE::getQE,
86 NAMESPACE::getAngularAcceptance,
87 JAbsorptionLength::getAbsorptionLength,
88 JScatteringLength::getScatteringLength,
89 JScatteringProbability::getScatteringProbability,
90 NAMESPACE::getAmbientPressure(),
94 epsilon);
95
96
98
99 cout << "enter time (^C to exit) > " << flush;
100
101 for (double dt; cin >> dt; ) {
102
103 for (vector<int>::const_iterator F = function.begin(); F != function.end(); ++F) {
104
105 cout << setw(2) << *F << ' '
107 <<
FIXED(5,1) << D <<
' '
108 <<
FIXED(5,2) << cd <<
' '
111 <<
FIXED(5,1) << dt <<
' '
113 }
114 }
115
116 return 0;
117 }
118
119
121
122
123 const double t0 = 0.0;
124
126
127 if (function.size() == 1 && function[0] == DIRECT_LIGHT_FROM_EMSHOWER) {
128
130
132
133 } else {
134
136
138 }
139 }
140
142
144
145 for (int i = 1; i <= h0.GetNbinsX(); ++i) {
146
147 const double dt = h0.GetBinCenter(i) - t0;
148
149 double value = 0.0;
150
151 for (vector<int>::const_iterator F = function.begin(); F != function.end(); ++F) {
152 value += pdf.getLightFromEMshower(*F, E, D, cd, dir.
getTheta(), dir.
getPhi(), dt);
153 }
154
155 h0.SetBinContent(i, value);
156
157 f1[dt] = value;
158 }
159
160 f1.compile();
161
162 try {
163
165
166 DEBUG(
"int " << quantiles.getIntegral() << endl);
167 DEBUG(
"x " << quantiles.getX() << endl);
168 DEBUG(
"y " << quantiles.getY() << endl);
169 DEBUG(
"FWHM " << quantiles.getFWHM() << endl);
170 }
171 catch(const exception&) {}
172
173 out.Write();
174 out.Close();
175}
#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.
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...
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.