Changeset 3838 for trunk/MagicSoft


Ignore:
Timestamp:
04/26/04 18:32:10 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3837 r3838  
    4444   * mcalib/MCalibrationChargeCalc.[h,cc]
    4545     - calculate and store the above numbers.
     46
     47
     48   * mbadpixels/MBadPixelsPix.[h,cc]
     49     - removed bits: kHiGainNotCalibrated and kLoGainNotCalibrated
     50     - added bit: kDeviatingFFactor
    4651
    4752
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r3739 r3838  
    647647  FinalizePINDiodeQECam();
    648648
     649  //
     650  // Finalize calibration statistics
     651  //
     652  FinalizeUnsuitablePixels();
     653
    649654  fCam      ->SetReadyToSave();
    650655  fQECam    ->SetReadyToSave();
     
    656661    fPINDiode->SetReadyToSave();
    657662 
    658 
    659  
    660   *fLog << inf << endl;
    661   *fLog << GetDescriptor() << ": Calibration statistics:" << endl;
    662   *fLog << dec << setfill(' ');
    663 
    664   UInt_t countinner = 0;
    665   UInt_t countouter = 0; 
    666   for (Int_t i=0; i<fBadPixels->GetSize(); i++)
    667     {
    668       MBadPixelsPix &bad = (*fBadPixels)[i];
    669       if (bad.IsOK())
    670         {
    671           if (fGeom->GetPixRatio(i) == 1.)
    672             countinner++;
    673           else
    674             countouter++;
    675         }
    676     }
    677 
    678   *fLog << " " << setw(7) << "Successfully calibrated Pixels: "
    679         << "Inner: " << countinner << " Outer: " << countouter << endl;
    680  
    681   PrintUnsuitable(MBadPixelsPix::kUnsuitableRun, "Bad Pixels:                     ");
    682   PrintUnsuitable(MBadPixelsPix::kUnreliableRun, "Unreliable Pixels:              ");
    683 
    684663  *fLog << inf << endl;
    685664  *fLog << GetDescriptor() << ": Errors statistics:" << endl; 
     
    13951374// -----------------------------------------------------------------------------------------------
    13961375//
    1397 // Print out statistics about BadPixels of type UnsuitableType_t
    1398 //
    1399 void MCalibrationChargeCalc::PrintUnsuitable(MBadPixelsPix::UnsuitableType_t typ, const char *text) const
    1400 {
    1401 
     1376// - Print out statistics about BadPixels of type UnsuitableType_t
     1377// - store numbers of bad pixels of each type in fCam
     1378//
     1379void MCalibrationChargeCalc::FinalizeUnsuitablePixels()
     1380{
     1381 
     1382  *fLog << inf << endl;
     1383  *fLog << GetDescriptor() << ": Calibration statistics:" << endl;
     1384  *fLog << dec << setfill(' ');
     1385
     1386  const Int_t nareas = fGeom->GetNumAreas();
     1387
     1388  Int_t counts[nareas];
     1389  memset(counts,0,nareas*sizeof(Int_t));
     1390
     1391  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
     1392    {
     1393      MBadPixelsPix &bad = (*fBadPixels)[i];
     1394      if (bad.IsOK())
     1395        {
     1396          const Int_t aidx = (*fGeom)[i].GetAidx();
     1397          counts[aidx]++;
     1398        }
     1399    }
     1400
     1401  if (fGeom->InheritsFrom("MGeomCamMagic"))
     1402    *fLog << " " << setw(7) << "Successfully calibrated Pixels: "
     1403          << Form("%s%3i%s%3i","Inner: ",counts[0]," Outer: ",counts[1]) << endl;
     1404 
     1405  memset(counts,0,nareas*sizeof(Int_t));
     1406
     1407  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
     1408    {
     1409      MBadPixelsPix &bad = (*fBadPixels)[i];
     1410      if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
     1411        {
     1412          const Int_t aidx = (*fGeom)[i].GetAidx();
     1413          counts[aidx]++;
     1414        }
     1415    }
     1416
     1417  for (Int_t aidx=0; aidx<nareas; aidx++)
     1418    fCam->SetNumUncalibrated(counts[aidx], aidx);
     1419
     1420  if (fGeom->InheritsFrom("MGeomCamMagic"))
     1421    *fLog << " " << setw(7) << "Uncalibrated Pixels:            "
     1422          << Form("%s%3i%s%3i","Inner: ",counts[0]," Outer: ",counts[1]) << endl;
     1423
     1424  memset(counts,0,nareas*sizeof(Int_t));
     1425
     1426  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
     1427    {
     1428      MBadPixelsPix &bad = (*fBadPixels)[i];
     1429      if (bad.IsUnsuitable(MBadPixelsPix::kUnreliableRun))
     1430        {
     1431          const Int_t aidx = (*fGeom)[i].GetAidx();
     1432          counts[aidx]++;
     1433        }
     1434    }
     1435
     1436  for (Int_t aidx=0; aidx<nareas; aidx++)
     1437    fCam->SetNumUnreliable(counts[aidx], aidx);
     1438
     1439  *fLog << " " << setw(7) << "Unreliable Pixels:              "
     1440        << Form("%s%3i%s%3i","Inner: ",counts[0]," Outer: ",counts[1]) << endl;
     1441
     1442}
     1443
     1444// -----------------------------------------------------------------------------------------------
     1445//
     1446// Print out statistics about BadPixels of type UncalibratedType_t
     1447//
     1448void MCalibrationChargeCalc::PrintUncalibrated(MBadPixelsPix::UncalibratedType_t typ, const char *text) const
     1449{
     1450 
    14021451  UInt_t countinner = 0;
    14031452  UInt_t countouter = 0;
     
    14051454    {
    14061455      MBadPixelsPix &bad = (*fBadPixels)[i];
    1407       if (bad.IsUnsuitable(typ))
     1456      if (bad.IsUncalibrated(typ))
    14081457        {
    14091458          if (fGeom->GetPixRatio(i) == 1.)
     
    14141463    }
    14151464
    1416   *fLog << " " << setw(7) << text
    1417         << Form("%s%3i%s%3i","Inner: ",countinner," Outer: ",countouter) << endl;
    1418 }
    1419 
    1420 // -----------------------------------------------------------------------------------------------
    1421 //
    1422 // Print out statistics about BadPixels of type UncalibratedType_t
    1423 //
    1424 void MCalibrationChargeCalc::PrintUncalibrated(MBadPixelsPix::UncalibratedType_t typ, const char *text) const
    1425 {
    1426  
    1427   UInt_t countinner = 0;
    1428   UInt_t countouter = 0;
    1429   for (Int_t i=0; i<fBadPixels->GetSize(); i++)
    1430     {
    1431       MBadPixelsPix &bad = (*fBadPixels)[i];
    1432       if (bad.IsUncalibrated(typ))
    1433         {
    1434           if (fGeom->GetPixRatio(i) == 1.)
    1435             countinner++;
    1436           else
    1437             countouter++;
    1438         }
    1439     }
    1440 
    14411465  *fLog << " " << setw(7) << text 
    14421466        << Form("%s%3i%s%3i","Inner: ",countinner," Outer: ",countouter) << endl;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h

    r3702 r3838  
    8787  void   FinalizeBlindPixelQECam();
    8888  void   FinalizePINDiodeQECam  ();
    89  
    90   void   PrintUnsuitable  ( MBadPixelsPix::UnsuitableType_t typ  , const char *text) const;   
     89  void   FinalizeUnsuitablePixels();
     90
    9191  void   PrintUncalibrated( MBadPixelsPix::UncalibratedType_t typ, const char *text) const;
    9292
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc

    r3727 r3838  
    4646// sigmas.
    4747//
     48// Final numbers of uncalibrated or unreliable pixels can be retrieved via the commands:
     49// GetNumUncalibrated(aidx) and GetNumUnreliable(aidx) where aidx is the area index (0 for
     50// inner and 1 for outer pixels in the MAGIC camera).
     51//
    4852// The following "calibration" constants are used for the calibration of each pixel
    4953// (see MCalibrate and MCalibrateData):
     
    147151}
    148152
     153// -------------------------------------------------------------------
     154//
     155// Calls:
     156// - MCalibrationCam::Init()
     157// - fNumUncalibrated.Set(NumAreas);
     158// - fNumUnreliable.Set(NumAreas);
     159//
     160void MCalibrationChargeCam::Init(const MGeomCam &geom)
     161{
     162  fNumUncalibrated.Set(geom.GetNumAreas());
     163  fNumUnreliable  .Set(geom.GetNumAreas());
     164  MCalibrationCam::Init(geom);
     165}
    149166
    150167// -----------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.