25{
28
32
33 try {
34
36
37 JParser<> zap(
"Example program to histogram time over threshold as a function of number of photo-electrons.");
38
42
43 zap(argc, argv);
44 }
45 catch(const exception &error) {
46 FATAL(error.what() << endl);
47 }
48
49
51 cout << "PMT parameters:" << endl;
53 }
54
56
58
59 TH1D h0("[model]", NULL, 510, 0.0, 255.0);
60 TH1D h1("[parametrisation]", NULL, 510, 0.0, 255.0);
61
62 for (int i = 1; i <= h0.GetNbinsX(); ++i) {
63
64 try {
65
66 const double x = h0.GetBinCenter(i);
67
68 double npe = cpu.getNPE(x);
69
70 if (npe > cpu.saturation) {
71 npe = cpu.saturation;
72 }
73
74 double y = cpu.getRiseTime(npe);
75
77
78 h0.SetBinContent(i, y);
79 h1.SetBinContent(i, getRiseTime(x));
80 }
82 }
83
84 out.Write();
85 out.Close();
86}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Data structure for PMT parameters.
JProperties getProperties(const JEquationParameters &equation=JPMTParameters::getEquationParameters())
Get properties of this class.
Utility class to parse parameter values.
Simple data structure to support I/O of equations (see class JLANG::JEquation).
Exception for accessing a value in a collection that is outside of its range.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
PMT analogue signal processor.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...