24 int main(
int argc, 
char **argv)
 
   29   typedef JAbstractHistogram<double> JHistogram_t;
 
   42     JParser<> zap(
"Program to plot PDF of Cherenkov light from EM-shower using interpolation tables.");
 
   46     zap[
'D'] = 
make_field(dir,       
"(theta, phi) of PMT [rad]");
 
   47     zap[
'x'] = 
make_field(
x,         
"histogram x-binning")        = JHistogram_t();
 
   48     zap[
'y'] = 
make_field(y,         
"histogram y-binning")        = JHistogram_t();
 
   55   catch(
const exception &error) {
 
   56     FATAL(error.what() << endl);
 
   65   if (!
x.is_valid()) { 
x = JHistogram_t(150,  0.0, 150.0); }
 
   66   if (!y.is_valid()) { y = JHistogram_t(200, -1.0,  +1.0); }
 
   68   TH2D h0(
"h0", 
"PDF Projection; D [m]; cos #theta_{0}",
 
   69           x.getNumberOfBins(), 
x.getLowerLimit(), 
x.getUpperLimit(),
 
   70           y.getNumberOfBins(), y.getLowerLimit(), y.getUpperLimit());
 
   72   for (
int ix = 1; ix <= h0.GetNbinsX(); ++ix) {
 
   73     for (
int iy = 1; iy <= h0.GetNbinsY(); ++iy) {
 
   75       const double cd = h0.GetYaxis()->GetBinCenter(iy);
 
   76       const double D  = h0.GetXaxis()->GetBinCenter(ix);
 
   78       const double Y  = npe.
calculate(
E, D, cd, dir.getTheta(), dir.getPhi());
 
   80       h0.SetBinContent(ix, iy, Y/
E);
 
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
 
Auxiliary data structure for shower PDF. 
 
Auxiliary data structure for muon PDF. 
 
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
 
I/O formatting auxiliaries. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
General purpose messaging. 
 
Utility class to parse command line options. 
 
do echo Generating $dir eval D
 
double calculate(const double E, const double D, const double cd, const double theta, const double phi) const 
Get PDF.