223 if(
object.
IsA()->InheritsFrom(
"TH1"))
227 throw dqm_core::BadConfig( ERS_HERE,
m_name,
"called with histogram of dimension > 2" );
231 throw dqm_core::BadConfig( ERS_HERE,
m_name,
"called with object that does not inherit from TH1" );
239 throw dqm_core::BadConfig( ERS_HERE,
m_name,
"called with histogram with no bins");
243 const TH1*
proj =
static_cast<const TH2*
>(
histogram)->ProjectionY(
"", 0, 0);
244 if (
proj->GetNbinsX() >= 1) {
247 throw dqm_core::BadConfig( ERS_HERE,
m_name,
"called with histogram with no bins");
251 m_gaus3_fn =
new TF1(
"gaus3", Form(
"[3]/[2]/2.5066*%f*exp(-0.5*((x-[0]+[1])/[2])**2) + [4]/[2]/2.5066*%f*exp(-0.5*((x-[0])/[2])**2) + [5]/[2]/2.5066*%f*exp(-0.5*((x-[0]-[1])/[2])**2)",
binwidth,
binwidth,
binwidth), -100, 100);
253 m_gaus3_fn =
new TF1(
"gaus3",
"[3]*exp(-0.5*((x-[0]+[1])/[2])**2) + [4]*exp(-0.5*((x-[0])/[2])**2) + [5]*exp(-0.5*((x-[0]-[1])/[2])**2)", -100, 100);
256 m_gaus3_fn->SetParName(1,
"Mean_offzero_gaus");
262 Double_t resolutionAll, meanZeroPeak, meanNonzeroPeaks, minEvents;
275 m_gaus3_fn->SetParLimits(0, meanZeroPeak-5, meanZeroPeak+5);
281 m_gaus3_fn->SetParameter(1, meanNonzeroPeaks);
282 m_gaus3_fn->SetParLimits(1, meanNonzeroPeaks-10, meanNonzeroPeaks+10);
285 m_gaus3_fn->FixParameter(1, meanNonzeroPeaks);
306 for (err_map::const_iterator peit = paramErrors.begin(); peit != paramErrors.end(); ++peit) {
307 result->tags_[(*peit).first +
" Error"] = (*peit).second;
311 catch ( dqm_core::Exception & ex) {
312 throw dqm_core::BadConfig( ERS_HERE,
m_name, ex.what(), ex);
323 unsigned int psz = (
unsigned int) std::log10(nxbin)+1;
325 std::vector<int> goodLB;
327 const std::string sig_str =
"SIG_LB_";
329 for (
int lb = 0;
lb < nxbin;
lb++) {
331 sprintf(buf,
fmt, psz,
lb);
333 Double_t good_entries =
proj->GetEntries() -
proj->GetBinContent(0) -
proj->GetBinContent(
proj->GetNbinsX()+1);
334 if (good_entries < minEvents) {
345 m_gaus3_fn->SetParameter(1, meanNonzeroPeaks);
353 result->histos_.push_back((TH1D*)
proj->Clone());
366 goodLB.push_back(
lb);
371 if (goodLB.size() != 0)