40 JParser<> zap(
"Example program to histogram PMT transit time distribution.");
51 catch(
const exception &error) {
52 FATAL(error.what() << endl);
56 cout <<
"PMT parameters:" << endl;
60 const JPMTAnalogueSignalProcessor cpu(
parameters);
64 TH1D
h1(
"tts", NULL, 100, -20.0, +20.0);
65 TH1D h2(
"tt2", NULL, 100, -20.0, +20.0);
66 TH1D h3(
"pmt", NULL, 100, -20.0, +20.0);
68 for (
int i = 1; i <=
h1.GetNbinsX(); ++i) {
70 const double t1 =
h1.GetBinCenter(i);
75 for (
int i = 1; i <= h2.GetNbinsX(); ++i) {
77 const double t1 = h2.GetBinCenter(i);
82 for (
int i = 0; i != numberOfEvents; ++i) {
84 const double npe = cpu.getRandomCharge(NPE);
88 if (cpu.applyThreshold(npe) == cpu.ABOVE_THRESHOLD) {
90 const Double_t t1 = cpu.getRiseTime(npe) + gRandom->Gaus(0.0, TTS_ns);
92 h3.Fill((Double_t) t1);
95 }
catch (
const JValueOutOfRange& exception) {
97 DEBUG(exception.what());
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)...
static const JTransitionTimeProbability getTransitionTimeProbability
Function object of transition time prabability.
static const JTransitionTimeProbability2D getTransitionTimeProbability2D
Function object of twofold transition time prabability.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
#define DEBUG(A)
Message macros.