36 using namespace JROOT;
 
   51     tr->Branch(
"dom_id", &obs.
moduleID, 
"dom_id/I");
 
   52     tr->Branch(
"vetoIndex", &obs.
vetoIndex, 
"vetoIndex/I");
 
   53     tr->Branch(
"event_time", &obs.
time, 
"event_time/D");
 
   54     tr->Branch(
"timeslice_time_s", &obs.
timeslice_time, 
"timeslice_time_s/D");
 
   55     tr->Branch(
"frame_number", frame_number, 
"frame_number/I");
 
   56     tr->Branch(
"multiplicity", &(obs.
multiplicity), 
"multiplicity/I");
 
   60 int main(
int argc, 
char **argv)
 
   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);
 
  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); 
 
Data structure for detector geometry and calibration.
 
int main(int argc, char **argv)
 
int initialize_root_tree(JCoincidenceSN &obs, int *frame_number, TTree *tr)
Initialize the output ROOT file with CCSN candidate information.
 
General purpose messaging.
 
#define DEBUG(A)
Message macros.
 
Scanning of objects from multiple files according a format that follows from the extension of each fi...
 
Utility class to parse command line options.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
I/O formatting auxiliaries.
 
ROOT TTree parameter settings of various packages.
 
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.
 
double getLength()
Get length of veto time range.
 
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.
 
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.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
Auxiliary classes and methods for ROOT I/O.
 
Long64_t counter_type
Type definition for counter.
 
KM3NeT DAQ data structures and auxiliaries.
 
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.