25 int main(
int argc,
char **argv)
40 JParser<> zap(
"Example program to histogram PMT transit time distribution.");
50 catch(
const exception &error) {
51 FATAL(error.what() << endl);
55 cout <<
"PMT parameters:" << endl;
61 const JPMTAnalogueSignalProcessor cpu(
parameters);
65 TH1D
h1(
"tts", NULL, 1300, -30.0, +100.0);
66 TH1D h2(
"pmt", NULL, 130, -30.0, +100.0);
70 for (
int i = 1; i <= h1.GetNbinsX(); ++i) {
72 const double t1 = h1.GetBinCenter(i);
74 const double z = h1.GetBinWidth (i);
76 h1.SetBinContent(i, y);
81 h1.Scale(1.0 / W,
"nosw2");
83 if (numberOfEvents > 0) {
85 for (
int i = 0; i != numberOfEvents; ++i) {
87 const double t0 = 0.0;
88 const double t1 = cpu.getRandomTime(t0);
93 h2.Scale(1.0 / numberOfEvents);
Utility class to parse command line options.
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).
then for HISTOGRAM in h0 h1
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
getTransitionTimeProbability
Function object of transition time prabability.
General purpose messaging.
Utility class to parse command line options.
PMT analogue signal processor.
int main(int argc, char *argv[])