Changeset 8417 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 04/18/07 16:34:51 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc
r8408 r8417 32 32 // MCalibrationIntensityChargeCam 33 33 // MCalibrationIntensityRelTimeCam 34 // MBadPixelsIntensityCam35 34 // 36 35 // Output Containers: 37 36 // MCalibrationIntensityChargeCam 38 37 // MCalibrationIntensityRelTimeCam 39 // MBadPixelsIntensityCam40 38 // 41 39 // Class version 2: … … 64 62 //#include "MCalibrationIntensityRelTimeCam.h" 65 63 66 #include "MBadPixels IntensityCam.h"64 #include "MBadPixelsCam.h" 67 65 68 66 #include "MCalibrationChargePix.h" … … 88 86 MCalibCalcFromPast::MCalibCalcFromPast(const char *name, const char *title) 89 87 : fGeom(NULL), fParList(NULL), fRunHeader(NULL), 90 fIntensCharge(NULL), fIntensBlind(NULL), fIntensRelTime(NULL), 91 fIntensBad(NULL), 88 fIntensCharge(NULL), fIntensBlind(NULL), 92 89 fChargeCalc(NULL), fRelTimeCalc(NULL), fCalibrate(NULL), 93 90 fNumCam(0), fNumEvents(0), fUpdateWithFFactorMethod(kTRUE), fUpdateNumPhes(kTRUE), … … 131 128 // Look for the MBadPixels Intensity Cam 132 129 // 133 fIntensBad = (MBadPixelsIntensityCam*)pList->FindCreateObj("MBadPixelsIntensityCam"); 134 if (fIntensBad) 135 *fLog << inf << "Found MBadPixelsIntensityCam ... " << flush; 136 else 137 return kFALSE; 138 130 fBadPixels = (MBadPixelsCam*)pList->FindObject("MBadPixelsCam"); 131 if (!fBadPixels) 132 { 133 *fLog << err << "MBadPixelsCam not found... abort." << endl; 134 return kFALSE; 135 } 136 139 137 // 140 138 // Look for the MFillH-class "MHCalibrationBlindCam". In case yes, initialize the … … 209 207 { 210 208 211 fIntensRelTime = (MCalibrationIntensityRelTimeCam*)pList->FindCreateObj("MCalibrationIntensityRelTimeCam");212 if (! fIntensRelTime)209 MParContainer *cont = pList->FindCreateObj("MCalibrationIntensityRelTimeCam"); 210 if (!cont) 213 211 { 214 212 *fLog << err << "Could not find nor create MCalibrationIntensityRelTimeCam abort... " << endl; … … 276 274 return kTRUE; 277 275 276 // Replace the old cams by (empty) new ones 277 // MCalibrationChargeCam: fIntensCharge 278 // MCalibrationQECam: fIntensQE 279 // MCalibrationBlindCam: fIntensBlind 278 280 fNumEvents = 0; 279 281 ReInitialize(); … … 382 384 // The "DeleteOldCam" function must not delete the first entry in 383 385 // the array because it is a special cam from the MParList. (see above) 384 385 if (fIntensBad) 386 { 387 *fLog << "MBadPixelsCam..."; 388 MBadPixelsCam *cold = fIntensBad->GetCam(); 389 fIntensBad->AddToList(Form("MBadPixelsCam%04d",fNumCam),*fGeom); 390 if (cold) 391 fIntensBad->DeleteOldCam(cold); 392 } 386 *fLog << "MBadPixelsCam..."; 387 fBadPixels->Clear(); // FIXME:::::: MERGE PreExcl!!!! 393 388 394 389 if (fIntensCharge) -
trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.h
r8408 r8417 20 20 class MCalibrationIntensityBlindCam; 21 21 class MCalibrationIntensityQECam; 22 class MCalibrationIntensityRelTimeCam; 23 class MBadPixels IntensityCam;22 23 class MBadPixelsCam; 24 24 25 25 class MCalibCalcFromPast : public MTask … … 35 35 MCalibrationIntensityBlindCam *fIntensBlind; //! Intensity Blind Cam (to be created) 36 36 MCalibrationIntensityQECam *fIntensQE; //! Intensity QE Cam (to be created) 37 MCalibrationIntensityRelTimeCam *fIntensRelTime; //! Intensity Rel. Time Cam (to be created) 38 MBadPixels IntensityCam *fIntensBad; //! Intensity Bad Pixels Cam (to be created)39 37 38 MBadPixelsCam *fBadPixels; 39 40 40 MCalibrationChargeCalc *fChargeCalc; //! Charge Calibration Task 41 41 MCalibrationRelTimeCalc *fRelTimeCalc; //! Rel. Times Calibratio Task -
trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.cc
r7005 r8417 35 35 // MCalibrationIntensityChargeCam 36 36 // MCalibrationIntensityRelTimeCam 37 // MBadPixelsIntensityCam38 37 // 39 38 // Output Containers: 40 39 // MCalibrationIntensityChargeCam 41 40 // MCalibrationIntensityRelTimeCam 42 // MBadPixelsIntensityCam43 41 // 44 42 ////////////////////////////////////////////////////////////////////////////// … … 50 48 #include "MParList.h" 51 49 #include "MTaskList.h" 50 51 #include "MGeomCam.h" 52 #include "MRawRunHeader.h" 52 53 53 54 #include "MHCalibrationCam.h" 54 55 #include "MCalibrationChargeCam.h" 55 56 #include "MCalibrationBlindCam.h" 57 #include "MBadPixelsCam.h" 56 58 57 59 #include "MCalibrationIntensityChargeCam.h" … … 60 62 #include "MCalibrationIntensityRelTimeCam.h" 61 63 62 #include "MBadPixelsIntensityCam.h" 63 64 #include "MCalibrationPattern.h" 64 65 #include "MCalibrationChargeCam.h" 65 66 #include "MCalibrationChargeCalc.h" 66 67 #include "MCalibrationRelTimeCalc.h" 67 68 68 #include "MRawRunHeader.h"69 #include "MCalibrationPattern.h"70 71 #include "MGeomCam.h"72 73 69 ClassImp(MCalibColorSteer); 74 70 … … 81 77 MCalibColorSteer::MCalibColorSteer(const char *name, const char *title) 82 78 : fCalibPattern(NULL), fGeom(NULL), fParList(NULL), 83 fIntensCharge(NULL), fIntensRelTime(NULL), fIntensBad(NULL),79 fIntensCharge(NULL), fIntensRelTime(NULL), 84 80 fBad(NULL), fChargeCalc(NULL), fRelTimeCalc(NULL), fHistCopy(kFALSE) 85 81 { … … 135 131 136 132 // 137 // Look for the MBadPixels Intensity Cam 138 // 139 fIntensBad = (MBadPixelsIntensityCam*)pList->FindCreateObj("MBadPixelsIntensityCam"); 140 if (fIntensBad) 141 *fLog << inf << "Found MBadPixelsIntensityCam ... " << flush; 142 else 143 return kFALSE; 144 145 // 146 // Look for the MBadPixels Intensity Cam 133 // Look for the MBadPixelsCam 147 134 // 148 135 fBad = (MBadPixelsCam*)pList->FindObject("MBadPixelsCam"); 149 if (fBad) 150 { 151 *fLog << inf << "Found also MBadPixelsCam ... " << flush; 152 fIntensBad->GetCam()->Merge(*fBad); 153 } 154 else 155 return kFALSE; 156 136 if (!fBad) 137 { 138 *fLog << err << "MBadPixelsCam not found... abort." << endl; 139 return kFALSE; 140 } 141 157 142 // 158 143 // Look for the MCalibrationIntensityBlindCam 159 144 // 160 145 fIntensBlind = (MCalibrationIntensityBlindCam*)pList->FindCreateObj("MCalibrationIntensityBlindCam"); 161 162 if (fIntensBlind)163 *fLog << inf << "Found MCalibrationIntensityBlindCam ... " << flush;164 else165 return kFALSE;146 if (!fIntensBlind) 147 { 148 *fLog << err << "MCalibrationIntensityBlindCam not found... abort." << endl; 149 return kFALSE; 150 } 166 151 167 152 // … … 341 326 TString namep = GetNamePattern(); 342 327 343 if (fIntensBad) 344 { 345 fIntensBad->AddToList(Form("MBadPixelsCam%s",namep.Data()),*fGeom); 346 *fLog << inf << "New MBadPixelsCam with " << namep << endl; 347 fIntensBad->GetCam()->Merge(*fBad); 348 *fLog << inf << "Merged new MBadPixelsCam with first of list" << endl; 349 } 328 fBad->Clear(); // FIXME:::::: MERGE PreExcl!!!! 329 350 330 if (fIntensCharge) 351 331 { -
trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.h
r7005 r8417 21 21 class MCalibrationIntensityQECam; 22 22 class MCalibrationIntensityRelTimeCam; 23 class MBadPixelsIntensityCam;24 23 class MBadPixelsCam; 25 24 … … 35 34 MCalibrationIntensityQECam *fIntensQE; //! 36 35 MCalibrationIntensityRelTimeCam *fIntensRelTime; //! 37 MBadPixelsIntensityCam *fIntensBad; //!38 36 MBadPixelsCam *fBad; //! 39 37 -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r8398 r8417 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MCalibrationChargeCalc.cc,v 1.17 2 2007-04-12 11:47:19tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MCalibrationChargeCalc.cc,v 1.173 2007-04-18 15:33:56 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 239 239 #include "MExtractedSignalPINDiode.h" 240 240 241 #include "MBadPixelsIntensityCam.h"242 241 #include "MBadPixelsCam.h" 243 242 … … 364 363 fNumProcessed = 0; 365 364 366 fIntensBad = NULL;367 365 fBadPixels = NULL; 368 366 fIntensCam = NULL; … … 447 445 // - MCalibrationIntensityChargeCam or MCalibrationChargeCam 448 446 // - MCalibrationIntensityQECam or MCalibrationQECam 449 // - MBadPixels IntensityCam or MBadPixelsCam447 // - MBadPixelsCam 450 448 // 451 449 // Search for the following input containers and give a warning if not existing: … … 535 533 *fLog << inf << "No MHCalibrationChargeBlindCam found... no Blind Pixel method!" << endl; 536 534 537 fIntensBad = (MBadPixelsIntensityCam*)pList->FindObject(AddSerialNumber("MBadPixelsIntensityCam")); 538 if (fIntensBad) 539 *fLog << inf << "Found MBadPixelsIntensityCam... " << flush; 540 else 541 { 542 fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam")); 543 if (!fBadPixels) 544 { 545 *fLog << err << "Cannot find MBadPixelsCam ... abort." << endl; 546 return kFALSE; 547 } 548 } 535 fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam")); 536 if (!fBadPixels) 537 { 538 *fLog << err << "Cannot find MBadPixelsCam ... abort." << endl; 539 return kFALSE; 540 } 549 541 550 542 // … … 559 551 MCalibrationChargeCam *chargecam = fIntensCam 560 552 ? (MCalibrationChargeCam*)fIntensCam->GetCam() : fCam; 561 MBadPixelsCam *badcam = fIntensBad562 ? (MBadPixelsCam*) fIntensBad->GetCam() : fBadPixels;563 553 564 554 UInt_t npixels = fGeom->GetNumPixels(); … … 569 559 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*chargecam)[i]; 570 560 MCalibrationQEPix &pqe = (MCalibrationQEPix&) (*qecam) [i]; 571 MBadPixelsPix &bad = (* badcam)[i];561 MBadPixelsPix &bad = (*fBadPixels)[i]; 572 562 573 563 if (bad.IsBad()) … … 750 740 MCalibrationQECam *qecam = fIntensQE ? (MCalibrationQECam*) fIntensQE->GetCam() : fQECam; 751 741 MCalibrationChargeCam *chargecam = fIntensCam ? (MCalibrationChargeCam*)fIntensCam->GetCam() : fCam; 752 MBadPixelsCam *badcam = fIntensBad ? (MBadPixelsCam*) fIntensBad->GetCam() : fBadPixels;753 742 754 743 // … … 768 757 769 758 MPedestalPix &ped = (*fPedestals)[pixid]; 770 MBadPixelsPix &bad = (* badcam)[pixid];759 MBadPixelsPix &bad = (*fBadPixels)[pixid]; 771 760 772 761 const Int_t aidx = (*fGeom)[pixid].GetAidx(); … … 919 908 chargecam->SetReadyToSave(); 920 909 qecam ->SetReadyToSave(); 921 badcam->SetReadyToSave();910 fBadPixels->SetReadyToSave(); 922 911 923 912 if (blindcam) … … 1158 1147 { 1159 1148 1160 MBadPixelsCam *badcam = fIntensBad ? (MBadPixelsCam*)fIntensBad->GetCam() : fBadPixels; 1161 1162 for (Int_t i=0; i<badcam->GetSize(); i++) 1163 { 1164 1165 MBadPixelsPix &bad = (*badcam)[i]; 1149 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 1150 { 1151 1152 MBadPixelsPix &bad = (*fBadPixels)[i]; 1166 1153 1167 1154 if (IsCheckDeadPixels()) … … 1238 1225 Bool_t MCalibrationChargeCalc::FinalizeFFactorMethod() 1239 1226 { 1240 MBadPixelsCam *badcam = fIntensBad1241 ? (MBadPixelsCam*) fIntensBad->GetCam() : fBadPixels;1242 1227 MCalibrationChargeCam *chargecam = fIntensCam 1243 1228 ? (MCalibrationChargeCam*)fIntensCam->GetCam() : fCam; … … 1266 1251 { 1267 1252 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*chargecam)[i]; 1268 MBadPixelsPix &bad = (*badcam)[i]; 1253 1254 MBadPixelsPix &bad = (*fBadPixels)[i]; 1269 1255 1270 1256 if (!pix.IsFFactorMethodValid()) … … 1391 1377 continue; 1392 1378 1393 MBadPixelsPix &bad = (*badcam)[i];1379 MBadPixelsPix &bad = (*fBadPixels)[i]; 1394 1380 1395 1381 if (bad.IsUncalibrated(MBadPixelsPix::kChargeSigmaNotValid)) … … 1526 1512 1527 1513 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*chargecam)[i]; 1528 MBadPixelsPix &bad = (*badcam)[i]; 1514 1515 MBadPixelsPix &bad = (*fBadPixels)[i]; 1529 1516 1530 1517 if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) … … 1734 1721 MCalibrationChargeCam *chargecam = fIntensCam 1735 1722 ? (MCalibrationChargeCam*)fIntensCam->GetCam() : fCam; 1736 MBadPixelsCam *badcam = fIntensBad1737 ? (MBadPixelsCam*) fIntensBad->GetCam() : fBadPixels;1738 1723 1739 1724 MCalibrationChargePix &avpix = (MCalibrationChargePix&)chargecam->GetAverageArea(0); … … 1785 1770 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*chargecam)[i]; 1786 1771 MCalibrationQEPix &qpix = (MCalibrationQEPix&) (*qecam) [i]; 1787 MBadPixelsPix &bad = (*badcam) [i]; 1772 1773 MBadPixelsPix &bad = (*fBadPixels)[i]; 1788 1774 1789 1775 if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) … … 1903 1889 1904 1890 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*chargecam)[i]; 1905 MBadPixelsPix &bad = (*badcam) [i]; 1891 1892 MBadPixelsPix &bad = (*fBadPixels)[i]; 1906 1893 1907 1894 if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) … … 1928 1915 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*chargecam)[i]; 1929 1916 MCalibrationQEPix &qpix = (MCalibrationQEPix&) (*qecam) [i]; 1930 MBadPixelsPix &bad = (*badcam) [i]; 1931 1932 if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) 1917 1918 if ((*fBadPixels)[i].IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) 1933 1919 { 1934 1920 qpix.SetFFactorMethodValid(kFALSE,fPulserColor); … … 1964 1950 MCalibrationBlindCam *blindcam = fIntensBlind 1965 1951 ? (MCalibrationBlindCam*) fIntensBlind->GetCam(): fBlindCam; 1966 MBadPixelsCam *badcam = fIntensBad1967 ? (MBadPixelsCam*) fIntensBad->GetCam() : fBadPixels;1968 1952 MCalibrationQECam *qecam = fIntensQE 1969 1953 ? (MCalibrationQECam*) fIntensQE->GetCam() : fQECam; … … 2007 1991 } 2008 1992 2009 MBadPixelsPix &bad = (*badcam)[i];1993 MBadPixelsPix &bad = (*fBadPixels)[i]; 2010 1994 2011 1995 if (bad.IsUnsuitable (MBadPixelsPix::kUnsuitableRun)) … … 2063 2047 MCalibrationChargeCam *chargecam = fIntensCam 2064 2048 ? (MCalibrationChargeCam*)fIntensCam->GetCam() : fCam; 2065 MBadPixelsCam *badcam = fIntensBad2066 ? (MBadPixelsCam*) fIntensBad->GetCam() : fBadPixels;2067 2049 2068 2050 if (!fPINDiode) … … 2090 2072 } 2091 2073 2092 MBadPixelsPix &bad = (*badcam)[i];2074 MBadPixelsPix &bad = (*fBadPixels)[i]; 2093 2075 2094 2076 if (!bad.IsUnsuitable (MBadPixelsPix::kUnsuitableRun)) … … 2130 2112 MCalibrationQECam *qecam = fIntensQE 2131 2113 ? (MCalibrationQECam*) fIntensQE->GetCam() : fQECam; 2132 MBadPixelsCam *badcam = fIntensBad2133 ? (MBadPixelsCam*) fIntensBad->GetCam() : fBadPixels;2134 2114 2135 2115 for (UInt_t i=0; i<npixels; i++) … … 2137 2117 2138 2118 MCalibrationQEPix &qepix = (MCalibrationQEPix&) (*qecam) [i]; 2139 MBadPixelsPix &bad = (*badcam) [i]; 2140 2141 if (!bad.IsUnsuitable (MBadPixelsPix::kUnsuitableRun)) 2119 2120 if (!(*fBadPixels)[i].IsUnsuitable (MBadPixelsPix::kUnsuitableRun)) 2142 2121 { 2143 2122 qepix.SetPINDiodeMethodValid(kFALSE, fPulserColor); … … 2167 2146 TArrayI unrel(nareas); 2168 2147 2169 const MBadPixelsCam *badcam = fIntensBad ? (MBadPixelsCam*)fIntensBad->GetCam() : fBadPixels;2170 2148 MCalibrationChargeCam *chargecam = fIntensCam ? (MCalibrationChargeCam*)fIntensCam->GetCam() : fCam; 2171 2149 … … 2176 2154 for (Int_t aidx=0; aidx<nareas; aidx++) 2177 2155 { 2178 suit[aidx] = badcam->GetNumSuitable(MBadPixelsPix::kUnsuitableRun, fGeom, aidx);2179 unsuit[aidx] = badcam->GetNumUnsuitable(MBadPixelsPix::kUnsuitableRun, fGeom, aidx);2180 unrel[aidx] = badcam->GetNumUnsuitable(MBadPixelsPix::kUnreliableRun, fGeom, aidx);2156 suit[aidx] = fBadPixels->GetNumSuitable(MBadPixelsPix::kUnsuitableRun, fGeom, aidx); 2157 unsuit[aidx] = fBadPixels->GetNumUnsuitable(MBadPixelsPix::kUnsuitableRun, fGeom, aidx); 2158 unrel[aidx] = fBadPixels->GetNumUnsuitable(MBadPixelsPix::kUnreliableRun, fGeom, aidx); 2181 2159 2182 2160 unsuitcnt += unsuit[aidx]; … … 2237 2215 UInt_t countouter = 0; 2238 2216 2239 MBadPixelsCam *badcam = fIntensBad 2240 ? (MBadPixelsCam*)fIntensBad->GetCam() : fBadPixels; 2241 2242 for (Int_t i=0; i<badcam->GetSize(); i++) 2243 { 2244 MBadPixelsPix &bad = (*badcam)[i]; 2245 2246 if (bad.IsUncalibrated(typ)) 2217 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 2218 { 2219 if ((*fBadPixels)[i].IsUncalibrated(typ)) 2247 2220 { 2248 2221 if (fGeom->GetPixRatio(i) == 1.) -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h
r8142 r8417 33 33 class MGeomCam; 34 34 class MExtractedSignalCam; 35 class MBadPixelsIntensityCam;36 35 class MBadPixelsCam; 37 36 class MExtractor; … … 85 84 86 85 // Pointers 87 MBadPixelsIntensityCam *fIntensBad; //! Bad Pixels 86 // MBadPixelsIntensityCam *fIntensBad; //! Bad Pixels 88 87 MBadPixelsCam *fBadPixels; //! Bad Pixels 89 88 MCalibrationIntensityChargeCam *fIntensCam; //! Intensity Calibration results of all pixels -
trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCalc.cc
r8355 r8417 75 75 #include "MCalibrationRelTimePix.h" 76 76 77 #include "MBadPixelsIntensityCam.h"78 77 #include "MBadPixelsCam.h" 79 78 #include "MBadPixelsPix.h" … … 124 123 { 125 124 126 fIntensBad = NULL;127 125 fBadPixels = NULL; 128 126 fCam = NULL; … … 136 134 // - MGeomCam 137 135 // - MCalibrationIntensityRelTimeCam or MCalibrationRelTimeCam 138 // - MBadPixels IntensityCam or MBadPixelsCam136 // - MBadPixelsCam 139 137 // 140 138 // It defines the PixId of every pixel in: … … 156 154 } 157 155 158 fIntensBad = (MBadPixelsIntensityCam*)pList->FindObject(AddSerialNumber("MBadPixelsIntensityCam")); 159 if (fIntensBad) 160 *fLog << inf << "Found MBadPixelsIntensityCam ... " << endl; 161 else 162 { 163 fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam")); 164 if (!fBadPixels) 165 { 166 *fLog << err << "Cannot find MBadPixelsCam ... abort." << endl; 167 return kFALSE; 168 } 169 } 156 fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam")); 157 if (!fBadPixels) 158 { 159 *fLog << err << "Cannot find MBadPixelsCam ... abort." << endl; 160 return kFALSE; 161 } 170 162 171 163 fIntensCam = (MCalibrationIntensityRelTimeCam*)pList->FindObject(AddSerialNumber("MCalibrationIntensityRelTimeCam")); … … 187 179 MCalibrationRelTimeCam *relcam = fIntensCam 188 180 ? (MCalibrationRelTimeCam*)fIntensCam->GetCam() : fCam; 189 MBadPixelsCam *badcam = fIntensBad190 ? (MBadPixelsCam*) fIntensBad->GetCam() : fBadPixels;191 181 192 182 for (UInt_t i=0; i<npixels; i++) … … 194 184 195 185 MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*relcam)[i]; 196 MBadPixelsPix &bad = (*badcam)[i]; 197 198 if (bad.IsBad()) 186 187 if ((*fBadPixels)[i].IsBad()) 199 188 { 200 189 pix.SetExcluded(); … … 258 247 fCam ->SetReadyToSave(); 259 248 260 if (fIntensBad) 261 fIntensBad->SetReadyToSave(); 262 else 263 fBadPixels->SetReadyToSave(); 249 fBadPixels->SetReadyToSave(); 264 250 265 251 *fLog << inf << endl; … … 293 279 MCalibrationRelTimeCam *relcam = fIntensCam 294 280 ? (MCalibrationRelTimeCam*)fIntensCam->GetCam() : fCam; 295 MBadPixelsCam *badcam = fIntensBad296 ? (MBadPixelsCam*) fIntensBad->GetCam() : fBadPixels;297 281 298 282 const UInt_t npixels = fGeom->GetNumPixels(); … … 311 295 for (UInt_t i=0; i<npixels; i++) 312 296 { 313 MBadPixelsPix &bad = (* badcam)[i];297 MBadPixelsPix &bad = (*fBadPixels)[i]; 314 298 const Int_t aidx = (*fGeom)[i].GetAidx(); 315 299 … … 336 320 337 321 MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*relcam)[i]; 338 MBadPixelsPix &bad = (*badcam)[i]; 339 322 340 323 if (pix.IsExcluded()) 341 324 continue; 342 325 326 MBadPixelsPix &bad = (*fBadPixels)[i]; 343 327 if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) 344 328 continue; … … 383 367 384 368 MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*relcam)[i]; 385 MBadPixelsPix &bad = (*badcam)[i];386 369 387 370 if (pix.IsExcluded()) 388 371 continue; 389 372 373 MBadPixelsPix &bad = (*fBadPixels)[i]; 390 374 if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) 391 375 continue; … … 420 404 MCalibrationRelTimeCam *relcam = fIntensCam 421 405 ? (MCalibrationRelTimeCam*)fIntensCam->GetCam() : fCam; 422 MBadPixelsCam *badcam = fIntensBad 423 ? (MBadPixelsCam*) fIntensBad->GetCam() : fBadPixels; 424 425 for (Int_t i=0; i<badcam->GetSize(); i++) 426 { 427 428 MBadPixelsPix &bad = (*badcam)[i]; 406 407 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 408 { 409 429 410 MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*relcam)[i]; 411 412 MBadPixelsPix &bad = (*fBadPixels)[i]; 430 413 431 414 if (IsCheckDeviatingBehavior()) … … 460 443 461 444 MCalibrationRelTimeCam *relcam = fIntensCam ? (MCalibrationRelTimeCam*)fIntensCam->GetCam() : fCam; 462 const MBadPixelsCam *badcam = fIntensBad ? (MBadPixelsCam*)fIntensBad->GetCam() : fBadPixels;463 445 464 446 const Int_t nareas = fGeom->GetNumAreas(); … … 469 451 for (int aidx=0; aidx<nareas; aidx++) 470 452 { 471 unsuit[aidx] += badcam->GetNumUnsuitable(MBadPixelsPix::kUnsuitableRun, fGeom, aidx);472 unrel[aidx] += badcam->GetNumUnsuitable(MBadPixelsPix::kUnreliableRun, fGeom, aidx);453 unsuit[aidx] += fBadPixels->GetNumUnsuitable(MBadPixelsPix::kUnsuitableRun, fGeom, aidx); 454 unrel[aidx] += fBadPixels->GetNumUnsuitable(MBadPixelsPix::kUnreliableRun, fGeom, aidx); 473 455 relcam->SetNumUnsuitable(unsuit[aidx], aidx); 474 456 relcam->SetNumUnreliable(unrel[aidx], aidx); … … 488 470 void MCalibrationRelTimeCalc::PrintUncalibrated(MBadPixelsPix::UncalibratedType_t typ, const char *text) const 489 471 { 490 const MBadPixelsCam *badcam = fIntensBad ? (MBadPixelsCam*)fIntensBad->GetCam() : fBadPixels;491 492 472 UInt_t countinner = 0; 493 473 UInt_t countouter = 0; 494 for (Int_t i=0; i< badcam->GetSize(); i++)495 { 496 if ((* badcam)[i].IsUncalibrated(typ))474 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 475 { 476 if ((*fBadPixels)[i].IsUncalibrated(typ)) 497 477 { 498 478 if (fGeom->GetPixRatio(i) == 1.) -
trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCalc.h
r8142 r8417 22 22 class MCalibrationRelTimeCam; 23 23 class MGeomCam; 24 class MBadPixelsIntensityCam;24 //class MBadPixelsIntensityCam; 25 25 class MBadPixelsCam; 26 26 … … 35 35 36 36 // Pointers 37 MBadPixelsIntensityCam *fIntensBad; // Bad Pixels Intensity Cam37 //MBadPixelsIntensityCam *fIntensBad; // Bad Pixels Intensity Cam 38 38 MBadPixelsCam *fBadPixels; // Bad Pixels 39 39 MCalibrationIntensityRelTimeCam *fIntensCam; // Calibrated RelTimes for different intensities -
trunk/MagicSoft/Mars/mcalib/MCalibrationTestCalc.cc
r8049 r8417 68 68 #include "MCalibrationTestPix.h" 69 69 70 #include "MBadPixelsIntensityCam.h"71 70 #include "MBadPixelsCam.h" 72 71 #include "MBadPixelsPix.h" … … 90 89 // 91 90 MCalibrationTestCalc::MCalibrationTestCalc(const char *name, const char *title) 92 : fIntensBad(NULL), fBadPixels(NULL), 93 fTestCam(NULL), fIntensCam(NULL), fCam(NULL), 91 : fBadPixels(NULL), fTestCam(NULL), fIntensCam(NULL), fCam(NULL), 94 92 fGeom(NULL) 95 93 { … … 112 110 // - MHCalibrationTestCam 113 111 // - MCalibrationIntensityTestCam or MCalibrationTestCam 114 // - MBadPixels IntensityCam or MBadPixelsCam112 // - MBadPixelsCam 115 113 // 116 114 Bool_t MCalibrationTestCalc::ReInit(MParList *pList ) … … 146 144 } 147 145 148 fIntensBad = (MBadPixelsIntensityCam*)pList->FindObject(AddSerialNumber("MBadPixelsIntensityCam")); 149 if (fIntensBad) 150 *fLog << inf << "Found MBadPixelsIntensityCam ... " << endl; 151 else 152 { 153 fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam")); 154 if (!fBadPixels) 155 { 156 *fLog << err << "Cannot find MBadPixelsCam ... abort." << endl; 157 return kFALSE; 158 } 159 } 160 161 162 return kTRUE; 163 } 164 165 // ---------------------------------------------------------------------------------- 166 // 167 // Nothing to be done in Process, but have a look at MHCalibrationTestCam, instead 168 // 169 Int_t MCalibrationTestCalc::Process() 170 { 146 fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam")); 147 if (!fBadPixels) 148 { 149 *fLog << err << "Cannot find MBadPixelsCam ... abort." << endl; 150 return kFALSE; 151 } 152 171 153 return kTRUE; 172 154 } … … 241 223 MCalibrationTestCam *testcam = fIntensCam 242 224 ? (MCalibrationTestCam*)fIntensCam->GetCam() : fCam; 243 MBadPixelsCam *badcam = fIntensBad244 ? (MBadPixelsCam*) fIntensBad->GetCam() : fBadPixels;245 225 246 226 TArrayD lowlim (nareas); … … 409 389 << Form("%8.2f out of %3.1f sigma limit: ",nphot,fPhotErrLimit) 410 390 << Form("[%8.2f,%8.2f] pixel%4i",lowlim[aidx],upplim[aidx],i) << endl; 411 MBadPixelsPix &bad = (* badcam)[i];391 MBadPixelsPix &bad = (*fBadPixels)[i]; 412 392 bad.SetUncalibrated( MBadPixelsPix::kDeviatingNumPhots ); 413 393 bad.SetUnsuitable ( MBadPixelsPix::kUnsuitableRun ); -
trunk/MagicSoft/Mars/mcalib/MCalibrationTestCalc.h
r5046 r8417 22 22 class MCalibrationIntensityTestCam; 23 23 class MCalibrationTestCam; 24 class MBadPixelsIntensityCam;25 24 class MBadPixelsCam; 26 25 class MGeomCam; … … 39 38 40 39 // Pointers 41 MBadPixelsIntensityCam *fIntensBad; //! Bad Pixels42 40 MBadPixelsCam *fBadPixels; //! Bad Pixels 43 41 MHCalibrationTestCam *fTestCam; //! Calibrated Photons in the camera … … 55 53 56 54 Bool_t ReInit (MParList *pList); 57 Int_t Process ();58 55 Int_t PostProcess(); 59 56
Note:
See TracChangeset
for help on using the changeset viewer.