Changeset 5329


Ignore:
Timestamp:
11/01/04 19:10:39 (20 years ago)
Author:
paneque
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r5328 r5329  
    2020
    2121                                                 -*-*- END OF LINE -*-*-
     22
     232004/11/01: David Paneque
     24   
     25   * mtemp/mmpi/SupercutsONOFFClasses/MHFindSignificanceONOFF.cc
     26   
     27     - Condition to assume a constant background in the fit
     28       of the ON and OFF data is softened:
     29          1) Bins with zero content are allowed (if they are less than 10%
     30          of the total number of bins used). Yet their error is set to
     31          a huge number 10E19; which means that they are not taken into account
     32          in the fit.
     33          2) Maximum number of bins with low content (less than 9) is increased
     34          from 5% to 20%. The error of these bins is set to 3.
     35
     36       The motivation of these changes is to allow the fitting procedures also
     37       in those cases where the background rejection is that large that very few
     38       events remain in the background region of the alpha plot. This situation
     39       is occuring quite often when using the Random Forest and SPECIALLY, when
     40       making large SIZE cuts.
     41
     42
     43
    2244 2004/10/30: Markus Gaug
    2345   
     
    2547   * msignal/MExtractTime.h
    2648     - set the version number by 1 higher due to the changes on 12.10.
     49
    2750
    2851
  • 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.