Changeset 7066 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
05/19/05 16:16:51 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7065 r7066  
    5252     - improved the output line plotted into the histogram
    5353     - implemented getter for fSigInt
     54     - start integration in first bin not in underflow bin
     55     - added 'background' option for scaling
    5456
    5557   * mhflux/MHAlpha.[h,cc]:
  • trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc

    r7064 r7066  
    203203    fIntegralMax      = h.GetBinLowEdge(bin+1);
    204204    fEventsBackground = fFunc->Integral(0, fIntegralMax)/alphaw;
    205     fEventsSignal     = h.Integral(0, bin);
     205    fEventsSignal     = h.Integral(1, bin);
    206206    fEventsExcess     = fEventsSignal-fEventsBackground;
    207207    fSignificance     = MMath::SignificanceLiMaSigned(fEventsSignal, fEventsBackground);
     
    232232
    233233    fIntegralMax      = hon.GetBinLowEdge(bin+1);
    234     fEventsBackground = hof.Integral(0, bin);
    235     fEventsSignal     = hon.Integral(0, bin);
     234    fEventsBackground = hof.Integral(1, bin);
     235    fEventsSignal     = hon.Integral(1, bin);
    236236    fEventsExcess     = fEventsSignal-fEventsBackground;
    237237    fScaleFactor      = alpha;
     
    301301
    302302    TLatex text(x, y, Form(fmt.Data(), fSignificance, w, (int)fEventsExcess,
    303                            fEventsBackground, m, fChiSqBg, fChiSqSignal,
     303                           (int)fEventsBackground, m, fChiSqBg, fChiSqSignal,
    304304                           fCoefficients[3]));
    305305
     
    358358    case kIntegral:    *fLog << "integral.";     break;
    359359    case kOffRegion:   *fLog << "off region.";   break;
     360    case kBackground:  *fLog << "background.";   break;
    360361    case kLeastSquare: *fLog << "least square."; break;
    361362    case kUserScale:   *fLog << "user def (" << fScaleUser << ")"; break;
     
    487488            const Int_t min = on.GetXaxis()->FindFixBin(fScaleMin);
    488489            const Int_t max = on.GetXaxis()->FindFixBin(fScaleMax);
     490            scaleon = on.Integral(min, max);
     491            scaleof = of.Integral(min, max);
     492        }
     493        break;
     494
     495    case kBackground:
     496        {
     497            const Int_t min = on.GetXaxis()->FindFixBin(fBgMin);
     498            const Int_t max = on.GetXaxis()->FindFixBin(fBgMax);
    489499            scaleon = on.Integral(min, max);
    490500            scaleof = of.Integral(min, max);
     
    605615        if (txt==(TString)"offregion")
    606616            fScaleMode = kOffRegion;
     617        if (txt==(TString)"background")
     618            fScaleMode = kBackground;
    607619        if (txt==(TString)"leastsquare")
    608620            fScaleMode = kLeastSquare;
  • trunk/MagicSoft/Mars/mhflux/MAlphaFitter.h

    r7064 r7066  
    2121public:
    2222    enum ScaleMode_t {
    23         kNone,
    24         kEntries,
    25         kIntegral,
    26         kOffRegion,
    27         kLeastSquare,
    28         kUserScale
     23        kNone,         // No scaling
     24        kEntries,      // scale by the number of entries in on and off
     25        kIntegral,     // scale by the integral in on and off
     26        kOffRegion,    // scale by the integral between fScaleMin, fScaleMax in on and off
     27        kBackground,   // scale by the integral between fBgMin, fBgMax in on and off
     28        kLeastSquare,  // not yet implemented
     29        kUserScale     // scale by fixed factor set by SetScaleUser
    2930    };
    3031    enum Strategy_t {
Note: See TracChangeset for help on using the changeset viewer.