Jpp 21.0.0
the software that should make you happy
Loading...
Searching...
No Matches
JFitK40.cc
Go to the documentation of this file.
1#include <string>
2#include <iostream>
3#include <iomanip>
4#include <cmath>
5#include <set>
6#include <vector>
7#include <algorithm>
8#include <memory>
9
10#include "TROOT.h"
11#include "TFile.h"
12#include "TH1D.h"
13#include "TH2D.h"
14
17
18#include "JTools/JConstants.hh"
23
25#include "JROOT/JRootToolkit.hh"
26
27#include "JTools/JRange.hh"
28
30
31#include "JSupport/JMeta.hh"
33
35#include "JCalibrate/JTDC_t.hh"
36
37#include "JFitK40.hh"
38#include "JTransmittances.hh"
39
40#include "Jeep/JProperties.hh"
41#include "Jeep/JPrint.hh"
42#include "Jeep/JParser.hh"
43#include "Jeep/JMessage.hh"
44#include "Jeep/JContainer.hh"
45
46
47namespace {
48
49 double MINIMAL_RATE_HZ = 1.0e-2; //!< minimal coincidence rate [Hz] (below, disable PMT)
50 double STDEV = 2.0; //!< number of standard deviations
51 size_t MAXIMAL_COUNTS = 10; //!< maximal count negative rate (above, fit background)
52 double QE_MIN = 0.1; //!< minimal QE (below, disable PMT)
53 double T0_NS = 1.0; //!< precision t0 [ns] (at limit, disable PMT)
54 int MESTIMATOR = 2; //!< M-estimator
55}
56
57
58/**
59 * \file
60 *
61 * Auxiliary program to fit PMT parameters from JMergeCalibrateK40.cc output.\n
62 * Note that the contebts of the 2D histograms are converted to standard deviations.
63 *
64 * \author mdejong
65 */
66int main(int argc, char **argv)
67{
68 using namespace std;
69 using namespace JPP;
70 using namespace KM3NETDAQ;
71
73
75
76 string inputFile;
77 string outputFile;
78 string detectorFile;
79 string pmtFile;
80 JTDC_t TDC;
81 bool reverse;
82 bool overwriteDetector;
83 JCounter writeFits;
84 bool fitAngle;
85 bool fitNoise;
86 bool fitModel;
87 double QE;
88 set<char> transmittance;
89 JRange_t X;
90 JRange_t Y;
91 string transmittanceFile;
92 bool TEST = false;
93 int debug;
94
95 try {
96
97 JProperties properties;
98
99 properties.insert(gmake_property(MINIMAL_RATE_HZ));
100 properties.insert(gmake_property(STDEV));
101 properties.insert(gmake_property(MAXIMAL_COUNTS));
102 properties.insert(gmake_property(QE_MIN));
103 properties.insert(gmake_property(T0_NS));
104 properties.insert(gmake_property(K40.R));
105 properties.insert(gmake_property(K40.p1));
106 properties.insert(gmake_property(K40.p2));
107 properties.insert(gmake_property(K40.p3));
108 properties.insert(gmake_property(K40.p4));
109 properties.insert(gmake_property(TEROSTAT_R1));
110 properties.insert(gmake_property(TEROSTAT_DZ));
111 properties.insert(gmake_property(BELL_SHAPE));
112 properties.insert(gmake_property(MESTIMATOR));
113 properties.insert(gmake_property(TEST));
114
115 JParser<> zap("Auxiliary program to fit PMT parameters from JMergeCalibrateK40 output.");
116
117 zap['@'] = make_field(properties) = JPARSER::initialised();
118 zap['f'] = make_field(inputFile, "input file (output from JMergeCalibrateK40).");
119 zap['o'] = make_field(outputFile, "output file.") = "fit.root";
120 zap['a'] = make_field(detectorFile, "detector file.");
121 zap['P'] = make_field(pmtFile, "specify PMT file name that can be given to JTriggerEfficiency.") = "";
122 zap['!'] = make_field(TDC,
123 "Fix time offset(s) of PMT(s) of certain module(s), e.g."
124 "\n-! \"808969848 0 808982077 23\" will fix time offsets of PMT 0 of module 808969848 and of PMT 23 of module 808982077."
125 "\nSame PMT offset can be fixed for all optical modules, e.g."
126 "\n-! \"-1 0 -1 23\" will fix time offsets of PMTs 0 and 23 of all optical modules.") = JPARSER::initialised();
127 zap['r'] = make_field(reverse, "reverse TDC constraints due to option -! <TDC>.");
128 zap['A'] = make_field(overwriteDetector, "overwrite detector file provided through '-a' with fitted time offsets.");
129 zap['w'] = make_field(writeFits, "write fit results to ROOT file; -ww also write fitted TTS to PMT file.");
130 zap['D'] = make_field(fitAngle, "fit angular distribution; fix normalisation.");
131 zap['B'] = make_field(fitNoise, "fit background.");
132 zap['M'] = make_field(fitModel, "fit angular distribution as well as normalisation; fix PMT QEs = 1.0.");
133 zap['Q'] = make_field(QE, "fix PMT QEs") = 0.0;
134 zap['T'] = make_field(transmittance, "fit transmittance of ring A-F") = JPARSER::initialised();
135 zap['X'] = make_field(transmittanceFile, "transmittances I/O") = JPARSER::initialised();
136 zap['x'] = make_field(X, "fit range (PMT pairs).") = JRange_t();
137 zap['y'] = make_field(Y, "fit range (time residual [ns]).") = JRange_t();
138 zap['d'] = make_field(debug, "debug.") = 1;
139
140 zap(argc, argv);
141 }
142 catch(const exception &error) {
143 FATAL(error.what() << endl);
144 }
145
146
147 if ((fitModel ? 1 : 0) +
148 (fitAngle ? 1 : 0) +
149 (fitNoise ? 1 : 0) +
150 (QE != 0.0 ? 1 : 0) > 1) {
151 FATAL("Use either option -M, -D, -B or -Q" << endl);
152 }
153
154 const int option = (fitModel ? FIT_MODEL_t :
156 fitNoise ? FIT_PMTS_AND_BACKGROUND_t :
157 QE != 0.0 ? FIT_PMTS_QE_FIXED_t :
158 FIT_PMTS_t);
159
160 if (reverse) {
161 TDC.reverse();
162 }
163
164 for (JTDC_t::const_iterator i = TDC.begin(); i != TDC.end(); ++i) {
165 DEBUG("PMT " << setw(10) << i->first << ' ' << setw(2) << i->second << " constrain t0." << endl);
166 }
167
168 try {
169 TDC.is_valid(true);
170 }
171 catch(const exception &error) {
172 FATAL(error.what() << endl);
173 }
174
176
177 try {
178 load(detectorFile, detector);
179 }
180 catch(const JException& error) {
181 FATAL(error);
182 }
183
184
185 JPMTParametersMap parameters;
186
187 if (pmtFile != "") {
188 try {
189 parameters.load(pmtFile.c_str());
190 }
191 catch(const exception& error) {}
192 }
193
194
195 transmittances_type transmittances;
196
197 if (transmittanceFile != "") {
198 try {
199 transmittances.load(transmittanceFile.c_str());
200 }
201 catch(const exception& error) {}
202 }
203
204 TFile* in = TFile::Open(inputFile.c_str(), "exist");
205
206 if (in == NULL || !in->IsOpen()) {
207 FATAL("File: " << inputFile << " not opened." << endl);
208 }
209
210
211 TFile out(outputFile.c_str(), "recreate");
212
213 TH1D h0("chi2", NULL, 500, 0.0, 5.0);
214 TH1D hn("hn", NULL, 501, -0.5, 500.0);
215 TH1D hr("rate", NULL, 500, 0.0, 25.0);
216 TH1D h1("p1", NULL, 500, -5.0, +5.0);
217 TH1D h2("p2", NULL, 500, -5.0, +5.0);
218 TH1D h3("p3", NULL, 500, -5.0, +5.0);
219 TH1D h4("p4", NULL, 500, -5.0, +5.0);
220 TH1D hc("cc", NULL, 500, -0.1, +0.1);
221 TH1D hb("bc", NULL, 500, -0.1, +0.1);
222
224
225 for (int i = 0; i != NUMBER_OF_RINGS; ++i) {
226 T.push_back(new TH1D(MAKE_CSTRING("transmittance[" << ring_type::getRing(i) << "]"), NULL, 100, 0.0, 10.0));
227 }
228
230 const JStringRouter string(detector);
231
232 TH2D H2("detector", NULL,
233 string.size() + 0, -0.5, string.size() - 0.5,
234 range.getUpperLimit(), 1 - 0.5, range.getUpperLimit() + 0.5);
235
236 for (Int_t i = 1; i <= H2.GetXaxis()->GetNbins(); ++i) {
237 H2.GetXaxis()->SetBinLabel(i, MAKE_CSTRING(string.at(i-1)));
238 }
239 for (Int_t i = 1; i <= H2.GetYaxis()->GetNbins(); ++i) {
240 H2.GetYaxis()->SetBinLabel(i, MAKE_CSTRING(i));
241 }
242
243 TH2D* HN = (TH2D*) H2.Clone("iterations");
244
245 JFit fit(MESTIMATOR, debug);
246
247 for (JDetector::iterator module = detector.begin(); module != detector.end(); ++module) {
248
249 if (module->getFloor() == 0) {
250 continue;
251 }
252
253 const JTDC_t::range_type range = TDC.equal_range(module->getID());
254
255 NOTICE("Module " << setw(10) << module->getID() << ' ' << getLabel(module->getLocation()) << " !" << distance(range.first, range.second) << endl);
256
257 TH2D* h2d = (TH2D*) in->Get(MAKE_CSTRING(module->getID() << _2R));
258
259 if (h2d == NULL || h2d->GetEntries() == 0) {
260
261 NOTICE("No data for module " << module->getID() << " -> set QEs to 0." << endl);
262
263 for (int pmt = 0; pmt != NUMBER_OF_PMTS; ++pmt) {
264 parameters[JPMTIdentifier(module->getID(), pmt)].QE = 0.0;
265 }
266
267 continue;
268 }
269
270 JModel model(*module, K40, range, option);
271
272 for (const char c : transmittance) {
273 model.transmittance[ring_type(c).getIndex()].set();
274 }
275
276 if (transmittances.count(module->getID())) {
277 for (int i = 0 ; i != NUMBER_OF_RINGS; ++i) {
278 model.transmittance[i].fix(transmittances[module->getID()][i]);
279 }
280 }
281
282 if (QE != 0.0) {
283 for (int pmt = 0; pmt != NUMBER_OF_PMTS; ++pmt) {
284 model.parameters[pmt].QE.fix(QE);
285 }
286 }
287
288 data_type data; // input data
289
290 vector<size_t> count[2] = {
291 vector<size_t>(NUMBER_OF_PMTS, 0), // counter (exclude self)
292 vector<size_t>(NUMBER_OF_PMTS, 1) // counter (include self)
293 };
294
295 for (int ix = 1; ix <= h2d->GetXaxis()->GetNbins(); ++ix) {
296
297 const pair_type pair = model.getPair(ix - 1);
298
299 auto& buffer = data[pair]; // storage
300
301 double V = 0.0; // integrated value
302 double W = 0.0; // integrated error
303
304 for (int iy = 1; iy <= h2d->GetYaxis()->GetNbins(); ++iy) {
305
306 const double x = h2d->GetXaxis()->GetBinCenter(ix);
307 const double y = h2d->GetYaxis()->GetBinCenter(iy);
308
309 if (X(x) && Y(y)) {
310
311 double value = h2d->GetBinContent(ix,iy);
312 double error = h2d->GetBinError (ix,iy);
313
314 buffer.push_back(rate_type(y, value, error));
315
316 double width = h2d->GetYaxis()->GetBinWidth(iy);
317
318 value *= width;
319 error *= width;
320
321 V += value;
322 W += error * error;
323 }
324 }
325
326 W = sqrt(W);
327
328 if (V <= 0.0 - STDEV*W) {
329 count[0][pair.first] += 1;
330 count[0][pair.second] += 1;
331 }
332
333 if (V <= MINIMAL_RATE_HZ + STDEV*W) {
334 count[1][pair.first] += 1;
335 count[1][pair.second] += 1;
336 }
337 }
338
339 for (int pmt = 0; pmt != NUMBER_OF_PMTS; ++pmt) {
340
341 if (count[0][pmt] >= MAXIMAL_COUNTS) { // too many paired rates negative
342
343 WARNING("PMT " << setw(10) << module->getID() << '.' << FILL(2,'0') << pmt << FILL() << " some rates negative -> fit background" << endl);
344
345 if (fit.value.parameters[pmt].status) {
346 model.parameters[pmt].bg.set();
347 }
348 }
349
350 if (count[1][pmt] == NUMBER_OF_PMTS) { // all paired rates too low
351
352 WARNING("PMT " << setw(10) << module->getID() << '.' << FILL(2,'0') << pmt << FILL() << " all rates to low -> disable" << endl);
353
354 model.parameters[pmt].disable();
355 }
356 }
357
358 DEBUG("Start value:" << endl << model << endl);
359
360 try {
361
362 fit.value = model; // start value
363
364 fit.TEST = TEST; // test
365
366 auto result = fit(data);
367
368 if (result.ndf <= 0) {
369
370 ERROR("Fit result " << setw(10) << module->getID() << " NDF " << setw(5) << result.ndf << " -> skip" << endl);
371
372 continue;
373 }
374
375 bool refit = false;
376
377 for (int pmt = 0; pmt != NUMBER_OF_PMTS; ++pmt) {
378
379 if (fit.value.parameters[pmt].status) {
380
381 if (fit.value.parameters[pmt].QE() <= QE_MIN ) {
382
383 WARNING("PMT " << setw(10) << module->getID() << '.' << FILL(2,'0') << pmt << FILL() << ' '
384 << "QE = "
385 << FIXED(5,3) << fit.value.parameters[pmt].QE() << " +/- "
386 << FIXED(5,3) << fit.error.parameters[pmt].QE() << " "
387 << " -> disable" << (!refit ? " and refit" : "") << endl);
388
389 fit.value.parameters[pmt].disable();
390
391 refit = true;
392 }
393 }
394 }
395
396 for (int pmt = 0; pmt != NUMBER_OF_PMTS; ++pmt) {
397
398 if (fit.value.parameters[pmt].status) {
399
400 if (fit.value.parameters[pmt].t0.atLimit(T0_NS)) {
401
402 WARNING("PMT " << setw(10) << module->getID() << '.' << FILL(2,'0') << pmt << FILL() << ' '
403 << "t0 at limit "
404 << FIXED(7,3) << fit.value.parameters[pmt].t0() << " +/- "
405 << FIXED(7,3) << fit.error.parameters[pmt].t0());
406
407 if (refit == false) {
408
409 WARNING(" -> disable and refit" << endl);
410
411 fit.value.parameters[pmt].disable();
412
413 refit = true;
414
415 } else {
416
417 WARNING(" -> reset" << endl);
418
419 fit.value.parameters[pmt].t0.set(0.0);
420 }
421 }
422 }
423 }
424
425 if (refit) {
426
427 fit.value.transmittance.set(JTransmittance::getInstance());
428
429 for (int pmt = 0; pmt != NUMBER_OF_PMTS; ++pmt) {
430 if (fit.value.parameters[pmt].status) {
431 fit.value.parameters[pmt].set(JPMTParameters_t::getInstance());
432 }
433 }
434
435 refit = false;
436 result = fit(data);
437 }
438
439 NOTICE("Fit result " << setw(10) << module->getID() << " chi2 / NDF " << FIXED(10,2) << result.chi2 << " / " << setw(5) << result.ndf << ' ' << setw(5) << fit.numberOfIterations << endl);
440
441 if (fitModel && debug < debug_t) {
442 fit.value.model.print(cout);
443 }
444
445 DEBUG(fit.value);
446
447 // store transmittances
448
449 transmittances[module->getID()] = fit.value.transmittance;
450
451 if (writeFits) {
452
453 h0.Fill(result.chi2 / result.ndf);
454 hn.Fill(fit.numberOfIterations);
455 hr.Fill(fit.value.model.R );
456 h1.Fill(fit.value.model.p1);
457 h2.Fill(fit.value.model.p2);
458 h3.Fill(fit.value.model.p3);
459 h4.Fill(fit.value.model.p4);
460 hc.Fill(fit.value.model.cc);
461 hb.Fill(fit.value.model.bc);
462
463 for (int i = 0; i != NUMBER_OF_RINGS; ++i) {
464 T[i]->Fill(fit.value.transmittance[i]());
465 }
466
467 TH1D h1t(MAKE_CSTRING(module->getID() << ".1t0"), NULL, NUMBER_OF_PMTS, -0.5, NUMBER_OF_PMTS - 0.5);
468 TH1D h1s(MAKE_CSTRING(module->getID() << ".1TTS"), NULL, NUMBER_OF_PMTS, -0.5, NUMBER_OF_PMTS - 0.5);
469 TH1D h1q(MAKE_CSTRING(module->getID() << ".1QE"), NULL, NUMBER_OF_PMTS, -0.5, NUMBER_OF_PMTS - 0.5);
470
471 for (int pmt = 0; pmt != NUMBER_OF_PMTS; ++pmt) {
472 h1t.SetBinContent(pmt + 1, fit.value.parameters[pmt].t0 ());
473 h1t.SetBinError (pmt + 1, fit.error.parameters[pmt].t0 () + numeric_limits<double>::epsilon());
474 h1s.SetBinContent(pmt + 1, fit.value.parameters[pmt].TTS());
475 h1s.SetBinError (pmt + 1, fit.error.parameters[pmt].TTS() + numeric_limits<double>::epsilon());
476 h1q.SetBinContent(pmt + 1, fit.value.parameters[pmt].QE ());
477 h1q.SetBinError (pmt + 1, fit.error.parameters[pmt].QE () + numeric_limits<double>::epsilon());
478 }
479
480 out << h1t << h1s << h1q;
481
482 for (int ix = 1; ix <= h2d->GetXaxis()->GetNbins(); ++ix) {
483
484 const pair_type pair = fit.value.getPair(ix - 1);
485
486 for (int iy = 1; iy <= h2d->GetYaxis()->GetNbins(); ++iy) {
487
488 const double dt_ns = h2d->GetYaxis()->GetBinCenter(iy);
489
490 h2d->SetBinContent(ix, iy, fit.value.getValue(pair, dt_ns));
491 h2d->SetBinError (ix, iy, 0.0);
492 }
493 }
494
495 h2d->SetName(MAKE_CSTRING(module->getID() << _2F));
496 h2d->Write();
497
498 const double x = string.getIndex(module->getString());
499 const double y = module->getFloor();
500
501 H2 .Fill(x, y, result.chi2 / result.ndf);
502 HN->Fill(x, y, fit.numberOfIterations);
503 }
504
505 const double t0 = (fit.value.hasFixedTimeOffset() ? fit.value.getFixedTimeOffset() : 0.0);
506
507 for (int pmt = 0; pmt != NUMBER_OF_PMTS; ++pmt) {
508
509 const ring_type ring = getRing(module->getPMT(pmt).getDZ());
510
511 JPMTParameters& data = parameters[JPMTIdentifier(module->getID(), pmt)];
512
513 // PMT parameters of 'model' should correspond to those used in $JPP_DIR/examples/JCalibrate/JOMGsim.sh (B)
514
516
517 if (R > 0.0)
518 data.QE = fit.value.parameters[pmt].QE() * fit.value.transmittance[ring]() / R;
519 else
520 data.QE = 0.0;
521
522 if (writeFits > 1) {
523 data.TTS_ns = fit.value.parameters[pmt].TTS();
524 }
525
526 module->getPMT(pmt).addT0(fit.value.parameters[pmt].t0() - t0);
527 }
528 }
529 catch(const exception& error) {
530
531 ERROR("Module " << setw(10) << module->getID() << ' ' << error.what() << " -> set QEs to 0." << endl);
532
533 for (int pmt = 0; pmt != NUMBER_OF_PMTS; ++pmt) {
534 parameters[JPMTIdentifier(module->getID(), pmt)].QE = 0.0;
535 }
536 }
537 }
538
539
540 vector<JMeta> meta(1, JMeta(argc, argv));
541
542 {
543 JSingleFileScanner<JMeta> reader(inputFile);
544 JSTDObjectWriter <JMeta> writer(meta);
545
546 writer << reader;
547 }
548
549 for (vector<JMeta>::const_reverse_iterator i = meta.rbegin(); i != meta.rend(); ++i) {
550 parameters.comment.add(*i);
551 detector .comment.add(*i);
552 }
553
554 if (overwriteDetector) {
555
556 NOTICE("Store calibration data on file " << detectorFile << endl);
557
558 store(detectorFile, detector);
559 }
560
561 if (pmtFile != "") {
562 parameters.store(pmtFile.c_str());
563 }
564
565 if (transmittanceFile != "") {
566 transmittances.store(transmittanceFile.c_str());
567 }
568
569 for (vector<JMeta>::const_iterator i = meta.begin(); i != meta.end(); ++i) {
570 putObject(out,*i);
571 }
572
573 for (JRootFileReader<JDAQHeader> in(inputFile.c_str()); in.hasNext(); ) {
574 putObject(out, *in.next());
575 }
576
577 if (writeFits) {
578
579 out << h0 << hn << hr << h1 << h2 << h3 << h4 << hc << hb << H2 << *HN;
580
581 for (int i = 0; i != NUMBER_OF_RINGS; ++i) {
582 out << *T[i];
583 }
584 }
585
586 out.Close();
587
588 return 0;
589}
Container I/O.
string outputFile
KM3NeT DAQ constants, bit handling, etc.
Data structure for detector geometry and calibration.
General purpose messaging.
#define DEBUG(A)
Message macros.
Definition JMessage.hh:62
#define NOTICE(A)
Definition JMessage.hh:64
#define FATAL(A)
Definition JMessage.hh:67
int debug
debug level
Definition JSirene.cc:74
#define WARNING(A)
Definition JMessage.hh:65
ROOT I/O of application specific meta data.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition JParser.hh:2107
I/O formatting auxiliaries.
#define MAKE_CSTRING(A)
Make C-string.
Definition JPrint.hh:57
Utility class to parse parameter values.
#define gmake_property(A)
macros to convert (template) parameter to JPropertiesElement object
Auxiliary class to define a range between two values.
#define TEST(T)
Test data member.
Definition JRootClass.cc:35
Scanning of objects from a single file according a format that follows from the extension of each fil...
Direct access to string in detector data structure.
Constants.
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
Detector data structure.
Definition JDetector.hh:96
Auxiliary class for map of PMT parameters.
Data structure for PMT parameters.
Utility class to parse parameter values.
General exception.
Definition JException.hh:25
Utility class to parse command line options.
Definition JParser.hh:1664
Object reading from a list of files.
Range of values.
Definition JRange.hh:42
T getUpperLimit() const
Get upper limit.
Definition JRange.hh:213
static double TEROSTAT_R1
scaling factor
Definition JFitK40.hh:66
static const char *const _2F
Name extension for 2F rate fitted.
@ FIT_PMTS_QE_FIXED_t
fit parameters of PMTs with QE fixed
Definition JFitK40.hh:57
@ FIT_PMTS_AND_ANGULAR_DEPENDENCE_t
fit parameters of PMTs and angular dependence of K40 rate
Definition JFitK40.hh:55
@ FIT_MODEL_t
fit parameters of K40 rate and TTSs of PMTs
Definition JFitK40.hh:58
@ FIT_PMTS_AND_BACKGROUND_t
fit parameters of PMTs and background
Definition JFitK40.hh:56
@ FIT_PMTS_t
fit parameters of PMTs
Definition JFitK40.hh:54
static const char *const _2R
Name extension for 2D rate measured.
static const int NUMBER_OF_RINGS
number of rings in optical module.
Definition JFitK40.hh:63
static double TEROSTAT_DZ
maximal PMT inclination
Definition JFitK40.hh:65
ring_type getRing(const double dz)
Get ring.
Definition JFitK40.hh:988
static double BELL_SHAPE
Bell shape.
Definition JFitK40.hh:67
std::string getLabel(const JLocation &location)
Get module label for monitoring and other applications.
Definition JLocation.hh:247
floor_range getRangeOfFloors(const JDetector &detector)
Get range of floors.
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.
double getSurvivalProbability(const JPMTParameters &parameters)
Get model dependent probability that a one photo-electron hit survives the simulation of the PMT assu...
@ debug_t
debug
Definition JMessage.hh:29
void model(JModel_t &value)
Auxiliary function to constrain model during fit.
Definition JGandalf.hh:57
static const JX X
Definition JMathlib.hh:1613
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
bool putObject(TDirectory &dir, const TObject &object)
Write object to ROOT directory.
return result
Definition JPolint.hh:862
KM3NeT DAQ data structures and auxiliaries.
Definition DataQueue.cc:39
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Definition JDAQ.hh:26
Auxiliary data structure for sequence of same character.
Definition JManip.hh:330
Auxiliary data structure for floating point format specification.
Definition JManip.hh:448
Type definition of range.
Definition JHead.hh:43
Livetime of noise data.
Definition JHead.hh:1062
Detector file.
Definition JHead.hh:227
Acoustic single fit.
Model for fit to acoustics data.
Fit parameters for two-fold coincidence rate due to K40.
Definition JFitK40.hh:726
static const JK40Parameters & getInstance()
Get default values.
Definition JFitK40.hh:742
static const JPMTParameters_t & getInstance()
Get default values.
Definition JFitK40.hh:495
Auxiliary class for TDC constraints.
Definition JTDC_t.hh:38
range_type equal_range(const int id)
Get range of constraints for given module.
Definition JTDC_t.hh:100
void reverse()
Reverse constraints.
Definition JTDC_t.hh:136
bool is_valid(const bool option=false) const
Check validity of TDC constrants.
Definition JTDC_t.hh:170
static const JTransmittance & getInstance()
Get default values.
Definition JFitK40.hh:1069
Data structure for measured coincidence rates of all pairs of PMTs in optical module.
Definition JFitK40.hh:110
Data structure for measured coincidence rate of pair of PMTs.
Definition JFitK40.hh:73
Auxiliary data structure to define ring.
Definition JFitK40.hh:902
int getIndex() const
Get index.
Definition JFitK40.hh:918
static ring_type getRing(const int index)
Get ring.
Definition JFitK40.hh:941
Auxiliary data structure for I/O of transmittances of optical modules in detector.
Router for mapping of string identifier to index.
JComment & add(const std::string &comment)
Add comment.
Definition JComment.hh:100
void store(const char *file_name) const
Store to output file.
void load(const char *file_name)
Load from input file.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Definition JParser.hh:66
Auxiliary class for ROOT I/O of application specific meta data.
Definition JMeta.hh:72
Data structure for a pair of indices.