Changeset 3838 for trunk/MagicSoft
- Timestamp:
- 04/26/04 18:32:10 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3837 r3838 44 44 * mcalib/MCalibrationChargeCalc.[h,cc] 45 45 - calculate and store the above numbers. 46 47 48 * mbadpixels/MBadPixelsPix.[h,cc] 49 - removed bits: kHiGainNotCalibrated and kLoGainNotCalibrated 50 - added bit: kDeviatingFFactor 46 51 47 52 -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r3739 r3838 647 647 FinalizePINDiodeQECam(); 648 648 649 // 650 // Finalize calibration statistics 651 // 652 FinalizeUnsuitablePixels(); 653 649 654 fCam ->SetReadyToSave(); 650 655 fQECam ->SetReadyToSave(); … … 656 661 fPINDiode->SetReadyToSave(); 657 662 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 else674 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 684 663 *fLog << inf << endl; 685 664 *fLog << GetDescriptor() << ": Errors statistics:" << endl; … … 1395 1374 // ----------------------------------------------------------------------------------------------- 1396 1375 // 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 // 1379 void 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 // 1448 void MCalibrationChargeCalc::PrintUncalibrated(MBadPixelsPix::UncalibratedType_t typ, const char *text) const 1449 { 1450 1402 1451 UInt_t countinner = 0; 1403 1452 UInt_t countouter = 0; … … 1405 1454 { 1406 1455 MBadPixelsPix &bad = (*fBadPixels)[i]; 1407 if (bad.IsUn suitable(typ))1456 if (bad.IsUncalibrated(typ)) 1408 1457 { 1409 1458 if (fGeom->GetPixRatio(i) == 1.) … … 1414 1463 } 1415 1464 1416 *fLog << " " << setw(7) << text1417 << Form("%s%3i%s%3i","Inner: ",countinner," Outer: ",countouter) << endl;1418 }1419 1420 // -----------------------------------------------------------------------------------------------1421 //1422 // Print out statistics about BadPixels of type UncalibratedType_t1423 //1424 void MCalibrationChargeCalc::PrintUncalibrated(MBadPixelsPix::UncalibratedType_t typ, const char *text) const1425 {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 else1437 countouter++;1438 }1439 }1440 1441 1465 *fLog << " " << setw(7) << text 1442 1466 << Form("%s%3i%s%3i","Inner: ",countinner," Outer: ",countouter) << endl; -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h
r3702 r3838 87 87 void FinalizeBlindPixelQECam(); 88 88 void FinalizePINDiodeQECam (); 89 90 void PrintUnsuitable ( MBadPixelsPix::UnsuitableType_t typ , const char *text) const; 89 void FinalizeUnsuitablePixels(); 90 91 91 void PrintUncalibrated( MBadPixelsPix::UncalibratedType_t typ, const char *text) const; 92 92 -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc
r3727 r3838 46 46 // sigmas. 47 47 // 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 // 48 52 // The following "calibration" constants are used for the calibration of each pixel 49 53 // (see MCalibrate and MCalibrateData): … … 147 151 } 148 152 153 // ------------------------------------------------------------------- 154 // 155 // Calls: 156 // - MCalibrationCam::Init() 157 // - fNumUncalibrated.Set(NumAreas); 158 // - fNumUnreliable.Set(NumAreas); 159 // 160 void MCalibrationChargeCam::Init(const MGeomCam &geom) 161 { 162 fNumUncalibrated.Set(geom.GetNumAreas()); 163 fNumUnreliable .Set(geom.GetNumAreas()); 164 MCalibrationCam::Init(geom); 165 } 149 166 150 167 // -----------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.