46 int main(
int argc,
char **argv)
51 typedef JAbstractHistogram<double> JHistogram_t;
61 JHistogram_t histogram;
66 JParser<> zap(
"Auxiliary program to draw PDF of Cherenkov light from EM-shower.");
70 zap[
'e'] =
make_field(epsilon,
"precision for integration") = 1.0e-10;
73 zap[
'E'] =
make_field(
E,
"shower energy [GeV]") = 1.0;
75 zap[
'c'] =
make_field(cd,
"cosine emission angle");
76 zap[
'D'] =
make_field(dir,
"(theta, phi) of PMT [rad]");
78 zap[
'H'] =
make_field(histogram,
"histogram binning") = JHistogram_t();
83 catch(
const exception &error) {
84 FATAL(error.what() << endl);
104 for (
double dt; cin >> dt; ) {
108 cout << setw(2) << *
F <<
' '
111 <<
FIXED(5,2) << cd <<
' '
112 <<
FIXED(5,2) << dir.getTheta() <<
' '
113 <<
FIXED(5,2) << dir.getPhi() <<
' '
114 <<
FIXED(5,1) << dt <<
' '
115 <<
SCIENTIFIC(9,3) << pdf.getLightFromEMshower(*
F,
E,
D, cd, dir.getTheta(), dir.getPhi(), dt) *
E << endl;
126 const double t0 = 0.0;
128 if (!histogram.is_valid()) {
132 histogram = JHistogram_t(t0 - 20.0, t0 + 50.0);
134 histogram.setBinWidth(0.1);
138 histogram = JHistogram_t(t0 - 20.0, t0 + 1000.0);
140 histogram.setBinWidth(0.5);
144 TH1D h0(
"h0", NULL, histogram.getNumberOfBins(), histogram.getLowerLimit(), histogram.getUpperLimit());
146 JSplineFunction1S_t f1;
148 for (
int i = 1; i <= h0.GetNbinsX(); ++i) {
150 const double dt = h0.GetBinCenter(i) - t0;
155 value += pdf.getLightFromEMshower(*
F,
D, cd, dir.getTheta(), dir.getPhi(), dt) *
E;
158 h0.SetBinContent(i, value);
163 f1.setExceptionHandler(
new JSplineFunction1S_t::JDefaultResult(
JMATH::zero));
166 JQuantiles quantiles(f1);
168 DEBUG(
"int " << quantiles.getIntegral() << endl);
169 DEBUG(
"x " << quantiles.getX() << endl);
170 DEBUG(
"y " << quantiles.getY() << endl);
171 DEBUG(
"FWHM " << quantiles.getFWHM() << endl);
Utility class to parse command line options.
do echo Generating $dir eval D
const double getPhotocathodeArea()
Photo-cathode area 10 inch PMT.
then check_input_file $DETECTOR $INPUT_FILE for OPTION in A B C D E F
Optical properties of Antares deep-sea site.
double absorptionLengthFactor
Scaling of absorption and scattering length.
double getScatteringProbability(const double x)
Function to describe light scattering in water.
static const JZero zero
Function object to assign zero value.
double getMinimalWavelength()
Get minimal wavelength for PDF evaluations.
Auxiliary data structure for floating point format specification.
Optical properties of KM3NeT deep-sea site.
double getMaximalWavelength()
Get maximal wavelength for PDF evaluations.
I/O formatting auxiliaries.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
double getQE(const double R, const double mu)
Get QE for given ratio of hit probabilities and expectation value of the number of photo-electrons...
double getAmbientPressure()
Get ambient pressure.
General purpose messaging.
double getAbsorptionLength(const double lambda)
Absoption length.
Utility class to parse command line options.
double getScatteringLength(const double lambda)
Scattering length.
double scatteringLengthFactor
Auxiliary data structure for floating point format specification.
then usage $script[input file[working directory[option]]] nWhere option can be E
#define DEBUG(A)
Message macros.
double getAngularAcceptance(const double x)
Angular acceptence of PMT.
int main(int argc, char *argv[])