Ignore:
Timestamp:
04/04/05 10:18:01 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhflux
Files:
2 edited

Legend:

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

    r6906 r6907  
    184184}
    185185
    186 void MHAlpha::FitEnergyBins(Bool_t paint)
     186Float_t MHAlpha::FitEnergyBins(Bool_t paint)
    187187{
    188188    // Do not store the 'final' result in fFit
     
    193193    fHEnergy.SetEntries(0);
    194194
     195    Float_t mean = 0;
     196    Int_t   num  = 0;
    195197    for (int i=1; i<=n; i++)
    196198    {
     
    202204            else
    203205                fHEnergy.SetBinError(i, fit.GetEventsExcess());
    204         }
    205     }
     206
     207            if (fit.GetSignificance()>1)
     208            {
     209                mean += fit.GetSignificance();
     210                num++;
     211            }
     212        }
     213    }
     214    return mean/num;
    206215}
    207216
     
    412421    fHAlphaTime.SetEntries(0);
    413422
    414     // Get number of bins
    415     const Int_t n = fHTime.GetNbinsX();
    416 
    417423    //
    418424    // Prepare Histogram
     
    420426    if (final)
    421427        time->Plus1ns();
     428
     429    // Get number of bins
     430    const Int_t n = fHTime.GetNbinsX();
    422431
    423432    // Enhance binning
  • trunk/MagicSoft/Mars/mhflux/MHAlpha.h

    r6240 r6907  
    117117
    118118    void FitEnergySpec(Bool_t paint=kFALSE);
    119     void FitEnergyBins(Bool_t paint=kFALSE);
     119    Float_t FitEnergyBins(Bool_t paint=kFALSE);
    120120    void FitThetaBins(Bool_t paint=kFALSE);
    121121
Note: See TracChangeset for help on using the changeset viewer.