12#include "TGraphErrors.h"
21#include "slalib/slalib.h"
23#include "flux/Flux.hh"
32int main(
int argc,
char **argv){
49 JParser<> zap(
"Auxiliary program to integrate atmospheric neutrino flux over apparent trajectory of a source.");
61 catch(
const exception& error) {
84 for (
int i = 0; i <
NE; ++i){
91 for (
int i = 0; i <
NT; ++i) {
115 for (
int j = 0; j <
NE; ++j){
127 double rc = (
flx[1]-
flx[0])/(E[1]-E[0]);
128 oss_formula <<
"((x>=" << E[0] <<
"&&x<=" << E[1] <<
")*(" <<
rc <<
"*(x-" << E[0] <<
")+" <<
flx[0] <<
")+";
131 for (
int i = 2; i <
NE; ++i){
133 rc = (
flx[i]-
flx[i-1])/(E[i]-E[i-1]);
134 oss_formula <<
"(x>" << E[i-1] <<
"&&x<=" << E[i] <<
")*(" <<
rc <<
"*(x-" << E[i-1] <<
")+" <<
flx[i-1] <<
")+";
142 if (getFilenameExtension(file_name)==
"txt"){
143 ofstream out(file_name);
149 if (getFilenameExtension(file_name)==
"root"){
150 TFile out(file_name.c_str(),
"recreate");
154 f1->SetTitle(
"Linear interpolation");
155 f1->Write(
"formula");
158 TGraph*
graph =
new TGraph();
159 for (
int i = 0; i <
NE; ++i){
164 graph->GetXaxis()->SetTitle(
"E");
165 graph->GetYaxis()->SetTitle(
"Flux");
166 graph->Write(
"flux");
Interface methods for SLALIB and auxiliary classes and methods for astronomy.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Auxiliary class to define a range between two values.
int main(int argc, char **argv)
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).