Ignore:
Timestamp:
01/24/05 17:12:43 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhflux/MHAlpha.cc

    r5901 r5973  
    569569            // Check whether we are dealing with on-off analysis
    570570            TH1D *hoff = (TH1D*)gPad->FindObject("ProjAlphaOff");
    571             if (hoff)
    572             {
    573                 // Do not store the 'final' result in fFit
    574                 MAlphaFitter fit(fFit);
    575 
    576                 // BE CARFEULL: This is a really weird workaround!
    577                 const Double_t alpha = hoff->GetMaximum();
    578                 fit.Fit(*h0, hoff, alpha<0 ? 1: alpha, kTRUE);
    579 
    580                 fit.PaintResult();
    581             }
     571
     572            // BE CARFEULL: This is a really weird workaround!
     573            const Double_t scale = !hoff || hoff->GetMaximum()<0 ? 1 : hoff->GetMaximum();
     574
     575            // Do not store the 'final' result in fFit
     576            MAlphaFitter fit(fFit);
     577            fit.Fit(*h0, hoff, scale, kTRUE);
     578            fit.PaintResult();
    582579        }
    583580
Note: See TracChangeset for help on using the changeset viewer.