![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <MTTmaxPatternRecognition.h>
Definition at line 36 of file MTTmaxPatternRecognition.h.
◆ MTTmaxPatternRecognition()
MuonCalib::MTTmaxPatternRecognition::MTTmaxPatternRecognition |
( |
| ) |
|
|
inline |
◆ estimate_background()
bool MuonCalib::MTTmaxPatternRecognition::estimate_background |
( |
TH1F * |
hist | ) |
|
|
private |
estimates the background level
- Parameters
-
Definition at line 39 of file MTTmaxPatternRecognition.cxx.
41 for (
double i = 1.0;
i <= 4.0;
i *= 2.0) {
42 for (
int j = 0; j < 2; j++)
55 double peak_falling(0.0), peak_falling_slope(-9e9);
60 if (
bin2.Width() -
bin1.Width() > peak_falling_slope &&
bin2.Right() <
hist->GetBinLowEdge(
hist->GetNbinsX()) - 10) {
61 peak_falling =
bin1.Right();
62 peak_falling_slope =
bin2.Width() -
bin1.Width();
68 if (lastbin - firstbin < m_settings->MinBackgroundBins()) lastbin =
hist->GetNbinsX();
69 if (lastbin - firstbin < m_settings->MinBackgroundBins()) {
71 log << MSG::WARNING <<
"estimate_background() - Falling edge is to glose to upper histogram range!" <<
endmsg;
78 if (lastbin >
hist->GetNbinsX()) lastbin =
hist->GetNbinsX();
79 for (
int i = firstbin;
i <= lastbin;
i++) {
85 (
new TLine(
hist->GetBinCenter(firstbin), 0,
hist->GetBinCenter(firstbin),
hist->GetMaximum()))->Write(
"tmax_back_left");
86 (
new TLine(
hist->GetBinCenter(lastbin), 0,
hist->GetBinCenter(lastbin),
hist->GetMaximum()))->Write(
"tmax_back_right");
◆ estimate_height()
bool MuonCalib::MTTmaxPatternRecognition::estimate_height |
( |
TH1F * |
hist | ) |
|
|
private |
estimates the height of the spectrum.
The height is representet by an exponetial function a*exp(b*t). It returns the upper end of the height region.
- Parameters
-
Definition at line 99 of file MTTmaxPatternRecognition.cxx.
103 TF1*
fun =
new TF1(
"myexp",
myexp, left, right, 4);
106 hist->Fit(
"myexp",
"Q0+",
"", left, right);
108 m_a =
fun->GetParameter(0);
109 m_b =
fun->GetParameter(1);
113 (
new TLine(left, 0, left,
hist->GetMaximum()))->Write(
"tmax_height_left");
114 (
new TLine(right, 0, right,
hist->GetMaximum()))->Write(
"tmax_height_right");
◆ GetA()
double MuonCalib::MTTmaxPatternRecognition::GetA |
( |
| ) |
const |
|
inline |
◆ GetB()
double MuonCalib::MTTmaxPatternRecognition::GetB |
( |
| ) |
const |
|
inline |
◆ GetBackground()
double MuonCalib::MTTmaxPatternRecognition::GetBackground |
( |
| ) |
const |
|
inline |
◆ GetError()
bool MuonCalib::MTTmaxPatternRecognition::GetError |
( |
| ) |
const |
|
inline |
◆ GetEstimatedTMax()
double MuonCalib::MTTmaxPatternRecognition::GetEstimatedTMax |
( |
| ) |
const |
|
inline |
◆ GetFitRangeMax()
double MuonCalib::MTTmaxPatternRecognition::GetFitRangeMax |
( |
| ) |
const |
|
inline |
◆ GetFitRangeMin()
double MuonCalib::MTTmaxPatternRecognition::GetFitRangeMin |
( |
| ) |
const |
|
inline |
◆ Initialize()
bool MuonCalib::MTTmaxPatternRecognition::Initialize |
( |
TH1F * |
hist, |
|
|
double |
t0, |
|
|
const T0MTSettings * |
settings |
|
) |
| |
Initialize class.
- Parameters
-
hist | Histogram which is to be fitted |
t0 | comes from the t0 fit |
Definition at line 20 of file MTTmaxPatternRecognition.cxx.
28 log << MSG::WARNING <<
"Initialize() - Initialization of VBH failed!" <<
endmsg;
◆ m_a
double MuonCalib::MTTmaxPatternRecognition::m_a |
|
private |
◆ m_b
double MuonCalib::MTTmaxPatternRecognition::m_b |
|
private |
◆ m_background
double MuonCalib::MTTmaxPatternRecognition::m_background |
|
private |
◆ m_draw_debug_graph
bool MuonCalib::MTTmaxPatternRecognition::m_draw_debug_graph |
|
private |
◆ m_error
bool MuonCalib::MTTmaxPatternRecognition::m_error |
|
private |
◆ m_fit_max
double MuonCalib::MTTmaxPatternRecognition::m_fit_max |
|
private |
◆ m_fit_min
double MuonCalib::MTTmaxPatternRecognition::m_fit_min |
|
private |
◆ m_settings
◆ m_t0
double MuonCalib::MTTmaxPatternRecognition::m_t0 |
|
private |
◆ m_tmax_est
double MuonCalib::MTTmaxPatternRecognition::m_tmax_est |
|
private |
◆ m_vbh
The documentation for this class was generated from the following files:
const VariableBinwidthHistogramBin & GetBin(unsigned int bin) const
Get a bin.
const double & WidthAB() const
Width of the region in which the parameters a and b are estimated.
TGraph * DiffDensityGraph() const
Plot graph with differential density.
std::vector< ALFA_RawData_p1 > t0
const double & MaxBinwidth() const
Maximum bin width for the VariableBinwidthHistogram The bins will not be wider than this even if it m...
TGraph * DenistyGraph() const
create density graph - density vs bin center
unsigned int GetNumberOfBins() const
Get the number of bins
const double & VBHLow() const
For the pattern-recognition only a part of the drift time spectrum is used for creating the VariableB...
const double & EndMin() const
The range of the falling edge of the spectrum is searched in a region after t0.
IMessageSvc * getMessageSvc(bool quiet=false)
double m_tmax_est
t0 estimate
TGraph * DiffBinwidthGraph() const
Plot graph with differential binwidth.
double m_background
background level
bool Smooth(double width)
Removes steps that origin in a binning effekt.
const T0MTSettingsTMax * m_settings
settings
const double & EndMax() const
double m_a
parameters a, b in a*exp(b*x)
const double & DistBackground() const
distance between the detected falling edge and the begin of the background region
bool Initialize(TH1F *hist, double binc_r, double max_bin_width, double min_x=-9e9, double max_x=9e9)
Initialize with new input histogram Returns on error false.
double m_fit_min
fit range
TGraph * BinWidthGraph() const
Plot binwidth graph - binwidth versus bin center.
double Right() const
Get right (upper) bin border.
const double & DistAB() const
Distance of the a/b region from the detected falling edge.
VariableBinwidthHistogram m_vbh
Variable binwidth histogram.
Double_t myexp(Double_t *x, Double_t *p)
const double & VBHBinContent() const
Number of hits per histogram bin for the VariableBinwidthHistogram The number is given relative to th...
bool estimate_height(TH1F *hist)
estimates the height of the spectrum.
bool estimate_background(TH1F *hist)
estimates the background level