- Timestamp:
- 11/01/04 19:10:39 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mtemp/mmpi/SupercutsONOFFClasses/MHFindSignificanceONOFF.cc
r4411 r5329 1047 1047 // count bins with zero entry 1048 1048 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 } 1051 1055 // set minimum error 1052 1056 if (content < 9.0) … … 1151 1155 1152 1156 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 ) 1154 1173 { 1155 1174 *fLog << "MHFindSignificanceONOFF::FitPolynomialOFF; polynomial fit not possible, fNzeroOFF, fMlowOFF, fMbinsOFF = " … … 1182 1201 Double_t val, err; 1183 1202 val = mean; 1184 err = sqrt( mean / (Double_t)fMbinsOFF );1203 err = rms; // sqrt( mean / (Double_t)fMbinsOFF ); 1185 1204 1186 1205 fPolyOFF->SetParameter(0, val); … … 1553 1572 // count bins with zero entry 1554 1573 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 1557 1581 // set minimum error 1558 1582 if (content < 9.0) … … 1657 1681 1658 1682 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 1660 1700 { 1661 1701 *fLog << "MHFindSignificanceONOFF::FitPolynomial; polynomial fit not possible, fNzero, fMlow, fMbins = " … … 1688 1728 Double_t val, err; 1689 1729 val = mean; 1690 err = sqrt( mean / (Double_t)fMbins );1730 err = rms; // sqrt( mean / (Double_t)fMbins ); 1691 1731 1692 1732 fPoly->SetParameter(0, val);
Note:
See TracChangeset
for help on using the changeset viewer.