44 int main(
int argc, 
char **argv) {
 
   56     JParser<> zap(
"Auxiliary program to test generation of L0 background.");
 
   58     zap[
'f'] = 
make_field(inputFile,         
"input file (output from JRipple).");
 
   60     zap[
'T'] = 
make_field(duration_ms,          
"duration in ms of the background sample.")           = 500;
 
   61     zap[
'N'] = 
make_field(outNumberOfLines,  
"number of lines of the simulated (output) detector") = 115;
 
   65   catch(
const exception &error) {
 
   66     FATAL(error.what() << endl);
 
   69   TFile* in = TFile::Open(inputFile.c_str(), 
"exist");
 
   71   if (in == NULL || !in->IsOpen()) {
 
   72     FATAL(
"File: " << inputFile << 
" not opened." << endl);
 
   75   NOTICE(
"Initialising generator." << endl);
 
   81   NOTICE(
"File loaded." << endl);
 
   83   int T_ms = duration_ms;
 
   88   int inNumberOfLines = 1;
 
  100   NOTICE(
"Generation SEQ" << endl);
 
  102   for (
int i = 0; i < 10; i++) {
 
  105     for (
int j = 0; 
j < T_ms; 
j++) {
 
  106       RT_SEQ[i]->Fill(
j, seq[0][
j]);
 
  107       NC_SEQ[i]->Fill(
j, seq[1][
j]);
 
  113   NOTICE(
"Generation SHF" << endl);
 
  115   for (
int i = 0; i < 10; i++) {
 
  118     for (
int j = 0; 
j < T_ms; 
j++) {
 
  120       RT_SHF[i]->Fill(
j, shf[0][
j]);
 
  121       NC_SHF[i]->Fill(
j, shf[1][
j]);
 
  126   NOTICE(
"Generation H2D + FIT" << endl);
 
  132   for (
int j = 0; 
j < T_ms; 
j++) {
 
  133     RT_FIT[
"SG_1"]->Fill(
j, fit1[0][
j]);
 
  136   NOTICE(
"Generation H2D + FIT - rebin = 5" << endl);
 
  143   for (
size_t j = 0; 
j < fit5[0].size(); 
j++) {
 
  144     cout << fit5[0][
j] << endl;
 
  145     RT_FIT[
"SG_5"]->Fill(
j, fit5[0][
j]);
 
  163   TDirectory* dseq = out.mkdir(
"SEQ");
 
  164   TDirectory* dshf = out.mkdir(
"SHF");
 
  165   TDirectory* dfit = out.mkdir(
"FIT");
 
KM3NeT DAQ constants, bit handling, etc.
 
int main(int argc, char **argv)
 
This file provides a class to emulate a L0 (L1) background on the ms time scale for an arbitrarily si...
 
Dynamic ROOT object management.
 
General purpose messaging.
 
Utility class to parse command line options.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
I/O formatting auxiliaries.
 
Auxiliary class to define a range between two values.
 
Utility class to parse command line options.
 
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys.
 
void Write(TDirectory &out, const bool wm=false)
Write objects to file.
 
Class to emulate L0 background for an arbitrarily sized detector.
 
h2d_t * generate_H2D(int rb=1)
Generate 2D sample.
 
bg_type generate_fitted(int rb=1)
Generate fitted L1 sample.
 
void configureRatio(const int inputNumberOfLines, const int outputNumberOfLines)
Configure generation ratio.
 
bg_type generate_shuffled(bool randomizeRun=false)
Generate sample of L0 background The sampling of the L0 data is not sequential but random within the ...
 
void configureTimeWindow(const int T_ms)
Configure the duration of an output sample.
 
void setSeed(const UInt_t uSeed=0)
Set TRandom seed.
 
bg_type generate()
Generate sample of L0 background L0 data are randomly sampled from a single L0 dataset.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).