Changeset 3603 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
03/29/04 19:01:12 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3602 r3603  
    3131
    3232   * mcalib/MHCalibrationChargeCam.cc
     33   * mcalib/MCalibrationChargeCam.cc
    3334   * mbadpixels/MBadPixelsCam.cc
    3435     - adopt to new style in MBadPixelsPix.h
     36
     37   * mcalib/MCalibrationChargeCalc.[h,cc]
     38   * mcalib/MCalibrationChargePix.[h,cc]
     39     - move consistency checks from Pix to Calc
    3540
    3641
  • trunk/MagicSoft/Mars/macros/calibration.C

    r3566 r3603  
    8080  plist.AddToList(&tlist);
    8181  plist.AddToList(&pedloop.GetPedestalCam());
    82   plist.AddToList(&badcam);
     82  plist.AddToList(&pedloop.GetBadPixels());   
    8383
    8484  gLog << endl;;
     
    119119  //    plist.AddToList(&histpin);
    120120  plist.AddToList(&histblind);
    121   plist.AddToList(&pedloop.GetBadPixels());   
    122121 
    123122  //
     
    202201  //
    203202  //    histblind.DrawClone("all");
    204   //    histcharge[5].DrawClone("all");
     203  //  histcharge[5].DrawClone("all");
    205204  //    histcharge(5).DrawClone("all");
    206205  //    histtime[5].DrawClone("fourierevents");
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc

    r3560 r3603  
    884884              if (nphe < lowerpheinnerlimit || nphe > upperpheinnerlimit)
    885885                {
    886                   bad[idx].SetDeviatingNumPhes();
    887                   bad[idx].SetUnsuitable(MBadPixelsPix::kUnreliableRun);
     886                  bad[idx].SetUncalibrated(MBadPixelsPix::kDeviatingNumPhes);
     887                  bad[idx].SetUnsuitable(  MBadPixelsPix::kUnreliableRun);
    888888                  continue;
    889889                }
     
    899899              if (nphe < lowerpheouterlimit || nphe > upperpheouterlimit)
    900900                {
    901                   bad[idx].SetDeviatingNumPhes();
    902                   bad[idx].SetUnsuitable(MBadPixelsPix::kUnreliableRun);
     901                  bad[idx].SetUncalibrated(MBadPixelsPix::kDeviatingNumPhes);
     902                  bad[idx].SetUnsuitable(  MBadPixelsPix::kUnreliableRun);
    903903                  continue;
    904904                }
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc

    r3562 r3603  
    105105const Float_t MCalibrationChargePix::gkConversionHiLoErr        = 2.5;
    106106
    107 const Float_t MCalibrationChargePix::fgChargeLimit              = 3.;
    108 const Float_t MCalibrationChargePix::fgChargeErrLimit           = 0.;
    109 const Float_t MCalibrationChargePix::fgChargeRelErrLimit        = 1.;
    110 const Float_t MCalibrationChargePix::fgTimeLimit                = 1.5;
    111 const Float_t MCalibrationChargePix::fgTimeErrLimit             = 3.;
    112107const Float_t MCalibrationChargePix::fgPheFFactorMethodLimit    = 5.;
    113108// --------------------------------------------------------------------------
     
    132127  SetConversionHiLoErr();
    133128
    134   SetChargeLimit();
    135   SetChargeErrLimit(); 
    136  
    137   SetChargeRelErrLimit();
    138   SetTimeLimit();
    139   SetTimeErrLimit();
    140129  SetPheFFactorMethodLimit();
    141130 
     
    182171  fLoGainPedRmsVar                  =  -1.;
    183172
    184   fTimeFirstHiGain                  =   0 ;
    185   fTimeLastHiGain                   =   0 ;
    186   fTimeFirstLoGain                  =   0 ;
    187   fTimeLastLoGain                   =   0 ;
    188 
    189173  fAbsTimeMean                      =  -1.;
    190174  fAbsTimeRms                       =  -1.;
     
    373357}
    374358
    375 void MCalibrationChargePix::SetAbsTimeBordersHiGain(const Byte_t f, const Byte_t l)
    376 {
    377 
    378   fTimeFirstHiGain = f;
    379   fTimeLastHiGain  = l;
    380  
    381 }
    382 
    383 void MCalibrationChargePix::SetAbsTimeBordersLoGain(const Byte_t f, const Byte_t l)
    384 {
    385   fTimeFirstLoGain = f;
    386   fTimeLastLoGain  = l;
    387 }
    388359
    389360Float_t  MCalibrationChargePix::GetPedRms()  const
     
    596567}
    597568
    598 
    599 //
    600 // The check return kTRUE if:
    601 //
    602 // 1) Pixel has a fitted charge greater than fChargeLimit*PedRMS
    603 // 2) Pixel has a fit error greater than fChargeVarLimit
    604 // 3) Pixel has a fitted charge greater its fChargeRelVarLimit times its charge error
    605 // 4) Pixel has a charge sigma bigger than its Pedestal RMS
    606 //
    607 void MCalibrationChargePix::CheckChargeValidity(MBadPixelsPix *bad)
    608 {
    609  
    610   if (GetMeanCharge() < fChargeLimit*GetPedRms())
    611     {
    612       *fLog << warn << "WARNING: Fitted Charge is smaller than "
    613             << fChargeLimit << " Pedestal RMS in Pixel  " << fPixId << endl;
    614       bad->SetChargeIsPedestal();
    615       bad->SetUnsuitable(MBadPixelsPix::kUnsuitableRun);
    616     }
    617  
    618   const Float_t meanchargevar = IsHiGainSaturation() ? fLoGainMeanChargeVar : fHiGainMeanChargeVar;
    619  
    620   if (meanchargevar < fChargeVarLimit)
    621     {
    622       *fLog << warn << "WARNING: Variance of Fitted Charge is smaller than "
    623             << meanchargevar << " in Pixel  " << fPixId << endl;
    624       bad->SetChargeErrNotValid();
    625       bad->SetUnsuitable(MBadPixelsPix::kUnsuitableRun);
    626     }
    627      
    628    if (GetMeanCharge()*GetMeanCharge() < fChargeRelVarLimit*meanchargevar)
    629     {
    630       *fLog << warn << "WARNING: Fitted Charge is smaller than "
    631             << TMath::Sqrt(fChargeRelVarLimit) << "* its error in Pixel  " << fPixId << endl;
    632       bad->SetChargeRelErrNotValid();
    633       bad->SetUnsuitable(MBadPixelsPix::kUnsuitableRun);
    634     }
    635 
    636   if (GetSigmaCharge() < GetPedRms())
    637     {
    638         *fLog << warn << "WARNING: Sigma of Fitted Charge smaller than Pedestal RMS in Pixel  "
    639               << fPixId << endl;
    640         bad->SetChargeSigmaNotValid();
    641         bad->SetUnsuitable(MBadPixelsPix::kUnsuitableRun);
    642     }
    643 
    644 }
    645 
    646 //
    647 // The check returns kTRUE if:
    648 //
    649 // The mean arrival time is at least 1.0 slices from the used edge slices
    650 //
    651 void MCalibrationChargePix::CheckTimeValidity(MBadPixelsPix *bad)
    652 {
    653  
    654   const Byte_t loweredge     = IsHiGainSaturation() ? fTimeFirstLoGain   : fTimeFirstHiGain;
    655   const Byte_t upperedge     = IsHiGainSaturation() ? fTimeLastLoGain    : fTimeLastHiGain;
    656  
    657   if ( fAbsTimeMean < (Float_t)loweredge+1)
    658     {
    659       *fLog << warn << "WARNING: Mean ArrivalTime in first extraction bin of the Pixel " << fPixId << endl;
    660       *fLog << fAbsTimeMean << "   " << (Float_t)loweredge+1. << endl;
    661       bad->SetMeanTimeInFirstBin();
    662       bad->SetUnsuitable(MBadPixelsPix::kUnsuitableRun);
    663     }
    664  
    665   if ( fAbsTimeMean > (Float_t)upperedge-2)
    666     {
    667       *fLog << warn << "WARNING: Mean ArrivalTime in last two extraction bins of the Pixel " << fPixId << endl;
    668       *fLog << fAbsTimeMean << "   " << (Float_t)upperedge-2. << endl;
    669       bad->SetMeanTimeInLastBin();
    670       bad->SetUnsuitable(MBadPixelsPix::kUnsuitableRun);
    671     }
    672 }
    673 
    674 
    675569//
    676570//
Note: See TracChangeset for help on using the changeset viewer.