ATLAS Offline Software
Loading...
Searching...
No Matches
RtCalibrationIntegration.cxx File Reference
#include "MdtCalibRt/RtCalibrationIntegration.h"
#include <algorithm>
#include <fstream>
#include <iostream>
#include "AthenaKernel/getMessageSvc.h"
#include "GaudiKernel/MsgStream.h"
#include "MdtCalibData/RtFromPoints.h"
#include "MdtCalibData/RtRelationLookUp.h"
#include "MdtCalibRt/RtParabolicExtrapolation.h"
#include "MdtCalibT0/T0MTHistos.h"
#include "TF1.h"
#include "TList.h"

Go to the source code of this file.

Functions

Double_t slope_function_C (Double_t *x, Double_t *par)
void update_parameter_on_mttmax (TH1 *h, TF1 *f, const float &b, const float &T, const T0MTSettingsTMax &tmax_settings)

Function Documentation

◆ slope_function_C()

Double_t slope_function_C ( Double_t * x,
Double_t * par )
inline

Definition at line 23 of file RtCalibrationIntegration.cxx.

23 {
24 Double_t &t(x[0]);
25 Double_t &a(par[0]), &b(par[1]), &t_0(par[2]), &back(par[3]);
26 return back + std::exp(a + b * (t - t_0));
27}
static Double_t a
#define x

◆ update_parameter_on_mttmax()

void update_parameter_on_mttmax ( TH1 * h,
TF1 * f,
const float & b,
const float & T,
const T0MTSettingsTMax & tmax_settings )
inline

Definition at line 29 of file RtCalibrationIntegration.cxx.

29 {
30 Double_t rmin, rmax;
31 f->GetRange(rmin, rmax);
32 std::unique_ptr<TF1> slope_function =
33 std::make_unique<TF1>("slope_function", slope_function_C, rmin, rmin + tmax_settings.WidthAB(), 4);
34 slope_function->SetParameter(0, f->GetParameter(T0MTHistos::TMAX_PAR_NR_A));
35 slope_function->FixParameter(1, b);
36 slope_function->FixParameter(2, f->GetParameter(T0MTHistos::TMAX_PAR_NR_T0));
37 slope_function->FixParameter(3, f->GetParameter(T0MTHistos::TMAX_PAR_NR_BACK));
38 h->Fit("slope_function", "R+", "");
39 f->FixParameter(T0MTHistos::TMAX_PAR_NR_A, slope_function->GetParameter(0));
40 f->FixParameter(T0MTHistos::TMAX_PAR_NR_B, b);
41 f->FixParameter(T0MTHistos::TMAX_PAR_NR_T, T);
42}
Double_t slope_function_C(Double_t *x, Double_t *par)
Header file for AthHistogramAlgorithm.
static constexpr int TMAX_PAR_NR_T0
Definition T0MTHistos.h:62
static constexpr int TMAX_PAR_NR_T
Definition T0MTHistos.h:61
static constexpr int TMAX_PAR_NR_B
Definition T0MTHistos.h:61
static constexpr int TMAX_PAR_NR_BACK
Definition T0MTHistos.h:61
static constexpr int TMAX_PAR_NR_A
Definition T0MTHistos.h:61
double WidthAB() const
Width of the region in which the parameters a and b are estimated.