ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/JetFitAnalyzer/src/jetfit.cpp
(Generate patch)

Comparing UserCode/JetFitAnalyzer/src/jetfit.cpp (file contents):
Revision 1.6.2.1 by dnisson, Tue Nov 10 01:12:05 2009 UTC vs.
Revision 1.8 by dnisson, Tue Nov 10 04:37:51 2009 UTC

# Line 558 | Line 558 | namespace jetfit {
558                                  sub_energy[0].size(), energy.Ylo,
559                                  energy.Yhi);
560        fill_histo_with_vec(hist_sub, sub_energy);
561 <      max_sub = hist_sub->GetSumOfWeights();
561 >      max_sub = 0.0;
562 >      for (int i = 1; i <= hist_sub->GetXaxis()->GetNbins(); i++) {
563 >        for (int j = 1; j <= hist_sub->GetYaxis()->GetNbins(); j++) {
564 >          if (hist_sub->GetBinContent(i, j) > max_sub) {
565 >            max_sub = hist_sub->GetBinContent(i, j);
566 >          }
567 >        }
568 >      }
569        max_x = hist_sub->GetMean(1);
570        max_y = hist_sub->GetMean(2);
571  
572        for (int i = npar1; i < npar; i++) {
573          if (mdef->get_indiv_max_E() == i - npar1) {
567          double nu = 0.0;
568          if (ngauss > 1) {
569            ngauss--;
570            nu = fit_fcn(max_x, max_y, pval_other) * XbinSize * YbinSize;
571            ngauss++;
572          }
574            pval[i] = max_sub;
575            perr[i] = mdef->chisquare_error(pval[i])*0.5;
576            plo[i] = 0.0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines