41   typedef JAbstractHistogram<double> JHistogram_t;
 
   49   JHistogram_t   histogram;
 
   54     JParser<> zap(
"Program to verify generation of arrival times of Cherenkov photons from a muon using tabulated CDF.");
 
   58     zap[
'E'] = 
make_field(
E,         
"muon energy [GeV]")          = 1.0;
 
   59     zap[
'R'] = 
make_field(
R,         
"distance of approach [m]");
 
   60     zap[
'D'] = 
make_field(dir,       
"(theta, phi) of PMT [rad]");
 
   62     zap[
'H'] = 
make_field(histogram, 
"histogram binning")          = JHistogram_t();
 
   67   catch(
const exception& error) {
 
   68     FATAL(error.what() << endl);
 
   72   typedef JHermiteSplineFunction1D_t                              JFunction1D_t;
 
   75   typedef JMAPLIST<JPolint1FunctionalMap,
 
   76                    JPolint1FunctionalGridMap,
 
   77                    JPolint1FunctionalGridMap>::maplist            JMapList_t;
 
   78   typedef JCDFTable<JFunction1D_t, JMapList_t>                    JCDF_t;
 
   80   const int N = inputFile.size();
 
   87     for (
int i = 0; i != 
N; ++i) {
 
   89       NOTICE(
"loading input from file " << inputFile[i] << 
"... " << flush);
 
   93       cdf [i].load(inputFile[i].c_str());
 
   98   catch(
const JException& error) {
 
   99     FATAL(error.what() << endl);
 
  109       cout << 
"> " << flush;
 
  114       for (
int i = 0; i != 
N; ++i) {
 
  118           double npe = 
cdf[i].getNPE (
R, dir.getTheta(), dir.getPhi());
 
  119           double t   = 
cdf[i].getTime(
R, dir.getTheta(), dir.getPhi(), 
x);
 
  127           cout << 
' ' << 
FIXED(6,2) << t << 
' ' << 
FIXED(5,2) << npe;
 
  129         catch(
const exception& error) {
 
  130           ERROR(error.what() << endl);
 
  151   const double t0   =  0.0;                                   
 
  153   if (!histogram.is_valid()) {
 
  160       for ( ; x <  -10.0; x +=  5.0) { X.push_back(t0 + x); }
 
  161       for ( ; x <  +20.0; x +=  1.0) { X.push_back(t0 + x); }
 
  162       for ( ; x <  +50.0; x +=  2.0) { X.push_back(t0 + x); }
 
  165       for ( ; x < +100.0; x +=  5.0) { X.push_back(t0 + x); }
 
  166       for ( ; x < +250.0; x += 10.0) { X.push_back(t0 + x); }
 
  167       for ( ; x < +500.0; x += 25.0) { X.push_back(t0 + x); }
 
  168       for ( ; x < +900.0; x += 50.0) { X.push_back(t0 + x); }
 
  171     h0 = 
new TH1D(
"h0", NULL,  X.size() - 1, X.data());
 
  175     h0 = 
new TH1D(
"h0", NULL, histogram.getNumberOfBins(), histogram.getLowerLimit(), histogram.getUpperLimit());
 
  180   JManager<int, TH1D> H1(
new TH1D(
"h1[%]", NULL, 100000, 0.0, +1.0));
 
  182   for (
int i = 0; i != 
N; ++i) {
 
  184     for (
int j = 1; 
j <= H1->GetNbinsX(); ++
j) {
 
  188         const double x = H1->GetBinCenter(
j);
 
  189         const double t = 
cdf[i].getTime(
R, dir.getTheta(), dir.getPhi(), 
x);
 
  191         H1[i]->SetBinContent(
j, t);
 
  193       catch(
const exception& error) {
 
  194         ERROR(error.what() << endl);
 
  199   if (numberOfEvents > 0) {
 
  205     for (
int counter = 0; counter != numberOfEvents; ++counter) {
 
  207       if (counter%1000== 0) { 
 
  213       for (
int i = 0; i != 
N; ++i) {
 
  217           double npe = 
cdf[i].getNPE(
R, dir.getTheta(), dir.getPhi());
 
  225           for (
int j = gRandom->Poisson(npe); 
j != 0; --
j) {
 
  227             const double x = gRandom->Rndm();
 
  228             const double t = 
cdf[i].getTime(
R, dir.getTheta(), dir.getPhi(), 
x);
 
  233         catch(
const exception& error) {
 
  234           NOTICE(error.what() << endl);
 
  242     const double W = 1.0 / (double) numberOfEvents;
 
  245       timer.print(cout, W);
 
Utility class to parse command line options. 
 
then JShowerPostfit f $INPUT_FILE o $OUTPUT_FILE N
 
Auxiliary data structure for floating point format specification. 
 
bool is_bremsstrahlung(const int pdf)
Test if given PDF type corresponds to Cherenkov light from Bremsstrahlung. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
void convertToPDF(TH1 &h1, const std::string &option="NW", const double factor=1.0)
Convert 1D histogram to PDF. 
 
then for FUNCTION in pdf npe cdf
 
int getPDFType(const std::string &file_name)
Get PDF type. 
 
then JCookie sh JDataQuality D $DETECTOR_ID R
 
bool is_deltarays(const int pdf)
Test if given PDF type corresponds to Cherenkov light from delta-rays. 
 
double getDeltaRaysFromMuon(const double E)
Equivalent EM-shower energy due to delta-rays per unit muon track length. 
 
no fit printf nominal n $STRING awk v X
 
#define DEBUG(A)
Message macros.