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);
56 JK40Rates corrected_rates_Hz = rates_Hz;
58 corrected_rates_Hz.correct(QE);
60 NOTICE(
"K40 rates (corrected) " << corrected_rates_Hz << endl);
66 buffer.resize(corrected_rates_Hz.getUpperL1Multiplicity() + 1);
70 for (
size_t M = corrected_rates_Hz.getLowerL1Multiplicity();
M <= corrected_rates_Hz.getUpperL1Multiplicity(); ++
M) {
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);
90 for (
size_t M = corrected_rates_Hz.getLowerL1Multiplicity();
M <= corrected_rates_Hz.getUpperL1Multiplicity(); ++
M) {
91 NOTICE(setw(2) <<
M <<
' ' <<
FIXED(8,4) << buffer[
M] << endl);
96 for (
size_t M = rates_Hz.getLowerL1Multiplicity();
M <= rates_Hz.getUpperL1Multiplicity(); ++
M) {
97 if (fabs(buffer[
M] - rates_Hz.getMultiplesRate(
M)) > precision * rates_Hz.getMultiplesRate(
M)) {
98 FATAL(
"R[" << setw(2) <<
M <<
"] [Hz] " <<
FIXED(8,4) << buffer[
M] <<
" != " << rates_Hz.getMultiplesRate(
M) << endl);
Utility class to parse command line options.
int main(int argc, char *argv[])
Auxiliary data structure for floating point format specification.
then JCookie sh JDataQuality D $DETECTOR_ID R $RUNS[*] o $QUALITY_TXT d $DEBUG!fi fi JDataQuality f $QUALITY_TXT Q livetime_s
I/O formatting auxiliaries.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
General purpose messaging.
Utility class to parse command line options.