148{
150
155
156 try {
157
158 JParser<> zap(
"Auxiliary program to draw npe as a function of EM-energy.");
159
164
165 zap(argc, argv);
166 }
167 catch(const exception &error) {
168 FATAL(error.what() << endl);
169 }
170
171
173
175 pdf(NAMESPACE::getPhotocathodeArea(),
176 NAMESPACE::getQE,
177 NAMESPACE::getAngularAcceptance,
178 NAMESPACE::getAbsorptionLength,
179 NAMESPACE::getScatteringLength,
180 NAMESPACE::getScatteringProbability,
181 NAMESPACE::getAmbientPressure(),
185 epsilon);
186
187
190
191 const double precision = 1.0e-10;
192
193 while (fabs(xmax - xmin) > precision) {
194
196 const double E =
pow(10.0, x);
197
198 const double y = getEMShowerCorrection(E);
199
200 if (y < 0.5)
202 else
204 }
205
206 const double EMIN =
pow(10.0, 0.5*(xmax + xmin));
207
208 NOTICE(
"Threshold kinetic energy [GeV] " << sqrt((EMIN + MASS_ELECTRON) * (EMIN - MASS_ELECTRON)) << endl);
209
210
212
213 TH1D h0("h0", NULL, 10000, -4.0, +4.0);
214 TH1D h1("h1", NULL, 10000, -4.0, +4.0);
215
216 for (int i = 1; i <= h0.GetNbinsX(); ++i) {
217
218 const Double_t
x = h0.GetBinCenter(i);
219 const Double_t E =
pow(10.0, x);
220
221 h0.SetBinContent(i, E *
geanc() * pdf.getNumberOfPhotons());
222 h1.SetBinContent(i, getEMShowerCorrection(E));
223 }
224
225 out.Write();
226 out.Close();
227}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Utility class to parse command line options.
Probability Density Functions of the time response of a PMT with an implementation of the JAbstractPM...
T pow(const T &x, const double y)
Power .
double getMinimalWavelength()
Get minimal wavelength for PDF evaluations.
double geanc()
Equivalent muon track length per unit shower energy.
double getMaximalWavelength()
Get maximal wavelength for PDF evaluations.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).