Ignore:
Timestamp:
03/07/04 20:48:16 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r3429 r3435  
    439439      pix.CheckTimeValidity(&bad);
    440440     
    441       if (!bad.IsCalibrationResultOK())
     441      if (!bad.IsCalibrationSignalOK())
    442442        continue;
    443443
     
    497497                              avouterprms/avouternum * TMath::Sqrt((Float_t)fNumHiGainSamples/avouternum));
    498498  }
     499
     500  MBadPixelsPix *bad = fCam->GetAverageInnerBadPix();
    499501 
    500   if (!avinnerpix->CheckChargeValidity() || !avinnerpix->CheckTimeValidity())
    501       if (!avinnerpix->CalcReducedSigma())
    502           avinnerpix->CalcFFactorMethod();
    503 
    504   if (!avouterpix->CheckChargeValidity() || !avouterpix->CheckTimeValidity())
    505       if (!avouterpix->CalcReducedSigma())
    506           avouterpix->CalcFFactorMethod();
    507 
     502  avinnerpix->CheckChargeValidity(bad);
     503  avinnerpix->CheckTimeValidity(bad);
     504
     505  if (bad->IsCalibrationSignalOK())
     506    if (!avinnerpix->CalcReducedSigma())
     507      avinnerpix->CalcFFactorMethod();
     508
     509  bad = fCam->GetAverageInnerBadPix();
     510
     511  avouterpix->CheckChargeValidity(bad);
     512  avouterpix->CheckTimeValidity(bad);
     513
     514  if (bad->IsCalibrationSignalOK()) 
     515    if (!avouterpix->CalcReducedSigma())
     516      avouterpix->CalcFFactorMethod();
    508517
    509518  if (!fBlindPixel->CheckChargeFitValidity())
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc

    r3434 r3435  
    504504// 4) Pixel has a charge sigma bigger than its Pedestal RMS
    505505//
    506 Bool_t MCalibrationChargePix::CheckChargeValidity(MBadPixelsPix *bad)
     506void MCalibrationChargePix::CheckChargeValidity(MBadPixelsPix *bad)
    507507{
    508508 
     
    511511      *fLog << warn << "WARNING: Fitted Charge is smaller than "
    512512            << fChargeLimit << " Pedestal RMS in Pixel  " << fPixId << endl;
    513       if (bad)
    514         bad->SetChargeIsPedestal();
    515       else
    516         return kFALSE;
     513      bad->SetChargeIsPedestal();
    517514    }
    518515 
     
    521518      *fLog << warn << "WARNING: Error of Fitted Charge is smaller than "
    522519            << fChargeErrLimit << " in Pixel  " << fPixId << endl;
    523       if (bad)
    524         bad->SetChargeErrNotValid();
    525       else
    526         return kFALSE;
     520      bad->SetChargeErrNotValid();
    527521    }
    528522     
     
    531525      *fLog << warn << "WARNING: Fitted Charge is smaller than "
    532526            << fChargeRelErrLimit << "* its error in Pixel  " << fPixId << endl;
    533       if (bad)
    534         bad->SetChargeRelErrNotValid();
    535       else
    536         return kFALSE;
     527      bad->SetChargeRelErrNotValid();
    537528    }
    538529
     
    541532        *fLog << warn << "WARNING: Sigma of Fitted Charge smaller than Pedestal RMS in Pixel  "
    542533              << fPixId << endl;
    543         if (bad)
    544           {
    545             *fLog << err << "HERERERERE" << endl;           
    546             bad->SetChargeSigmaNotValid();
    547           }
    548         else
    549           return kFALSE;
     534        bad->SetChargeSigmaNotValid();
    550535    }
    551536
    552   if (bad->IsChargeSigmaNotValid())
    553     *fLog << err << " HERE " << endl;
    554 
    555   return kTRUE;
    556537}
    557538
     
    561542// The mean arrival time is at least 1.0 slices from the used edge slices
    562543//
    563 Bool_t MCalibrationChargePix::CheckTimeValidity(MBadPixelsPix *bad)
     544void MCalibrationChargePix::CheckTimeValidity(MBadPixelsPix *bad)
    564545{
    565546 
     
    570551    {
    571552      *fLog << warn << "WARNING: Mean ArrivalTime in first extraction bin of the Pixel " << fPixId << endl;
    572       if (bad)
    573         bad->SetMeanTimeInFirstBin();
    574       else
    575         return kFALSE;
     553      bad->SetMeanTimeInFirstBin();
    576554    }
    577555 
     
    579557    {
    580558      *fLog << warn << "WARNING: Mean ArrivalTime in last extraction bin of the Pixel " << fPixId << endl;
    581       if (bad)
    582         bad->SetMeanTimeInLastBin();
    583       else
    584         return kFALSE;
     559      bad->SetMeanTimeInLastBin();
    585560    }
    586561 
    587   return kTRUE;
    588562}
    589563
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h

    r3430 r3435  
    283283  void  ApplyLoGainConversion();
    284284
    285   Bool_t CheckChargeValidity ( MBadPixelsPix *bad=NULL );
    286   Bool_t CheckTimeValidity   ( MBadPixelsPix *bad=NULL );
     285  void CheckChargeValidity ( MBadPixelsPix *bad );
     286  void CheckTimeValidity   ( MBadPixelsPix *bad );
    287287  Bool_t CalcReducedSigma();
    288288  Bool_t CalcFFactorMethod();
Note: See TracChangeset for help on using the changeset viewer.