41 for (
double i = 1.0; i <= 4.0; i *= 2.0) {
42 for (
int j = 0; j < 2; j++)
43 if (!
m_vbh.Smooth(hist->GetBinWidth(1) / i)) {
49 m_vbh.DenistyGraph()->Write(
"tmax_density");
50 m_vbh.BinWidthGraph()->Write(
"tmax_binwidth");
51 m_vbh.DiffDensityGraph()->Write(
"tmax_diffdensity");
52 m_vbh.DiffBinwidthGraph()->Write(
"tmax_diffbinwidth");
55 double peak_falling(0.0), peak_falling_slope(-9e9);
56 for (
unsigned int i = 0; i <
m_vbh.GetNumberOfBins() - 1; i++) {
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();
66 int firstbin = hist->FindBin(peak_falling +
m_settings->DistBackground());
67 int lastbin = hist->FindBin(
m_vbh.GetBin(
m_vbh.GetNumberOfBins() - 1).Right());
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");