36 using namespace KM3NETDAQ;
42 JAbstractHistogram_t
X;
43 JAbstractHistogram_t
Y;
48 JParser<> zap(
"Example program to histogram trigger efficiency.");
52 zap[
'X'] =
make_field(
X,
"Energy binning") = JAbstractHistogram_t(20, 1e-3, 100.0);
53 zap[
'Y'] =
make_field(
Y,
"Zenith-angle binning") = JAbstractHistogram_t(20, -1.0, 1.0);
58 catch(
const exception &error) {
59 FATAL(error.what() << endl);
68 X.getNumberOfBins(),
X.getLowerLimit(),
X.getUpperLimit(),
69 Y.getNumberOfBins(),
Y.getLowerLimit(),
Y.getUpperLimit());
71 X.getNumberOfBins(),
X.getLowerLimit(),
X.getUpperLimit(),
72 Y.getNumberOfBins(),
Y.getLowerLimit(),
Y.getUpperLimit());
74 X.getNumberOfBins(),
X.getLowerLimit(),
X.getUpperLimit(),
75 Y.getNumberOfBins(),
Y.getLowerLimit(),
Y.getUpperLimit());
80 while (inputFile.hasNext()) {
82 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
86 const Evt*
event = ps;
92 if (hit != event->mc_hits.cend() && primary !=
event->mc_trks.cend()) {
93 h1.Fill(primary->E, primary->dir.z, 1.0);
101 STATUS(
"event: " << setw(10) <<
in.getCounter() <<
'\r');
DEBUG(endl);
103 const Evt*
event =
in.next();
109 if (hit != event->mc_hits.cend() && primary !=
event->mc_trks.cend()) {
110 h0.Fill(primary->E, primary->dir.z, 1.0);
116 for (Int_t
i = 1;
i <= h1.GetNbinsX(); ++
i) {
117 for (Int_t
j = 1;
j <= h1.GetNbinsY(); ++
j) {
119 const Double_t z1 = h1.GetBinContent(
i,
j);
120 const Double_t z0 = h0.GetBinContent(
i,
j);
124 const Double_t z3 = z1 / z0;
125 const Double_t w3 = sqrt(z1 * (z0 - z1) / (z0*z0*z0));
127 h2.SetBinContent(
i,
j, z3);
128 h2.SetBinError (
i,
j, w3);
131 ERROR(
"Bin " << h0.GetName() <<
"[" <<
i <<
"," <<
j <<
"] empty." << endl);
Utility class to parse command line options.
Auxiliary class to synchronously read DAQ events and Monte Carlo events (and optionally other events)...
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
bool is_noise(const Hit &hit)
Verify hit origin.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
bool is_initialstate(const Trk &track)
Test whether given track corresponds to an initial state particle.
General purpose class for object reading from a list of file names.
then fatal The output file must have the wildcard in the e g root fi eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
no fit printf nominal n $STRING awk v X
General purpose class for multiple pointers.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
#define DEBUG(A)
Message macros.