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

Legend:

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

    r3427 r3434  
    507507{
    508508 
    509   if (!IsFitted())
    510     return kFALSE;
    511 
    512509  if (GetMeanCharge() < fChargeLimit*GetPedRms())
    513510    {
     
    515512            << fChargeLimit << " Pedestal RMS in Pixel  " << fPixId << endl;
    516513      if (bad)
    517         bad->SetCalcChargePedestal();
     514        bad->SetChargeIsPedestal();
    518515      else
    519516        return kFALSE;
    520517    }
    521   else
    522     if (bad)
    523       bad->SetNoCalcChargePedestal();
    524      
    525518 
    526519  if (GetMeanChargeErr() < fChargeErrLimit)
     
    529522            << fChargeErrLimit << " in Pixel  " << fPixId << endl;
    530523      if (bad)
    531         bad->SetNoCalcChargeErrValid();
     524        bad->SetChargeErrNotValid();
    532525      else
    533526        return kFALSE;
    534527    }
    535   else
    536       if (bad)
    537         bad->SetCalcChargeErrValid();
    538528     
    539529   if (GetMeanCharge() < fChargeRelErrLimit*GetMeanChargeErr())
     
    542532            << fChargeRelErrLimit << "* its error in Pixel  " << fPixId << endl;
    543533      if (bad)
    544         bad->SetNoCalcChargeRelErrValid();
     534        bad->SetChargeRelErrNotValid();
    545535      else
    546536        return kFALSE;
    547537    }
    548    else
    549       if (bad)
    550         bad->SetCalcChargeRelErrValid();     
    551538
    552539  if (GetSigmaCharge() < GetPedRms())
     
    555542              << fPixId << endl;
    556543        if (bad)
    557           bad->SetNoCalcChargeSigmaValid();
     544          {
     545            *fLog << err << "HERERERERE" << endl;           
     546            bad->SetChargeSigmaNotValid();
     547          }
    558548        else
    559549          return kFALSE;
    560550    }
    561   else
    562     if (bad)
    563         bad->SetCalcChargeSigmaValid();
     551
     552  if (bad->IsChargeSigmaNotValid())
     553    *fLog << err << " HERE " << endl;
    564554
    565555  return kTRUE;
     
    585575        return kFALSE;
    586576    }
    587   else
    588     bad->SetNoMeanTimeInFirstBin();
    589577 
    590578  if ( fAbsTimeMean > upperedge-1.)
     
    596584        return kFALSE;
    597585    }
    598   else
    599     bad->SetNoMeanTimeInLastBin();
    600586 
    601587  return kTRUE;
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc

    r3433 r3434  
    549549    FinalizeLoGainHists(*fAverageLoGainOuterPix,*fCam->GetAverageOuterPix(),*fCam->GetAverageOuterBadPix());
    550550
    551     fCam->GetAverageInnerPix()->SetSigmaCharge   (fCam->GetAverageInnerPix()->GetSigmaCharge()   *TMath::Sqrt((Float_t)fNumInnerPixels));
    552     fCam->GetAverageOuterPix()->SetSigmaCharge   (fCam->GetAverageOuterPix()->GetSigmaCharge()   *TMath::Sqrt((Float_t)fNumOuterPixels));
    553     fCam->GetAverageInnerPix()->SetSigmaChargeErr(fCam->GetAverageInnerPix()->GetSigmaChargeErr()*TMath::Sqrt((Float_t)fNumInnerPixels));
    554     fCam->GetAverageOuterPix()->SetSigmaChargeErr(fCam->GetAverageOuterPix()->GetSigmaChargeErr()*TMath::Sqrt((Float_t)fNumOuterPixels));
     551    fCam->GetAverageInnerPix()->SetSigmaCharge   (fCam->GetAverageInnerPix()->GetSigmaCharge()   
     552                                                  *TMath::Sqrt((Float_t)fNumInnerPixels));
     553    fCam->GetAverageOuterPix()->SetSigmaCharge   (fCam->GetAverageOuterPix()->GetSigmaCharge()   
     554                                                  *TMath::Sqrt((Float_t)fNumOuterPixels));
     555    fCam->GetAverageInnerPix()->SetSigmaChargeErr(fCam->GetAverageInnerPix()->GetSigmaChargeErr()
     556                                                  *TMath::Sqrt((Float_t)fNumInnerPixels));
     557    fCam->GetAverageOuterPix()->SetSigmaChargeErr(fCam->GetAverageOuterPix()->GetSigmaChargeErr()
     558                                                  *TMath::Sqrt((Float_t)fNumOuterPixels));
    555559   
    556560    return kTRUE;
     
    575579    // 2) Fit the Hi Gain histograms with a Gaussian
    576580    //
    577     if (hist.FitGaus())
    578         bad.SetHiGainFitted();
     581    if (!hist.FitGaus())
    579582    //
    580583    // 3) In case of failure set the bit Fitted to false and take histogram means and RMS
    581584    //
    582     else if (hist.RepeatFit())
    583         bad.SetHiGainFitted();
    584     else
     585      if (!hist.RepeatFit())
    585586      {
    586587        hist.BypassFit();
    587         bad.SetNoHiGainFitted();
     588        bad.SetHiGainNotFitted();
    588589      }
    589590
     
    635636    // 2) Fit the Lo Gain histograms with a Gaussian
    636637    //
    637     if (hist.FitGaus())
    638         bad.SetLoGainFitted();
     638    if (!hist.FitGaus())
    639639    //
    640640    // 3) In case of failure set the bit kFitted to false and take histogram means and RMS
    641641    //
    642     else if (hist.RepeatFit())
    643         bad.SetLoGainFitted();
    644     else
    645       {
    646         hist.BypassFit();
    647         bad.SetNoLoGainFitted();
    648       }
     642      if (!hist.RepeatFit())
     643        {
     644          hist.BypassFit();
     645          bad.SetLoGainNotFitted();
     646        }
    649647
    650648    //
Note: See TracChangeset for help on using the changeset viewer.