Changeset 6091 for trunk


Ignore:
Timestamp:
01/28/05 16:31:09 (20 years ago)
Author:
mazin
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r6086 r6091  
    9898     - fill MCalibConstCam with update results (once per calib. consts
    9999       update == every 10 sec.)
     100     - introduce check for size of calibration constant. In case, it is
     101       completetly out of range, set the MBadPixelsPix::IsUnsuitableRun
    100102
    101103   * mjobs/MJCalibrateSignal.cc:
  • trunk/MagicSoft/Mars/callisto.rc

    r6090 r6091  
    303303#MJCalibrateSignal.MCalibrateData.PedestalFlag: Event
    304304#MJCalibrateSignal.MCalibrateData.CalibrationMode: Default
     305#MJCalibrateSignal.MCalibrateData.CalibConvMinLimit: 0.01
     306#MJCalibrateSignal.MCalibrateData.CalibConvMaxLimit: 5.
    305307MJCalibrateSignal.Interlaced: yes
    306308#MJCalibrateSignal.RelTimesUpdate: no
  • trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc

    r6077 r6091  
    135135using namespace std;
    136136
     137const Float_t MCalibrateData::fgCalibConvMinLimit = 0.01;
     138const Float_t MCalibrateData::fgCalibConvMaxLimit = 5.;
    137139// --------------------------------------------------------------------------
    138140//
     
    155157 
    156158  SetCalibrationMode(calmode);
     159 
     160  SetCalibConvMinLimit();
     161  SetCalibConvMaxLimit();
    157162
    158163  fNamesPedestal.SetOwner();
     
    477482        if(fCalibrationMode!=kNone)
    478483          {
    479             if ((*fBadPixels)[pixidx].IsUnsuitable())
     484            if ((*fBadPixels)[pixidx].IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
    480485              {
    481486                skip++;
     487                calibConv = -1.;
    482488                continue;
    483               }
     489             }
    484490           
    485491            MCalibrationChargePix &pix   = (MCalibrationChargePix&)(*fCalibrations)[pixidx];
     
    604610        fCalibFFactors[pixidx] = calibFFactor;
    605611
     612        if (calibConv < fCalibConvMinLimit || calibConv > fCalibConvMaxLimit)
     613          {
     614            (*fBadPixels)[pixidx].SetUnsuitable(MBadPixelsPix::kUnsuitableRun); 
     615            cpix.SetCalibConst(-1.);
     616            cpix.SetCalibFFactor(-1.);
     617            continue;
     618          }
     619       
    606620        cpix.SetCalibConst(calibConv);
    607621        cpix.SetCalibFFactor(calibFFactor);
     
    819833    }
    820834
     835    if (IsEnvDefined(env, prefix, "CalibConvMinLimit", print))
     836    {
     837        fCalibConvMinLimit = GetEnvValue(env, prefix, "CalibConvMinLimit", fCalibConvMinLimit);
     838        rc = kTRUE;
     839    }
     840
     841    if (IsEnvDefined(env, prefix, "CalibConvMaxLimit", print))
     842    {
     843        fCalibConvMaxLimit = GetEnvValue(env, prefix, "CalibConvMaxLimit", fCalibConvMaxLimit);
     844        rc = kTRUE;
     845    }
     846
    821847    return rc;
    822848}
  • trunk/MagicSoft/Mars/mcalib/MCalibrateData.h

    r6077 r6091  
    3939private:
    4040
     41  static const Float_t  fgCalibConvMinLimit; //! Minimum limit for conv. factor
     42  static const Float_t  fgCalibConvMaxLimit; //! Maximum limit for conv. factor
     43
     44  Float_t  fCalibConvMinLimit;           // Minimum limit for conv. factor
     45  Float_t  fCalibConvMaxLimit;           // Maximum limit for conv. factor
     46   
    4147  MGeomCam              *fGeomCam;       //! Camera geometry container
    4248  MBadPixelsCam         *fBadPixels;     //! Bad Pixels information
     
    117123  void   SetSignalType      ( SignalType_t      sigtype=kPhot    ) { fSignalType     =sigtype; } 
    118124
     125  void   SetCalibConvMinLimit( const Float_t f=fgCalibConvMinLimit ) { fCalibConvMinLimit = f; }
     126  void   SetCalibConvMaxLimit( const Float_t f=fgCalibConvMaxLimit ) { fCalibConvMaxLimit = f; }
     127   
    119128  Bool_t UpdateConversionFactors( const MCalibrationChargeCam *updatecam=NULL);
    120129
Note: See TracChangeset for help on using the changeset viewer.