Program to plot PDF of Cherenkov light from EM-shower using interpolation tables.
More...
#include <string>
#include <iostream>
#include <iomanip>
#include "TROOT.h"
#include "TFile.h"
#include "TH2D.h"
#include "JTools/JAbstractHistogram.hh"
#include "JPhysics/JNPE_t.hh"
#include "JGeometry3D/JAngle3D.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) |
|
Program to plot PDF of Cherenkov light from EM-shower using interpolation tables.
- Author
- lquinn
Definition in file JPhysics/JShowerNPE.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 24 of file JPhysics/JShowerNPE.cc.
29 typedef JAbstractHistogram<double> JHistogram_t;
42 JParser<> zap(
"Program to plot PDF of Cherenkov light from EM-shower using interpolation tables.");
46 zap[
'D'] =
make_field(dir,
"(theta, phi) of PMT [rad]");
47 zap[
'x'] =
make_field(
x,
"histogram x-binning") = JHistogram_t();
48 zap[
'y'] =
make_field(y,
"histogram y-binning") = JHistogram_t();
55 catch(
const exception &error) {
56 FATAL(error.what() << endl);
65 if (!
x.is_valid()) {
x = JHistogram_t(150, 0.0, 150.0); }
66 if (!y.is_valid()) { y = JHistogram_t(200, -1.0, +1.0); }
68 TH2D h0(
"h0",
"PDF Projection; D [m]; cos #theta_{0}",
69 x.getNumberOfBins(),
x.getLowerLimit(),
x.getUpperLimit(),
70 y.getNumberOfBins(), y.getLowerLimit(), y.getUpperLimit());
72 for (
int ix = 1; ix <= h0.GetNbinsX(); ++ix) {
73 for (
int iy = 1; iy <= h0.GetNbinsY(); ++iy) {
75 const double cd = h0.GetYaxis()->GetBinCenter(iy);
76 const double D = h0.GetXaxis()->GetBinCenter(ix);
78 const double Y = npe.calculate(
E, D, cd, dir.getTheta(), dir.getPhi());
80 h0.SetBinContent(ix, iy, Y/
E);
Utility class to parse command line options.
Auxiliary data structure for shower PDF.
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
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
do echo Generating $dir eval D