Changeset 4272 for trunk/MagicSoft


Ignore:
Timestamp:
06/03/04 10:52:24 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4270 r4272  
    3030     - replace fNumHiGainFADCSlices and fNumLoGainFADCSlices by a
    3131       TArrayF and increment ClassDef by 1 for the streamer.
     32
     33   * mcalib/MCalibrationChargeCalc.cc
     34     - found a small bug making a difference in the number of valid
     35       pixels with the blind PIxel method and the ffactor method. Now
     36       fixed. (The difference was usually a couple of pixels)
    3237
    3338
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r4242 r4272  
    10131013          bad.SetUncalibrated( MBadPixelsPix::kDeviatingNumPhes );
    10141014          bad.SetUnsuitable  ( MBadPixelsPix::kUnsuitableRun    );
    1015           pix.SetExcluded();
     1015          pix.SetFFactorMethodValid(kFALSE);
    10161016          continue;
    10171017        }
     
    12951295      MCalibrationQEPix   &qepix = (MCalibrationQEPix&)  (*fQECam)[i];
    12961296
    1297       if (!pix.IsFFactorMethodValid())
    1298         {
    1299           qepix.SetExcluded();
    1300           qepix.SetFFactorMethodValid(kFALSE,fPulserColor);
    1301           continue;
    1302         }
    1303      
     1297      if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
     1298        continue;
     1299
    13041300      const Float_t photons = avphotons / fGeom->GetPixRatio(i);
    13051301      const Float_t qe      = pix.GetPheFFactorMethod() / photons ;
     
    13071303      if (!pix.CalcMeanFFactor( photons , avphotrelvar ))
    13081304        {
    1309           pix.SetFFactorMethodValid(kFALSE);
    1310           qepix.SetFFactorMethodValid(kFALSE, fPulserColor);
    13111305          (*fBadPixels)[i].SetUncalibrated( MBadPixelsPix::kDeviatingNumPhes );
     1306          continue;
     1307         
    13121308        }
    13131309
     
    13411337     
    13421338      MCalibrationChargePix &pix = (MCalibrationChargePix&)(*fCam)[i];
    1343 
    1344       if (!pix.IsFFactorMethodValid())
     1339      MBadPixelsPix         &bad =                   (*fBadPixels)[i];
     1340
     1341      if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
    13451342        continue;
    13461343     
    13471344      const Float_t ffactor = pix.GetMeanFFactorFADC2Phot();
    1348       MBadPixelsPix    &bad = (*fBadPixels)[i];
    1349 
    13501345      const Int_t   aidx   = (*fGeom)[i].GetAidx();
    13511346
     
    13571352          bad.SetUncalibrated( MBadPixelsPix::kDeviatingFFactor );
    13581353          bad.SetUnsuitable  ( MBadPixelsPix::kUnsuitableRun    );
     1354        }
     1355    }
     1356
     1357  for (UInt_t i=0; i<npixels; i++)
     1358    {
     1359     
     1360      MCalibrationChargePix &pix = (MCalibrationChargePix&)(*fCam)[i];
     1361      MCalibrationQEPix   &qepix = (MCalibrationQEPix&)  (*fQECam)[i];
     1362      MBadPixelsPix         &bad =                   (*fBadPixels)[i];
     1363     
     1364      if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
     1365        {
     1366          qepix.SetFFactorMethodValid(kFALSE,fPulserColor);
     1367          pix.SetFFactorMethodValid(kFALSE);
    13591368          pix.SetExcluded();
     1369          continue;
    13601370        }
    13611371    }
     
    14251435        }
    14261436     
    1427       MBadPixelsPix       &bad   =                   (*fBadPixels)[i];
    1428 
     1437      MBadPixelsPix &bad = (*fBadPixels)[i];
    14291438      if (bad.IsUnsuitable (MBadPixelsPix::kUnsuitableRun))
    14301439        {
Note: See TracChangeset for help on using the changeset viewer.