Changeset 2191 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
06/18/03 09:55:15 (21 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r2190 r2191  
    146146        fSum[idx] += val;
    147147        fRms[idx] += val*val;
     148
    148149    }
    149150
     
    171172        fRms[i] -= fSum[i]*fSum[i]/fEntries;
    172173        fRms[i] /= fEntries-1;
    173         fRms[i]  = TMath::Sqrt(fRms[i]);
     174
     175        if (fRms[i]<0)
     176        {
     177            *fLog << warn << "WARNING - fRms[" << i <<"]= " << fRms[i] << " -> was set to 0 " << endl;
     178            fRms[i]=0;
     179        }
     180
     181        else
     182            fRms[i]  = TMath::Sqrt(fRms[i]);
    174183
    175184        // calc mean value for pixel index i
Note: See TracChangeset for help on using the changeset viewer.