Example program to plot oscillogram from 8D oscillations probability table
after 6D interpolation in oscillation parameters.  
More...
#include <iostream>
#include <iomanip>
#include <string>
#include "JLang/JVectorize.hh"
#include "Jeep/JPrint.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
#include "JOscProb/JOscChannel.hh"
#include "JOscProb/JOscParameters.hh"
#include "JOscProb/JOscProbToolkit.hh"
#include "JOscProb/JOscProbInterpolator2D.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 from 8D oscillations probability table
after 6D interpolation in oscillation parameters. 
- Author
 - bjung 
 
Definition in file JPlotOscProbInterpolation6D.cc.
 
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char **  | 
          argv  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 27 of file JPlotOscProbInterpolation6D.cc.
   44     zap[
'f'] = 
make_field(inputFile,  
"8D oscillation probability table file");
 
   46     zap[
'x'] = 
make_field(
X,          
"histogram binning in energy [GeV]"); 
 
   47     zap[
'y'] = 
make_field(
Y,          
"histogram binning in cos(theta)");   
 
   49     zap[
'#'] = 
make_field(channel,    
"Oscillation channel")    = JOscChannel(JOscChannel::MUON, JOscChannel::MUON, JOscChannel::ANTIPARTICLE);
 
   54   catch (
const exception& error) {
 
   55     FATAL(error.what() << endl);
 
   59   TH2D h0(
"h0", 
"; energy [GeV]; cos(#theta)", 
X.size()-1, &
X[0], 
Y.size()-1, &
Y[0]);
 
   61   const JOscProbTable6D<> g6(inputFile.c_str());
 
   64   const JOscProbInterpolator2D<> interpolator(&g2);
 
   67          RIGHT(15) << 
"cos(theta)"   <<
 
   68          RIGHT(15) << 
"P"            << endl);
 
   70   for (Int_t ix = 1; ix <= h0.GetNbinsX(); ++ix) {
 
   71     for (Int_t iy = 1; iy <= h0.GetNbinsY(); ++iy) {
 
   73       const Double_t 
energy = h0.GetXaxis()->GetBinCenter(ix);
 
   74       const Double_t costh  = h0.GetYaxis()->GetBinCenter(iy);
 
   76       const Double_t prob  = interpolator(channel, energy, costh);
 
   79              FIXED(15,3) << costh  <<
 
   82       h0.SetBinContent(ix, iy, prob);
 
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
 
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
 
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
 
Auxiliary data structure for floating point format specification. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
then break fi done getCenter read X Y Z let X
 
then for APP in event gandalf start energy
 
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG