Example program to test generation of transit times using PMT simulator.  
More...
#include <string>
#include <iostream>
#include <iomanip>
#include "TROOT.h"
#include "TFile.h"
#include "TH1D.h"
#include "JDetector/JPMTSimulator.hh"
#include "JDetector/JPMTDefaultSimulator.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
 
Go to the source code of this file.
 | 
| int  | main (int argc, char **argv) | 
|   | 
Example program to test generation of transit times using PMT simulator. 
- Author
 - mdejong 
 
Definition in file JTransitTimeGenerator.cc.
 
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char **  | 
          argv  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 23 of file JTransitTimeGenerator.cc.
   30   JPMTParameters parameters;
 
   35     JProperties properties = parameters.getProperties();
 
   37     JParser<> zap(
"Example program to test generation of transit times using PMT simulator.");
 
   46   catch(
const exception &error) {
 
   47     FATAL(error.what() << endl);
 
   52     cout << 
"PMT parameters:" << endl;
 
   56   const JPMTIdentifier pmt(1,0);
 
   57   const JCalibration   calibration;
 
   59   const JPMTDefaultSimulator simulator(parameters, pmt);
 
   64   JPMTData<JPMTSignal> input;
 
   65   JPMTData<JPMTPulse>  output;
 
   68   TH1D h1(
"tts", NULL,  120, -20.0, +100.0);
 
   70   for (
int i = 0; i != numberOfHits; ++i) {
 
   72     const double t_ns = 0.0;
 
   74     const double W    = 1.0 / (double) numberOfHits;
 
   79     input.push_back(JPMTSignal(t_ns, npe));
 
   81     simulator.processHits(pmt, calibration, input, output);
 
   83     for (JPMTData<JPMTPulse>::const_iterator hit = output.begin(); hit != output.end(); ++hit) {
 
   84       h1.Fill(hit->t_ns, W);
 
Utility class to parse command line options. 
 
Utility class to parse parameter values. 
 
Simple data structure to support I/O of equations (see class JLANG::JEquation). 
 
Empty structure for specification of parser element that is initialised (i.e. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object