32{
35
37
38 string detectorFile;
41
42 try {
43
45
51
52 JParser<> zap(
"Auxiliary plot fit function of JFitK40.cc.");
53
58
59 zap(argc, argv);
60 }
61 catch(const exception &error) {
62 FATAL(error.what() << endl);
63 }
64
65
67
68 if (detectorFile != "") {
69
71
72 try {
74 }
77 }
78
79 module = detector[0];
80
81 } else {
82
83 module = getModule<JKM3NeT_t>(1001);
84 }
85
87
88 const int nx =
model.getNumberOfPairs();
89 const double xmin = -0.5;
90 const double xmax = nx - 0.5;
91
92 if (
debug >= debug_t) {
93 for (size_t i = 0; i != module.size(); ++i) {
95 }
96 }
97
99
100 TH1D h1("h1", NULL, nx, xmin, xmax);
101
102 double R = 0.0;
103
104 for (int ix = 1; ix <= h1.GetXaxis()->GetNbins(); ++ix) {
105
106 const Double_t
x = h1.GetXaxis()->GetBinCenter(ix);
107
109 const double rate =
model.getValue(
pair);
110
111 R += rate;
112
113 DEBUG(
"bin " << setw(3) << ix <<
' '
114 <<
"(" <<
FILL(2,
'0') <<
pair.first <<
"," <<
FILL(2,
'0') <<
pair.second <<
")" <<
FILL() <<
' '
116 module[
pair.second].getDirection()) <<
' '
117 <<
FIXED(6,3) << rate << endl);
118
119 h1.SetBinContent(ix, rate);
120 }
121
122 cout <<
"Total rate " <<
FIXED(7,3) << R <<
" [Hz]." << endl;
123
124 out.Write();
125 out.Close();
126}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
#define gmake_property(A)
macros to convert (template) parameter to JPropertiesElement object
Data structure for a composite optical module.
Utility class to parse parameter values.
Utility class to parse command line options.
JDirection3D getDirection(const Vec &dir)
Get direction.
double getDot(const JNeutrinoDirection &first, const JNeutrinoDirection &second)
Dot product.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for sequence of same character.
Auxiliary data structure for floating point format specification.
Model for fit to acoustics data.
Fit parameters for two-fold coincidence rate due to K40.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...