55 int main(
int argc,
char **argv)
69 JParser<> zap(
"Program to create interpolation tables of the PDF of the arrival time of the Cherenkov light from a shower.");
87 catch(
const exception &error) {
88 FATAL(error.what() << endl);
92 typedef double (
JPDF::*fcn)(
const double,
120 typedef JSplineFunction1D_t JFunction1D_t;
121 typedef JMAPLIST<JPolint1FunctionalMap,
122 JPolint1FunctionalMap,
123 JPolint1FunctionalGridMap,
124 JPolint1FunctionalGridMap>::maplist JMapList_t;
125 typedef JPDFTable<JFunction1D_t, JMapList_t> JPDF_t;
127 typedef JPDFTransformer<4, JFunction1D_t::argument_type> JFunction4DTransformer_t;
128 typedef JArray<4, JFunction1D_t::argument_type> JArray_t;
133 NOTICE(
"building multi-dimensional function object <" <<
function <<
">... " << flush);
135 const double ng[] = { pdf_c.getIndexOfRefractionGroup(wmax),
136 pdf_c.getIndexOfRefractionGroup(wmin) };
144 if (zmap.find(
function) == zmap.end()) {
145 FATAL(
"illegal function specifier" << endl);
148 fcn
f = zmap[
function].first;
149 JFunction4DTransformer_t transformer = zmap[
function].second;
181 JQuadrature qeant(-1.0, +1.0, 60,
geanx);
183 for (JQuadrature::const_iterator i = qeant.begin(); i != qeant.end(); ++i)
194 for (
double buffer[] = { 0.0, 0.005, 0.01, 0.015, -1 }, *
x = buffer; *
x >= 0; ++
x) {
199 for (
double x = 0.02;
x < 0.99;
x += 0.01)
274 const double grid = 7.0;
276 const double alpha = 2.0 * sqrt(1.0 - cos(grid *
PI / 180.0));
281 const double D_m = *
d;
285 const double cd = *
c;
287 const unsigned int number_of_theta_points = max(2
u, (
unsigned int) (180.0/(1.4 * grid)));
289 for (
double theta = 0.0; theta <=
PI +
epsilon; theta +=
PI/number_of_theta_points) {
291 const unsigned int number_of_phi_points = max(2
u, (
unsigned int) (
PI *
sin(theta) / alpha));
293 for (
double phi = 0.0; phi <=
PI +
epsilon; phi +=
PI/number_of_phi_points) {
295 JFunction1D_t&
f1 = pdf[D_m][cd][theta][phi];
297 const JArray_t array(D_m, cd, theta, phi);
299 double t_old = transformer.getXn(array, *
X.begin());
304 const double t = transformer.getXn(array, *
x);
305 const double y = (pdf_c.*
f)(D_m, cd, theta, phi, t);
310 WARNING(
"dt < 0 " << *
x <<
' ' << D_m <<
' ' << t <<
' ' << y << endl);
334 pdf.transform(transformer);
347 catch(
const JException& error) {
348 FATAL(error.what() << endl);
Utility class to parse command line options.
int main(int argc, char *argv[])
scattered light from muon
scattered light from EM shower
o $QUALITY_ROOT d $DEBUG!CHECK_EXIT_CODE JPlot1D f
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)...
double getMinimalWavelength()
Get minimal wavelength for PDF evaluations.
Various implementations of functional maps.
static const double C
Physics constants.
const JPolynome f1(1.0, 2.0, 3.0)
Function.
Properties of KM3NeT PMT and deep-sea water.
double getMaximalWavelength()
Get maximal wavelength for PDF evaluations.
#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.
direct light from EM shower
static const double PI
Mathematical constants.
double getPhotocathodeArea()
Get photo-cathode area of PMT.
General purpose messaging.
Empty structure for specification of parser element that is not initialised (i.e. does require input)...
$WORKDIR ev_configure_dqsimulator txt echo process $DQ_SIMULATOR $i $SOURCE_HOST[$index] csh c(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&($DQ_SIMULATOR\-u\$NAME\$\-H\$SERVER\$\-M\$LOGGER\$\-d $DEBUG</dev/null > &/dev/null &))'
Auxiliary classes for numerical integration.
double getAbsorptionLength(const double lambda)
Get absorption length.
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Utility class to parse command line options.
double getScatteringLength(const double lambda)
Get scattering length.
static const JGeanx geanx(0.35,-5.40)
Function object for the number of photons from EM-shower as a function of emission angle...
double scatteringLengthFactor
no fit printf nominal n $STRING awk v X
do echo Generating $dir eval D
double getAngularAcceptance(const double x)
Angular acceptence of PMT.
Auxiliary data structure for muon PDF.