![]() |
ATLAS Offline Software
|
Histogram and fitter class for drift time and pulsehight spectra The rising slope is fitted by a fermi-function: \(f(t)=r_{u,0} + \frac{A}{1+exp((t_0 - t)/T_0}\). More...
#include <T0MTHistos.h>
Classes | |
| class | Slice |
Public Member Functions | |
| T0MTHistos ()=default | |
| Default Constructor. | |
| T0MTHistos (int id, const T0MTSettings *settings, const char *hname=nullptr) | |
| Initializing constructor. | |
| void | Initialize (int id, const T0MTSettings *settings, const char *hname=nullptr) |
| Initialize class. | |
| TH1F * | GetTSpec () const |
| get drift time spectrum | |
| void | SetTSpec (int id, TH1F *spec, const T0MTSettings *settings, bool copy_spec=true) |
| set the pointer of the drift-time spectrum to an existing spectrum. | |
| void | FillT (double t) |
| fill drift time spectrum | |
| bool | FitT0 () |
| Perform t0-fit Returns true if fit is successfull. | |
| bool | FitTmax () |
| Performs tmax-fit Returns true if fit is successfull. | |
| int | Id () const |
| return tube id | |
| bool | T0Ok () const |
| returns true if t0-fit was successfull | |
| int | StatusCode () const |
| returns status code - the status code applies only to the t0 fit | |
| const TF1 * | GetT0Function () const |
| returns function fitted to the riding edge of the spectrum | |
| TF1 * | GetT0Function () |
| returns function fitted to the riding edge of the spectrum | |
| bool | TmaxOk () const |
| returns true if tmax-fir was successfull | |
| const TF1 * | GetTMaxFunction () const |
| returns function fitted to the riding edge of the spectrum | |
| TF1 * | GetTMaxFunctionNC () const |
| returns function fitted to the riding edge of the spectrum | |
| double | T0Chi2 () const |
| returns t0 chi2 | |
Static Public Attributes | |
| static constexpr int | N_T0_FIT_PAR = 4 |
| number of parameters in t0 fit | |
| static constexpr int | T0_PAR_NR_T0 = 0 |
| parameter numbers in t0 fit | |
| static constexpr int | T0_PAR_NR_T = 1 |
| static constexpr int | T0_PAR_NR_BACK = 2 |
| static constexpr int | T0_PAR_NR_A = 3 |
| static constexpr int | N_TMAX_FIT_PAR = 6 |
| number of parameters for tmax fit | |
| static constexpr int | TMAX_PAR_NR_TMAX = 0 |
| parameters numbers for tmax fit | |
| static constexpr int | TMAX_PAR_NR_T = 1 |
| static constexpr int | TMAX_PAR_NR_BACK = 2 |
| static constexpr int | TMAX_PAR_NR_A = 3 |
| static constexpr int | TMAX_PAR_NR_B = 4 |
| static constexpr int | TMAX_PAR_NR_T0 = 5 |
Private Member Functions | |
| bool | NormalFit () |
| normal t0 fit | |
| bool | T0Scramble () |
| try to get better start values from a scrambled histogram | |
| void | TopChi2 () |
| top chi2 calculation | |
| void | TopSlicing () |
| top slicing metyhod | |
Private Attributes | |
| std::unique_ptr< TH1F > | m_time {nullptr} |
| time spectrum | |
| int | m_id {-1} |
| tube id; | |
| std::unique_ptr< TF1 > | m_t0_fermi {nullptr} |
| function fitted to the riding edghe of the spectrum | |
| bool | m_t0_ok {false} |
| is true if t0 fit was successful | |
| int | m_status_code {99} |
| status code for t0 fit (0 ok, 1 not fitted, 2 low statistics, 3 failed) | |
| std::unique_ptr< TF1 > | m_tmax_fermi {nullptr} |
| function fitted to the falling edge of the spectrum | |
| double | m_tmax_ok {FLT_MAX} |
| is true if tmax fit was successful | |
| TDirectory * | m_dir {nullptr} |
| TDirectory where debug and result histograms are stored. | |
| const T0MTSettings * | m_settings {nullptr} |
| Pointer to settings class. | |
| double | m_chi2 {FLT_MAX} |
| chi2/NDF value | |
Histogram and fitter class for drift time and pulsehight spectra The rising slope is fitted by a fermi-function: \(f(t)=r_{u,0} + \frac{A}{1+exp((t_0 - t)/T_0}\).
The falling slope is fitted by \(g(t)=r_{u,max} + \frac{e(t,a,b)}{1+exp((t_{max} - t)/T_{max}}\) where \(e(t, a, b) = a e^{bt}\). A pattern recognition determines the fit ranges and the parameters \(r_u\), \(A\), \(a\) and \(b\).
}
Definition at line 40 of file T0MTHistos.h.
|
default |
Default Constructor.
|
inline |
Initializing constructor.
| id | tube id |
| settings | t0-fit settings: settings will be asked about histogram binning |
Definition at line 50 of file T0MTHistos.h.
| void MuonCalib::T0MTHistos::FillT | ( | double | t | ) |
| bool MuonCalib::T0MTHistos::FitT0 | ( | ) |
Perform t0-fit Returns true if fit is successfull.
Definition at line 114 of file T0MTHistos.cxx.
| bool MuonCalib::T0MTHistos::FitTmax | ( | ) |
Performs tmax-fit Returns true if fit is successfull.
Definition at line 142 of file T0MTHistos.cxx.
|
inline |
returns function fitted to the riding edge of the spectrum
Definition at line 106 of file T0MTHistos.h.
|
inline |
returns function fitted to the riding edge of the spectrum
Definition at line 104 of file T0MTHistos.h.
|
inline |
returns function fitted to the riding edge of the spectrum
Definition at line 110 of file T0MTHistos.h.
|
inline |
returns function fitted to the riding edge of the spectrum
Definition at line 112 of file T0MTHistos.h.
|
inline |
|
inline |
| void MuonCalib::T0MTHistos::Initialize | ( | int | id, |
| const T0MTSettings * | settings, | ||
| const char * | hname = nullptr ) |
Initialize class.
| id | tube id |
| settings | t0-fit settings: settings will be asked about histogram binning |
Definition at line 61 of file T0MTHistos.cxx.
|
private |
normal t0 fit
Definition at line 212 of file T0MTHistos.cxx.
| void MuonCalib::T0MTHistos::SetTSpec | ( | int | id, |
| TH1F * | spec, | ||
| const T0MTSettings * | settings, | ||
| bool | copy_spec = true ) |
set the pointer of the drift-time spectrum to an existing spectrum.
This is for testapps
| id | tube id |
| spec | Pointer to an existing spectrum |
Definition at line 95 of file T0MTHistos.cxx.
|
inline |
returns status code - the status code applies only to the t0 fit
Definition at line 102 of file T0MTHistos.h.
|
inline |
|
inline |
|
private |
try to get better start values from a scrambled histogram
Definition at line 292 of file T0MTHistos.cxx.
|
inline |
|
private |
top chi2 calculation
Definition at line 366 of file T0MTHistos.cxx.
|
private |
top slicing metyhod
Definition at line 392 of file T0MTHistos.cxx.
|
private |
|
private |
TDirectory where debug and result histograms are stored.
Definition at line 133 of file T0MTHistos.h.
|
private |
|
private |
|
private |
status code for t0 fit (0 ok, 1 not fitted, 2 low statistics, 3 failed)
Definition at line 127 of file T0MTHistos.h.
|
private |
function fitted to the riding edghe of the spectrum
Definition at line 123 of file T0MTHistos.h.
|
private |
|
private |
|
private |
function fitted to the falling edge of the spectrum
Definition at line 129 of file T0MTHistos.h.
|
private |
|
staticconstexpr |
number of parameters in t0 fit
Definition at line 55 of file T0MTHistos.h.
|
staticconstexpr |
number of parameters for tmax fit
Definition at line 59 of file T0MTHistos.h.
|
static |
Definition at line 57 of file T0MTHistos.h.
|
static |
Definition at line 57 of file T0MTHistos.h.
|
static |
Definition at line 57 of file T0MTHistos.h.
|
staticconstexpr |
parameter numbers in t0 fit
Definition at line 57 of file T0MTHistos.h.
|
static |
Definition at line 61 of file T0MTHistos.h.
|
static |
Definition at line 61 of file T0MTHistos.h.
|
static |
Definition at line 61 of file T0MTHistos.h.
|
static |
Definition at line 61 of file T0MTHistos.h.
|
static |
Definition at line 62 of file T0MTHistos.h.
|
staticconstexpr |
parameters numbers for tmax fit
Definition at line 61 of file T0MTHistos.h.