30{
33
34 string inputFile;
39
40 try {
41
42 JParser<> zap(
"Program to extract time offsets of DOM-DOM correlations");
43
44 zap[
'f'] =
make_field(inputFile,
"input file") =
"monitor.root";
50
52 return 1;
53 }
54 }
55 catch(const exception &error) {
57 }
58
59
61
62 try {
64 }
67 }
68
69
71
73
75 zmap[module->getString()][module->getFloor()] = module->getID();
76 }
77
81 {}
82
84 };
85
86 TF1 f1("f1", "[0]*exp(-0.5*(x-[1])*(x-[1])/([2]*[2])) + [3]");
87
89
90
91
94
96
97 TFile* in = TFile::Open(inputFile.c_str(),
"exist");
98
99 if (in ==
NULL || !in->IsOpen()) {
100 FATAL(
"File: " << inputFile <<
" not opened." <<
endl);
101 }
102
103
106
108
110
112
114 continue;
115 }
116
119
121
123
125
127 h2->GetYaxis()->GetNbins(), h2->GetYaxis()->GetXmin(), h2->GetYaxis()->GetXmax());
128
130 }
131
134
136
137 TH1D*
py = h2->ProjectionY(
"__py",
139 h2->GetXaxis()->FindBin(TString(
Form(
"%i",
module_2))),
"e");
140
142
144 }
145 }
146
148
149 double mm=h1->GetXaxis()->GetBinCenter(h1->GetMaximumBin());
150
151 f1.SetParameter(0, double(h1->GetMaximum()));
152 f1.SetParameter(1,
double(
mm));
153 f1.SetParameter(2, 50.);
154
155 for (
Int_t i = 0; i != f1.GetNpar(); ++i) {
156 f1.SetParError(i, 0.0);
157 }
158
159
160
161 if (h1->GetMaximum()>0){
162
163 h1->Fit(&f1,"LQ", "same");
164
165
166
167 maxarr[
string.getIndex(
string_1.first) ][
string.getIndex(
string_2.first) ][0] = h1->GetFunction(
"f1")->GetParameter(1);
168 maxarr[
string.getIndex(
string_1.first) ][
string.getIndex(
string_2.first) ][1] = h1->GetFunction(
"f1")->GetParameter(0);
169 maxarr[
string.getIndex(
string_1.first) ][
string.getIndex(
string_2.first) ][2] = h1->GetFunction(
"f1")->GetParameter(2);
170 }
171 }
172 }
173 }
174 }
175 }
176
177
182 }
183 }
184 }
185
186
187
189
190 out.cd();
191
192 for (
auto& h1 :
H1) {
193 for (auto& h2 : h1.second) {
194 h2.second.p->Write();
195 }
196 }
197
198 out.Close();
199}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
#define MAKE_CSTRING(A)
Make C-string.
Template definition of a multi-dimensional oscillation probability interpolation table.
JReader & read(JReader &in) override final
Read from input.
Utility class to parse command line options.
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).
Router for mapping of string identifier to index.