Auxiliary plot fit function of JFitK40.cc.  
More...
#include <string>
#include <iostream>
#include <iomanip>
#include <cmath>
#include "TROOT.h"
#include "TFile.h"
#include "TH1D.h"
#include "km3net-dataformat/online/JDAQ.hh"
#include "JDetector/JModule.hh"
#include "JTools/JCombinatorics.hh"
#include "JROOT/JRootToolkit.hh"
#include "JCalibrate/JCalibrateK40.hh"
#include "JCalibrate/JFitK40.hh"
#include "Jeep/JProperties.hh"
#include "Jeep/JPrint.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
 
Go to the source code of this file.
 | 
| int  | main (int argc, char **argv) | 
|   | 
Auxiliary plot fit function of JFitK40.cc. 
- Author
 - mdejong 
 
Definition in file JPlotK40.cc.
 
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char **  | 
          argv  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 31 of file JPlotK40.cc.
   35   using namespace KM3NETDAQ;
 
   37   JFitK40Parameters fitk40;               
 
   52     JParser<> zap(
"Auxiliary plot fit function of JFitK40.cc.");
 
   60   catch(
const exception &error) {
 
   61     FATAL(error.what() << endl);
 
   69   const int    nx   = combinatorics.getNumberOfPairs();
 
   70   const double xmin = -0.5;
 
   71   const double xmax = nx - 0.5;
 
   76   TH1D 
h1(
"h1", NULL, nx, xmin, xmax);
 
   79               h1.GetXaxis()->GetXmin(),
 
   80               h1.GetXaxis()->GetXmax(),
 
   85   fit.setModelParameters(fitk40.getModelParameters());
 
   87   fit.sort(JPairwiseComparator(module));
 
   89   for (
int ix = 1; ix <= 
h1.GetXaxis()->GetNbins(); ++ix) {
 
   91     const Double_t x = 
h1.GetXaxis()->GetBinCenter(ix);
 
   94     const double             rate = fit.getValue(pair);
 
   96     h1.SetBinContent(ix, rate);
 
Utility class to parse command line options. 
 
JCombinatorics::pair_type pair_type
 
JFitK40_t< TF2 > JFitK40
Type definition for backward compatibility. 
 
#define gmake_property(A)
macro to convert (template) parameter to JPropertiesElement object 
 
then set_variable singlesRate set_variable doublesRate set_variable numberOfSlices echo Generating random background echo Singles rate
 
Utility class to parse parameter values. 
 
then for HISTOGRAM in h0 h1
 
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
 
T & getInstance(const T &object)
Get static instance from temporary object. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
static const int NUMBER_OF_PMTS
Total number of PMTs in module.