Changeset 5014
- Timestamp:
- 09/14/04 19:10:30 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r5013 r5014 32 32 33 33 2004/09/14: Markus Gaug 34 35 * mhcalib/MHCalibration*Cam.[h,cc] 36 - added MBadpixelsIntenstiyCam 34 37 35 38 * mbadpixels/MBadPixelsIntensityCam.[h,cc] -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc
r4985 r5014 69 69 #include "MCalibrationPix.h" 70 70 71 #include "MBadPixelsIntensityCam.h" 72 #include "MBadPixelsCam.h" 71 73 #include "MBadPixelsPix.h" 72 #include "MBadPixelsCam.h"73 74 74 75 #include "MGeomCam.h" … … 112 113 : fHistName(gsHistName),fHistTitle(gsHistTitle), 113 114 fHistXTitle(gsHistXTitle),fHistYTitle(gsHistYTitle), 114 fColor(MCalibrationCam::kNONE), 115 fColor(MCalibrationCam::kNONE), fIntensBad(NULL), 115 116 fBadPixels(NULL), fIntensCam(NULL), fCam(NULL), fGeom(NULL), fRunHeader(NULL) 116 117 { … … 466 467 // 467 468 // Gets or creates the pointers to: 469 // - MBadPixelsIntensityCam 468 470 // - MBadPixelsCam 469 471 // … … 503 505 const Int_t nareas = fGeom->GetNumAreas(); 504 506 505 fBadPixels = (MBadPixelsCam*)pList->FindObject("MBadPixelsCam"); 506 if (!fBadPixels) 507 { 508 509 fBadPixels = (MBadPixelsCam*)pList->FindCreateObj(AddSerialNumber("MBadPixelsCam")); 507 fIntensBad = (MBadPixelsIntensityCam*)pList->FindObject(AddSerialNumber("MBadPixelsIntensityCam")); 508 if (fIntensBad) 509 *fLog << inf << "Found MBadPixelsIntensityCam ... " << endl; 510 else 511 { 512 fBadPixels = (MBadPixelsCam*)pList->FindObject("MBadPixelsCam"); 510 513 if (!fBadPixels) 511 514 { 512 *fLog << err << "Cannot find nor create MBadPixelsCam ... abort." << endl; 513 return kFALSE; 515 516 fBadPixels = (MBadPixelsCam*)pList->FindCreateObj(AddSerialNumber("MBadPixelsCam")); 517 if (!fBadPixels) 518 { 519 *fLog << err << "Cannot find nor create MBadPixelsCam ... abort." << endl; 520 return kFALSE; 521 } 522 else 523 fBadPixels->InitSize(npixels); 514 524 } 515 else 516 fBadPixels->InitSize(npixels); 517 } 518 525 } 526 519 527 if (IsAverageing()) 520 528 { … … 538 546 for (Int_t i=0; i<npixels; i++) 539 547 { 540 if ((*fBadPixels)[i].IsBad()) 548 549 MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i]; 550 if (bad.IsBad()) 541 551 continue; 542 552 … … 647 657 h->SetYTitle(fHistYTitle.Data()); 648 658 649 InitHists(pix,(*fBadPixels)[i],i); 659 MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i]; 660 InitHists(pix,bad,i); 650 661 } 651 662 } … … 759 770 h->SetYTitle(fHistYTitle.Data()); 760 771 761 InitHists(pix,(*fBadPixels)[i],i); 772 MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i]; 773 InitHists(pix,bad,i); 762 774 } 763 775 } -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.h
r4974 r5014 34 34 class MCalibrationCam; 35 35 class MCalibrationPix; 36 class MBadPixelsIntensityCam; 36 37 class MBadPixelsCam; 37 38 class MBadPixelsPix; … … 78 79 79 80 MCalibrationCam::PulserColor_t fColor; // Colour of the pulsed LEDs 80 81 82 MBadPixelsIntensityCam *fIntensBad; //! Bad Pixels intensity calibration storage container 81 83 MBadPixelsCam *fBadPixels; //! Bad Pixels storage container 82 84 MCalibrationIntensityCam *fIntensCam; //! Intensity Calibration Cam with the results -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc
r4983 r5014 127 127 #include "MGeomPix.h" 128 128 129 #include "MBadPixelsIntensityCam.h" 129 130 #include "MBadPixelsCam.h" 130 131 #include "MBadPixelsPix.h" … … 430 431 h->SetYTitle(fAbsHistYTitle.Data()); 431 432 432 InitHists((*this)[i],(*fBadPixels)[i],i); 433 MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i]; 434 InitHists((*this)[i],bad,i); 433 435 } 434 436 } … … 592 594 h->SetYTitle(fAbsHistYTitle.Data()); 593 595 594 InitHists(pix,(*fBadPixels)[i],i); 596 MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i]; 597 InitHists(pix,bad,i); 595 598 } 596 599 } … … 949 952 } 950 953 951 MBadPixelsPix &bad =(*fBadPixels)[i];954 MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i]; 952 955 953 956 h = histhi.GetHGausHist(); … … 979 982 980 983 MHCalibrationChargePix &histlo = (MHCalibrationChargePix&)(*this)(i); 981 MBadPixelsPix &bad =(*fBadPixels)[i];984 MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i]; 982 985 983 986 if (histlo.IsExcluded()) … … 1037 1040 } 1038 1041 1039 MBadPixelsPix 1042 MBadPixelsPix &bad = fIntensCam 1040 1043 ? fIntensCam->GetAverageBadArea(j) 1041 1044 : fCam->GetAverageBadArea(j); … … 1063 1066 if (pix.IsHiGainSaturation()) 1064 1067 { 1065 MBadPixelsPix 1068 MBadPixelsPix &bad = fIntensCam 1066 1069 ? fIntensCam->GetAverageBadArea(j) 1067 1070 : fCam->GetAverageBadArea(j); … … 1087 1090 } 1088 1091 1089 MBadPixelsPix &bad= fIntensCam1092 MBadPixelsPix &bad = fIntensCam 1090 1093 ? fIntensCam->GetAverageBadSector(j) 1091 1094 : fCam->GetAverageBadSector(j); … … 1124 1127 // 1125 1128 FitHiGainArrays(fIntensCam ? (MCalibrationCam&)(*fIntensCam->GetCam()) : (MCalibrationCam&)(*fCam), 1126 *fBadPixels,1129 fIntensBad ? (*fIntensBad->GetCam()) : *fBadPixels, 1127 1130 MBadPixelsPix::kHiGainNotFitted, 1128 1131 MBadPixelsPix::kHiGainOscillating); … … 1133 1136 if (IsLoGain()) 1134 1137 FitLoGainArrays(fIntensCam ? (MCalibrationCam&)(*fIntensCam->GetCam()) : (MCalibrationCam&)(*fCam), 1135 *fBadPixels,1138 fIntensBad ? (*fIntensBad->GetCam()) : *fBadPixels, 1136 1139 MBadPixelsPix::kLoGainNotFitted, 1137 1140 MBadPixelsPix::kLoGainOscillating); … … 1191 1194 void MHCalibrationChargeCam::FinalizeBadPixels() 1192 1195 { 1193 1194 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 1195 { 1196 1197 MBadPixelsPix &bad = (*fBadPixels)[i]; 1196 1197 MBadPixelsCam *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels; 1198 1199 for (Int_t i=0; i<badcam->GetSize(); i++) 1200 { 1201 1202 MBadPixelsPix &bad = (*badcam)[i]; 1198 1203 MCalibrationPix &pix = fIntensCam ? (*fIntensCam)[i] : (*fCam)[i]; 1199 1204 … … 1219 1224 } 1220 1225 } 1221 }1222 1223 // --------------------------------------------------------------------------1224 //1225 // Dummy, needed by MCamEvent1226 //1227 Bool_t MHCalibrationChargeCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const1228 {1229 return kTRUE;1230 1226 } 1231 1227 -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.h
r4983 r5014 119 119 void SetAbsHistYTitle( const char *name ) { fAbsHistYTitle = name; } 120 120 121 Bool_t GetPixelContent ( Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const ;121 Bool_t GetPixelContent ( Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const { return kTRUE; } 122 122 void DrawPixelContent( Int_t num ) const; 123 123 -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc
r4964 r5014 105 105 #include "MGeomPix.h" 106 106 107 #include "MBadPixelsIntensityCam.h" 107 108 #include "MBadPixelsCam.h" 108 109 #include "MBadPixelsPix.h" … … 484 485 485 486 FitHiGainArrays(fIntensCam ? (MCalibrationCam&)(*fIntensCam->GetCam()) : (MCalibrationCam&)(*fCam), 486 *fBadPixels,487 fIntensBad ? (*fIntensBad->GetCam()) : *fBadPixels, 487 488 MBadPixelsPix::kRelTimeNotFitted, 488 489 MBadPixelsPix::kRelTimeOscillating); … … 490 491 if (IsLoGain()) 491 492 FitLoGainArrays(fIntensCam ? (MCalibrationCam&)(*fIntensCam->GetCam()) : (MCalibrationCam&)(*fCam), 492 *fBadPixels,493 fIntensBad ? (*fIntensBad->GetCam()) : *fBadPixels, 493 494 MBadPixelsPix::kRelTimeNotFitted, 494 495 MBadPixelsPix::kRelTimeOscillating); … … 506 507 { 507 508 508 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 509 { 510 511 MBadPixelsPix &bad = (*fBadPixels)[i]; 509 MBadPixelsCam *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels; 510 511 for (Int_t i=0; i<badcam->GetSize(); i++) 512 { 513 MBadPixelsPix &bad = (*badcam)[i]; 512 514 513 515 if (bad.IsUncalibrated( MBadPixelsPix::kRelTimeNotFitted ))
Note:
See TracChangeset
for help on using the changeset viewer.