24 int main(
int argc,
char **argv)
30 JPMTParameters parameters;
38 JProperties properties = parameters.getProperties();
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.getRandomAmplitude(NPE);
86 if (cpu.applyThreshold(npe)) {
88 const Double_t t1 = cpu.getRiseTime(npe) + gRandom->Gaus(0.0, TTS_ns);
90 h3.Fill((Double_t) t1);