55 msg(MSG::FATAL) <<
"Could not retrieve L1CaloRampDataContainer." <<
endmsg;
61 std::vector<double>
x, ex,
y, ey;
62 std::unique_ptr<TGraphErrors> graph(
nullptr);
63 std::unique_ptr<TF1> func(
new TF1(
"func",
"pol1", 5., 255.));
66 for(; it != itEnd; ++it) {
67 x.clear(); ex.clear();
y.clear(); ey.clear();
68 func->SetParameters(0., 1.);
71 for(
unsigned int step = 0; step < it->second.getNSteps(); ++step) {
73 val = it->second.getLevel1(step)->mean();
74 if(val != val)
continue;
75 val = it->second.getLevel1(step)->rms();
76 if(val != val)
continue;
77 val = it->second.getCalo(step)->mean();
78 if(val != val)
continue;
79 val = it->second.getCalo(step)->rms();
80 if(val != val)
continue;
82 if(step && it->second.getLevel1(step)->mean() <
x.back()) {
88 x.push_back(it->second.getLevel1(step)->mean());
90 ex.push_back(sqrt(it->second.getLevel1(step)->rms()*it->second.getLevel1(step)->rms() + 0.0052083333333333348));
91 y.push_back(it->second.getCalo(step)->mean());
92 ey.push_back(it->second.getCalo(step)->rms());
94 graph.reset(
new TGraphErrors(
x.size(), &
x.front(), &
y.front(), &ex.front(), &ey.front()));
96 if(graph->Fit(func.get(),
"QRF0") != 0) {
109 func->GetParameter(0),
110 func->GetParameter(1),
111 func->GetChisquare(),
121 msg(MSG::WARNING) <<
"Decreasing step energy - ignoring. ("
122 << errCount <<
" occurances)" <<
endmsg;
128 msg(MSG::FATAL) <<
"Could not record EnergyScanResultsContainer." <<
endmsg;
136 msg(MSG::FATAL) <<
"Could not record EnergyScanRunInfoContainer." <<
endmsg;
140 return StatusCode::SUCCESS;