30{
34
39 double stdev;
43
44 try {
45
46 JParser<> zap(
"Program to correct detector file for inconsistencies in configuration of data filter.");
47
48 zap[
'f'] =
make_field(inputFile,
"original raw data file and reprocessed raw data file");
51 zap[
'S'] =
make_field(stdev,
"number of standard deviations for comparison of counts per optical module.") = 10.0;
55
57 }
58 catch(const exception& error) {
60 }
61
62
63 if (inputFile.size() != 2) {
64 FATAL(
"Wrong number of input files " << inputFile.size() <<
" != " << 2 <<
endl);
65 }
66
68
69 try {
71 }
74 }
75
77
79
80 map_type zmap[2];
81
82 for (int i = 0; i != 2; ++i) {
83
85
87
89
91
93 zmap[i][
hit->getModuleID()] += 1;
94 }
95 }
97 }
98
99 size_t ns = 0;
100
101 for (map_type::const_iterator
102 p = zmap[0].begin(),
103 q = zmap[1].begin(); (p != zmap[0].end() &&
104 q != zmap[1].end()); ) {
105
106 if (p->first < q->first) { ++p; }
107 else if (q->first < p->first) { ++q; }
108 else {
109
110 if (max ((double) p->second, (double) q->second) > stdev * sqrt(p->second + q->second) &&
111 fabs((double) p->second - (double) q->second) > stdev * sqrt(p->second + q->second)) {
112
113 ns += 1;
114
116
119 }
120 }
121
122 ++p;
123 ++q;
124 }
125 }
126
128
130
132 }
133
135
136 return 0;
137}
#define DEBUG(A)
Message macros.
#define QAQC(A)
QA/QC output macro.
int qaqc
QA/QC file descriptor.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Router for direct addressing of module data in detector data structure.
Data structure for vector in three dimensions.
Template definition of a multi-dimensional oscillation probability interpolation table.
JTriggerCounter_t next()
Increment trigger counter.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
void store(const std::string &file_name, const JDetector &detector)
Store detector to output file.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
KM3NeT DAQ data structures and auxiliaries.
std::map< int, range_type > map_type
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.