From 37647d631c6451d6e155b0ddb84506749d891d31 Mon Sep 17 00:00:00 2001 From: rpreghen Date: Fri, 7 Oct 2011 13:01:40 +0000 Subject: [PATCH] update to macro to read online histos --- TOF/ReadT0FillReference.C | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/TOF/ReadT0FillReference.C b/TOF/ReadT0FillReference.C index b43bc9f09c2..169fbffdfb3 100644 --- a/TOF/ReadT0FillReference.C +++ b/TOF/ReadT0FillReference.C @@ -21,19 +21,19 @@ ReadT0FillReference(Int_t run, Int_t year = 2010) Float_t maxBinCenter = hT0Fill->GetBinCenter(maxBin); /* rough fit of the edge */ - TF1 *gaus = (TF1 *)gROOT->GetFunction("landau"); + TF1 *gaus = (TF1 *)gROOT->GetFunction("gaus"); gaus->SetParameter(1, maxBinCenter); - Float_t fitMin = maxBinCenter - 1000.; /* fit from 1 ns before max */ - Float_t fitMax = maxBinCenter + 1000.; /* fit until 1 ns above max */ + Float_t fitMin = maxBinCenter - 100.; /* fit from 0.1 ns before max */ + Float_t fitMax = maxBinCenter + 100.; /* fit until 0.1 ns above max */ hT0Fill->Fit("gaus", "q0", "", fitMin, fitMax); /* better fit of the edge */ Float_t mean, sigma; for (Int_t istep = 0; istep < 10; istep++) { mean = gaus->GetParameter(1); sigma = gaus->GetParameter(2); - fitMin = mean - 2. * sigma; - fitMax = mean + 1. * sigma; - hT0Fill->Fit("landau", "q", "", fitMin, fitMax); + fitMin = mean - 1. * sigma; + fitMax = mean + 0.1 * sigma; + hT0Fill->Fit("gaus", "q", "", fitMin, fitMax); } /* print params */ mean = gaus->GetParameter(1); -- 2.43.5