23 int main(
int argc,
char **argv)
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;
60 const JPMTDefaultSimulator simulator(
parameters, pmt);
65 JPMTData<JPMTSignal> input;
66 JPMTData<JPMTPulse> output;
69 TH1D h1(
"tts", NULL, 120, -20.0, +100.0);
71 for (
int i = 0; i != numberOfHits; ++i) {
73 const double t_ns = 0.0;
75 const double W = 1.0 / (double) numberOfHits;
80 input.push_back(JPMTSignal(t_ns, npe));
82 simulator.processHits(pmt, calibration, status, input, output);
84 for (JPMTData<JPMTPulse>::const_iterator hit = output.begin(); hit != output.end(); ++hit) {
85 h1.Fill(hit->t_ns, W);
Utility class to parse command line options.
int main(int argc, char *argv[])
Utility class to parse parameter values.
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
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. does not require input)...
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
General purpose messaging.
Utility class to parse command line options.