25 int main(
int argc,
char **argv)
38 JParser<> zap(
"Example program to histogram time over threshold as a function of number of photo-electrons.");
46 catch(
const exception &error) {
47 FATAL(error.what() << endl);
52 cout <<
"PMT parameters:" << endl;
60 TH1D h0(
"[model]", NULL, 510, 0.0, 255.0);
61 TH1D
h1(
"[parametrisation]", NULL, 510, 0.0, 255.0);
63 for (
int i = 1; i <= h0.GetNbinsX(); ++i) {
67 const double x = h0.GetBinCenter(i);
68 const double npe = cpu.getNPE(x);
69 const double y = cpu.getRiseTime(npe);
71 h0.SetBinContent(i, y);
74 catch(
const JValueOutOfRange& error) {}
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).
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
static const JGetRiseTime getRiseTime
Function object for rise time evaluation.
General purpose messaging.
Utility class to parse command line options.
PMT analogue signal processor.