Go to the documentation of this file.
   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);
 
  144   for (
int j = 0; 
j < fit5[0].size(); 
j++) {
 
  145     cout << fit5[0][
j] << endl;
 
  146     RT_FIT[
"SG_5"]->
Fill(
j, fit5[0][
j]);
 
  168   TDirectory* dseq = out.mkdir(
"SEQ");
 
  169   TDirectory* dshf = out.mkdir(
"SHF");
 
  170   TDirectory* dfit = out.mkdir(
"FIT");
 
  
void Write(TFile &out)
Write histograms to file.
 
Class to emulate L0 background for an arbitrarily sized detector.
 
Utility class to parse command line options.
 
Auxiliary class to manage set of compatible ROOT objects (e.g.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
bg_type generate_fitted(int rb=1)
Generate fitted L1 sample.
 
h2d_t * generate_H2D(int rb=1)
Generate 2D sample.
 
int main(int argc, char **argv)
 
void Write(TDirectory &out, const bool wm=false)
Write objects to file.
 
bg_type generate()
Generate sample of L0 background L0 data are randomly sampled from a single L0 dataset.
 
void Fill(const JFit &fA, const JFit &fB, const bool option)
Fill histograms.
 
void setSeed(const UInt_t uSeed=0)
Set TRandom seed.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
void configureRatio(const int iSize, const int oSize)
Set rebinning ratio.
 
void configureTimeWindow(const int T_ms)
Configure the duration of an output sample.
 
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 ...