183 {
185 if (!prov_diff) {
187 log << MSG::WARNING <<
"MultilayerRtDifference::DoFit: Not enough hits!" <<
endmsg;
188 return false;
189 }
190 if (prov_diff->Fit("polfun", "Q", "", 4., 15.) != 0) {
192 log << MSG::WARNING <<
"MultilayerRtDifference: Fit of polinomial failed! Not updating scale!" <<
endmsg;
193 return false;
194 }
197 log << MSG::WARNING <<
"MultilayerRtDifference: No Scale update needed! Scale correction: " <<
m_polfun->GetParameter(0)
199 return true;
200 }
201 if (!rt_relation) return true;
203 if (std::abs(scale) > 2)
scale *= 4;
204 if (rt_relation->hasTmaxDiff()) {
scale += rt_relation->GetTmaxDiff(); }
205 rt_relation->SetTmaxDiff(scale);
206 if (seg.empty()) return true;
207
208 for (const auto &segment : seg) {
210 float old_corr = hit->TemperatureTime();
211 float corr =
RtScaleFunction(hit->driftTime(), hit->identify().mdtMultilayer() == 2, *rt_relation);
212 hit->setTemperatureTime(corr);
213 hit->setDriftTime(hit->driftTime() - corr + old_corr);
214 hit->setDriftRadius(rt_relation->radius(hit->driftTime()), hit->sigmaDriftRadius());
215 }
216 }
217 return true;
218 }
std::shared_ptr< MdtCalibHitBase > MdtHitPtr
typedef for a collection of MdtCalibHitBase s
IMessageSvc * getMessageSvc(bool quiet=false)
float RtScaleFunction(const float t, const bool ml2, const IRtRelation &rtrelation)
TProfile(*args, **kwargs)