29int main(
int argc,
char **argv)
42 JParser<> zap(
"Program to extract time offsets of DOM-DOM correlations");
44 zap[
'f'] =
make_field(inputFile,
"input file") =
"monitor.root";
55 catch(
const exception &error) {
75 zmap[
module->getString()][module->getFloor()] = module->getID();
86 TF1 f1(
"f1",
"[0]*exp(-0.5*(x-[1])*(x-[1])/([2]*[2])) + [3]");
97 TFile* in = TFile::Open(inputFile.c_str(),
"exist");
99 if (in ==
NULL || !in->IsOpen()) {
100 FATAL(
"File: " << inputFile <<
" not opened." <<
endl);
127 h2->GetYaxis()->GetNbins(), h2->GetYaxis()->GetXmin(), h2->GetYaxis()->GetXmax());
137 TH1D*
py = h2->ProjectionY(
"__py",
139 h2->GetXaxis()->FindBin(TString(
Form(
"%i",
module_2))),
"e");
149 double mm=h1->GetXaxis()->GetBinCenter(h1->GetMaximumBin());
151 f1.SetParameter(0,
double(h1->GetMaximum()));
152 f1.SetParameter(1,
double(
mm));
153 f1.SetParameter(2, 50.);
155 for (
Int_t i = 0; i != f1.GetNpar(); ++i) {
156 f1.SetParError(i, 0.0);
161 if (h1->GetMaximum()>0){
163 h1->Fit(&f1,
"LQ",
"same");
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);
192 for (
auto& h1 :
H1) {
193 for (
auto& h2 : h1.second) {
194 h2.second.p->Write();