Jpp
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 
14 #include "JDAQ/JDAQTimesliceIO.hh"
15 #include "JDAQ/JDAQEventIO.hh"
19 
20 #include "JAAnet/JHead.hh"
21 #include "JAAnet/JHeadToolkit.hh"
22 
23 #include "JDetector/JDetector.hh"
27 #include "JDetector/JPMTRouter.hh"
28 #include "JDetector/JTimeRange.hh"
29 #include "JDetector/JK40Rates.hh"
36 
37 #include "JTrigger/JHit.hh"
38 #include "JTrigger/JHitToolkit.hh"
39 #include "JTrigger/JTimeslice.hh"
42 #include "JTrigger/JHitL0.hh"
43 #include "JTrigger/JHitL1.hh"
44 #include "JTrigger/JBuildL1.hh"
45 #include "JTrigger/JBuildL2.hh"
49 #include "JTrigger/JTriggerBits.hh"
53 #include "JTrigger/JTimesliceL1.hh"
57 #include "JTrigger/JRunByRun.hh"
59 
64 #include "JSupport/JSupport.hh"
66 #include "JSupport/JMeta.hh"
67 
68 #include "Jeep/JPrint.hh"
69 #include "Jeep/JParser.hh"
70 #include "Jeep/JMessage.hh"
71 
72 
73 /**
74  * \file
75  * Auxiliary program to trigger Monte Carlo events.
76  *
77  * Note that option
78  * - <tt>-a</tt> refers to the detector configuration that is used to convert Monte Carlo true information to raw data; and
79  * - <tt>-b</tt> refers to the detector configuration that is used to convert raw data to calibrated data.
80  *
81  * Note that the event counter of the triggered events, as returned by JDAQEvent::getCounter(),
82  * are set to the corresponding index of the Monte Carlo event in the output.
83  * \author mdejong
84  */
85 int main(int argc, char **argv)
86 {
87  using namespace std;
88  using namespace JPP;
89  using namespace KM3NETDAQ;
90 
92 
93  JMultipleFileScanner<> inputFile;
95  JLimit_t& numberOfEvents = inputFile.getLimit();
96  string detectorFileA;
97  string detectorFileB;
98  int run;
99  JTriggerParameters parameters;
100  bool triggeredEventsOnly;
101  JPMTParametersMap pmtParameters;
102  JK40Rates rates_Hz;
103  JRunByRun runbyrun;
104  UInt_t seed;
105  int debug;
106 
107  try {
108 
109  JParser<> zap("Auxiliary program to trigger Monte Carlo events.");
110 
111  zap['f'] = make_field(inputFile, "input file (output of detector simulation)");
112  zap['o'] = make_field(outputFile, "output file") = "trigger_efficieny.root";
113  zap['n'] = make_field(numberOfEvents) = JLimit::max();
114  zap['a'] = make_field(detectorFileA, "detector used for conversion from Monte Carlo truth to raw data.");
115  zap['b'] = make_field(detectorFileB, "detector used for conversion of raw data to calibrated data.") = "";
116  zap['R'] = make_field(run, "run number") = -1;
117  zap['r'] = make_field(runbyrun, "option for run-by-run mode") = JPARSER::initialised();
118  zap['@'] = make_field(parameters, "Trigger parameters (or corresponding file name)") = JPARSER::initialised();
119  zap['O'] = make_field(triggeredEventsOnly, "optionally write only triggered events.");
120  zap['P'] = make_field(pmtParameters, "PMT simulation data (or corresponding file name)") = JPARSER::initialised();
121  zap['B'] = make_field(rates_Hz, "background rates [Hz]") = JPARSER::initialised();
122  zap['S'] = make_field(seed, "seed") = 0;
123  zap['d'] = make_field(debug, "debug") = 0;
124 
125  zap(argc, argv);
126  }
127  catch(const exception &error) {
128  FATAL(error.what() << endl);
129  }
130 
131  gRandom->SetSeed(seed);
132 
133  cout.tie(&cerr);
134 
136 
137  if (detectorFileB == "") {
138  detectorFileB = detectorFileA;
139  }
140 
141 
142  JDetector detectorA;
143  JDetector detectorB;
144 
145  try {
146  load(detectorFileA, detectorA);
147  load(detectorFileB, detectorB);
148  }
149  catch(const JException& error) {
150  FATAL(error);
151  }
152 
153  JPMTParametersMap::Throw(true);
154 
155  if (!pmtParameters.is_valid()) {
156  FATAL("Invalid PMT parameters " << pmtParameters << endl);
157  }
158 
159  if (pmtParameters.getQE() != 1.0) {
160 
161  WARNING("Correct background rates with global efficiency " << pmtParameters.getQE() << endl);
162 
163  rates_Hz.correct(pmtParameters.getQE());
164  }
165 
166  const JModuleRouter moduleRouter(detectorB);
167  JDetectorSimulator simbad (detectorA);
168  JSummaryRouter summaryRouter;
169 
170  if (runbyrun.is_valid()) {
171 
172  NOTICE("Using run-by-run:" << endl << runbyrun << endl);
173 
174  if (!runbyrun.hasNext()) {
175  FATAL("Run-by-run simulation yields no input." << endl);
176  }
177 
178  if (rates_Hz.getSinglesRate() != 0.0) {
179  WARNING("Run-by-run simulation discards singles rate [Hz] " << rates_Hz.getSinglesRate() << endl);
180  }
181 
182  try {
183  simbad.reset(new JK40RunByRunSimulator(summaryRouter, rates_Hz));
184  simbad.reset(new JPMTRunByRunSimulator(summaryRouter, pmtParameters, detectorA, runbyrun.range_Hz));
185  simbad.reset(new JCLBDefaultSimulator());
186  }
187  catch(const JException& error) {
188  FATAL(error.what() << endl);
189  }
190 
191  try {
192 
193  parameters = getTriggerParameters(runbyrun.get<JMultipleFileScanner<>,true>());
194 
195  NOTICE("Set trigger parameters from run-by-run input." << endl);
196  }
197  catch(const JException& error) {
198  WARNING("No trigger parameters from run-by-run input;\nrun with default/user input." << endl);
199  }
200 
201  } else {
202 
203  NOTICE("Using fixed rates [Hz]: " << rates_Hz << endl);
204 
205  try {
206  simbad.reset(new JK40DefaultSimulator(rates_Hz));
207  simbad.reset(new JPMTDefaultSimulator(pmtParameters, detectorA));
208  simbad.reset(new JCLBDefaultSimulator());
209  }
210  catch(const JException& error) {
211  FATAL(error.what() << endl);
212  }
213  }
214 
215  parameters.set(getMaximalDistance(detectorB));
216 
217  DEBUG("Trigger:" << endl << parameters << endl);
218  DEBUG("PMT parameters:" << endl << pmtParameters << endl);
219 
220  const double Tmax = getMaximalTime(detectorB);
221 
222  const JTimeRange period(-(Tmax + parameters.TMaxLocal_ns),
223  +(Tmax + parameters.TMaxLocal_ns));
224 
225  typedef double hit_type;
226 
227  typedef JSuperFrame1D<hit_type> JSuperFrame1D_t;
228  typedef JSuperFrame2D<hit_type> JSuperFrame2D_t;
229  typedef JTimeslice <hit_type> JTimeslice_t;
230  typedef JBuildL1 <hit_type> JBuildL1_t;
231  typedef JBuildL2 <hit_type> JBuildL2_t;
232 
233  const JBuildL1_t buildL1(parameters);
234  const JBuildL2_t buildL2(parameters.L2);
235  const JBuildL2_t buildSN(parameters.SN);
236 
237  JTimesliceRouter timesliceRouter(parameters.numberOfBins);
238 
239  const JTrigger3DMuon trigger3DMuon (parameters);
240  const JTrigger3DShower trigger3DShower(parameters);
241  const JTriggerMXShower triggerMXShower(parameters, detectorB);
242 
243 
244  Head header;
245 
246  try {
247  header = getHeader(inputFile);
248  }
249  catch(const JException& error) {
250  FATAL(error);
251  }
252 
253  const JPosition3D center = get<JPosition3D>(header);
254 
255  NOTICE("Apply detector offset from Monte Carlo run header (" << center << ")" << endl);
256 
257  detectorA -= center;
258  detectorB -= center;
259 
260  TH1D h1("Trigger bits", NULL, NUMBER_OF_TRIGGER_BITS, -0.5, NUMBER_OF_TRIGGER_BITS - 0.5);
261 
262 
263  outputFile.open();
264 
265  if (!outputFile.is_open()) {
266  FATAL("Error opening file " << outputFile << endl);
267  }
268 
269  outputFile.put(*gRandom);
270  outputFile.put(JMeta(argc, argv));
271  outputFile.put(header);
272  outputFile.put(parameters);
273 
274  JLimit_t limit = inputFile.getLimit();
275  counter_type number_of_events = 0;
276  JTriggerCounter_t trigger_counter = 0;
277 
278  for (JMultipleFileScanner<>::const_iterator file = inputFile.begin(); file != inputFile.end(); ++file) {
279 
280  int mc_run_id = 0;
281 
282  try {
283 
284  const JHead head(getHeader(*file));
285 
286  mc_run_id = head.start_run.run_id;
287  }
288  catch(const JException& error) {
289  FATAL(error);
290  }
291 
292  JMultipleFileScanner<Evt> in(*file);
293 
294  limit.setLowerLimit(limit.getLowerLimit() - in.skip(limit.getLowerLimit()));
295 
296  for ( ; in.hasNext() && number_of_events != limit; ++number_of_events) {
297 
298  STATUS("event: " << setw(10) << number_of_events << '\r'); DEBUG(endl);
299 
300  Evt* event = in.next();
301 
302  event->mc_run_id = mc_run_id;
303 
304  DEBUG(*event << endl);
305 
306  bool trigger = false;
307 
308  if (!event->mc_hits.empty()) {
309 
310  int frame_index = (int) in.getCounter() + 1; // 1 event / slice
311 
312  if (runbyrun.is_valid() && runbyrun.hasNext()) {
313 
314  summaryRouter.update(runbyrun.next());
315 
316  summaryRouter.correct(dynamic_cast<const JPMTDefaultSimulatorInterface&>(simbad.getPMTSimulator()));
317 
318  frame_index = summaryRouter.getFrameIndex();
319  run = summaryRouter.getRunNumber();
320  }
321 
322  // set the event time!
323 
324  JTimeRange timeRange = getTimeRange(*event, period);
325 
326  if (!timeRange.is_valid()) {
327  timeRange.setRange(0.0,0.0);
328  }
329 
330  const double t0 = 0.5 * (timeRange.getLowerLimit() + timeRange.getUpperLimit());
331  const double t1 = getTimeOfFrame(frame_index) + gRandom->Rndm() * getFrameTime();
332 
333  event->mc_t = t1 - t0; // time since start of data taking run
334 
335  timeRange.add(event->mc_t);
336  timeRange.add(period);
337 
338  const JDAQChronometer chronometer(detectorB.getID(), (run != -1 ? run : mc_run_id) , frame_index, JDAQUTCExtended(getTimeOfFrame(frame_index)));
339 
340  const JEventTimeslice timeslice(chronometer, simbad, *event, period);
341 
342  DEBUG(timeslice << endl);
343 
344 
345  timesliceRouter.configure(timeslice);
346 
347  JTimeslice_t timesliceL0(timeslice.getDAQChronometer());
348  JTimeslice_t timesliceL1(timeslice.getDAQChronometer());
349  JTimeslice_t timesliceL2(timeslice.getDAQChronometer());
350  JTimeslice_t timesliceSN(timeslice.getDAQChronometer());
351 
352  for (JDAQTimeslice::const_iterator super_frame = timeslice.begin(); super_frame != timeslice.end(); ++super_frame) {
353 
354  if (moduleRouter.hasModule(super_frame->getModuleID())) {
355 
356  // calibration
357 
358  const JModule& module = moduleRouter.getModule(super_frame->getModuleID());
359  const JSuperFrame2D_t& buffer = JSuperFrame2D_t::demultiplex(*super_frame, module);
360 
361  // L0
362 
363  timesliceL0.push_back(JSuperFrame1D_t(buffer));
364 
365  // L1
366 
367  timesliceL1.push_back(JSuperFrame1D_t(super_frame->getDAQChronometer(),
368  super_frame->getModuleIdentifier(),
369  module.getPosition()));
370 
371  buildL1(*timesliceL0.rbegin(), back_inserter(*timesliceL1.rbegin()));
372 
373  // L2
374 
375  timesliceL2.push_back(JSuperFrame1D_t(super_frame->getDAQChronometer(),
376  super_frame->getModuleIdentifier(),
377  module.getPosition()));
378 
379  buildL2(buffer, *timesliceL1.rbegin(), back_inserter(*timesliceL2.rbegin()));
380 
381  // SN
382 
383  timesliceSN.push_back(JSuperFrame1D_t(super_frame->getDAQChronometer(),
384  super_frame->getModuleIdentifier(),
385  module.getPosition()));
386 
387  buildSN(buffer, *timesliceL1.rbegin(), back_inserter(*timesliceSN.rbegin()));
388 
389  DEBUG("L0 " << setw(8) << timesliceL0.rbegin()->getModuleID() << ' ' << setw(8) << timesliceL0.rbegin()->size() << endl);
390  DEBUG("L1 " << setw(8) << timesliceL1.rbegin()->getModuleID() << ' ' << setw(8) << timesliceL1.rbegin()->size() << endl);
391  DEBUG("L2 " << setw(8) << timesliceL2.rbegin()->getModuleID() << ' ' << setw(8) << timesliceL2.rbegin()->size() << endl);
392  DEBUG("SN " << setw(8) << timesliceSN.rbegin()->getModuleID() << ' ' << setw(8) << timesliceSN.rbegin()->size() << endl);
393  }
394  }
395 
396 
397  // Trigger
398 
399  JTriggerInput trigger_input(timesliceL2);
400  JTriggerOutput trigger_output;
401 
402  trigger3DMuon (trigger_input, back_inserter(trigger_output));
403  trigger3DShower(trigger_input, back_inserter(trigger_output));
404  triggerMXShower(trigger_input, timesliceL0, back_inserter(trigger_output));
405 
406  trigger_output.merge(JEventOverlap(parameters.TMaxEvent_ns));
407 
408  for (JTriggerOutput::const_iterator to = trigger_output.begin(); to != trigger_output.end(); ++to) {
409 
410  for (int i = 0; i != h1.GetNbinsX(); ++i) {
411  if (to->hasTriggerBit(i)) {
412  h1.Fill((double) i);
413  }
414  }
415 
416  JTimeRange eventTime = getTimeRange(*to).add(getTimeOfRTS(*to));
417 
418  DEBUG("Event time: "
419  << to->getFrameIndex() << ' '
420  << eventTime << ' '
421  << timeRange << endl);
422 
423  if (timeRange.overlap(eventTime)) {
424 
425  JTriggeredEvent tev(*to,
426  timesliceRouter,
427  moduleRouter,
428  parameters.TMaxLocal_ns,
429  getTimeRange(parameters));
430 
431  // Set the event counter to the index of the Monte Carlo event in the output.
432 
433  tev.setCounter(trigger_counter);
434 
435  outputFile.put(tev);
436 
437  trigger = true;
438  }
439  }
440 
441 
442  if (!triggeredEventsOnly || trigger) {
443 
444  if (parameters.writeL0()) {
445  outputFile.put(timeslice);
446  }
447 
448  if (parameters.writeL1()) {
449  outputFile.put(JTimesliceL1<JDAQTimesliceL1>(timesliceL1, timesliceRouter, moduleRouter, parameters.TMaxLocal_ns));
450  }
451 
452  if (parameters.writeL2()) {
453  outputFile.put(JTimesliceL1<JDAQTimesliceL2>(timesliceL2, timesliceRouter, moduleRouter, parameters.L2.TMaxLocal_ns));
454  }
455 
456  if (parameters.writeSN()) {
457  outputFile.put(JTimesliceL1<JDAQTimesliceSN>(timesliceSN, timesliceRouter, moduleRouter, parameters.SN.TMaxLocal_ns));
458  }
459 
460  if (parameters.writeSummary()) {
461  outputFile.put(JSummaryslice(chronometer,simbad));
462  }
463  }
464  }
465 
466  if (!triggeredEventsOnly || trigger) {
467 
468  outputFile.put(*event);
469 
470  ++trigger_counter;
471  }
472  }
473  }
474  STATUS(endl);
475 
476 
478 
479  io >> outputFile;
480 
481  outputFile.put(h1);
482  outputFile.put(*gRandom);
483  outputFile.close();
484 }
KM3NETDAQ::JSummaryslice::correct
void correct(const JPMTDefaultSimulatorInterface &simulator)
Correct measured singles rates for the probability that a hit survives the simulation of the PMT.
Definition: JSummaryslice.hh:121
JTRIGGER::JRunByRun::range_Hz
JPMTRateRange range_Hz
Definition: JRunByRun.hh:111
JPMTParametersMap.hh
main
int main(int argc, char **argv)
Definition: JTriggerEfficiency.cc:85
JMeta.hh
JK40DefaultSimulator.hh
Head.hh
JSUPPORT::getTriggerParameters
JTriggerParameters getTriggerParameters(const JMultipleFileScanner_t &file_list)
Get trigger parameters.
Definition: JTriggerParametersSupportkit.hh:148
JTOOLS::JRange::getLowerLimit
T getLowerLimit() const
Get lower limit.
Definition: JRange.hh:215
JTRIGGER::JTriggerParameters::numberOfBins
int numberOfBins
number of bins for lookup table of timeslice
Definition: JTriggerParameters.hh:324
JDETECTOR::JK40DefaultSimulator
Default implementation of the simulation of K40 background.
Definition: JK40DefaultSimulator.hh:25
JTriggerParameters.hh
KM3NETDAQ::JEventTimeslice
Timeslice with Monte Carlo event.
Definition: JEventTimeslice.hh:33
JTOOLS::JRange::getUpperLimit
T getUpperLimit() const
Get upper limit.
Definition: JRange.hh:226
JDETECTOR::getMaximalDistance
double getMaximalDistance(const JDetector &detector)
Get maximal distance between modules in detector.
Definition: JDetectorToolkit.hh:78
JFileRecorder.hh
JSuperFrame2D.hh
JLANG::JTemplate::get
const T & get() const
Get reference to object.
Definition: JTemplate.hh:113
JSUPPORT::JLimit
Auxiliary class for defining the range of iterations of objects.
Definition: JLimit.hh:41
JAANET::getTimeRange
JTimeRange getTimeRange(const Evt &event)
Get time range (i.e.
Definition: JAAnetToolkit.hh:134
JTrigger3DMuon.hh
JTriggeredEvent.hh
JRunByRun.hh
JMessage.hh
JHead.hh
JLANG::JObjectSampler::next
virtual const pointer_type & next()
Get next element.
Definition: JObjectSampler.hh:120
JTRIGGER::JTriggerParameters::set
void set(const double DMax_m=0.0)
Set dependent trigger parameters.
Definition: JTriggerParameters.hh:141
JDETECTOR::JCLBDefaultSimulator
Default CLB simulation.
Definition: JCLBDefaultSimulator.hh:139
JPrint.hh
KM3NETDAQ::JDAQUTCExtended
Data structure for UTC time.
Definition: JDAQUTCExtended.hh:22
JDETECTOR::JPMTParametersMap::getQE
double getQE(const JPMTIdentifier &id) const
Get QE of given PMT.
Definition: JPMTParametersMap.hh:162
JEventToolkit.hh
JTRIGGER::JTriggerParameters::TMaxLocal_ns
double TMaxLocal_ns
maximal time difference between L0 hits for L1
Definition: JTriggerParameters.hh:322
JTRIGGER::JTriggerParameters
Data structure for all trigger parameters.
Definition: JTriggerParameters.hh:116
JK40RunByRunSimulator.hh
JTriggerToolkit.hh
JDETECTOR::JModuleRouter::getModule
const JModule & getModule(const JObjectID &id) const
Get module parameters.
Definition: JModuleRouter.hh:89
JTimeslice.hh
JTRIGGER::JBuildL1
Template L1 hit builder.
Definition: JBuildL1.hh:85
JPARSER::initialised
Empty structure for specification of parser element that is initialised (i.e.
Definition: JParser.hh:63
JDETECTOR::load
void load(const JString &file_name, JDetector &detector)
Load detector from input file.
Definition: JDetectorToolkit.hh:476
JTOOLS::JRange::setRange
void setRange(const range_type &range)
Set range.
Definition: JRange.hh:139
JTRIGGER::JTriggerParameters::TMaxEvent_ns
double TMaxEvent_ns
maximal time before and after event for snapshot
Definition: JTriggerParameters.hh:323
JTOOLS::JRange::add
range_type & add(argument_type x)
Add offset.
Definition: JRange.hh:437
JTRIGGER::JSuperFrame1D
1-dimensional frame with time calibrated data from one optical module.
Definition: JSuperFrame1D.hh:35
KM3NETDAQ::JDAQChronometer::getFrameIndex
int getFrameIndex() const
Get frame index.
Definition: JDAQChronometer.hh:132
JTOOLS::JRange< double >
JAANET::JHead::start_run
JAANET::start_run start_run
Definition: JHead.hh:1071
Evt
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Definition: Evt.hh:19
Evt.hh
JK40Rates.hh
JPARSER::JParser
Utility class to parse command line options.
Definition: JParser.hh:1493
NOTICE
#define NOTICE(A)
Definition: JMessage.hh:64
KM3NETDAQ::NUMBER_OF_TRIGGER_BITS
static const unsigned int NUMBER_OF_TRIGGER_BITS
Number of trigger bits.
Definition: JDAQTriggerMask.hh:27
JDETECTOR::JPMTRunByRunSimulator
PMT simulation based on run-by-run information.
Definition: JPMTRunByRunSimulator.hh:32
JTRIGGER::JTriggerInput
Data structure for input to trigger algorithm.
Definition: JTriggerInput.hh:32
JDETECTOR::JK40RunByRunSimulator
K40 simulation based on run-by-run information.
Definition: JK40RunByRunSimulator.hh:29
JTimeRange.hh
JTriggerBits.hh
JTRIGGER::JTriggerParameters::L2
JL2Parameters L2
L2 processing.
Definition: JTriggerParameters.hh:327
JTOOLS::JRange::setLowerLimit
void setLowerLimit(argument_type x)
Set lower limit.
Definition: JRange.hh:237
JAANET::JHead
Monte Carlo run header.
Definition: JHead.hh:839
KM3NETDAQ::getFrameTime
double getFrameTime()
Get frame time duration.
Definition: JDAQClock.hh:162
JHeadToolkit.hh
JSupport.hh
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
JBuildL1.hh
JDETECTOR::JK40Rates
Auxiliary class for K40 rates.
Definition: JK40Rates.hh:41
JPMTRunByRunSimulator.hh
JTriggerMXShower.hh
Hit.hh
JSUPPORT::getHeader
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
Definition: JMonteCarloFileSupportkit.hh:458
JDetectorSimulator.hh
JDETECTOR::getMaximalTime
double getMaximalTime(const JDetector &detector)
Get maximal time between modules in detector following causality.
Definition: JDetectorToolkit.hh:306
JSUPPORT::JMultipleFileScanner::getCounter
counter_type getCounter() const
Get counter.
Definition: JMultipleFileScanner.hh:323
JDAQEventIO.hh
JDETECTOR::JK40Rates::getSinglesRate
double getSinglesRate() const
Get singles rate.
Definition: JK40Rates.hh:97
WARNING
#define WARNING(A)
Definition: JMessage.hh:65
JTRIGGER::JTriggerParameters::writeL2
JPrescaler writeL2
write JDAQTimeslice with L2 data
Definition: JTriggerParameters.hh:334
JDAQTimesliceIO.hh
JCLBDefaultSimulator.hh
debug
int debug
debug level
Definition: JSirene.cc:59
JSUPPORT::JMultipleFileScanner::next
virtual const pointer_type & next()
Get next element.
Definition: JMultipleFileScanner.hh:398
JTRIGGER::JTimesliceL1
Auxiliary class to build JDAQTimeslice for L1 timeslice.
Definition: JTimesliceL1.hh:36
JTRIGGER::JRunByRun
Auxiliary class to handle run by run options.
Definition: JRunByRun.hh:50
JTRIGGER::JTriggerOutput::merge
void merge(const JMatch_t &match)
Merge events.
Definition: JTriggerOutput.hh:41
KM3NETDAQ::JSummaryslice
Auxiliary class to create summary data.
Definition: JSummaryslice.hh:33
JGEOMETRY3D::JPosition3D
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
JHitToolkit.hh
JLANG::JObjectID::getID
int getID() const
Get identifier.
Definition: JObjectID.hh:55
Head
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
Definition: Head.hh:39
JTimesliceL1.hh
JEventOverlap.hh
JHit.hh
JDETECTOR::JPMTParametersMap
Auxiliary class for map of PMT parameters.
Definition: JPMTParametersMap.hh:88
JTRIGGER::JTimeslice
Time slice with calibrated data.
Definition: JTimeslice.hh:26
JDETECTOR::JModule
Data structure for a composite optical module.
Definition: JModule.hh:49
JAANET::start_run::run_id
int run_id
MC run number.
Definition: JHead.hh:93
KM3NETDAQ::JDAQTriggerCounter::setCounter
void setCounter(const JTriggerCounter_t counter)
Set trigger counter.
Definition: JDAQTriggerCounter.hh:110
JTRIGGER::JSummaryRouter
Router for fast addressing of summary data in JDAQSummaryslice data structure as a function of the op...
Definition: JSummaryRouter.hh:32
JSummaryRouter.hh
JMultipleFileScanner.hh
JLANG::JTypeList
Type list.
Definition: JTypeList.hh:22
JTRIGGER::JTriggeredEvent
Auxiliary class to build JDAQEvent for a triggered event.
Definition: JTriggeredEvent.hh:41
STATUS
#define STATUS(A)
Definition: JMessage.hh:63
JSUPPORT::JMultipleFileScanner::hasNext
virtual bool hasNext()
Check availability of next element.
Definition: JMultipleFileScanner.hh:350
JBuildL2.hh
JTOOLS::JRange::is_valid
bool is_valid() const
Check validity of range.
Definition: JRange.hh:313
JTRIGGER::JRunByRun::is_valid
bool is_valid()
Check validity of run by run options.
Definition: JRunByRun.hh:68
JParser.hh
JModuleMapper.hh
JDetectorToolkit.hh
JTriggerParametersSupportkit.hh
JDETECTOR::JModuleRouter
Router for direct addressing of module data in detector data structure.
Definition: JModuleRouter.hh:34
JHitL1.hh
JTRIGGER::JTriggerParameters::SN
JL2Parameters SN
Supernova trigger.
Definition: JTriggerParameters.hh:328
JTRIGGER::JTimesliceRouter::configure
void configure(const JDAQTimeslice &timeslice)
Configure.
Definition: JTimesliceRouter.hh:112
JTimesliceRouter.hh
KM3NETDAQ::JDAQChronometer::getRunNumber
int getRunNumber() const
Get run number.
Definition: JDAQChronometer.hh:121
JTOOLS::JRange::overlap
bool overlap(const range_type &range) const
Test overlap with given range.
Definition: JRange.hh:373
JTRIGGER::JTriggerParameters::writeSummary
JPrescaler writeSummary
write JDAQSummaryslice
Definition: JTriggerParameters.hh:331
JDETECTOR::JPMTDefaultSimulator
Default PMT simulation.
Definition: JPMTDefaultSimulator.hh:54
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1954
JTrigger3DShower.hh
KM3NETDAQ::getTimeOfRTS
double getTimeOfRTS(const JDAQChronometer &chronometer)
Get time of last RTS in ns since start of run for a given chronometer.
Definition: JDAQChronometer.hh:223
JSummaryslice.hh
JSUPPORT::JMultipleFileScanner<>
JDETECTOR::JDetector
Detector data structure.
Definition: JDetector.hh:80
JGEOMETRY3D::JPosition3D::getPosition
const JPosition3D & getPosition() const
Get position.
Definition: JPosition3D.hh:129
JTRIGGER::JTrigger3DShower
Shower trigger.
Definition: JTrigger3DShower.hh:22
KM3NETDAQ::JDAQChronometer::getDAQChronometer
const JDAQChronometer & getDAQChronometer() const
Get DAQ chronometer.
Definition: JDAQChronometer.hh:88
JSuperFrame1D.hh
JSUPPORT::JMeta
Auxiliary class for ROOT I/O of application specific meta data.
Definition: JMeta.hh:71
JTRIGGER::JTriggerOutput
Set of triggered events.
Definition: JTriggerOutput.hh:23
DEBUG
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62
JPMTRouter.hh
JTRIGGER::JSummaryRouter::update
void update(JDAQSummaryslice *ps)
Update router.
Definition: JSummaryRouter.hh:49
std
Definition: jaanetDictionary.h:36
JDETECTOR::JDetectorSimulator
Detector simulation.
Definition: JDetectorSimulator.hh:33
JDETECTOR::JModuleRouter::hasModule
bool hasModule(const JObjectID &id) const
Has module.
Definition: JModuleRouter.hh:101
JPMTDefaultSimulator.hh
JDETECTOR::JK40Rates::correct
void correct(const double QE)
Correct rates for global efficiency,.
Definition: JK40Rates.hh:145
JTRIGGER::JTriggerParameters::writeSN
JPrescaler writeSN
write JDAQTimeslice with SN data
Definition: JTriggerParameters.hh:335
KM3NETDAQ
KM3NeT DAQ data structures and auxiliaries.
Definition: DataQueue.cc:39
JDETECTOR::JPMTParametersMap::is_valid
bool is_valid() const
Check validity of PMT parameters.
Definition: JPMTParametersMap.hh:242
JLANG::JObjectSampler::hasNext
virtual bool hasNext()
Check availability of next element.
Definition: JObjectSampler.hh:78
JDAQSummarysliceIO.hh
KM3NETDAQ::setDAQLongprint
void setDAQLongprint(const bool option)
Set DAQ print option.
Definition: JDAQPrint.hh:28
JEventTimeslice.hh
JMonteCarloFileSupportkit.hh
KM3NETDAQ::JTriggerCounter_t
unsigned long long int JTriggerCounter_t
Type definition of trigger counter.
Definition: JDAQTriggerCounter.hh:17
JLANG::JException::what
virtual const char * what() const
Get error message.
Definition: JException.hh:48
JDETECTOR::JDetectorSimulator::getPMTSimulator
const JPMTSimulator & getPMTSimulator() const
Get PMT simulator.
Definition: JDetectorSimulator.hh:116
JTRIGGER::JTriggerParameters::writeL1
JPrescaler writeL1
write JDAQTimeslice with L1 data
Definition: JTriggerParameters.hh:333
JDetector.hh
JTRIGGER::JTriggerMXShower
Shower trigger.
Definition: JTriggerMXShower.hh:76
JHitL0.hh
JTRIGGER::JSuperFrame2D
2-dimensional frame with time calibrated data from one optical module.
Definition: JSuperFrame2D.hh:41
FATAL
#define FATAL(A)
Definition: JMessage.hh:67
outputFile
string outputFile
Definition: JDAQTimesliceSelector.cc:37
JTRIGGER::JTriggerParameters::writeL0
JPrescaler writeL0
write JDAQTimeslice with L0 data
Definition: JTriggerParameters.hh:332
JSUPPORT::JFileRecorder
Object writing to file.
Definition: JFileRecorder.hh:41
JROOT::counter_type
Long64_t counter_type
Type definition for counter.
Definition: JCounter.hh:24
JEEP::debug_t
debug
Definition: JMessage.hh:29
JTRIGGER::JTrigger3DMuon
Muon trigger.
Definition: JTrigger3DMuon.hh:24
JTRIGGER::JEventOverlap
Match of two events considering overlap in time.
Definition: JEventOverlap.hh:20
JLANG::JException
General exception.
Definition: JException.hh:23
JTRIGGER::JL2Parameters::TMaxLocal_ns
double TMaxLocal_ns
maximal time difference [ns]
Definition: JTriggerParameters.hh:108
JDETECTOR::JDetectorSimulator::reset
void reset(JK40Simulator *k40Simulator)
Reset K40 simulator.
Definition: JDetectorSimulator.hh:144
KM3NETDAQ::getTimeOfFrame
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
KM3NETDAQ::JDAQChronometer
DAQ chronometer.
Definition: JDAQChronometer.hh:21
JTRIGGER::JTimesliceRouter
Router for fast addressing of hits in KM3NETDAQ::JDAQTimeslice data structure as a function of the op...
Definition: JTimesliceRouter.hh:62
JTRIGGER::JBuildL2
Template L2 builder.
Definition: JBuildL2.hh:45
JRandomSampler.hh
JSUPPORT::JMultipleFileScanner::skip
virtual skip_type skip(const skip_type ns)
Skip items.
Definition: JMultipleFileScanner.hh:412