Changeset 16891


Ignore:
Timestamp:
06/22/13 16:47:15 (12 years ago)
Author:
tbretz
Message:
Added a check for underflows, for the case the gains are read as offsets... only for checking purpose.
Location:
trunk/Mars/mdrs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mdrs/MHDrsCalibration.cc

    r14966 r16891  
    359359    MHCamEvent::Paint(o);
    360360}
     361
     362Short_t MHDrsCalibration::GetNumUnderflows(float lvl) const
     363{
     364    if (!fResult)
     365        return -1;
     366
     367    short cnt = 0;
     368
     369    for (int drs=0; drs<160; drs++)
     370    {
     371        const int p = drs*9*1024;
     372
     373        double avg = 0;
     374        for (int i=0; i<1024*9; i++)
     375            avg += fResult->fOffset[p+i];
     376
     377        avg /= 1024*9*fResult->fNumOffset;
     378
     379        if (avg/1000<lvl)
     380            cnt++;
     381    }
     382
     383    return cnt;
     384
     385}
  • trunk/Mars/mdrs/MHDrsCalibration.h

    r14922 r16891  
    6363    void Paint(Option_t *o="");
    6464
     65    Short_t GetNumUnderflows(float lvl) const;
     66
    6567    ClassDef(MHDrsCalibration, 1) // A list of histograms storing the Fadc spektrum of one pixel
    6668};
Note: See TracChangeset for help on using the changeset viewer.