26 int main(
int argc,
char **argv)
42 zap[
'f'] =
make_field(inputFile,
"2D oscillation probability table file");
44 zap[
'x'] =
make_field(
X,
"histogram binning in energy [GeV]");
45 zap[
'y'] =
make_field(
Y,
"histogram binning in cos(theta)");
46 zap[
'#'] =
make_field(channel,
"Oscillation channel") = JOscChannel(JOscChannel::MUON, JOscChannel::MUON, JOscChannel::ANTIPARTICLE);
51 catch (
const exception& error) {
52 FATAL(error.what() << endl);
56 TH2D h0(
"h0",
"; energy [GeV]; cos(#theta)",
X.size()-1, &
X[0],
Y.size()-1, &
Y[0]);
58 const JOscProbTable2D<> g2(inputFile.c_str());
59 const JOscProbInterpolator2D<> interpolator(&g2);
62 RIGHT(15) <<
"cos(theta)" <<
63 RIGHT(15) <<
"P" << endl);
65 for (Int_t ix = 1; ix <= h0.GetNbinsX(); ++ix) {
66 for (Int_t iy = 1; iy <= h0.GetNbinsY(); ++iy) {
68 const Double_t
energy = h0.GetXaxis()->GetBinCenter(ix);
69 const Double_t costh = h0.GetYaxis()->GetBinCenter(iy);
71 const Double_t prob = interpolator(channel, energy, costh);
74 FIXED(15,3) << costh <<
77 h0.SetBinContent(ix, iy, prob);
Utility class to parse command line options.
int main(int argc, char *argv[])
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.
I/O formatting auxiliaries.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Auxiliary methods to convert data members or return values of member methods of a set of objects to a...
General purpose messaging.
then for APP in event gandalf start energy
Utility class to parse command line options.
no fit printf nominal n $STRING awk v X
#define DEBUG(A)
Message macros.