67   JLimit_t&              numberOfEvents = inputFile.getLimit();
 
   72   JToTRange_t            totRange_ns;
 
   76   int                    preTriggerThreshold;
 
   82     JParser<> zap(
"Example application to study supernova detection background");
 
   86     zap[
'n'] = 
make_field(numberOfEvents)      = JLimit::max();
 
   90     zap[
'C'] = 
make_field(selector)            = getROOTClassSelection<JDAQTimesliceTypes_t>();
 
   92     zap[
'P'] = 
make_field(preTriggerThreshold) = 4;
 
   97   catch(
const exception &error) {
 
   98     FATAL(error.what() << endl);
 
  112   TTree *tr = 
new TTree(
"singledom", 
"SN coincidence info");
 
  128   pts->configure(inputFile);
 
  133   int    fEnd   = pts->rbegin()->getFrameIndex();
 
  134   int    fStart = pts->begin( )->getFrameIndex();
 
  138   if (fEnd > inputFile.getUpperLimit()) {
 
  139     fEnd = fStart + inputFile.getUpperLimit();
 
  142   int fLength = 1 + fEnd - fStart;
 
  144   NOTICE(
"begin | end | length = " << fStart << 
" | " << fEnd << 
" | " << fLength << endl);
 
  159   TH1D* h_vtr = 
new TH1D(
"VetoTimeRange",
"VetoTimeRange", 10000, 0, 10000);
 
  165     for (; evIn.hasNext(); ) {
 
  167         STATUS(
"event: " << setw(10) << evIn.getCounter() << 
'\r'); 
DEBUG(endl);
 
  171         if (!runNumber) { runNumber = 
event->getRunNumber(); }
 
  173         JVeto vp(*event, hitRouter);
 
  175         triggeredEvents[
event->getFrameIndex()].push_back(vp);
 
  177         h_vtr->Fill(vp.getLength());
 
  181   STATUS(triggeredEvents.size() << 
" JDAQEvents loaded in veto buffer." << endl);
 
  189   TFile *out = 
new TFile(
outputFile.c_str(), 
"RECREATE");
 
  190   tr->SetDirectory(out);
 
  192   for ( ; pts->hasNext() && counter != inputFile.getLimit(); ++counter) {
 
  194     STATUS(
"timeslice: " << setw(10) << counter << 
'\r'); 
DEBUG(endl);
 
  206     if (triggeredEvents.count(frame_number)) {
 
  207       veto = triggeredEvents.at(frame_number);
 
  212     JDataSN preTrigger(TMax_ns, preTriggerThreshold);
 
  214     preTrigger(timeslice, moduleRouter, totSelector_ns);
 
  236           SNdata = p.getPeak();
 
  237           SNdata.vetoIndex = trgA1(p) ? (trgAV(p) ? 0 : 2) : (trgAV(p) ? 1 : 3); 
 
  238           SNdata.timeslice_time = event_time;
 
int initialize_root_tree(JCoincidenceSN &obs, int *frame_number, TTree *tr)
Initialize the output ROOT file with CCSN candidate information.
 
#define DEBUG(A)
Message macros.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
Simple wrapper around JModuleRouter class for direct addressing of PMT data in detector data structur...
 
Router for direct addressing of module data in detector data structure.
 
Utility class to parse command line options.
 
Auxiliary class to store reduced information of a coincidence on an optical module This class allows ...
 
Auxiliary class to build the supernova trigger dataset.
 
SN filter based on veto window.
 
SN filter based on multiplicity selection optional suppression of multi-module coincidences WARNING: ...
 
Auxiliary class to apply the supernova trigger to SN data.
 
Auxiliary class to manage a set of vetoes.
 
Auxiliary class to define a veto time window on a set of optical modules.
 
Auxiliary interface for direct access of elements in ROOT TChain.
 
Template definition for direct access of elements in ROOT TChain.
 
JDAQUTCExtended getTimesliceStart() const
Get start of timeslice.
 
int getFrameIndex() const
Get frame index.
 
JTriggerCounter_t next()
Increment trigger counter.
 
Data structure for UTC time.
 
double getTimeNanoSecond() const
Get time (limited to 16 ns cycles).
 
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
 
Long64_t counter_type
Type definition for counter.
 
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
 
Type definition of range.
 
Auxiliary class for a type holder.
 
Auxiliary class to select ROOT class based on class name.
 
Auxiliary class to select JTreeScanner based on ROOT class name.
 
Auxiliary class for defining the range of iterations of objects.
 
Auxiliary class to select DAQ hits based on time-over-treshold value.