32{
35
37
40 double epsilon;
42 double E;
43 double R;
44 double z;
49
50 try {
51
53
54 JParser<> zap(
"Auxiliary program to draw PDF of Cherenkov light from muon.");
55
59 zap[
'e'] =
make_field(epsilon,
"precision for integration") = 1.0e-10;
60 zap[
'E'] =
make_field(E,
"muon energy at vertex [GeV]") = 1.0;
61 zap[
'R'] =
make_field(R,
"distance of approach [m]");
62 zap[
'z'] =
make_field(z,
"PMT z-position [m]");
63 zap[
'D'] =
make_field(dir,
"(theta, phi) of PMT [rad]");
67
68 zap(argc, argv);
69 }
70 catch(const exception &error) {
71 FATAL(error.what() << endl);
72 }
73
74
76 pdf(NAMESPACE::getPhotocathodeArea(),
77 PDF::getQE,
78 PDF::getAngularAcceptance,
79 PDF::getAbsorptionLength,
80 PDF::getScatteringLength,
81 PDF::getScatteringProbability,
82 NAMESPACE::getAmbientPressure(),
86 epsilon);
87
88 const double z_0 = z - R/getTanThetaC();
89 const double E_0 = gWater.getE(E, z_0);
90
91
93
94 cout << "enter time (^C to exit) > " << flush;
95
96 for (double dt; cin >> dt; ) {
97
98 for (vector<int>::const_iterator F = function.begin(); F != function.end(); ++F) {
99
100 cout << setw(2) << *F << ' '
102 <<
FIXED(5,1) << R <<
' '
103 <<
FIXED(5,1) << z <<
' '
106 <<
FIXED(5,1) << dt <<
' '
108 }
109 }
110
111 return 0;
112 }
113
114
116
117 const double t0 = 0.0;
118
120
121 if (function.size() == 1 && function[0] == DIRECT_LIGHT_FROM_MUON) {
122
124
126
127 } else {
128
130
132 }
133 }
134
136
138
139 if (E_0 >= MASS_MUON* (1.0/SIN_THETA_C_WATER)) {
140
141 if (z_0 >= 0 && z_0 <= gWater(E)) {
142
143 for (int i = 1; i <= h0.GetNbinsX(); ++i) {
144
145 const double dt = h0.GetBinCenter(i) - t0;
146
147 double value = 0.0;
148
149 for (vector<int>::const_iterator F = function.begin(); F != function.end(); ++F) {
150 value += pdf.getLightFromMuon(*F, E_0, R, dir.
getTheta(), dir.
getPhi(), dt);
151 }
152
153 h0.SetBinContent(i, value);
154
155 f1[dt] = value;
156 }
157 }
158 }
159
161 f1.compile();
162
163 try {
164
165 const double T_ns = 5;
166
168
169 const double t1 = quantiles.getX();
170 const double y = f1(t1 + T_ns).v - f1(t1 - T_ns).v;
171
172 DEBUG(
"E " << E << endl);
173 DEBUG(
"E_0 " << E_0 << endl);
174 DEBUG(
"R " << R << endl);
175 DEBUG(
"z " << z << endl);
178 DEBUG(
"int " << quantiles.getIntegral() << endl);
179 DEBUG(
"t1 " << t1 << endl);
180 DEBUG(
"max " << quantiles.getY() << endl);
181 DEBUG(
"FWHM " << quantiles.getFWHM() << endl);
182 DEBUG(
"int[] " << y << endl);
183 }
184 catch(const exception&) {}
185
186 out.Write();
187 out.Close();
188}
#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.