#include #include #include "TROOT.h" #include "TFile.h" #include "TH1D.h" #include "JAcoustics/JAcousticsSupportkit.hh" #include "Jeep/JParser.hh" #include "Jeep/JMessage.hh" /** * \file * * Auxiliary program to plot attenuation length. * * See Figure 4.1 in reference: * Robert Lahmann: "Ultra-High-Energy Neutrinos and Their Acoustic Detection in the Sea" * Habilitation Thesis, University of Erlangen * * \author mdejong */ int main(int argc, char **argv) { using namespace std; using namespace JPP; string outputFile; double D_m; int debug; try { JParser<> zap("Auxiliary program to plot attenuation length."); zap['o'] = make_field(outputFile) = "attenuation_length.root"; zap['D'] = make_field(D_m, "depth [m]"); zap['d'] = make_field(debug) = 1; zap(argc, argv); } catch(const exception &error) { FATAL(error.what() << endl); } TFile out(outputFile.c_str(), "recreate"); TH1D h0("h0", NULL, 1000, 0.0, 3.0); for (Int_t ix = 1; ix <= h0.GetXaxis()->GetNbins(); ++ix) { const double x = h0.GetBinCenter(ix); const double f_kHz = pow(10.0, x); const double y = getAttenuationLength(D_m, f_kHz); h0.SetBinContent(ix, y * 1.0e-3); } out.Write(); out.Close(); }