Jpp 20.0.0-72-g597b30bc9
the software that should make you happy
Loading...
Searching...
No Matches
JTriggerEfficiency.cc
Go to the documentation of this file.
1
2#include <string>
3#include <iostream>
4#include <iomanip>
5#include <vector>
6#include <set>
7
8#include "TH1D.h"
9#include "TRandom3.h"
10
16
18#include "JDAQ/JDAQEventIO.hh"
20#include "JDAQ/JDAQToolkit.hh"
23
24#include "JAAnet/JHead.hh"
27
28#include "JPhysics/JK40Rates.hh"
29
40
41#include "JTrigger/JHit.hh"
46#include "JTrigger/JHitL0.hh"
47#include "JTrigger/JHitL1.hh"
48#include "JTrigger/JBuildL1.hh"
49#include "JTrigger/JBuildL2.hh"
65
72#include "JSupport/JSupport.hh"
73#include "JSupport/JMeta.hh"
74
75#include "JROOT/JRandom.hh"
76
77#include "Jeep/JPrint.hh"
78#include "Jeep/JParser.hh"
79#include "Jeep/JMessage.hh"
80
81namespace {
82
84
85
86 /**
87 * Get time offset of detector.
88 *
89 * \param detector detector
90 * \return time offset [ns]
91 */
92 inline double getT0(const JDetector& detector)
93 {
94 using namespace std;
95 using namespace JPP;
96
97 double T0_ns = numeric_limits<double>::max();
98
99 for (const JModule& module : detector) {
100 for (const JPMT& pmt : module) {
101 if (!pmt.has(PMT_DISABLE)) {
102 if (pmt.getT0() < T0_ns) {
103 T0_ns = pmt.getT0();
104 }
105 }
106 }
107 }
108
109 return T0_ns;
110 }
111}
112
113/**
114 * \file
115 * Auxiliary program to trigger Monte Carlo events.
116 *
117 * The options
118 * - <tt>-a</tt> refers to the detector configuration that is used to convert Monte Carlo true information to raw data; and
119 * - <tt>-b</tt> refers to the detector configuration that is used to convert raw data to calibrated data.
120 *
121 * The event counter of the triggered events, as returned by KM3NETDAQ::JDAQEvent::getCounter(),
122 * is set to the corresponding index of the Monte Carlo event in the output.\n
123 * This allows for correlating the DAQ event to the Monte Carlo event.\n
124 * The time of the DAQ hits can be correlated to the time of the Monte Carlo hits using the frame index
125 * and the time of the Monte Carlo event (Evt::mc_t), respectively (see also time_converter).\n
126 * The universal time of the DAQ event is set to the universal time of the Monte Carlo event
127 * with a correction for the time of the event (read hits) within the time slice.\n
128 * In run-by-run mode, the trigger parameters as well as the singles rates and status of the PMTs
129 * are read from the given raw data file.\n
130 * The two-fold (and higher) coincidence rates should still be provided on the command line.
131 *
132 * \author mdejong
133 */
134int main(int argc, char **argv)
135{
136 using namespace std;
137 using namespace JPP;
138 using namespace KM3NETDAQ;
139
141
144 JLimit_t& numberOfEvents = inputFile.getLimit();
145 string detectorFileA;
146 string detectorFileB;
147 int run;
148 JTriggerParameters parameters;
149 bool triggeredEventsOnly;
150 JPMTParametersMap pmtParameters;
151 JK40Rates rates_Hz;
152 JMixedK40Rates mixed_Hz;
153 string runbyrun;
154 double sigma_ns;
155 JRandom seed;
156 int debug;
157
158 try {
159
160 JParser<> zap("Auxiliary program to trigger Monte Carlo events.");
161
162 zap['f'] = make_field(inputFile, "input file (output of detector simulation)");
163 zap['o'] = make_field(outputFile, "output file") = "trigger_efficieny.root";
164 zap['n'] = make_field(numberOfEvents) = JLimit::max();
165 zap['a'] = make_field(detectorFileA, "detector used for conversion from Monte Carlo truth to raw data.");
166 zap['b'] = make_field(detectorFileB, "detector used for conversion of raw data to calibrated data.") = "";
167 zap['R'] = make_field(run, "run number") = -1;
168 zap['r'] = make_field(runbyrun, "DAQ file for run-by-run mode") = JPARSER::initialised();
169 zap['@'] = make_field(parameters, "Trigger parameters (or corresponding file name)") = JPARSER::initialised();
170 zap['O'] = make_field(triggeredEventsOnly, "optionally write only triggered events.");
171 zap['P'] = make_field(pmtParameters, "PMT simulation data (or corresponding file name)") = JPARSER::initialised();
172 zap['B'] = make_field(rates_Hz, "background rates [Hz]") = JPARSER::initialised();
173 zap['X'] = make_field(mixed_Hz, "mixed-L1/L0 background rates [Hz]") = JPARSER::initialised();
174 zap['s'] = make_field(sigma_ns, "intrinsic time smearing of K40 coincidences [ns]") = JK40DefaultSimulatorInterface::getSigma();
175 zap['S'] = make_field(seed, "seed") = 0;
176 zap['d'] = make_field(debug, "debug") = 0;
177
178 zap(argc, argv);
179 }
180 catch(const exception &error) {
181 FATAL(error.what() << endl);
182 }
183
184 seed.set(gRandom);
185
187
189
190 if (detectorFileB == "") {
191 detectorFileB = detectorFileA;
192 }
193
194
195 JDetector detectorA;
196 JDetector detectorB;
197
198 try {
199 load(detectorFileA, detectorA);
200 load(detectorFileB, detectorB);
201 }
202 catch(const JException& error) {
203 FATAL(error);
204 }
205
206 const double TA_ns = getT0(detectorA);
207 const double TB_ns = getT0(detectorB);
208
210
211 if (!pmtParameters.is_valid()) {
212 FATAL("Invalid PMT parameters " << pmtParameters << endl);
213 }
214
215 if (pmtParameters.getQE() != 1.0) {
216
217 WARNING("Correct background rates with global efficiency " << pmtParameters.getQE() << endl);
218
219 rates_Hz.correct(pmtParameters.getQE());
220 }
221
222 Head header;
223
224 try {
225 header = getHeader(inputFile);
226 }
227 catch(const JException& error) {
228 FATAL(error);
229 }
230
231 const JModuleRouter moduleRouter(detectorB);
232 JDetectorSimulator simbad (detectorA);
233 JSummaryRouter summaryRouter;
234
236
237 set<int> fs; // frame indices of summary data already written
238
239 JDAQUTCExtended UTC = JDAQUTCExtended::getInstance(); // start of run
240
241 if (runbyrun != "") {
242
243 NOTICE("Using run-by-run: " << runbyrun << endl);
244
245 scanner.configure(runbyrun);
246
247 if (!scanner.empty()) {
248 UTC = scanner.begin()->getTimesliceStart();
249 } else {
250 FATAL("Run-by-run simulation misses summary data." << endl);
251 }
252
253 try {
254 simbad.reset(new JK40RunByRunSimulator(summaryRouter, rates_Hz, mixed_Hz));
255 simbad.reset(new JPMTRunByRunSimulator(summaryRouter, pmtParameters, detectorA));
256 simbad.reset(new JCLBRunByRunSimulator(summaryRouter));
257 }
258 catch(const JException& error) {
259 FATAL(error.what() << endl);
260 }
261
262 try {
263
264 parameters = getTriggerParameters(runbyrun);
265
266 NOTICE("Set trigger parameters from run-by-run input." << endl);
267 }
268 catch(const JException& error) {
269 WARNING("No trigger parameters from run-by-run input;\nrun with default/user input." << endl);
270 }
271
272 // set live time
273
274 JHead buffer(header);
275
277 buffer.push(&JHead::DAQ);
278
279 copy(buffer, header);
280
281 } else {
282
283 NOTICE("Using fixed rates [Hz]: " << rates_Hz << endl);
284
285 try {
286 simbad.reset(new JK40DefaultSimulator(rates_Hz, mixed_Hz));
287 simbad.reset(new JPMTDefaultSimulator(pmtParameters, detectorA));
288 simbad.reset(new JCLBDefaultSimulator());
289 }
290 catch(const JException& error) {
291 FATAL(error.what() << endl);
292 }
293 }
294
295 // detector
296
297 if (parameters.disableHighRateVeto) {
298
299 NOTICE("Disabling high-rate veto of all PMTs." << endl);
300
302 }
303
304 parameters.set(getMaximalDistance(detectorB));
305
306 DEBUG("Trigger:" << endl << parameters << endl);
307 DEBUG("PMT parameters:" << endl << pmtParameters << endl);
308
309 const double Tmax = max(getMaximalTime(detectorA),
310 getMaximalTime(detectorB));
311
312 const JTimeRange period(-(Tmax + parameters.TMaxLocal_ns),
313 +(Tmax + parameters.TMaxLocal_ns));
314
315 const JTimeRange frame_time(0.0, getFrameTime());
316
317 typedef double hit_type;
318
319 typedef JSuperFrame1D<hit_type> JSuperFrame1D_t;
320 typedef JSuperFrame2D<hit_type> JSuperFrame2D_t;
321 typedef JTimeslice <hit_type> JTimeslice_t;
322 typedef JBuildL1 <hit_type> JBuildL1_t;
323 typedef JBuildL2 <hit_type> JBuildL2_t;
324
325 const JBuildL1_t buildL1(parameters);
326 const JBuildL2_t buildL2(parameters.L2);
327 const JBuildL2_t buildSN(parameters.SN);
328
329 JTimesliceRouter timesliceRouter(parameters.numberOfBins);
330
331 const JTrigger3DMuon trigger3DMuon (parameters);
332 const JTrigger3DShower trigger3DShower(parameters);
333 const JTriggerMXShower triggerMXShower(parameters, detectorB);
334
335
336 TH1D h1("Trigger bits", NULL, NUMBER_OF_TRIGGER_BITS, -0.5, NUMBER_OF_TRIGGER_BITS - 0.5);
337
338
339 outputFile.open();
340
341 if (!outputFile.is_open()) {
342 FATAL("Error opening file " << outputFile << endl);
343 }
344
345 outputFile.put(*gRandom);
346 outputFile.put(JMeta(argc, argv));
347 outputFile.put(header);
348 outputFile.put(parameters);
349
350 JHead head;
351 int trigger_counter = 0;
352
353 for (string file_name; inputFile.hasNext(); ) {
354
355 STATUS("event: " << setw(10) << inputFile.getCounter() << '\r'); DEBUG(endl);
356
357 Evt* event = inputFile.next();
358
359 DEBUG(*event << endl);
360
361 if (file_name != inputFile.getFilename()) {
362
363 file_name = inputFile.getFilename();
364 head = getHeader(file_name);
365 }
366
367 event->mc_run_id = head.start_run.run_id;
368
369 if (run == -1) {
370 run = event->mc_run_id;
371 }
372
373 bool trigger = false;
374 int frame_index = inputFile.getCounter() + 1; // event / slice
375 double t1 = gRandom->Rndm() * getFrameTime(); // time of event within time slice
376
377 JDAQUTCExtended utc(UTC.getTimeNanoSecond() + getTimeOfFrame(frame_index));
378
379 if (runbyrun != "") {
380
381 if (event->mc_event_time == TTimeStamp(0)) {
382 FATAL("Monte Carlo event time undefined." << endl);
383 }
384
385 utc = getDAQUTCExtended(event->mc_event_time);
386 t1 = getTimeDifference(summaryRouter.getTimesliceStart(), utc) * 1.0e9;
387
388 if (!frame_time(t1)) {
389
390 const Long64_t index = scanner.find(utc);
391 JDAQSummaryslice* p = scanner.getEntry(index);
392
393 if (getTimeDifference(p->getTimesliceStart(), utc) < 0.0 && index != 0) {
394 p = scanner.getEntry(index - 1);
395 }
396
397 summaryRouter.update(p);
398 summaryRouter.correct(dynamic_cast<const JPMTDefaultSimulatorInterface&>(simbad.getPMTSimulator()));
399 }
400
401 t1 = getTimeDifference(summaryRouter.getTimesliceStart(), utc) * 1.0e9;
402
403 run = summaryRouter.getRunNumber();
404 frame_index = summaryRouter.getFrameIndex();
405 utc = summaryRouter.getTimesliceStart();
406
407 DEBUG("event: "
408 << FIXED(15,3) << event->mc_event_time.AsDouble() << " [s] "
409 << utc << ' '
410 << FIXED(12,0) << t1 << " [ns] "
411 << frame_time(t1) << endl);
412 }
413
414 if (!event->mc_hits.empty() && frame_time(t1)) {
415
416 JTimeRange timeRange = getTimeRange(*event, period);
417
418 double t0 = 0.5 * (timeRange.getLowerLimit() + timeRange.getUpperLimit());
419
420 DEBUG("Start time: " << FIXED(12,2) << t0 << ' ' << FIXED(12,2) << t1 << ' ' << FIXED(9,2) << TA_ns << endl);
421
422 t1 += TA_ns; // add time offset of detector
423
424 event->mc_t = getTimeOfFrame(frame_index) + t1 - t0; // set to time since start of data taking run
425
426 timeRange.add(event->mc_t);
427 timeRange.add(period);
428
429 const JDAQChronometer chronometer(detectorB.getID(), run, frame_index, utc);
430
431 const JEventTimeslice timeslice(chronometer, simbad, *event, period);
432
433 DEBUG(timeslice << endl);
434
435
436 timesliceRouter.configure(timeslice);
437
438 JTimeslice_t timesliceL0(timeslice.getDAQChronometer());
439 JTimeslice_t timesliceL1(timeslice.getDAQChronometer());
440 JTimeslice_t timesliceL2(timeslice.getDAQChronometer());
441 JTimeslice_t timesliceSN(timeslice.getDAQChronometer());
442
443 for (JDAQTimeslice::const_iterator super_frame = timeslice.begin(); super_frame != timeslice.end(); ++super_frame) {
444
445 if (moduleRouter.hasModule(super_frame->getModuleID())) {
446
447 // calibration
448
449 const JModule& module = moduleRouter.getModule(super_frame->getModuleID());
450 const JSuperFrame2D_t& buffer = JSuperFrame2D_t::demultiplex(*super_frame, module);
451
452 // L0
453
454 timesliceL0.push_back(JSuperFrame1D_t(buffer));
455
456 DEBUG("L0 " << setw(8) << timesliceL0.rbegin()->getModuleID() << ' ' << setw(8) << timesliceL0.rbegin()->size() << endl);
457
458 // L1
459
460 timesliceL1.push_back(JSuperFrame1D_t(super_frame->getDAQChronometer(),
461 super_frame->getModuleIdentifier(),
462 module.getPosition()));
463
464 buildL1(*timesliceL0.rbegin(), back_inserter(*timesliceL1.rbegin()));
465
466 DEBUG("L1 " << setw(8) << timesliceL1.rbegin()->getModuleID() << ' ' << setw(8) << timesliceL1.rbegin()->size() << endl);
467
468 // L2
469
470 timesliceL2.push_back(JSuperFrame1D_t(super_frame->getDAQChronometer(),
471 super_frame->getModuleIdentifier(),
472 module.getPosition()));
473
474 buildL2(buffer, *timesliceL1.rbegin(), back_inserter(*timesliceL2.rbegin()));
475
476 DEBUG("L2 " << setw(8) << timesliceL2.rbegin()->getModuleID() << ' ' << setw(8) << timesliceL2.rbegin()->size() << endl);
477
478 // SN
479 {
480 JTimeslice_t::value_type tv(super_frame->getDAQChronometer(),
481 super_frame->getModuleIdentifier(),
482 module.getPosition());
483
484 buildSN(buffer, *timesliceL1.rbegin(), back_inserter(tv));
485
486 if (!tv.empty()) {
487
488 timesliceSN.push_back(tv);
489
490 DEBUG("SN " << setw(8) << timesliceSN.rbegin()->getModuleID() << ' ' << setw(8) << timesliceSN.rbegin()->size() << endl);
491 }
492 }
493 }
494 }
495
496
497 // Trigger
498
499 JTriggerInput trigger_input(timesliceL2);
500 JTriggerOutput trigger_output;
501
502 trigger3DMuon (trigger_input, back_inserter(trigger_output));
503 trigger3DShower(trigger_input, back_inserter(trigger_output));
504 triggerMXShower(trigger_input, timesliceL0, back_inserter(trigger_output));
505
506 trigger_output.merge(JEventOverlap(parameters.TMaxEvent_ns));
507
508 for (JTriggerOutput::const_iterator to = trigger_output.begin(); to != trigger_output.end(); ++to) {
509
510 for (int i = 0; i != h1.GetNbinsX(); ++i) {
511 if (to->hasTriggerBit(i)) {
512 h1.Fill((double) i);
513 }
514 }
515
516 JTimeRange eventTime = getTimeRange(*to).add(getTimeOfRTS(*to));
517
518 eventTime.add(TA_ns);
519 eventTime.sub(TB_ns);
520
521 if (debug >= status_t) {
522 cout << "Event time: "
523 << to->getFrameIndex() << ' '
524 << eventTime << ' '
525 << timeRange << ' '
526 << (timeRange.overlap(eventTime) ? "Y" : "N") << endl;
527 }
528
529 if (timeRange.overlap(eventTime)) {
530
531 JTriggeredEvent tev(*to,
532 timesliceRouter,
533 moduleRouter,
534 parameters.TMaxLocal_ns,
535 getTimeRange(parameters));
536
537 tev.setCounter(trigger_counter); // set the event counter to the index of the Monte Carlo event in the output.
538
539 outputFile.put(tev);
540
541 trigger = true;
542 }
543 }
544
545
546 if (!triggeredEventsOnly || trigger) {
547
548 if (parameters.writeL0()) {
549 outputFile.put(timeslice);
550 }
551
552 if (parameters.writeL1()) {
553 outputFile.put(JTimesliceL1<JDAQTimesliceL1>(timesliceL1, timesliceRouter, moduleRouter, parameters.TMaxLocal_ns));
554 }
555
556 if (parameters.writeL2()) {
557 outputFile.put(JTimesliceL1<JDAQTimesliceL2>(timesliceL2, timesliceRouter, moduleRouter, parameters.L2.TMaxLocal_ns));
558 }
559
560 if (parameters.writeSN()) {
561 outputFile.put(JTimesliceL1<JDAQTimesliceSN>(timesliceSN, timesliceRouter, moduleRouter, parameters.SN.TMaxLocal_ns));
562 }
563
564 if (parameters.writeSummary()) {
565
566 if (fs.count(chronometer.getFrameIndex()) == 0) {
567
568 outputFile.put(JSummaryslice(chronometer,simbad));
569
570 fs.insert(chronometer.getFrameIndex());
571 }
572 }
573 }
574 }
575
576 if (!triggeredEventsOnly || trigger) {
577
578 outputFile.put(*event);
579
580 ++trigger_counter;
581 }
582 }
583 STATUS(endl);
584
585 {
587
588 io >> outputFile;
589 }
590
591 outputFile.put(h1);
592 outputFile.put(*gRandom);
593 outputFile.close();
594}
Definition of hit and track types and auxiliary methods for handling Monte Carlo data.
string outputFile
Data structure for detector geometry and calibration.
Recording of objects on file according a format that follows from the file name extension.
Basic data structure for L0 hit.
Basic data structure for L1 hit.
Tools for handling different hit types.
General purpose messaging.
#define DEBUG(A)
Message macros.
Definition JMessage.hh:62
#define STATUS(A)
Definition JMessage.hh:63
#define NOTICE(A)
Definition JMessage.hh:64
#define FATAL(A)
Definition JMessage.hh:67
int debug
debug level
Definition JSirene.cc:72
#define WARNING(A)
Definition JMessage.hh:65
ROOT I/O of application specific meta data.
Map of associated modules in detector.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Direct access to PMT in detector data structure.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition JParser.hh:2142
I/O formatting auxiliaries.
Auxiliaries for creation of summary data.
Support methods.
ROOT TTree parameter settings of various packages.
Setting of trigger bits.
int main(int argc, char **argv)
Basic data structure for time and time over threshold information of hit.
Monte Carlo run header.
Definition JHead.hh:1236
JAANET::start_run start_run
Definition JHead.hh:1601
JAANET::DAQ DAQ
Definition JHead.hh:1625
void push(T JHead::*pd)
Push given data member to Head.
Definition JHead.hh:1374
void merge(const JMatch_t &match)
Merge events.
void reset(JK40Simulator *k40Simulator)
Reset K40 simulator.
const JPMTSimulator & getPMTSimulator() const
Get PMT simulator.
Detector data structure.
Definition JDetector.hh:96
void setPMTStatus(const int bit)
Set status of all PMTs.
Definition JDetector.hh:207
static double getSigma()
Get intrinsic time smearing of K40 coincidences.
static void setSigma(const double sigma)
Set intrinsic time smearing of K40 coincidences.
Default implementation of the simulation of K40 background.
Router for direct addressing of module data in detector data structure.
bool hasModule(const JObjectID &id) const
Has module.
const JModule & getModule(const JObjectID &id) const
Get module parameters.
Data structure for a composite optical module.
Definition JModule.hh:76
Auxiliary class for map of PMT parameters.
double getQE(const JPMTIdentifier &id) const
Get QE of given PMT.
bool is_valid() const
Check validity of PMT parameters.
Data structure for PMT geometry, calibration and status.
Definition JPMT.hh:49
const JPosition3D & getPosition() const
Get position.
General exception.
Definition JException.hh:24
virtual const char * what() const override
Get error message.
Definition JException.hh:64
int getID() const
Get identifier.
Definition JObjectID.hh:50
static void Throw(const bool option)
Enable/disable throw option.
Definition JThrow.hh:37
Utility class to parse command line options.
Definition JParser.hh:1698
Object writing to file.
General purpose class for object reading from a list of file names.
virtual bool hasNext() override
Check availability of next element.
counter_type getCounter() const
Get counter.
virtual const pointer_type & next() override
Get next element.
const std::string & getFilename() const
Get current file name.
Router for fast addressing of summary data in KM3NETDAQ::JDAQSummaryslice data structure as a functio...
void update(const JDAQSummaryslice *ps)
Update router.
Template definition for direct access of elements in ROOT TChain.
bool overlap(const range_type &range) const
Test overlap with given range.
Definition JRange.hh:382
T getLowerLimit() const
Get lower limit.
Definition JRange.hh:202
range_type & sub(argument_type x)
Subtract offset.
Definition JRange.hh:460
range_type & add(argument_type x)
Add offset.
Definition JRange.hh:446
T getUpperLimit() const
Get upper limit.
Definition JRange.hh:213
CLB simulation based on run-by-run information.
K40 simulation based on run-by-run information.
PMT simulation based on run-by-run information.
1-dimensional frame with time calibrated data from one optical module.
2-dimensional frame with time calibrated data from one optical module.
Auxiliary class to build JDAQTimeslice for L1 timeslice.
Data structure for input to trigger algorithm.
Auxiliary class to build KM3NETDAQ::JDAQEvent for a triggered event.
const JDAQChronometer & getDAQChronometer() const
Get DAQ chronometer.
int getRunNumber() const
Get run number.
JDAQUTCExtended getTimesliceStart() const
Get start of timeslice.
int getFrameIndex() const
Get frame index.
void setCounter(const JTriggerCounter_t counter)
Set trigger counter.
Data structure for UTC time.
static const JDAQUTCExtended & getInstance()
Get arbitrary offset (e.g.
double getTimeNanoSecond() const
Get time (limited to 16 ns cycles).
JTimeRange getTimeRange(const Evt &event)
Get time range (i.e. time between earliest and latest hit) of Monte Carlo event.
void copy(const Head &from, JHead &to)
Copy header from from to to.
Definition JHead.cc:163
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
double getMaximalDistance(const JDetector &detector, const bool option=false)
Get maximal distance between modules in detector.
@ status_t
status
Definition JMessage.hh:30
@ debug_t
debug
Definition JMessage.hh:29
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
double getTimeDuration(const JDAQUTCTimeRange &utc)
Get time duration of given UTC time range.
JDAQUTCTimeRange getUTCTimeRange()
Get UTC time range.
JTriggerParameters getTriggerParameters(const JMultipleFileScanner_t &file_list)
Get trigger parameters.
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
KM3NeT DAQ data structures and auxiliaries.
Definition DataQueue.cc:39
double getFrameTime()
Get frame time duration.
Definition JDAQClock.hh:162
void setDAQLongprint(const bool option)
Set DAQ print option.
Definition JDAQPrint.hh:28
double getTimeOfFrame(const int frame_index)
Get start time of frame in ns since start of run for a given frame index.
Definition JDAQClock.hh:185
double getMaximalTime(const double R_Hz)
Get maximal time for given rate.
double getTimeDifference(const JDAQChronometer &first, const JDAQChronometer &second)
Get time difference between two chronometers.
JDAQUTCExtended getDAQUTCExtended(const TTimeStamp &t0, const double t1=0.0)
Get DAQ UTC time.
static const int HIGH_RATE_VETO_DISABLE
Enable (disable) use of high-rate veto test if this status bit is 0 (1);.
Definition pmt_status.hh:14
static const int PMT_DISABLE
ile KM3NeT Data Definitions v3.6.2 https://git.km3net.de/common/km3net-dataformat
Definition pmt_status.hh:13
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Definition Evt.hh:21
Auxiliary data structure for floating point format specification.
Definition JManip.hh:448
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
Definition Head.hh:65
double livetime_s
Live time [s].
Definition JHead.hh:1053
Detector file.
Definition JHead.hh:227
int run_id
MC run number.
Definition JHead.hh:143
Match of two events considering overlap in time and position.
Transmission with position.
Definition JBillabong.cc:70
Type list.
Definition JTypeList.hh:23
Template definition of random value generator.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Definition JParser.hh:68
Auxiliary class for K40 rates.
Definition JK40Rates.hh:41
void correct(const double QE)
Correct rates for global efficiency,.
Definition JK40Rates.hh:130
Auxiliary class for mixed-L1/L0 K40 rates.
Definition JK40Rates.hh:229
Auxiliary class for defining the range of iterations of objects.
Definition JLimit.hh:45
static counter_type max()
Get maximum counter value.
Definition JLimit.hh:128
Auxiliary class for ROOT I/O of application specific meta data.
Definition JMeta.hh:72
Router for fast addressing of hits in KM3NETDAQ::JDAQTimeslice data structure as a function of the op...
void configure(const JDAQTimeslice &timeslice)
Configure.
Timeslice with Monte Carlo event.
Auxiliary class to create summary data.