Example program to plot oscillogram.  
More...
#include <iostream>
#include <iomanip>
#include <string>
#include "Jeep/JPrint.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
#include "JOscProb/JOscChannel.hh"
#include "JOscProb/JOscParameters.hh"
#include "JOscProb/JOscillogram.hh"
#include "JOscProb/JOscProbToolkit.hh"
#include "JOscProb/JOscProbInterpolator.hh"
#include "TFile.h"
#include "TH2D.h"
Go to the source code of this file.
|  | 
| int | main (int argc, char **argv) | 
|  | 
Example program to plot oscillogram. 
- Author
- bjung 
Definition in file JPlotOscillogram.cc.
      
        
          | int main | ( | int | argc, | 
        
          |  |  | char ** | argv | 
        
          |  | ) |  |  | 
      
 
Definition at line 25 of file JPlotOscillogram.cc.
   30   typedef JGrid<double>     JGrid_t;
 
   51     zap[
'f'] = 
make_field(inputFile,    
"oscillation probability table file");
 
   53     zap[
'X'] = 
make_field(abscissaType, 
"abscissa type") =
 
   57     zap[
'x'] = 
make_field(abscissaGrid, 
"abscissa binning");
 
   58     zap[
'Y'] = 
make_field(ordinateType, 
"ordinate type") =
 
   62     zap[
'y'] = 
make_field(ordinateGrid, 
"ordinate binning"); 
 
   64       = JOscParameters<double>(
false);
 
   65     zap[
'#'] = 
make_field(channel,      
"oscillation channel")
 
   66       = JOscChannel(JFlavour_t::MUON, JFlavour_t::MUON, JChargeParity_t::PARTICLE);
 
   72   catch (
const exception& error) {
 
   73     FATAL(error.what() << endl);
 
   77   const JOscProbInterpolator<> interpolator(inputFile.c_str(), 
parameters);
 
   80           abscissaGrid.getSize(), abscissaGrid.getXmin(), abscissaGrid.getXmax(),
 
   81           ordinateGrid.getSize(), ordinateGrid.getXmin(), ordinateGrid.getXmax());
 
   83   const JOscillogram oscillogram(abscissaType, abscissaGrid,
 
   84                                  ordinateType, ordinateGrid,
 
   85                                  channel,      interpolator);
 
   89   for (
int ix = 0; ix < abscissaGrid.getSize(); ++ix) {
 
   90     for (
int iy = 0; iy < ordinateGrid.getSize(); ++iy) {
 
   92       const double x = abscissaGrid.getX(ix);
 
   93       const double y = ordinateGrid.getX(iy);
 
   95       const double P = oscillogram.getP(ix, iy);
 
   99       h0.SetBinContent(ix+1, iy+1, P);
 
Utility class to parse command line options. 
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
Auxiliary data structure for floating point format specification. 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
then for APP in event gandalf start energy
#define DEBUG(A)
Message macros.