Changeset 8452 for trunk/MagicSoft/Mars/mhcalib
- Timestamp:
- 04/27/07 11:05:11 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mhcalib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc
r8417 r8452 78 78 #include "MLogManip.h" 79 79 80 #include "MCalibrationIntensityCam.h"81 80 #include "MCalibrationCam.h" 82 81 #include "MCalibrationPix.h" … … 144 143 fHistXTitle(gsHistXTitle),fHistYTitle(gsHistYTitle), 145 144 fCurrentNumEvts(0), fColor(MCalibrationCam::kNONE), 146 fBadPixels(NULL), f IntensCam(NULL), fCam(NULL), fGeom(NULL),145 fBadPixels(NULL), fCam(NULL), fGeom(NULL), 147 146 fRunHeader(NULL) 148 147 { … … 606 605 if (!fBadPixels) 607 606 { 607 /* 608 608 fBadPixels = (MBadPixelsCam*)pList->FindCreateObj(AddSerialNumber("MBadPixelsCam")); 609 609 if (!fBadPixels) 610 610 return kFALSE; 611 611 612 fBadPixels->InitSize(npixels); 612 fBadPixels->InitSize(npixels); 613 */ 614 *fLog << err << "MBadPixelsCam not found... abort." << endl; 615 return kFALSE; 613 616 } 614 617 … … 762 765 } 763 766 else 764 InitHists(pix, fIntensCam ? fIntensCam->GetAverageBadArea(j) :fCam->GetAverageBadArea(j),j);767 InitHists(pix, fCam->GetAverageBadArea(j),j); 765 768 } 766 769 } … … 775 778 776 779 pix.SetBinning(fNbins*(Int_t)TMath::Sqrt((Float_t)npixels/nsectors), fFirst, fLast); 777 778 InitHists(pix, fIntensCam ? fIntensCam->GetAverageBadSector(j) :fCam->GetAverageBadSector(j),j);780 781 InitHists(pix, fCam->GetAverageBadSector(j),j); 779 782 } 780 783 } … … 835 838 } 836 839 else 837 InitHists(pix, fIntensCam ? fIntensCam->GetAverageBadArea(j) :fCam->GetAverageBadArea(j),j);840 InitHists(pix, fCam->GetAverageBadArea(j),j); 838 841 } 839 842 } … … 849 852 pix.SetBinning(fNbins*(Int_t)TMath::Sqrt((Float_t)npixels/nsectors), fFirst, fLast); 850 853 851 InitHists(pix, fIntensCam ? fIntensCam->GetAverageBadSector(j) :fCam->GetAverageBadSector(j),j);854 InitHists(pix, fCam->GetAverageBadSector(j),j); 852 855 } 853 856 } … … 1034 1037 // ------------------------------------------------------------- 1035 1038 // 1036 // - Searches for the CalibrationIntensity*Cam corresponding to 'name'. 1037 // - In case, it does not exist in the parameter list, it searches 1038 // for the corresponding MCalibration*Cam. 1039 // - Searches for the Calibration*Cam corresponding to 'name'. 1039 1040 // - Initializes the MCalibration*Cam, if not yet done. 1040 1041 // … … 1042 1043 { 1043 1044 1044 TString intensname = "MCalibrationIntensity"; 1045 intensname += name; 1046 intensname += "Cam"; 1047 1048 TString ordname = "MCalibration"; 1049 ordname += name; 1050 ordname += "Cam"; 1051 1052 fIntensCam = (MCalibrationIntensityCam*)plist->FindObject(AddSerialNumber(intensname)); 1053 if (fIntensCam) 1054 *fLog << inf << "Found " << intensname << "... " << endl; 1055 else 1056 { 1057 fCam = (MCalibrationCam*)plist->FindObject(AddSerialNumber(ordname)); 1045 TString ordname = "MCalibration"; 1046 ordname += name; 1047 ordname += "Cam"; 1048 1049 fCam = (MCalibrationCam*)plist->FindObject(AddSerialNumber(ordname)); 1050 if (!fCam) 1051 { 1052 fCam = (MCalibrationCam*)plist->FindCreateObj(AddSerialNumber(ordname)); 1058 1053 if (!fCam) 1059 { 1060 fCam = (MCalibrationCam*)plist->FindCreateObj(AddSerialNumber(ordname)); 1061 if (!fCam) 1062 return kFALSE; 1063 1064 fCam->Init(*fGeom); 1065 } 1066 } 1054 return kFALSE; 1055 1056 fCam->Init(*fGeom); 1057 } 1058 1067 1059 return kTRUE; 1068 1060 } … … 1182 1174 if (!IsAverageing()) 1183 1175 return; 1184 1185 MCalibrationCam *cam = f IntensCam ? fIntensCam->GetCam() : fCam;1176 1177 MCalibrationCam *cam = fCam; 1186 1178 if (!cam) 1187 1179 return; 1188 1180 1189 1181 for (UInt_t j=0; j<fGeom->GetNumAreas(); j++) 1190 1182 { 1191 1183 1192 1184 MCalibrationPix &pix = cam->GetAverageArea(j); 1193 1185 … … 1241 1233 if (hist.IsEmpty()) 1242 1234 { 1243 *fLog << warn << "Pixel " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram empty." << endl; 1235 //*fLog << warn << "Pixel " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram empty." << endl; 1236 //bad.SetUncalibrated( fittyp ); 1237 return; 1238 } 1239 if (hist.IsOnlyOverflow()) 1240 { 1241 *fLog << warn << "Pixel " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram contains only overflows (Check Binning!)." << endl; 1244 1242 bad.SetUncalibrated( fittyp ); 1245 1243 return; 1246 1244 } 1247 if (hist.IsOnlyOverflow())1248 {1249 *fLog << warn << "Pixel " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram contains only overflows." << endl;1250 bad.SetUncalibrated( fittyp );1251 return;1252 }1253 1245 if (hist.IsOnlyUnderflow()) 1254 1246 { 1255 *fLog << warn << "Pixel " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram contains only underflows ." << endl;1247 *fLog << warn << "Pixel " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram contains only underflows (Check Binning!)." << endl; 1256 1248 bad.SetUncalibrated( fittyp ); 1257 1249 return; … … 1346 1338 if (hist.IsEmpty()) 1347 1339 { 1348 // *fLog << warn << "Pixel " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram empty." << endl; 1340 //*fLog << warn << "Pixel " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram empty." << endl; 1341 //bad.SetUncalibrated( fittyp ); // FIXME: Combine with HiGain! 1342 return; 1343 } 1344 if (hist.IsOnlyOverflow()) 1345 { 1346 *fLog << warn << "Pixel " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram contains only overflows (Check Binning!)." << endl; 1349 1347 bad.SetUncalibrated( fittyp ); 1350 1348 return; 1351 1349 } 1352 if (hist.IsOnlyOverflow())1353 {1354 *fLog << warn << "Pixel " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram contains only overflows." << endl;1355 bad.SetUncalibrated( fittyp );1356 return;1357 }1358 1350 if (hist.IsOnlyUnderflow()) 1359 1351 { 1360 *fLog << warn << "Pixel " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram contains only underflows ." << endl;1352 *fLog << warn << "Pixel " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram contains only underflows (Check Binning!)." << endl; 1361 1353 bad.SetUncalibrated( fittyp ); 1362 1354 return; -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.h
r8417 r8452 29 29 class MGeomCam; 30 30 class MRawRunHeader; 31 class MCalibrationIntensityCam;32 31 class MCalibrationCam; 33 32 class MCalibrationPix; … … 100 99 101 100 MBadPixelsCam *fBadPixels; //! Bad Pixels storage container 102 MCalibrationIntensityCam *fIntensCam; //! Intensity Calibration Cam with the results103 101 MCalibrationCam *fCam; //! Calibration Cam with the results 104 102 MGeomCam *fGeom; //! Camera geometry -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc
r8446 r8452 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.5 7 2007-04-25 14:39:43tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.58 2007-04-27 10:04:47 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 143 143 #include "MHCalibrationPix.h" 144 144 145 #include "MCalibrationIntensityCam.h"146 145 #include "MCalibrationChargeCam.h" 147 146 #include "MCalibrationChargePix.h" … … 339 338 // Gets or creates the pointers to: 340 339 // - MExtractedSignalCam 341 // - MCalibrationChargeCam or MCalibrationIntensityChargeCam340 // - MCalibrationChargeCam 342 341 // - MBadPixelsCam 343 342 // … … 472 471 pix.SetBinningAbsTime(higainsamples, -0.5, higainsamples-0.5); 473 472 474 InitHists(pix, fIntensCam ? fIntensCam->GetAverageBadArea(j) :fCam->GetAverageBadArea(j),j);473 InitHists(pix, fCam->GetAverageBadArea(j),j); 475 474 476 475 h = pix.GetHAbsTime(); … … 498 497 pix.SetBinningAbsTime(higainsamples, -0.5, higainsamples-0.5); 499 498 500 InitHists(pix, fIntensCam ? fIntensCam->GetAverageBadSector(j) :fCam->GetAverageBadSector(j),j);499 InitHists(pix, fCam->GetAverageBadSector(j),j); 501 500 502 501 h = pix.GetHAbsTime(); … … 582 581 pix.SetBinningAbsTime(logainsamples, -0.5, logainsamples-0.5); 583 582 584 InitHists(pix, fIntensCam ? fIntensCam->GetAverageBadArea(j) :fCam->GetAverageBadArea(j),j);583 InitHists(pix, fCam->GetAverageBadArea(j),j); 585 584 586 585 h = pix.GetHAbsTime(); … … 609 608 pix.SetBinningAbsTime(logainsamples, -0.5, logainsamples-0.5); 610 609 611 InitHists(pix, fIntensCam ? fIntensCam->GetAverageBadSector(j) :fCam->GetAverageBadSector(j),j);610 InitHists(pix, fCam->GetAverageBadSector(j),j); 612 611 613 612 h = pix.GetHAbsTime(); … … 862 861 TH1F *h = NULL; 863 862 864 MCalibrationCam *chargecam = fIntensCam ? fIntensCam->GetCam() : fCam;865 866 863 const Int_t hifirst = fSignal->GetFirstUsedSliceHiGain(); 867 864 const Int_t hilast = fSignal->GetLastUsedSliceHiGain(); … … 871 868 for (Int_t i=0; i<fHiGainArray->GetSize(); i++) 872 869 { 873 870 874 871 MHCalibrationChargePix &histhi = (MHCalibrationChargePix&)(*this)[i]; 875 876 872 if (histhi.IsExcluded()) 877 873 continue; 878 874 879 MCalibrationChargePix &pix = (MCalibrationChargePix&)(* chargecam)[i];875 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*fCam)[i]; 880 876 881 877 const Int_t numsat = histhi.GetSaturated(); … … 935 931 } 936 932 937 MCalibrationChargePix &pix = (MCalibrationChargePix&)(* chargecam)[i] ;933 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*fCam)[i] ; 938 934 if (!pix.IsHiGainSaturation()) 939 935 continue; … … 966 962 967 963 MHCalibrationChargePix &histhi = (MHCalibrationChargePix&)GetAverageHiGainArea(j); 968 MCalibrationChargePix &pix = (MCalibrationChargePix&) chargecam->GetAverageArea(j);964 MCalibrationChargePix &pix = (MCalibrationChargePix&)fCam->GetAverageArea(j); 969 965 970 966 if (histhi.GetSaturated() > fNumHiGainSaturationLimit*histhi.GetHGausHist()->GetEntries()) … … 976 972 } 977 973 978 MBadPixelsPix &bad = chargecam->GetAverageBadArea(j);974 MBadPixelsPix &bad = fCam->GetAverageBadArea(j); 979 975 FinalizeAbsTimes(histhi, pix, bad, hifirst, hilast); 980 976 } … … 994 990 } 995 991 996 MCalibrationChargePix &pix = (MCalibrationChargePix&)chargecam->GetAverageArea(j); 997 992 MCalibrationChargePix &pix = (MCalibrationChargePix&)fCam->GetAverageArea(j); 998 993 if (pix.IsHiGainSaturation()) 999 994 { 1000 MBadPixelsPix &bad = chargecam->GetAverageBadArea(j);995 MBadPixelsPix &bad = fCam->GetAverageBadArea(j); 1001 996 FinalizeAbsTimes(histlo, pix, bad, lofirst, lolast); 1002 997 } 1003 998 1004 999 } 1005 1000 … … 1008 1003 1009 1004 MHCalibrationChargePix &histhi = (MHCalibrationChargePix&)GetAverageHiGainSector(j); 1010 MCalibrationChargePix &pix = (MCalibrationChargePix&) chargecam->GetAverageSector(j);1005 MCalibrationChargePix &pix = (MCalibrationChargePix&)fCam->GetAverageSector(j); 1011 1006 1012 1007 if (histhi.GetSaturated() > fNumHiGainSaturationLimit*histhi.GetHGausHist()->GetEntries()) … … 1018 1013 } 1019 1014 1020 MBadPixelsPix &bad = chargecam->GetAverageBadSector(j);1015 MBadPixelsPix &bad = fCam->GetAverageBadSector(j); 1021 1016 FinalizeAbsTimes(histhi, pix, bad, hifirst, hilast); 1022 1017 } … … 1025 1020 for (Int_t j=0; j<fAverageLoGainSectors->GetSize(); j++) 1026 1021 { 1027 1022 1028 1023 MHCalibrationChargePix &histlo = (MHCalibrationChargePix&)GetAverageLoGainSector(j); 1029 MBadPixelsPix &bad = chargecam->GetAverageBadSector(j);1030 1024 MBadPixelsPix &bad = fCam->GetAverageBadSector(j); 1025 1031 1026 if (histlo.GetSaturated() > fNumLoGainSaturationLimit*histlo.GetHGausHist()->GetEntries()) 1032 1027 { … … 1037 1032 continue; 1038 1033 } 1039 1040 MCalibrationChargePix &pix = (MCalibrationChargePix&)chargecam->GetAverageSector(j); 1041 1034 1035 MCalibrationChargePix &pix = (MCalibrationChargePix&)fCam->GetAverageSector(j); 1042 1036 if (pix.IsHiGainSaturation()) 1043 1037 FinalizeAbsTimes(histlo, pix, bad, lofirst, lolast); … … 1047 1041 // Perform the fitting for the High Gain (done in MHCalibrationCam) 1048 1042 // 1049 FitHiGainArrays(* chargecam, *fBadPixels,1043 FitHiGainArrays(*fCam, *fBadPixels, 1050 1044 MBadPixelsPix::kHiGainNotFitted, 1051 1045 MBadPixelsPix::kHiGainOscillating); … … 1055 1049 // 1056 1050 if (IsLoGain()) 1057 FitLoGainArrays(* chargecam, *fBadPixels,1051 FitLoGainArrays(*fCam, *fBadPixels, 1058 1052 MBadPixelsPix::kLoGainNotFitted, 1059 1053 MBadPixelsPix::kLoGainOscillating); … … 1071 1065 continue; 1072 1066 1073 MCalibrationChargePix &pix = (MCalibrationChargePix&)(* chargecam)[i];1067 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*fCam)[i]; 1074 1068 if (!pix.IsHiGainSaturation()) 1075 1069 continue; … … 1143 1137 { 1144 1138 1145 MCalibrationCam *chargecam = fIntensCam ? fIntensCam->GetCam() : fCam;1146 1147 1139 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 1148 1140 { 1149 1150 MBadPixelsPix &bad= (*fBadPixels)[i];1151 MCalibrationPix &pix = (*chargecam)[i];1141 1142 MBadPixelsPix &bad = (*fBadPixels)[i]; 1143 MCalibrationPix &pix = (*fCam)[i]; 1152 1144 1153 1145 if (bad.IsUncalibrated(MBadPixelsPix::kHiGainNotFitted)) -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc
r8428 r8452 125 125 126 126 const Float_t MHCalibrationRelTimeCam::fgNumHiGainSaturationLimit = 0.25; 127 const UInt_t MHCalibrationRelTimeCam::fgReferencePixel = 1;127 //const UInt_t MHCalibrationRelTimeCam::fgReferencePixel = 1; 128 128 const Int_t MHCalibrationRelTimeCam::fgNbins = 400; 129 129 const Axis_t MHCalibrationRelTimeCam::fgFirst = -9.975; … … 141 141 // 142 142 // Sets: 143 // - fReferencePixel to fgReferencePixel144 143 // - fNbins to fgNbins 145 144 // - fFirst to fgFirst … … 159 158 SetNumHiGainSaturationLimit(fgNumHiGainSaturationLimit); 160 159 161 SetReferencePixel();160 // SetReferencePixel(); 162 161 163 162 SetBinning(fgNbins, fgFirst, fgLast); … … 263 262 return kFALSE; 264 263 265 MArrivalTimeCam *signal = (MArrivalTimeCam*)pList->FindObject("MArrivalTimeCam");266 if (!signal)267 {268 *fLog << err << "MArrivalTimeCam not found... abort." << endl;269 return kFALSE;270 }271 272 264 const Int_t npixels = fGeom->GetNumPixels(); 273 265 const Int_t nsectors = fGeom->GetNumSectors(); … … 313 305 return kFALSE; 314 306 } 315 307 316 308 const Int_t npixels = fGeom->GetNumPixels(); 317 309 const Int_t nareas = fGeom->GetNumAreas(); … … 327 319 fNumsectorlo.Reset(); 328 320 329 const MArrivalTimePix &refpix = (*arrtime)[fReferencePixel];330 // FIXME: What do we do if pixel is invalid?331 if (!refpix.IsArrivalTimeValid())321 TArrayF arr(npixels); 322 Int_t n = 0; 323 for (Int_t i=0; i<npixels; i++) 332 324 { 333 gLog << warn << "WARNING - Arrival time in refrence pixel " << fReferencePixel << " invalid." << endl; 334 return kTRUE; 325 if ((*fGeom)[i].GetAidx()>0) 326 continue; 327 328 const MArrivalTimePix &pix = (*arrtime)[i]; 329 if (pix.IsHiGainValid() && !pix.IsHiGainSaturated()) 330 arr[n++] = pix.GetArrivalTimeHiGain(); 335 331 } 336 332 337 const Float_t reftime = refpix.GetArrivalTime(); 338 // refpix.IsHiGainSaturated() 339 // ? refpix.GetArrivalTimeLoGain() : refpix.GetArrivalTimeHiGain(); 333 const Float_t reftime = TMath::Median(n, arr.GetArray()); 340 334 341 335 for (Int_t i=0; i<npixels; i++) … … 345 339 continue; 346 340 347 const Int_t aidx = (*fGeom)[i].GetAidx();348 const Int_t sector = (*fGeom)[i].GetSector();349 350 341 const MArrivalTimePix &pix = (*arrtime)[i]; 351 342 … … 361 352 histhi.FillHist(time-reftime); 362 353 354 const Int_t aidx = (*fGeom)[i].GetAidx(); 355 const Int_t sector = (*fGeom)[i].GetSector(); 356 363 357 fSumareahi [aidx] += time; 364 358 fNumareahi [aidx] ++; … … 373 367 /* 374 368 // If lo-gain arrival time has been extracted successfully, 375 // the hi-gain has saturate ed and the lo-gain is switched on369 // the hi-gain has saturated and the lo-gain is switched on 376 370 // fill hi-gain histograms and arrays 377 371 if (pix.IsLoGainValid() && IsLoGain()) 378 372 { 379 373 const Float_t time = pix.GetArrivalTimeLoGain(); 374 375 // FIXME: We need the reference time of the lo-gains! 380 376 381 377 MHCalibrationPix &histlo = (*this)(i); … … 393 389 394 390 for (Int_t j=0; j<nareas; j++) 395 { 396 MHCalibrationPix &histhi = GetAverageHiGainArea(j); 397 if (IsOscillations()) 398 histhi.FillHistAndArray(fNumareahi[j] == 0 ? 0. : fSumareahi[j]/fNumareahi[j]); 399 else 400 histhi.FillHist(fNumareahi[j] == 0 ? 0. : fSumareahi[j]/fNumareahi[j]); 401 402 if (IsLoGain()) 403 { 391 { 392 if (fNumareahi[j]>0) 393 { 394 MHCalibrationPix &histhi = GetAverageHiGainArea(j); 395 if (IsOscillations()) 396 histhi.FillHistAndArray(fSumareahi[j]/fNumareahi[j]); 397 else 398 histhi.FillHist(fSumareahi[j]/fNumareahi[j]); 399 } 400 401 if (IsLoGain() && fNumarealo[j]>0) 402 { 404 403 MHCalibrationPix &histlo = GetAverageLoGainArea(j); 405 406 histlo.FillHistAndArray(f Numarealo[j] == 0 ? 0. : fSumarealo[j]/fNumarealo[j]);404 if (IsOscillations()) 405 histlo.FillHistAndArray(fSumarealo[j]/fNumarealo[j]); 407 406 else 408 histlo.FillHist(f Numarealo[j] == 0 ? 0. : fSumarealo[j]/fNumarealo[j]);409 410 411 407 histlo.FillHist(fSumarealo[j]/fNumarealo[j]); 408 } 409 } 410 412 411 for (Int_t j=0; j<nsectors; j++) 413 { 414 MHCalibrationPix &histhi = GetAverageHiGainSector(j); 415 if (IsOscillations()) 416 histhi.FillHistAndArray(fNumsectorhi[j] == 0 ? 0. : fSumsectorhi[j]/fNumsectorhi[j]); 417 else 418 histhi.FillHist(fNumsectorhi[j] == 0 ? 0. : fSumsectorhi[j]/fNumsectorhi[j]); 419 420 if (IsLoGain()) 421 { 412 { 413 if (fNumsectorhi[j]>0) 414 { 415 MHCalibrationPix &histhi = GetAverageHiGainSector(j); 416 if (IsOscillations()) 417 histhi.FillHistAndArray(fSumsectorhi[j]/fNumsectorhi[j]); 418 else 419 histhi.FillHist(fSumsectorhi[j]/fNumsectorhi[j]); 420 } 421 422 if (IsLoGain() && fNumsectorlo[j]>0) 423 { 422 424 MHCalibrationPix &histlo = GetAverageLoGainSector(j); 423 424 histlo.FillHistAndArray(f Numsectorlo[j] == 0 ? 0. : fSumsectorlo[j]/fNumsectorlo[j]);425 if (IsOscillations()) 426 histlo.FillHistAndArray(fSumsectorlo[j]/fNumsectorlo[j]); 425 427 else 426 histlo.FillHist(f Numsectorlo[j] == 0 ? 0. : fSumsectorlo[j]/fNumsectorlo[j]);427 428 428 histlo.FillHist(fSumsectorlo[j]/fNumsectorlo[j]); 429 } 430 } 429 431 430 432 return kTRUE; … … 459 461 if (histhi.IsExcluded()) 460 462 continue; 461 463 462 464 const Int_t aidx = (*fGeom)[i].GetAidx(); 463 465 const Int_t sector = (*fGeom)[i].GetSector(); … … 562 564 563 565 if (bad.IsUncalibrated( MBadPixelsPix::kRelTimeNotFitted )) 564 bad.SetUnsuitable( MBadPixelsPix::kUnreliableRun );566 bad.SetUnsuitable( MBadPixelsPix::kUnreliableRun ); 565 567 566 568 if (bad.IsUncalibrated( MBadPixelsPix::kRelTimeOscillating)) 567 bad.SetUnsuitable( MBadPixelsPix::kUnreliableRun );568 569 bad.SetUnsuitable( MBadPixelsPix::kUnreliableRun ); 570 569 571 } 570 572 } … … 577 579 // ============== 578 580 // 579 // 0: Fitted Mean Relative Arrival Time in FADC slices(MHGausEvents::GetMean()580 // 1: Error Mean Relative Arrival Time in FADC slices(MHGausEvents::GetMeanErr()581 // 0: Fitted Mean Relative Arrival Time in FADC slices (MHGausEvents::GetMean() 582 // 1: Error Mean Relative Arrival Time in FADC slices (MHGausEvents::GetMeanErr() 581 583 // 2: Sigma fitted Relative Arrival Time in FADC slices (MHGausEvents::GetSigma() 582 // 3: Error Sigma Relative Arrival Time in FADC slices(MHGausEvents::GetSigmaErr()584 // 3: Error Sigma Relative Arrival Time in FADC slices (MHGausEvents::GetSigmaErr() 583 585 // 584 586 // Useful variables derived from the fit results: 585 587 // ============================================= 586 588 // 587 // 4: Returned probability of Gauss fit (calls:MHGausEvents::GetProb())589 // 4: Returned probability of Gauss fit (MHGausEvents::GetProb()) 588 590 // 589 591 // Localized defects: 590 592 // ================== 591 593 // 592 // 5: Gaus fit not OK (calls:MHGausEvents::IsGausFitOK())593 // 6: Fourier spectrum not OK (calls:MHGausEvents::IsFourierSpectrumOK())594 // 5: Gaus fit not OK (MHGausEvents::IsGausFitOK()) 595 // 6: Fourier spectrum not OK (MHGausEvents::IsFourierSpectrumOK()) 594 596 // 595 597 Bool_t MHCalibrationRelTimeCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const … … 849 851 } 850 852 851 if (IsEnvDefined(env, prefix, "ReferencePixel", print))852 {853 SetReferencePixel(GetEnvValue(env, prefix, "ReferencePixel", (Int_t)fReferencePixel));854 rc = kTRUE;855 }856 857 853 TEnv refenv(fReferenceFile); 858 854 -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.h
r8001 r8452 22 22 23 23 static const Float_t fgNumHiGainSaturationLimit; //! The default for fNumHiGainSaturationLimit (now at: 0.25) 24 static const UInt_t fgReferencePixel; //! Default for fReferencePixel (now set to: 1)25 24 static const Int_t fgNbins; //! Default number of bins (now set to: 900 ) 26 25 static const Axis_t fgFirst; //! Default lower histogram limit (now set to: -13.5 ) … … 35 34 static const TString fgReferenceFile; //! default for fReferenceFile ("mjobs/calibrationref.rc") 36 35 37 UInt_t fReferencePixel; // The reference pixel for rel. times38 36 Float_t fInnerRefTime; // The reference mean arrival time inner pixels 39 37 Float_t fOuterRefTime; // The reference mean arrival time outer pixels … … 66 64 ~MHCalibrationRelTimeCam() {} 67 65 68 UInt_t GetReferencePixel() const { return fReferencePixel; }69 70 66 // Clone 71 67 TObject *Clone(const char *name="") const; 72 68 73 69 // Setters 74 void SetReferencePixel( const UInt_t i=fgReferencePixel ) { fReferencePixel = i; }75 70 void SetReferenceFile ( const TString ref=fgReferenceFile ) { fReferenceFile = ref; } 76 71
Note:
See TracChangeset
for help on using the changeset viewer.