23 int main(
int argc,
char **argv)
37 JParser<> zap(
"Example program to check background calculation.");
48 catch(
const exception &error) {
49 FATAL(error.what() << endl);
52 gRandom->SetSeed(seed);
54 NOTICE(
"K40 rates (original) " << rates_Hz << endl);
60 NOTICE(
"K40 rates (corrected) " << corrected_rates_Hz << endl);
62 if (livetime_s > 0.0) {
68 const double W = 1.0 / livetime_s;
72 const int numberOfEvents = (int) (livetime_s * corrected_rates_Hz.
getMultiplesRate(M));
74 for (
int number_of_events = 0; number_of_events != numberOfEvents; ++number_of_events) {
78 for (
size_t i = 0; i != M; ++i) {
79 if (gRandom->Rndm() <= QE) {
88 NOTICE(
"simulated" << endl);
91 NOTICE(setw(2) << M <<
' ' <<
FIXED(8,4) << buffer[M] << endl);
int main(int argc, char **argv)
General purpose messaging.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
I/O formatting auxiliaries.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
Auxiliary class for K40 rates.
double getMultiplesRate(const multiplicity_type M) const
Get multiples rate at given multiplicity.
multiplicity_type getLowerL1Multiplicity() const
Get lower multiplicty.
multiplicity_type getUpperL1Multiplicity() const
Get upper multiplicty.
void correct(const double QE)
Correct rates for global efficiency,.