9 #include "TProfile2D.h"
25 int main(
int argc,
char **argv)
39 JParser<> zap(
"Example program to histogram PMT simulator features.");
48 catch(
const exception &error) {
49 FATAL(error.what() << endl);
54 cout <<
"PMT parameters:" << endl;
72 TProfile h0(
"tot", NULL, 1000, parameters.
threshold, 1000.0);
73 TProfile h1(
"hit", NULL, 1000, parameters.
threshold, 1000.0);
74 TProfile2D h2(
"2D", NULL, 50, 0.0, 250.0, 100, 0.0, 1000.0);
77 for (
int i = 1; i <= h1.GetNbinsX(); ++i) {
79 const double t_ns = 100.0;
80 const double x = h1.GetBinCenter(i);
81 const int npe = (int)
x;
83 for (
int i = 0; i != numberOfHits; ++i) {
99 h1.Fill(
x, (
double) output.size());
104 for (
int i = 1; i <= h2.GetXaxis()->GetNbins(); ++i) {
105 for (
int j = 1;
j <= h2.GetYaxis()->GetNbins(); ++
j) {
107 const double t_ns = (int) h2.GetXaxis()->GetBinCenter(i);
108 const int npe = (int) h2.GetYaxis()->GetBinCenter(
j);
110 for (
int i = 0; i != numberOfHits; ++i) {
120 if (!output.empty()) {
121 h2.Fill(t_ns, (
double) npe, output.begin()->tot_ns);
General purpose messaging.
PMT analogue signal processor.
int main(int argc, char **argv)
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Data structure for time calibration.
Template data structure for PMT I/O.
std::vector< JElement_t >::const_iterator const_iterator
virtual void processHits(const JPMTIdentifier &id, const JCalibration &calibration, const JStatus &status, const JPMTData< JPMTSignal > &input, JPMTData< JPMTPulse > &output) const override
Process hits.
Data structure for PMT parameters.
double threshold
threshold [npe]
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).
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
PMT analogue signal processor.
Data structure for PMT analogue signal.
Auxiliary class for handling status.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...