11#include "TParameter.h"
69 JLimit_t& numberOfEvents = inputFile.getLimit();
85 JParser<> zap(
"Example application to study supernova detection background");
101 catch(
const exception &error) {
127 pts->configure(inputFile);
132 int fEnd =
pts->rbegin()->getFrameIndex();
133 int fStart =
pts->begin( )->getFrameIndex();
137 if (
fEnd > inputFile.getUpperLimit()) {
147 FATAL(
"FATAL: inconsistent TTree indexing" <<
endl);
159 const double xmin =
fStart;
160 const double xmax =
fEnd + 1;
162 const int ny = NUMBER_OF_PMTS + 1;
163 const double ymin = -0.5;
178 TH1D*
h_vtr =
new TH1D(
"VetoTimeRange",
"VetoTimeRange", 10000, 0, 10000);
184 for (;
evIn.hasNext(); ) {
190 if (!runNumber) { runNumber =
event->getRunNumber(); }
211 for ( ;
pts->hasNext() && counter != inputFile.getLimit(); ++counter) {
241 int nDOMs = timeslice->size();
243 for (JDAQTimeslice::const_iterator frame = timeslice->begin(); frame != timeslice->end(); ++frame) {
245 int moduleID = frame->getModuleID();
249 JSuperFrame2D_t& buffer = JSuperFrame2D_t::demultiplex(*frame,
255 JSuperFrame1D_t& data = JSuperFrame1D_t::multiplex(buffer);
261 TH1D*
h2dt =
new TH1D(
"H2DT",
"H2DT", 100, -TMax_ns, +TMax_ns);
267 while (++q != data.end() && q->getT() - p->getT() <= TMax_ns) {}
293 if (
h2dt->GetEntries() > 0) {
295 TF1 f(
"f",
"[0]*exp(-0.5*(x-[1])*(x-[1])/([2]*[2]))/(TMath::Sqrt(2*TMath::Pi())*[2]) + [3]");
297 f.SetParameter(0,
h2dt->GetMaximum());
298 f.SetParameter(1,
h2dt->GetMean());
299 f.SetParameter(2,
h2dt->GetRMS() * 0.25);
300 f.SetParameter(3,
h2dt->GetMinimum());
302 h2dt->Fit(&f,
"Q",
"same");
304 double nb =
h2dt->GetNbinsX();
305 double bg_v = f.GetParameter(3) * nb;
Data structure for detector geometry and calibration.
Basic data structure for L0 hit.
int main(int argc, char **argv)
static const char *const status_p
static const char *const mul_p
Dynamic ROOT object management.
Auxiliary methods for mathematics.
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.
Basic data structure for time and time over threshold information of hit.
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.
const JModule & getModule(const JObjectID &id) const
Get module parameters.
Template definition of a multi-dimensional oscillation probability interpolation table.
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.
Reduced data structure for L0 hit.
JDAQUTCExtended getTimesliceStart() const
Get start of timeslice.
int getFrameIndex() const
Get frame index.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
long long int factorial(const long long int n)
Determine factorial.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary classes and methods for ROOT I/O.
bool putObject(TDirectory &dir, const TObject &object)
Write object to ROOT directory.
KM3NeT DAQ data structures and auxiliaries.
Type definition of range.
Transmission with position.
Auxiliary class to select ROOT class based on class name.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.
Auxiliary class to select DAQ hits based on time-over-treshold value.
@ join_t
join consecutive hits according match criterion