Ignore:
Timestamp:
11/01/04 19:10:39 (20 years ago)
Author:
paneque
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mtemp/mmpi/SupercutsONOFFClasses/MHFindSignificanceONOFF.cc

    r4411 r5329  
    10471047      // count bins with zero entry
    10481048      if (content <= 0.0)
    1049         fNzeroOFF++;
    1050      
     1049        {
     1050          fNzeroOFF++;
     1051          // The error of the bin is set to a huge number,
     1052          // so that it does not have any weight in the fit
     1053          fHistOFF->SetBinError(i, dummy);
     1054        }
    10511055      // set minimum error
    10521056      if (content < 9.0)
     
    11511155
    11521156  fConstantBackg = kFALSE;
    1153   if ( fNzeroOFF > 0  ||  (Double_t)fMlowOFF>0.05*(Double_t)fMbinsOFF )
     1157
     1158  // Condition for disabling the fitting procedure and
     1159  // assuming a constant background (before Nov 2004)
     1160
     1161  // if ( fNzeroOFF > 0  ||  (Double_t)fMlowOFF>0.05*(Double_t)fMbinsOFF )
     1162
     1163
     1164  // Condition for disabling the fitting procedure and
     1165  // assuming a constant background (After Nov 01 2004)
     1166  // I softened the condition to allow the fit also in situations
     1167  // where the reduction of the background is such that very
     1168  // few events survived; which is
     1169  // Specially frequent with Random Forest at high Sizes)
     1170
     1171   if ( (Double_t)fNzeroOFF > 0.1*(Double_t)fMbinsOFF || 
     1172       (Double_t)fMlowOFF > 0.2*(Double_t)fMbinsOFF )
    11541173  {
    11551174    *fLog << "MHFindSignificanceONOFF::FitPolynomialOFF; polynomial fit not possible,  fNzeroOFF, fMlowOFF, fMbinsOFF = "
     
    11821201    Double_t val, err;
    11831202    val = mean;
    1184     err = sqrt( mean / (Double_t)fMbinsOFF );
     1203    err = rms; // sqrt( mean / (Double_t)fMbinsOFF );
    11851204
    11861205    fPolyOFF->SetParameter(0, val);
     
    15531572      // count bins with zero entry
    15541573      if (content <= 0.0)
    1555         fNzero++;
    1556      
     1574        {
     1575          fNzero++;
     1576          // The error of the bin is set to a huge number,
     1577          // so that it does not have any weight in the fit
     1578          fHistOFF->SetBinError(i, dummy);
     1579        }
     1580
    15571581      // set minimum error
    15581582      if (content < 9.0)
     
    16571681
    16581682  fConstantBackg = kFALSE;
    1659   if ( fNzero > 0  ||  (Double_t)fMlow>0.05*(Double_t)fMbins )
     1683
     1684  // Condition for disabling the fitting procedure and
     1685  // assuming a constant background (before Nov 2004)
     1686
     1687  // if ( fNzero > 0  ||  (Double_t)fMlow>0.05*(Double_t)fMbins )
     1688
     1689
     1690  // Condition for disabling the fitting procedure and
     1691  // assuming a constant background (After Nov 01 2004)
     1692  // I softened the condition to allow the fit also in situations
     1693  // where the reduction of the background is such that very
     1694  // few events survived; which is
     1695  // Specially frequent with Random Forest at high Sizes)
     1696
     1697  if ( (Double_t)fNzero > 0.1*(Double_t)fMbins || 
     1698       (Double_t)fMlow > 0.2*(Double_t)fMbins )
     1699
    16601700  {
    16611701    *fLog << "MHFindSignificanceONOFF::FitPolynomial; polynomial fit not possible,  fNzero, fMlow, fMbins = "
     
    16881728    Double_t val, err;
    16891729    val = mean;
    1690     err = sqrt( mean / (Double_t)fMbins );
     1730    err = rms; // sqrt( mean / (Double_t)fMbins );
    16911731
    16921732    fPoly->SetParameter(0, val);
Note: See TracChangeset for help on using the changeset viewer.