Ignore:
Timestamp:
03/01/07 23:37:37 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationPulseTimeCam.cc

    r8347 r8349  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationPulseTimeCam.cc,v 1.30 2007-03-01 23:04:55 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHCalibrationPulseTimeCam.cc,v 1.31 2007-03-01 23:37:08 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    2121!   Author(s): Thomas Bretz <mailto:tbretz@astro.uni-wuerzburg.de>
    2222!
    23 !   Copyright: MAGIC Software Development, 2000-2006
     23!   Copyright: MAGIC Software Development, 2000-2007
    2424!
    2525!
     
    134134using namespace std;
    135135
    136 const Byte_t  MHCalibrationPulseTimeCam::fgSaturationLimit   = 254;
     136const Byte_t  MHCalibrationPulseTimeCam::fgSaturationLimit   = 245;
    137137const Byte_t  MHCalibrationPulseTimeCam::fgLowerSignalLimit  =  85;
    138138const Int_t   MHCalibrationPulseTimeCam::fgNumPixelsRequired = 2;
     
    385385                continue;
    386386
    387         Float_t *beg = evt->GetSamples(idx);
    388         Float_t *end = beg + evt->GetNumSamples();;
    389         Float_t *max = beg;
    390 
    391         for (Float_t *ptr=beg+1; ptr<end; ptr++)
    392             if (*ptr>*max)
    393                 max = ptr;
    394 
    395         if (*max<fLowerSignalLimit || *max>fSaturationLimit)
     387        // Check for saturation
     388        if (evt->GetSaturation(idx, fSaturationLimit)>0)
    396389            continue;
    397390
    398         const Int_t maxpos = max-beg-1;
     391        // Get position of maximum
     392        const Int_t   pos = evt->GetMax(idx);
     393        const Float_t max = evt->GetSamples(idx)[pos];
     394
     395        // check if maximum is high enough
     396        if (max<fLowerSignalLimit)
     397            continue;
     398
     399        const Int_t maxpos = pos-1;
    399400
    400401        (*this)[idx].FillHist(maxpos);
Note: See TracChangeset for help on using the changeset viewer.