27int main(
const int argc,
const char *
const argv[])
43 JParser<> zap(
"Auxiliary program to update the PMT status in the detector file based on the fraction of short time-over-threshold values.");
45 zap[
'f'] =
make_field(inputFile,
"input file (output from JCalibrateToT).");
47 zap[
'x'] =
make_field(range,
"integration range for noise.") = JRange_t(0.0, 8.0);
54 catch(
const exception& error) {
77 TFile* in = TFile::Open(inputFile.c_str(),
"exist");
79 if (in ==
NULL || !in->IsOpen()) {
80 FATAL(
"File: " << inputFile <<
" not opened." <<
endl);
92 for (
int ix = 1;
ix <= h2s->GetXaxis()->GetNbins(); ++
ix) {
97 for (
int iy = 1;
iy <= h2s->GetYaxis()->GetNbins(); ++
iy) {
99 const double x = h2s->GetYaxis()->GetBinCenter(
iy);
100 const double y = h2s->GetBinContent(
ix,
iy);
109 const bool disable = noise >
fraction * signal;
111 if (
debug >= debug_t || disable) {
112 cout <<
"PMT " <<
FILL(10,
'0') <<
module->getID() << "." << FILL(2,'0') << (ix - 1) << FILL()
113 << " noise/signal " << FIXED(7,0) << noise << "/" << FIXED(7,0) << signal << (disable ? " *" : "") << endl;
118 module->getPMT(ix - 1).getStatus().set(PMT_DISABLE);
Data structure for detector geometry and calibration.
General purpose messaging.
int main(const int argc, const char *const argv[])
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
#define MAKE_CSTRING(A)
Make C-string.
Auxiliary class to define a range between two values.
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for sequence of same character.