Changeset 10281 for trunk/Mars/mhflux
- Timestamp:
- 04/04/11 10:08:59 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mhflux/MHEnergyEst.cc
r9851 r10281 254 254 *fLog << " RMS of Delta E/E: " << Form("%4.2f%%", 100*h->GetRMS()) << endl; 255 255 *fLog << "Results from Histogram-Fit:" << endl; 256 *fLog << " Bias of Delta E/E: " << Form("%+4.2f%%", 100*f->GetParameter(1)) << endl; 257 *fLog << " Sigma of Delta E/E: " << Form("%4.2f%%", 100*f->GetParameter(2)) << endl; 258 *fLog << " Res of Delta E/E: " << Form("%4.2f%%", 100*TMath::Hypot(f->GetParameter(1), f->GetParameter(2))) << endl; 256 if (!f) 257 *fLog << " <fit did not succeed>" << endl; 258 else 259 { 260 *fLog << " Bias of Delta E/E: " << Form("%+4.2f%%", 100*f->GetParameter(1)) << endl; 261 *fLog << " Sigma of Delta E/E: " << Form("%4.2f%%", 100*f->GetParameter(2)) << endl; 262 *fLog << " Res of Delta E/E: " << Form("%4.2f%%", 100*TMath::Hypot(f->GetParameter(1), f->GetParameter(2))) << endl; 263 } 259 264 260 265 delete h; … … 341 346 } 342 347 343 hx->Fit("gaus", "Q", "", -0.25, 1.0); 344 hx->GetFunction("gaus")->SetLineColor(kBlue); 345 hx->GetFunction("gaus")->SetLineWidth(2); 346 gPad=NULL; 347 gStyle->SetOptFit(101); 348 if (hx->GetEntries()>0) 349 { 350 hx->Fit("gaus", "Q", "", -0.25, 1.0); 351 if (hx->GetFunction("gaus")) 352 { 353 hx->GetFunction("gaus")->SetLineColor(kBlue); 354 hx->GetFunction("gaus")->SetLineWidth(2); 355 gPad=NULL; 356 gStyle->SetOptFit(101); 357 } 358 } 348 359 } 349 360 }
Note:
See TracChangeset
for help on using the changeset viewer.