Changeset 3845 for trunk/MagicSoft


Ignore:
Timestamp:
04/26/04 22:05:15 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3841 r3845  
    2020
    2121 2004/04/26: Markus Gaug
     22
     23   * mcalib/MCalibrationQEPix.cc
     24     - found a bug in the setting of validity flags of colours. This
     25       made the QE used for calibration uncorrect by about a factor 1.5
     26       for the outer pixels if only one colour is used for calibration.
    2227
    2328   * mjobs/MJCalibration.[h,cc]
  • trunk/MagicSoft/Mars/mcalib/MCalibrate.cc

    r3844 r3845  
    335335                      if (pix.IsFFactorMethodValid())
    336336                      {
    337                           calibQE      = qe.GetQECascadesFFactor   ( zenith );
     337                          calibQE      = qe.GetQECascadesFFactor   ( zenith );
    338338                          calibQEVar   = qe.GetQECascadesFFactorVar( zenith );
    339339                      }
  • trunk/MagicSoft/Mars/mcalib/MCalibrationQEPix.cc

    r3768 r3845  
    204204    const Float_t newavqe    =   GetQEBlindPixel(col)       / GetDefaultQE (col) ;
    205205    const Float_t newavqevar = ( GetQEBlindPixelRelVar(col) + GetDefaultQERelVar(col) ) * newavqe * newavqe;
    206     wav  += newavqe / newavqevar;
    207     sumw += 1. / newavqevar ;
     206    const Float_t weight     = 1./newavqevar;
     207    wav  += newavqe * weight;
     208    sumw += weight;
    208209  }
    209210}
     
    224225    const Float_t newavqe    =   GetQECombined(col)       / GetDefaultQE (col) ;
    225226    const Float_t newavqevar = ( GetQECombinedRelVar(col) + GetDefaultQERelVar(col) ) * newavqe * newavqe;
    226     wav  += newavqe / newavqevar;
    227     sumw += 1./ newavqevar;
     227    const Float_t weight     = 1./newavqevar;
     228    wav  += newavqe * weight;
     229    sumw += weight;
    228230
    229231  }
     
    243245  if (IsFFactorMethodValid (col))
    244246  {
    245     const Float_t newavqe    =   GetQEFFactor(col)       / GetDefaultQE (col) ; 
     247    const Float_t newavqe    =   GetQEFFactor(col)       / GetDefaultQE (col) ;
    246248    const Float_t newavqevar = ( GetQEFFactorRelVar(col) + GetDefaultQERelVar(col) ) * newavqe * newavqe;
    247     wav  += newavqe / newavqevar;
    248     sumw += 1./ newavqevar;
     249    const Float_t weight     = 1./newavqevar;
     250    wav  += newavqe *weight;
     251    sumw += weight;
    249252
    250253  }
     
    268271    const Float_t newavqe    =   GetQEPINDiode(col)       / GetDefaultQE (col) ;
    269272    const Float_t newavqevar = ( GetQEPINDiodeRelVar(col) + GetDefaultQERelVar(col) ) * newavqe * newavqe;
    270     wav  += newavqe / newavqevar;
    271     sumw += 1./ newavqevar;
     273    const Float_t weight     = 1./newavqevar;
     274    wav  += newavqe *weight;
     275    sumw += weight;
    272276  }
    273277}
     
    932936Bool_t MCalibrationQEPix::IsBlindPixelMethodValid (MCalibrationCam::PulserColor_t col)  const
    933937{
    934   return TESTBIT(fValidFlags[ MCalibrationCam::kGREEN ],kBlindPixelMethodValid);
     938  return TESTBIT(fValidFlags[ col ],kBlindPixelMethodValid);
    935939}
    936940
     
    942946Bool_t MCalibrationQEPix::IsCombinedMethodValid (MCalibrationCam::PulserColor_t col)  const
    943947{
    944   return TESTBIT(fValidFlags[ MCalibrationCam::kGREEN ],kCombinedMethodValid);
     948  return TESTBIT(fValidFlags[ col ],kCombinedMethodValid);
    945949}
    946950
     
    951955Bool_t MCalibrationQEPix::IsFFactorMethodValid (MCalibrationCam::PulserColor_t col)  const
    952956{
    953   return TESTBIT(fValidFlags[ MCalibrationCam::kGREEN ],kFFactorMethodValid);
     957  return TESTBIT(fValidFlags[ col ],kFFactorMethodValid);
    954958}
    955959
     
    960964Bool_t MCalibrationQEPix::IsPINDiodeMethodValid (MCalibrationCam::PulserColor_t col)  const
    961965{
    962   return TESTBIT(fValidFlags[ MCalibrationCam::kGREEN ],kPINDiodeMethodValid);
     966  return TESTBIT(fValidFlags[ col ],kPINDiodeMethodValid);
    963967}
    964968
     
    10181022{
    10191023  if (b)
    1020     SETBIT(fValidFlags[ MCalibrationCam::kGREEN ],kBlindPixelMethodValid);
     1024    SETBIT(fValidFlags[ col ],kBlindPixelMethodValid);
    10211025  else
    1022     CLRBIT(fValidFlags[ MCalibrationCam::kGREEN ],kBlindPixelMethodValid);   
     1026    CLRBIT(fValidFlags[ col ],kBlindPixelMethodValid);   
    10231027}
    10241028
     
    10301034{
    10311035  if (b)
    1032     SETBIT(fValidFlags[ MCalibrationCam::kGREEN ],kCombinedMethodValid);
     1036    SETBIT(fValidFlags[ col ],kCombinedMethodValid);
    10331037  else
    1034     CLRBIT(fValidFlags[ MCalibrationCam::kGREEN ],kCombinedMethodValid);   
     1038    CLRBIT(fValidFlags[ col ],kCombinedMethodValid);   
    10351039}
    10361040
     
    10421046{
    10431047  if (b)
    1044     SETBIT(fValidFlags[ MCalibrationCam::kGREEN ],kFFactorMethodValid);
     1048    SETBIT(fValidFlags[ col ],kFFactorMethodValid);
    10451049  else
    1046     CLRBIT(fValidFlags[ MCalibrationCam::kGREEN ],kFFactorMethodValid);   
     1050    CLRBIT(fValidFlags[ col ],kFFactorMethodValid);   
    10471051}
    10481052
     
    10541058{
    10551059  if (b)
    1056     SETBIT(fValidFlags[ MCalibrationCam::kGREEN ],kPINDiodeMethodValid);
     1060    SETBIT(fValidFlags[ col ],kPINDiodeMethodValid);
    10571061  else
    1058     CLRBIT(fValidFlags[ MCalibrationCam::kGREEN ],kPINDiodeMethodValid);   
     1062    CLRBIT(fValidFlags[ col ],kPINDiodeMethodValid);   
    10591063}
    10601064
     
    11281132  AddAverageFFactorQEs(MCalibrationCam::kUV   , weightedav, sumweights);
    11291133  AddAverageFFactorQEs(MCalibrationCam::kCT1  , weightedav, sumweights);
    1130 
     1134 
    11311135  if (weightedav == 0. || sumweights == 0.)
    11321136    return kFALSE;
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationCam.h

    r3731 r3845  
    7272  virtual void   FinalizeBadPixels();
    7373 
    74   void CalcAverageSigma();
     74  virtual void CalcAverageSigma();
    7575 
    7676  void DrawAverageSigma(Bool_t sat, Bool_t inner,
Note: See TracChangeset for help on using the changeset viewer.