Ignore:
Timestamp:
01/30/07 14:16:45 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MHCamera.cc

    r8106 r8279  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.95 2006-10-17 17:16:00 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.96 2007-01-30 14:16:45 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    13331333}
    13341334
     1335// ------------------------------------------------------------------------
     1336//
     1337// In the case the kProfile flag is set the spread of the bin is returned.
     1338// If you want to have the mean error instead set the kErrorMean bit via
     1339//  SetBit(kErrorMean) first.
     1340//
    13351341Stat_t MHCamera::GetBinError(Int_t bin) const
    13361342{
     
    13461352    const Double_t val = fArray[bin]        / n;
    13471353
    1348     return sqr>val*val ? TMath::Sqrt(sqr - val*val) / n : 0;
     1354    const Double_t spread = sqr>val*val ? TMath::Sqrt(sqr - val*val);
     1355
     1356    return TestBit(kErrorMean) ? spread/TMath::Sqrt(n) : spread;
    13491357
    13501358    /*
Note: See TracChangeset for help on using the changeset viewer.