|
ATLAS Offline Software
|
Go to the documentation of this file.
10 #include "GaudiKernel/MsgStream.h"
28 log << MSG::WARNING <<
"Initialize() - Initialization of VBH failed!" <<
endmsg;
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");
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");
const VariableBinwidthHistogramBin & GetBin(unsigned int bin) const
Get a bin.
const T0MTSettingsTMax * TMaxSettings() const
get settings for the tmax-fit
singleton-like access to IMessageSvc via open function and helper
double WidthAB() const
Width of the region in which the parameters a and b are estimated.
TGraph * DiffDensityGraph() const
Plot graph with differential density.
double VBHBinContent() const
Number of hits per histogram bin for the VariableBinwidthHistogram The number is given relative to th...
TGraph * DenistyGraph() const
create density graph - density vs bin center
unsigned int GetNumberOfBins() const
Get the number of bins
double MaxBinwidth() const
Maximum bin width for the VariableBinwidthHistogram The bins will not be wider than this even if it m...
IMessageSvc * getMessageSvc(bool quiet=false)
double DistAB() const
Distance of the a/b region from the detected falling edge.
double m_tmax_est
t0 estimate
TGraph * DiffBinwidthGraph() const
Plot graph with differential binwidth.
double DistBackground() const
distance between the detected falling edge and the begin of the background region
double m_background
background level
bool Smooth(double width)
Removes steps that origin in a binning effekt.
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
const T0MTSettingsTMax * m_settings
settings
double m_a
parameters a, b in a*exp(b*x)
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 EndMin() const
The range of the falling edge of the spectrum is searched in a region after t0.
double m_fit_min
fit range
TGraph * BinWidthGraph() const
Plot binwidth graph - binwidth versus bin center.
bool Initialize(TH1F *hist, double t0, const T0MTSettings *settings)
Initialize class.
double Right() const
Get right (upper) bin border.
const bool & DrawDebugGraphs() const
If set to true for every tube a TDirectory will be created.
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
VariableBinwidthHistogram m_vbh
Variable binwidth histogram.
Double_t myexp(Double_t *x, Double_t *p)
double VBHLow() const
For the pattern-recognition only a part of the drift time spectrum is used for creating the VariableB...
bool estimate_height(TH1F *hist)
estimates the height of the spectrum.
bool estimate_background(TH1F *hist)
estimates the background level