Changeset 8417 for trunk/MagicSoft/Mars/mhcalib
- Timestamp:
- 04/18/07 16:34:51 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mhcalib
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc
r8366 r8417 82 82 #include "MCalibrationPix.h" 83 83 84 #include "MBadPixelsIntensityCam.h"85 84 #include "MBadPixelsCam.h" 86 85 #include "MBadPixelsPix.h" … … 144 143 fHistName(gsHistName),fHistTitle(gsHistTitle), 145 144 fHistXTitle(gsHistXTitle),fHistYTitle(gsHistYTitle), 146 fCurrentNumEvts(0), 147 fColor(MCalibrationCam::kNONE), fIntensBad(NULL), 145 fCurrentNumEvts(0), fColor(MCalibrationCam::kNONE), 148 146 fBadPixels(NULL), fIntensCam(NULL), fCam(NULL), fGeom(NULL), 149 147 fRunHeader(NULL) … … 568 566 // 569 567 // Gets or creates the pointers to: 570 // - MBadPixelsIntensityCam571 568 // - MBadPixelsCam 572 569 // … … 606 603 const Int_t nareas = fGeom->GetNumAreas(); 607 604 608 fIntensBad = (MBadPixelsIntensityCam*)pList->FindObject(AddSerialNumber("MBadPixelsIntensityCam")); 609 if (fIntensBad) 610 *fLog << inf << "Found MBadPixelsIntensityCam ... " << endl; 611 else 612 { 613 fBadPixels = (MBadPixelsCam*)pList->FindObject("MBadPixelsCam"); 605 fBadPixels = (MBadPixelsCam*)pList->FindObject("MBadPixelsCam"); 606 if (!fBadPixels) 607 { 608 fBadPixels = (MBadPixelsCam*)pList->FindCreateObj(AddSerialNumber("MBadPixelsCam")); 614 609 if (!fBadPixels) 615 { 616 617 fBadPixels = (MBadPixelsCam*)pList->FindCreateObj(AddSerialNumber("MBadPixelsCam")); 618 if (!fBadPixels) 619 return kFALSE; 620 621 fBadPixels->InitSize(npixels); 622 } 623 } 624 610 return kFALSE; 611 612 fBadPixels->InitSize(npixels); 613 } 614 625 615 if (IsAverageing()) 626 616 { … … 644 634 for (Int_t i=0; i<npixels; i++) 645 635 { 646 647 MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i]; 648 if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) 636 637 if ((*fBadPixels)[i].IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) 649 638 continue; 650 639 … … 746 735 pix.SetProbLimit(fProbLimit); 747 736 748 MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i]; 749 InitHists(pix,bad,i); 737 InitHists(pix, (*fBadPixels)[i], i); 750 738 751 739 if (fCam) … … 823 811 pix.SetProbLimit(fProbLimit); 824 812 825 MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i]; 826 InitHists(pix,bad,i); 813 InitHists(pix, (*fBadPixels)[i], i); 827 814 } 828 815 } … … 1255 1242 { 1256 1243 *fLog << warn << "Pixel " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram empty." << endl; 1244 bad.SetUncalibrated( fittyp ); 1257 1245 return; 1258 1246 } … … 1260 1248 { 1261 1249 *fLog << warn << "Pixel " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram contains only overflows." << endl; 1250 bad.SetUncalibrated( fittyp ); 1262 1251 return; 1263 1252 } … … 1265 1254 { 1266 1255 *fLog << warn << "Pixel " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram contains only underflows." << endl; 1256 bad.SetUncalibrated( fittyp ); 1267 1257 return; 1268 1258 } … … 1357 1347 { 1358 1348 // *fLog << warn << "Pixel " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram empty." << endl; 1349 bad.SetUncalibrated( fittyp ); 1359 1350 return; 1360 1351 } … … 1362 1353 { 1363 1354 *fLog << warn << "Pixel " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram contains only overflows." << endl; 1355 bad.SetUncalibrated( fittyp ); 1364 1356 return; 1365 1357 } … … 1367 1359 { 1368 1360 *fLog << warn << "Pixel " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram contains only underflows." << endl; 1361 bad.SetUncalibrated( fittyp ); 1369 1362 return; 1370 1363 } -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.h
r8366 r8417 32 32 class MCalibrationCam; 33 33 class MCalibrationPix; 34 class MBadPixelsIntensityCam;35 34 class MBadPixelsCam; 36 35 class MBadPixelsPix; … … 100 99 MCalibrationCam::PulserColor_t fColor; // Colour of the pulsed LEDs 101 100 102 MBadPixelsIntensityCam *fIntensBad; //! Bad Pixels intensity calibration storage container103 101 MBadPixelsCam *fBadPixels; //! Bad Pixels storage container 104 102 MCalibrationIntensityCam *fIntensCam; //! Intensity Calibration Cam with the results -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc
r8365 r8417 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.5 5 2007-03-04 14:46:44tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.56 2007-04-18 15:33:56 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 150 150 #include "MGeomPix.h" 151 151 152 #include "MBadPixelsIntensityCam.h"153 152 #include "MBadPixelsCam.h" 154 153 #include "MBadPixelsPix.h" … … 429 428 { 430 429 431 MBadPixelsCam *badcam = fIntensBad432 ? (MBadPixelsCam*) fIntensBad->GetCam() : fBadPixels;433 434 430 TH1F *h; 435 431 … … 450 446 pix.SetBinningAbsTime(higainsamples, -0.5, higainsamples-0.5); 451 447 452 InitHists(pix,(* badcam)[i],i);448 InitHists(pix,(*fBadPixels)[i], i); 453 449 454 450 h = pix.GetHAbsTime(); … … 541 537 542 538 543 MBadPixelsCam *badcam = fIntensBad544 ? (MBadPixelsCam*) fIntensBad->GetCam() : fBadPixels;545 546 539 const Int_t logainsamples = fRunHeader->GetNumSamplesLoGain(); 547 540 … … 564 557 pix.SetBlackoutLimit(fgLoGainBlackoutLimit); 565 558 566 InitHists(pix,(* badcam)[i],i);559 InitHists(pix,(*fBadPixels)[i], i); 567 560 568 561 h = pix.GetHAbsTime(); … … 870 863 871 864 MCalibrationCam *chargecam = fIntensCam ? fIntensCam->GetCam() : fCam; 872 MBadPixelsCam *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels;873 865 874 866 const Int_t hifirst = fSignal->GetFirstUsedSliceHiGain(); … … 899 891 } 900 892 901 MBadPixelsPix &bad = (* badcam)[i];893 MBadPixelsPix &bad = (*fBadPixels)[i]; 902 894 903 895 h = histhi.GetHGausHist(); … … 929 921 930 922 MHCalibrationChargePix &histlo = (MHCalibrationChargePix&)(*this)(i); 931 MBadPixelsPix &bad = (*badcam)[i];932 923 933 924 if (histlo.IsExcluded()) 934 925 continue; 935 926 927 MBadPixelsPix &bad = (*fBadPixels)[i]; 936 928 if (histlo.GetSaturated() > fNumLoGainSaturationLimit*histlo.GetHGausHist()->GetEntries()) 937 929 { … … 1055 1047 // Perform the fitting for the High Gain (done in MHCalibrationCam) 1056 1048 // 1057 FitHiGainArrays(*chargecam, * badcam,1049 FitHiGainArrays(*chargecam, *fBadPixels, 1058 1050 MBadPixelsPix::kHiGainNotFitted, 1059 1051 MBadPixelsPix::kHiGainOscillating); … … 1063 1055 // 1064 1056 if (IsLoGain()) 1065 FitLoGainArrays(*chargecam, * badcam,1057 FitLoGainArrays(*chargecam, *fBadPixels, 1066 1058 MBadPixelsPix::kLoGainNotFitted, 1067 1059 MBadPixelsPix::kLoGainOscillating); … … 1090 1082 continue; 1091 1083 1092 MBadPixelsPix &bad = (* badcam)[i];1084 MBadPixelsPix &bad = (*fBadPixels)[i]; 1093 1085 bad.SetUnsuitable(MBadPixelsPix::kUnsuitableRun); 1094 1086 bad.SetUncalibrated(MBadPixelsPix::kLoGainBlackout); … … 1151 1143 { 1152 1144 1153 MBadPixelsCam *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels;1154 1145 MCalibrationCam *chargecam = fIntensCam ? fIntensCam->GetCam() : fCam; 1155 1146 1156 for (Int_t i=0; i< badcam->GetSize(); i++)1147 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 1157 1148 { 1158 1149 1159 MBadPixelsPix &bad = (* badcam)[i];1150 MBadPixelsPix &bad = (*fBadPixels)[i]; 1160 1151 MCalibrationPix &pix = (*chargecam)[i]; 1161 1152 -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.cc
r8132 r8417 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationHiLoCam.cc,v 1.2 0 2006-10-19 14:01:49tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationHiLoCam.cc,v 1.21 2007-04-18 15:33:56 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 116 116 #include "MGeomPix.h" 117 117 118 #include "MBadPixelsIntensityCam.h"119 118 #include "MBadPixelsCam.h" 120 119 #include "MBadPixelsPix.h" … … 718 717 719 718 MCalibrationCam *hilocam = fCam; 720 MBadPixelsCam *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels;721 719 722 720 const Int_t nareas = fAverageHiGainAreas->GetSize(); … … 766 764 767 765 768 FitHiGainArrays(*hilocam, *badcam,766 FitHiGainArrays(*hilocam, *fBadPixels, 769 767 MBadPixelsPix::kHiLoNotFitted, 770 768 MBadPixelsPix::kHiLoOscillating); … … 843 841 } 844 842 845 FitLoGainArrays(*hilocam, *badcam,843 FitLoGainArrays(*hilocam, *fBadPixels, 846 844 MBadPixelsPix::kHiLoNotFitted, 847 845 MBadPixelsPix::kHiLoOscillating); … … 859 857 { 860 858 861 MBadPixelsCam *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels; 862 863 for (Int_t i=0; i<badcam->GetSize(); i++) 864 { 865 MBadPixelsPix &bad = (*badcam)[i]; 859 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 860 { 861 MBadPixelsPix &bad = (*fBadPixels)[i]; 866 862 867 863 if (bad.IsUncalibrated( MBadPixelsPix::kHiLoNotFitted )) -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationPulseTimeCam.cc
r8361 r8417 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationPulseTimeCam.cc,v 1.3 4 2007-03-04 11:55:55tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationPulseTimeCam.cc,v 1.35 2007-04-18 15:33:56 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 124 124 #include "MHCalibrationPix.h" 125 125 #include "MCalibrationIntensityCam.h" 126 #include "MBadPixelsIntensityCam.h"127 126 128 127 #include "MGeomCam.h" … … 308 307 pix.SetBinning(fNbins, fFirst, fLast); 309 308 310 MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i]; 311 InitHists(pix,bad,i); 309 InitHists(pix, (*fBadPixels)[i], i); 312 310 313 311 if (fCam) -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc
r8359 r8417 107 107 #include "MGeomPix.h" 108 108 109 #include "MBadPixelsIntensityCam.h"110 109 #include "MBadPixelsCam.h" 111 110 #include "MBadPixelsPix.h" … … 448 447 449 448 MCalibrationCam *relcam = fIntensCam ? fIntensCam->GetCam() : fCam; 450 MBadPixelsCam *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels;451 449 452 450 const Int_t nareas = fAverageHiGainAreas->GetSize(); … … 542 540 } 543 541 544 FitHiGainArrays(*relcam, *badcam,542 FitHiGainArrays(*relcam, *fBadPixels, 545 543 MBadPixelsPix::kRelTimeNotFitted, 546 544 MBadPixelsPix::kRelTimeOscillating); 547 545 548 546 if (IsLoGain()) 549 FitLoGainArrays(*relcam, *badcam,547 FitLoGainArrays(*relcam, *fBadPixels, 550 548 MBadPixelsPix::kRelTimeNotFitted, 551 549 MBadPixelsPix::kRelTimeOscillating); … … 563 561 { 564 562 565 MBadPixelsCam *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels; 566 567 for (Int_t i=0; i<badcam->GetSize(); i++) 568 { 569 MBadPixelsPix &bad = (*badcam)[i]; 563 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 564 { 565 MBadPixelsPix &bad = (*fBadPixels)[i]; 570 566 571 567 if (bad.IsUncalibrated( MBadPixelsPix::kRelTimeNotFitted )) -
trunk/MagicSoft/Mars/mhcalib/MHPedestalCam.cc
r8339 r8417 104 104 #include "MCalibrationPix.h" 105 105 106 #include "MBadPixelsIntensityCam.h"107 106 #include "MBadPixelsCam.h" 108 107 … … 127 126 const TString MHPedestalCam::gsHistYTitle = "Nr. events"; 128 127 const TString MHPedestalCam::fgNamePedestalCam = "MPedestalCam"; 128 129 129 // -------------------------------------------------------------------------- 130 130 // … … 375 375 pix.SetProbLimit(fProbLimit); 376 376 377 MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i]; 378 InitHists(pix,bad,i); 377 InitHists(pix, (*fBadPixels)[i], i); 379 378 } 380 379 }
Note:
See TracChangeset
for help on using the changeset viewer.