Changeset 5029 for trunk/MagicSoft/Mars/mhcalib
- Timestamp:
- 09/15/04 14:27:20 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mhcalib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc
r5026 r5029 1226 1226 { 1227 1227 hist.BypassFit(); 1228 bad.SetUncalibrated( fittyp ); 1228 if (pix.IsHiGainSaturation()) 1229 bad.SetUncalibrated( fittyp ); 1229 1230 } 1230 1231 -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc
r5014 r5029 931 931 932 932 TH1F *h = NULL; 933 934 MCalibrationCam *chargecam = fIntensCam ? fIntensCam->GetCam() : fCam; 935 MBadPixelsCam *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels; 933 936 934 937 for (Int_t i=0; i<fHiGainArray->GetSize(); i++) … … 940 943 continue; 941 944 942 MCalibrationChargePix &pix = fIntensCam 943 ? (MCalibrationChargePix&)(*fIntensCam)[i] 944 : (MCalibrationChargePix&)(*fCam)[i]; 945 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*chargecam)[i] ; 945 946 946 947 if (histhi.GetSaturated() > fNumHiGainSaturationLimit*histhi.GetHGausHist()->GetEntries()) … … 952 953 } 953 954 954 MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];955 MBadPixelsPix &bad = (*badcam)[i]; 955 956 956 957 h = histhi.GetHGausHist(); … … 982 983 983 984 MHCalibrationChargePix &histlo = (MHCalibrationChargePix&)(*this)(i); 984 MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];985 MBadPixelsPix &bad = (*badcam)[i]; 985 986 986 987 if (histlo.IsExcluded()) … … 1016 1017 } 1017 1018 1018 MCalibrationChargePix &pix = fIntensCam 1019 ? (MCalibrationChargePix&)(*fIntensCam)[i] 1020 : (MCalibrationChargePix&)(*fCam)[i]; 1019 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*chargecam)[i] ; 1021 1020 1022 1021 if (pix.IsHiGainSaturation()) … … 1028 1027 1029 1028 MHCalibrationChargePix &histhi = (MHCalibrationChargePix&)GetAverageHiGainArea(j); 1030 MCalibrationChargePix &pix = fIntensCam 1031 ? (MCalibrationChargePix&)fIntensCam->GetAverageArea(j) 1032 : (MCalibrationChargePix&)fCam->GetAverageArea(j); 1029 MCalibrationChargePix &pix = (MCalibrationChargePix&)chargecam->GetAverageArea(j); 1033 1030 1034 1031 if (histhi.GetSaturated() > fNumHiGainSaturationLimit*histhi.GetHGausHist()->GetEntries()) … … 1040 1037 } 1041 1038 1042 MBadPixelsPix &bad = fIntensCam 1043 ? fIntensCam->GetAverageBadArea(j) 1044 : fCam->GetAverageBadArea(j); 1045 1039 MBadPixelsPix &bad = chargecam->GetAverageBadArea(j); 1046 1040 FinalizeAbsTimes(histhi, pix, bad, fFirstHiGain, fLastHiGain); 1047 1041 } … … 1060 1054 } 1061 1055 1062 MCalibrationChargePix &pix = fIntensCam 1063 ? (MCalibrationChargePix&)fIntensCam->GetAverageArea(j) 1064 : (MCalibrationChargePix&)fCam->GetAverageArea(j) ; 1056 MCalibrationChargePix &pix = (MCalibrationChargePix&)chargecam->GetAverageArea(j); 1065 1057 1066 1058 if (pix.IsHiGainSaturation()) 1067 1059 { 1068 MBadPixelsPix &bad = fIntensCam 1069 ? fIntensCam->GetAverageBadArea(j) 1070 : fCam->GetAverageBadArea(j); 1060 MBadPixelsPix &bad = chargecam->GetAverageBadArea(j); 1071 1061 FinalizeAbsTimes(histlo, pix, bad, fFirstLoGain, fLastLoGain); 1072 1062 } … … 1078 1068 1079 1069 MHCalibrationChargePix &histhi = (MHCalibrationChargePix&)GetAverageHiGainSector(j); 1080 MCalibrationChargePix &pix = fIntensCam 1081 ? (MCalibrationChargePix&)fIntensCam->GetAverageSector(j) 1082 : (MCalibrationChargePix&)fCam->GetAverageSector(j); 1070 MCalibrationChargePix &pix = (MCalibrationChargePix&)chargecam->GetAverageSector(j); 1083 1071 1084 1072 if (histhi.GetSaturated() > fNumHiGainSaturationLimit*histhi.GetHGausHist()->GetEntries()) … … 1090 1078 } 1091 1079 1092 MBadPixelsPix &bad = fIntensCam 1093 ? fIntensCam->GetAverageBadSector(j) 1094 : fCam->GetAverageBadSector(j); 1095 1080 MBadPixelsPix &bad = chargecam->GetAverageBadSector(j); 1096 1081 FinalizeAbsTimes(histhi, pix, bad, fFirstHiGain, fLastHiGain); 1097 1082 } … … 1102 1087 1103 1088 MHCalibrationChargePix &histlo = (MHCalibrationChargePix&)GetAverageLoGainSector(j); 1104 MBadPixelsPix &bad = fIntensCam 1105 ? fIntensCam->GetAverageBadSector(j) 1106 : fCam->GetAverageBadSector(j); 1089 MBadPixelsPix &bad = chargecam->GetAverageBadSector(j); 1107 1090 1108 1091 if (histlo.GetSaturated() > fNumLoGainSaturationLimit*histlo.GetHGausHist()->GetEntries()) … … 1115 1098 } 1116 1099 1117 MCalibrationChargePix &pix = fIntensCam 1118 ? (MCalibrationChargePix&)fIntensCam->GetAverageSector(j) 1119 : (MCalibrationChargePix&)fCam->GetAverageSector(j); 1100 MCalibrationChargePix &pix = (MCalibrationChargePix&)chargecam->GetAverageSector(j); 1120 1101 1121 1102 if (pix.IsHiGainSaturation()) … … 1126 1107 // Perform the fitting for the High Gain (done in MHCalibrationCam) 1127 1108 // 1128 FitHiGainArrays(fIntensCam ? (MCalibrationCam&)(*fIntensCam->GetCam()) : (MCalibrationCam&)(*fCam), 1129 fIntensBad ? (*fIntensBad->GetCam()) : *fBadPixels, 1109 FitHiGainArrays(*chargecam, *badcam, 1130 1110 MBadPixelsPix::kHiGainNotFitted, 1131 1111 MBadPixelsPix::kHiGainOscillating); … … 1135 1115 // 1136 1116 if (IsLoGain()) 1137 FitLoGainArrays(fIntensCam ? (MCalibrationCam&)(*fIntensCam->GetCam()) : (MCalibrationCam&)(*fCam), 1138 fIntensBad ? (*fIntensBad->GetCam()) : *fBadPixels, 1117 FitLoGainArrays(*chargecam, *badcam, 1139 1118 MBadPixelsPix::kLoGainNotFitted, 1140 1119 MBadPixelsPix::kLoGainOscillating); … … 1195 1174 { 1196 1175 1197 MBadPixelsCam *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels; 1176 MBadPixelsCam *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels; 1177 MCalibrationCam *chargecam = fIntensCam ? fIntensCam->GetCam() : fCam; 1198 1178 1199 1179 for (Int_t i=0; i<badcam->GetSize(); i++) … … 1201 1181 1202 1182 MBadPixelsPix &bad = (*badcam)[i]; 1203 MCalibrationPix &pix = fIntensCam ? (*fIntensCam)[i] : (*fCam)[i];1183 MCalibrationPix &pix = (*chargecam)[i]; 1204 1184 1205 1185 if (bad.IsUncalibrated( MBadPixelsPix::kHiGainNotFitted )) … … 1210 1190 if (pix.IsHiGainSaturation()) 1211 1191 bad.SetUnsuitable( MBadPixelsPix::kUnreliableRun ); 1212 1192 1213 1193 if (bad.IsUncalibrated( MBadPixelsPix::kLoGainSaturation )) 1214 1194 bad.SetUnsuitable( MBadPixelsPix::kUnsuitableRun ); … … 1224 1204 } 1225 1205 } 1206 1207 1208 1226 1209 } 1227 1210
Note:
See TracChangeset
for help on using the changeset viewer.