#include #include #include #include "km3net-dataformat/online/JDAQ.hh" #include "JPhysics/KM3NeT.hh" #include "JFit/JFitToolkit.hh" #include "JReconstruction/JStart.hh" #include "Jeep/JPrint.hh" #include "Jeep/JParser.hh" #include "Jeep/JMessage.hh" /** * \file * * Example program to determine multiplicity probabilities from theory. * \author mdejong */ int main(int argc, char **argv) { using namespace std; using namespace JPP; using namespace KM3NETDAQ; JK40Rates rates_Hz; double T_ns; int debug; try { JParser<> zap("Example program to determine multiplicity probabilities from theory."); zap['B'] = make_field(rates_Hz) = KM3NET::getK40Rates(); zap['T'] = make_field(T_ns); zap['d'] = make_field(debug) = 1; zap(argc, argv); } catch(const exception& error) { FATAL(error.what() << endl); } const size_t N = NUMBER_OF_PMTS; for (size_t M = 0; M != N; ++M) { cout << setw(2) << M << ' ' << SCIENTIFIC(12,3) << getProbability(N, M, rates_Hz, T_ns) << endl; } double P = 0.0; for (size_t M = 0; M != N; ++M) { P += getProbability(N, M, rates_Hz, T_ns); } cout << setw(2) << ' ' << ' ' << SCIENTIFIC(12,3) << P << endl; }