48 int main(
int argc,
char **argv)
53 typedef JAbstractHistogram<double> JHistogram_t;
71 JParser<> zap(
"Auxiliary program to draw PDF of Cherenkov light from muon.");
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]");
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;
137 histogram = JHistogram_t(t0 - 20.0, t0 + 50.0);
143 histogram = JHistogram_t(t0 - 20.0, t0 + 500.0);
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[])
then usage $script< input file >[option[primary[working directory]]] nWhere option can be E
The elements in a collection are sorted according to their abscissa values and a given distance opera...
#define gmake_property(A)
macros to convert (template) parameter to JPropertiesElement object
Utility class to parse parameter values.
Properties of Antares PMT and deep-sea water.
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.
then warning Cannot perform comparison test for histogram
Auxiliary data structure for floating point format specification.
Utility class to parse parameter values.
const JPolynome f1(1.0, 2.0, 3.0)
Function.
static double MODULE_RADIUS_M
Radius of optical module [m].
Properties of KM3NeT PMT and deep-sea water.
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.
double getPhotocathodeArea()
Get photo-cathode area of PMT.
General purpose messaging.
then JCookie sh JDataQuality D $DETECTOR_ID R
double getAbsorptionLength(const double lambda)
Get absorption length.
Utility class to parse command line options.
double getScatteringLength(const double lambda)
Get scattering length.
double scatteringLengthFactor
Auxiliary data structure for floating point format specification.
#define DEBUG(A)
Message macros.
double getAngularAcceptance(const double x)
Angular acceptence of PMT.