48 int main(
int argc,
char **argv)
53 typedef JAbstractHistogram<double> JHistogram_t;
62 JHistogram_t histogram;
71 JParser<> zap(
"Auxiliary program to draw PDF of Cherenkov light from muon.");
76 zap[
'e'] =
make_field(epsilon,
"precision for integration") = 1.0e-10;
79 zap[
'E'] =
make_field(
E,
"muon energy [GeV]") = 1.0;
80 zap[
'R'] =
make_field(
R,
"distance of approach [m]");
81 zap[
'D'] =
make_field(dir,
"(theta, phi) of PMT [rad]");
83 zap[
'H'] =
make_field(histogram,
"histogram binning") = JHistogram_t();
88 catch(
const exception &error) {
89 FATAL(error.what() << endl);
109 for (
double dt; cin >> dt; ) {
113 cout << setw(2) << *
F <<
' '
116 <<
FIXED(5,2) << dir.getTheta() <<
' '
117 <<
FIXED(5,2) << dir.getPhi() <<
' '
118 <<
FIXED(5,1) << dt <<
' '
119 <<
SCIENTIFIC(9,3) << pdf.getLightFromMuon(*
F,
E,
R, dir.getTheta(), dir.getPhi(), dt) *
E << endl;
131 const double t0 = 0.0;
133 if (!histogram.is_valid()) {
137 histogram = JHistogram_t(t0 - 20.0, t0 + 50.0);
139 histogram.setBinWidth(0.1);
143 histogram = JHistogram_t(t0 - 20.0, t0 + 500.0);
145 histogram.setBinWidth(0.5);
149 TH1D h0(
"h0", NULL, histogram.getNumberOfBins(), histogram.getLowerLimit(), histogram.getUpperLimit());
151 JSplineFunction1S_t f1;
153 for (
int i = 1; i <= h0.GetNbinsX(); ++i) {
155 const double dt = h0.GetBinCenter(i) - t0;
160 value += pdf.getLightFromMuon(*
F,
E,
R, dir.getTheta(), dir.getPhi(), dt);
163 h0.SetBinContent(i, value);
168 f1.setExceptionHandler(
new JSplineFunction1S_t::JDefaultResult(
JMATH::zero));
173 JQuantiles quantiles(f1);
175 const double t1 = quantiles.getX();
176 const double y = f1(t1 +
T).v - f1(t1 -
T).v;
180 DEBUG(
"theta " << dir.getTheta() << endl);
181 DEBUG(
"phi " << dir.getPhi() << endl);
182 DEBUG(
"int " << quantiles.getIntegral() << endl);
183 DEBUG(
"t1 " << t1 << endl);
184 DEBUG(
"max " << quantiles.getY() << endl);
185 DEBUG(
"FWHM " << quantiles.getFWHM() << endl);
186 DEBUG(
"int[] " << y << endl);
Utility class to parse command line options.
int main(int argc, char *argv[])
const double getPhotocathodeArea()
Photo-cathode area 10 inch PMT.
The elements in a collection are sorted according to their abscissa values and a given distance opera...
#define gmake_property(A)
macro to convert (template) parameter to JPropertiesElement object
Utility class to parse parameter values.
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.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
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.
Utility class to parse parameter values.
static double MODULE_RADIUS_M
Radius of optical module [m].
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...
do set_variable OUTPUT_DIRECTORY $WORKDIR T
double getAmbientPressure()
Get ambient pressure.
General purpose messaging.
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR set_variable NORTH set_variable EAST set_variable SOUTH set_variable WEST set_variable WORKDIR tmp set_variable R set_variable CT set_variable YMAX set_variable YMIN if do_usage *then usage $script[distance] fi case set_variable R
double getAbsorptionLength(const double lambda)
Absoption length.
Utility class to parse command line options.
double getScatteringLength(const double lambda)
Scattering length.
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
double scatteringLengthFactor
Auxiliary data structure for floating point format specification.
then usage $script[input file[working directory[option]]] nWhere option can be E
double getAngularAcceptance(const double x)
Angular acceptence of PMT.