- Timestamp:
- 09/15/04 13:30:16 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r4986 r5024 204 204 205 205 #include "MCalibrationIntensityChargeCam.h" 206 #include "MCalibrationIntensityQECam.h" 207 #include "MCalibrationIntensityBlindCam.h" 206 208 207 209 #include "MCalibrationChargeCam.h" … … 216 218 #include "MExtractedSignalPINDiode.h" 217 219 220 #include "MBadPixelsIntensityCam.h" 218 221 #include "MBadPixelsCam.h" 219 222 … … 263 266 // 264 267 MCalibrationChargeCalc::MCalibrationChargeCalc(const char *name, const char *title) 265 : fQECam(NULL), fGeom(NULL), fSignal(NULL), fHeader(NULL) 268 : 269 fGeom(NULL), fSignal(NULL), fHeader(NULL) 266 270 { 267 271 … … 314 318 fNumInnerFFactorMethodUsed = 0; 315 319 316 fBadPixels = NULL; 317 fCam = NULL; 318 fIntensCam = NULL; 319 fBlindCam = NULL; 320 fPINDiode = NULL; 321 fPedestals = NULL; 320 fIntensBad = NULL; 321 fBadPixels = NULL; 322 fIntensCam = NULL; 323 fCam = NULL; 324 fIntensQE = NULL; 325 fQECam = NULL; 326 fIntensBlind = NULL; 327 fBlindCam = NULL; 328 fPINDiode = NULL; 329 fPedestals = NULL; 322 330 323 331 fPulserPattern = 0; … … 367 375 } 368 376 369 //370 // Containers that are created in case that they are not there.371 //372 fQECam = (MCalibrationQECam*)pList->FindCreateObj("MCalibrationQECam");373 if (!fQECam)374 {375 *fLog << err << "Cannot find nor create MCalibrationQECam... aborting" << endl;376 return kFALSE;377 }378 379 fBadPixels = (MBadPixelsCam*)pList->FindCreateObj("MBadPixelsCam");380 if (!fBadPixels)381 {382 *fLog << err << "Could not find or create MBadPixelsCam ... aborting." << endl;383 return kFALSE;384 }385 386 377 fHeader = (MRawEvtHeader*)pList->FindObject("MRawEvtHeader"); 387 378 if (!fHeader) … … 452 443 } 453 444 445 fIntensQE = (MCalibrationIntensityQECam*)pList->FindObject(AddSerialNumber("MCalibrationIntensityQECam")); 446 if (fIntensQE) 447 *fLog << inf << "Found MCalibrationIntensityQECam ... " << endl; 448 else 449 { 450 fQECam = (MCalibrationQECam*)pList->FindObject(AddSerialNumber("MCalibrationQECam")); 451 if (!fQECam) 452 { 453 *fLog << err << "Cannot find MCalibrationQECam ... abort." << endl; 454 *fLog << err << "Maybe you forget to call an MFillH for the MHCalibrationQECam before..." << endl; 455 return kFALSE; 456 } 457 } 458 459 fIntensBlind = (MCalibrationIntensityBlindCam*)pList->FindObject(AddSerialNumber("MCalibrationIntensityBlindCam")); 460 if (fIntensBlind) 461 *fLog << inf << "Found MCalibrationIntensityBlindCam ... " << endl; 462 else 463 { 464 fBlindCam = (MCalibrationBlindCam*)pList->FindObject(AddSerialNumber("MCalibrationBlindCam")); 465 if (!fBlindCam) 466 { 467 *fLog << endl; 468 *fLog << warn << GetDescriptor() 469 << ": No MCalibrationBlindCam found... no Blind Pixel method! " << endl; 470 return kFALSE; 471 } 472 } 473 474 fIntensBad = (MBadPixelsIntensityCam*)pList->FindObject(AddSerialNumber("MBadPixelsIntensityCam")); 475 if (fIntensBad) 476 *fLog << inf << "Found MBadPixelsIntensityCam ... " << endl; 477 else 478 { 479 fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam")); 480 if (!fBadPixels) 481 { 482 *fLog << err << "Cannot find MBadPixelsCam ... abort." << endl; 483 return kFALSE; 484 } 485 } 486 454 487 // 455 488 // Optional Containers 456 489 // 457 fBlindCam = (MCalibrationBlindCam*)pList->FindObject("MCalibrationBlindCam");458 if (!fBlindCam)459 {460 *fLog << endl;461 *fLog << warn << GetDescriptor()462 << ": MCalibrationBlindPix nor MCalibrationBlindCam "463 << " found... no Blind Pixel method! " << endl;464 }465 466 490 fPINDiode = (MCalibrationChargePINDiode*)pList->FindObject("MCalibrationChargePINDiode"); 467 491 if (!fPINDiode) … … 486 510 ? (MCalibrationChargePix&)(*fIntensCam)[i] 487 511 : (MCalibrationChargePix&)(*fCam) [i]; 488 MCalibrationQEPix &pqe = (MCalibrationQEPix&) (*fQECam)[i]; 489 MBadPixelsPix &bad = (*fBadPixels)[i]; 512 MCalibrationQEPix &pqe = fIntensQE 513 ? (MCalibrationQEPix&) (*fIntensQE)[i] 514 : (MCalibrationQEPix&) (*fQECam)[i]; 515 MBadPixelsPix &bad = fIntensBad 516 ? (*fIntensBad)[i] 517 : (*fBadPixels)[i]; 490 518 491 519 pix.SetPixId(i); … … 598 626 fCam->SetPulserColor( fPulserColor ); 599 627 600 if (fBlindCam) 628 if (fIntensBlind) 629 fIntensBlind->SetPulserColor( fPulserColor ); 630 else if (fBlindCam) 601 631 fBlindCam->SetPulserColor( fPulserColor ); 602 632 … … 671 701 672 702 MPedestalPix &ped = (*fPedestals)[pixid]; 673 MBadPixelsPix &bad = (*fBadPixels)[pixid]; 703 MBadPixelsPix &bad = fIntensBad 704 ? (*fIntensBad)[pixid] 705 : (*fBadPixels)[pixid]; 674 706 const Int_t aidx = (*fGeom)[pixid].GetAidx(); 675 707 … … 750 782 // Finalize Blind Pixel 751 783 // 752 if ( FinalizeBlindCam())753 f QECam->SetBlindPixelMethodValid(kTRUE);784 if (fIntensQE) 785 fIntensQE->SetBlindPixelMethodValid(FinalizeBlindCam()); 754 786 else 755 fQECam->SetBlindPixelMethodValid( kFALSE);787 fQECam->SetBlindPixelMethodValid(FinalizeBlindCam()); 756 788 757 789 // 758 790 // Finalize PIN Diode 759 791 // 760 if ( FinalizePINDiode())761 f QECam->SetPINDiodeMethodValid(kTRUE);792 if (fIntensQE) 793 fIntensQE->SetBlindPixelMethodValid(FinalizePINDiode()); 762 794 else 763 fQECam->Set PINDiodeMethodValid(kFALSE);795 fQECam->SetBlindPixelMethodValid(FinalizePINDiode()); 764 796 765 797 // … … 787 819 fCam ->SetReadyToSave(); 788 820 789 fQECam ->SetReadyToSave(); 790 fBadPixels->SetReadyToSave(); 791 821 if (fIntensQE) 822 fIntensQE ->SetReadyToSave(); 823 else 824 fQECam ->SetReadyToSave(); 825 826 if (fIntensBad) 827 fIntensBad->SetReadyToSave(); 828 else 829 fBadPixels->SetReadyToSave(); 830 831 if (fIntensBlind) 832 fIntensBlind->SetReadyToSave(); 792 833 if (fBlindCam) 793 834 fBlindCam->SetReadyToSave(); … … 985 1026 { 986 1027 987 MBadPixelsPix &bad = (*fBadPixels)[i];1028 MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i]; 988 1029 MCalibrationPix &pix = fIntensCam ? (*fIntensCam)[i] : (*fCam)[i]; 989 1030 … … 1091 1132 ? (MCalibrationChargePix&)(*fIntensCam)[i] 1092 1133 : (MCalibrationChargePix&)(*fCam) [i]; 1093 MBadPixelsPix &bad = (*fBadPixels)[i]; 1134 MBadPixelsPix &bad = fIntensBad 1135 ? (*fIntensBad)[i] 1136 : (*fBadPixels)[i]; 1094 1137 1095 1138 if (!pix.IsFFactorMethodValid()) … … 1210 1253 continue; 1211 1254 1212 MBadPixelsPix &bad = (*fBadPixels)[i]; 1255 MBadPixelsPix &bad = fIntensBad 1256 ? (*fIntensBad)[i] 1257 : (*fBadPixels)[i]; 1213 1258 1214 1259 if (bad.IsUncalibrated(MBadPixelsPix::kChargeSigmaNotValid)) … … 1353 1398 ? (MCalibrationChargePix&)(*fIntensCam)[i] 1354 1399 : (MCalibrationChargePix&)(*fCam)[i]; 1355 MBadPixelsPix &bad = (*fBadPixels)[i]; 1400 MBadPixelsPix &bad = fIntensBad 1401 ? (*fIntensBad)[i] 1402 : (*fBadPixels)[i]; 1356 1403 1357 1404 if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) … … 1399 1446 { 1400 1447 1401 if (!fBlindCam )1448 if (!fBlindCam && !fIntensBlind) 1402 1449 return kFALSE; 1403 1450 … … 1406 1453 Int_t nvalid = 0; 1407 1454 1408 for (Int_t i=0; i<fBlindCam->GetSize(); i++) 1409 { 1410 1411 MCalibrationBlindPix &blindpix = (MCalibrationBlindPix&)(*fBlindCam)[i]; 1455 MCalibrationBlindCam *blindcam = fIntensBlind 1456 ? (MCalibrationBlindCam*)fIntensBlind->GetCam() : fBlindCam; 1457 MCalibrationQECam *qecam = fIntensQE 1458 ? (MCalibrationQECam*)fIntensQE->GetCam() : fQECam; 1459 MCalibrationChargeCam *chargecam = fIntensCam 1460 ? (MCalibrationChargeCam*)fIntensCam->GetCam() : fCam; 1461 1462 for (Int_t i=0; i<blindcam->GetSize(); i++) 1463 { 1464 1465 MCalibrationBlindPix &blindpix = (MCalibrationBlindPix&)(*blindcam)[i]; 1412 1466 1413 1467 if (!blindpix.IsValid()) … … 1456 1510 fluxvar /= 1./fluxvar; 1457 1511 1458 const Float_t photons = flux * (*fGeom)[0].GetA() / fQECam->GetPlexiglassQE(); 1459 if (fIntensCam) 1460 fIntensCam->SetNumPhotonsBlindPixelMethod(photons); 1461 else 1462 fCam->SetNumPhotonsBlindPixelMethod(photons); 1463 1464 const Float_t photrelvar = fluxvar / flux / flux + fQECam->GetPlexiglassQERelVar(); 1512 const Float_t photons = flux * (*fGeom)[0].GetA() / qecam->GetPlexiglassQE(); 1513 chargecam->SetNumPhotonsBlindPixelMethod(photons); 1514 1515 const Float_t photrelvar = fluxvar / flux / flux + qecam->GetPlexiglassQERelVar(); 1465 1516 if (photrelvar > 0.) 1466 if (fIntensCam) 1467 fIntensCam->SetNumPhotonsBlindPixelMethodErr(TMath::Sqrt( photrelvar * photons * photons)); 1468 else 1469 fCam->SetNumPhotonsBlindPixelMethodErr(TMath::Sqrt( photrelvar * photons * photons)); 1517 chargecam->SetNumPhotonsBlindPixelMethodErr(TMath::Sqrt( photrelvar * photons * photons)); 1470 1518 1471 1519 return kTRUE; … … 1575 1623 } 1576 1624 1577 MCalibrationChargePix &avpix = fIntensCam 1578 ? (MCalibrationChargePix&)fIntensCam->GetAverageArea(0) 1579 : (MCalibrationChargePix&)fCam->GetAverageArea(0); 1580 MCalibrationQEPix &qepix = (MCalibrationQEPix&) fQECam->GetAverageArea(0); 1625 MCalibrationQECam *qecam = fIntensQE 1626 ? (MCalibrationQECam*) fIntensQE->GetCam() : fQECam; 1627 MCalibrationChargeCam *chargecam = fIntensCam 1628 ? (MCalibrationChargeCam*)fIntensCam->GetCam() : fCam; 1629 MBadPixelsCam *badcam = fIntensBad 1630 ? (MBadPixelsCam*) fIntensBad->GetCam() : fBadPixels; 1631 1632 MCalibrationChargePix &avpix = (MCalibrationChargePix&)chargecam->GetAverageArea(0); 1633 MCalibrationQEPix &qepix = (MCalibrationQEPix&) qecam->GetAverageArea(0); 1581 1634 1582 1635 const Float_t avphotons = avpix.GetPheFFactorMethod() … … 1584 1637 / qepix.GetPMTCollectionEff() 1585 1638 / qepix.GetLightGuidesEff(fPulserColor) 1586 / fQECam->GetPlexiglassQE();1639 / qecam->GetPlexiglassQE(); 1587 1640 1588 1641 const Float_t avphotrelvar = avpix.GetPheFFactorMethodRelVar() … … 1590 1643 + qepix.GetPMTCollectionEffRelVar() 1591 1644 + qepix.GetLightGuidesEffRelVar(fPulserColor) 1592 + fQECam->GetPlexiglassQERelVar();1645 + qecam->GetPlexiglassQERelVar(); 1593 1646 1594 1647 const UInt_t nareas = fGeom->GetNumAreas(); … … 1597 1650 // Set the results in the MCalibrationChargeCam 1598 1651 // 1599 if (fIntensCam) 1600 fIntensCam->SetNumPhotonsFFactorMethod (avphotons); 1601 else 1602 fCam->SetNumPhotonsFFactorMethod (avphotons); 1652 charge->SetNumPhotonsFFactorMethod (avphotons); 1603 1653 1604 1654 if (avphotrelvar > 0.) 1605 if (fIntensCam) 1606 fIntensCam->SetNumPhotonsFFactorMethodErr(TMath::Sqrt( avphotrelvar * avphotons * avphotons)); 1607 else 1608 fCam->SetNumPhotonsFFactorMethodErr(TMath::Sqrt( avphotrelvar * avphotons * avphotons)); 1655 charge->SetNumPhotonsFFactorMethodErr(TMath::Sqrt( avphotrelvar * avphotons * avphotons)); 1609 1656 1610 1657 TArrayF lowlim (nareas); … … 1621 1668 { 1622 1669 1623 MCalibrationChargePix &pix = fIntensCam 1624 ? (MCalibrationChargePix&)(*fIntensCam)[i] 1625 : (MCalibrationChargePix&)(*fCam)[i]; 1626 MCalibrationQEPix &qepix = (MCalibrationQEPix&) (*fQECam)[i]; 1627 MBadPixelsPix &bad = (*fBadPixels)[i]; 1670 MCalibrationChargePix &avpix = (MCalibrationChargePix&)(*chargecam)[i]; 1671 MCalibrationQEPix &qepix = (MCalibrationQEPix&) (*qecam) [i]; 1672 MBadPixelsPix &bad = (*badcam) [i]; 1628 1673 1629 1674 if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) … … 1649 1694 if (!pix.CalcMeanFFactor( photons , avphotrelvar )) 1650 1695 { 1651 (*fBadPixels)[i].SetUncalibrated( MBadPixelsPix::kDeviatingFFactor );1696 bad.SetUncalibrated( MBadPixelsPix::kDeviatingFFactor ); 1652 1697 if (IsCheckDeviatingBehavior()) 1653 (*fBadPixels)[i].SetUnsuitable ( MBadPixelsPix::kUnreliableRun );1698 bad.SetUnsuitable ( MBadPixelsPix::kUnreliableRun ); 1654 1699 continue; 1655 1700 } … … 1676 1721 } 1677 1722 1678 avffactorphotvar[i] = (avffactorphotvar[i] - avffactorphotons[i]*avffactorphotons[i]/numffactor[i]) / (numffactor[i]-1.); 1723 avffactorphotvar[i] = (avffactorphotvar[i] - avffactorphotons[i]*avffactorphotons[i]/numffactor[i]) 1724 / (numffactor[i]-1.); 1679 1725 avffactorphotons[i] = avffactorphotons[i] / numffactor[i]; 1680 1726 … … 1739 1785 { 1740 1786 1741 MCalibrationChargePix &pix = fIntensCam 1742 ? (MCalibrationChargePix&)(*fIntensCam)[i] 1743 : (MCalibrationChargePix&)(*fCam)[i]; 1744 MBadPixelsPix &bad = (*fBadPixels)[i]; 1787 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*chargecam)[i]; 1788 MBadPixelsPix &bad = (*badcam) [i]; 1745 1789 1746 1790 if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) … … 1765 1809 { 1766 1810 1767 MCalibrationChargePix &pix = fIntensCam 1768 ? (MCalibrationChargePix&)(*fIntensCam)[i] 1769 : (MCalibrationChargePix&)(*fCam)[i]; 1770 MCalibrationQEPix &qepix = (MCalibrationQEPix&) (*fQECam)[i]; 1771 MBadPixelsPix &bad = (*fBadPixels)[i]; 1772 1811 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*chargecam)[i]; 1812 MCalibrationQEPix &qepix = (MCalibrationQEPix&) (*qecam) [i]; 1813 MBadPixelsPix &bad = (*badcam) [i]; 1814 1773 1815 if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) 1774 1816 { … … 1805 1847 const UInt_t npixels = fGeom->GetNumPixels(); 1806 1848 1849 MCalibrationQECam *qecam = fIntensQE 1850 ? (MCalibrationQECam*) fIntensQE->GetCam() : fQECam; 1851 MCalibrationChargeCam *chargecam = fIntensCam 1852 ? (MCalibrationChargeCam*)fIntensCam->GetCam() : fCam; 1853 MCalibrationBlindCam *blindcam = fIntensBlind 1854 ? (MCalibrationBlindCam*) fIntensBlind->GetCam(): fBlindCam; 1855 MBadPixelsCam *badcam = fIntensBad 1856 ? (MBadPixelsCam*) fIntensBad->GetCam() : fBadPixels; 1857 1807 1858 // 1808 1859 // Set the results in the MCalibrationChargeCam 1809 1860 // 1810 1861 /* 1811 if ( fBlindPixel)1862 if (blindcam) 1812 1863 { 1813 1864 if (fBlindPixel->IsFluxInsidePlexiglassAvailable()) … … 1838 1889 { 1839 1890 1840 MCalibrationQEPix &qepix = (MCalibrationQEPix&) (*fQECam)[i];1841 1842 if (! fBlindCam)1891 MCalibrationQEPix &qepix = (MCalibrationQEPix&) (*qecam) [i]; 1892 1893 if (!blindcam) 1843 1894 { 1844 1895 qepix.SetBlindPixelMethodValid(kFALSE, fPulserColor); … … 1846 1897 } 1847 1898 1848 /* 1849 if (!fBlindPixel->IsFluxInsidePlexiglassAvailable()) 1899 MBadPixelsPix &bad = (*badcam) [i]; 1900 1901 if (bad.IsUnsuitable (MBadPixelsPix::kUnsuitableRun)) 1850 1902 { 1851 1903 qepix.SetBlindPixelMethodValid(kFALSE, fPulserColor); 1852 1904 continue; 1853 1905 } 1854 */ 1855 1856 MBadPixelsPix &bad = (*fBadPixels)[i]; 1857 if (bad.IsUnsuitable (MBadPixelsPix::kUnsuitableRun)) 1858 { 1859 qepix.SetBlindPixelMethodValid(kFALSE, fPulserColor); 1860 continue; 1861 } 1862 1863 MCalibrationChargePix &pix = fIntensCam 1864 ? (MCalibrationChargePix&)(*fIntensCam)[i] 1865 : (MCalibrationChargePix&)(*fCam)[i]; 1866 MGeomPix &geo = (*fGeom)[i]; 1867 1906 1907 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*chargecam)[i]; 1908 MGeomPix &geo = (*fGeom) [i]; 1909 1868 1910 const Float_t qe = pix.GetPheFFactorMethod() 1869 // / fBlindPixel->GetFluxInsidePlexiglass()1911 / blindcam->GetFluxInsidePlexiglass() 1870 1912 / geo.GetA() 1871 * fQECam->GetPlexiglassQE();1872 1873 const Float_t qerelvar = /* fBlindPixel->GetFluxInsidePlexiglassRelVar()1874 + */ fQECam->GetPlexiglassQERelVar()1913 * qecam->GetPlexiglassQE(); 1914 1915 const Float_t qerelvar = blindcam->GetFluxInsidePlexiglassRelVar() 1916 + qecam->GetPlexiglassQERelVar() 1875 1917 + pix.GetPheFFactorMethodRelVar(); 1876 1918 … … 1907 1949 const UInt_t npixels = fGeom->GetNumPixels(); 1908 1950 1951 MCalibrationQECam *qecam = fIntensQE 1952 ? (MCalibrationQECam*) fIntensQE->GetCam() : fQECam; 1953 MCalibrationChargeCam *chargecam = fIntensCam 1954 ? (MCalibrationChargeCam*)fIntensCam->GetCam() : fCam; 1955 MCalibrationBlindCam *blindcam = fIntensBlind 1956 ? (MCalibrationBlindCam*) fIntensBlind->GetCam(): fBlindCam; 1957 MBadPixelsCam *badcam = fIntensBad 1958 ? (MBadPixelsCam*) fIntensBad->GetCam() : fBadPixels; 1909 1959 // 1910 1960 // With the knowledge of the overall photon flux, calculate the … … 1914 1964 { 1915 1965 1916 MCalibrationQEPix &qepix = (MCalibrationQEPix&) (*fQECam)[i];1966 MCalibrationQEPix &qepix = (MCalibrationQEPix&) (*qecam) [i]; 1917 1967 1918 1968 if (!fPINDiode) … … 1928 1978 } 1929 1979 1930 MBadPixelsPix &bad = (*fBadPixels)[i];1980 MBadPixelsPix &bad = (*badcam) [i]; 1931 1981 1932 1982 if (!bad.IsUnsuitable (MBadPixelsPix::kUnsuitableRun)) … … 1936 1986 } 1937 1987 1938 MCalibrationChargePix &pix = fIntensCam 1939 ? (MCalibrationChargePix&)(*fIntensCam)[i] 1940 : (MCalibrationChargePix&)(*fCam)[i]; 1941 MGeomPix &geo = (*fGeom)[i]; 1988 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*chargecam)[i]; 1989 MGeomPix &geo = (*fGeom) [i]; 1942 1990 1943 1991 const Float_t qe = pix.GetPheFFactorMethod() … … 1968 2016 const UInt_t npixels = fGeom->GetNumPixels(); 1969 2017 2018 MCalibrationQECam *qecam = fIntensQE 2019 ? (MCalibrationQECam*) fIntensQE->GetCam() : fQECam; 2020 MBadPixelsCam *badcam = fIntensBad 2021 ? (MBadPixelsCam*) fIntensBad->GetCam() : fBadPixels; 2022 1970 2023 for (UInt_t i=0; i<npixels; i++) 1971 2024 { 1972 2025 1973 MCalibrationQEPix &qepix = (MCalibrationQEPix&) (*fQECam)[i];1974 MBadPixelsPix &bad = (*fBadPixels)[i];2026 MCalibrationQEPix &qepix = (MCalibrationQEPix&) (*qecam) [i]; 2027 MBadPixelsPix &bad = (*badcam) [i]; 1975 2028 1976 2029 if (!bad.IsUnsuitable (MBadPixelsPix::kUnsuitableRun)) … … 2000 2053 TArrayI counts(nareas); 2001 2054 2002 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 2003 { 2004 MBadPixelsPix &bad = (*fBadPixels)[i]; 2055 MBadPixelsCam *badcam = fIntensBad 2056 ? (MBadPixelsCam*)fIntensBad->GetCam() : fBadPixels; 2057 MCalibrationChargeCam *chargecam = fIntensCam 2058 ? (MCalibrationChargeCam*)fIntensCam->GetCam() : fCam; 2059 2060 for (Int_t i=0; i<badcam->GetSize(); i++) 2061 { 2062 MBadPixelsPix &bad = (*badcam)[i]; 2005 2063 if (!bad.IsBad()) 2006 2064 { … … 2016 2074 counts.Reset(); 2017 2075 2018 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 2019 { 2020 MBadPixelsPix &bad = (*fBadPixels)[i]; 2076 for (Int_t i=0; i<badcam->GetSize(); i++) 2077 { 2078 MBadPixelsPix &bad = (*badcam)[i]; 2079 2021 2080 if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) 2022 2081 { … … 2027 2086 2028 2087 for (Int_t aidx=0; aidx<nareas; aidx++) 2029 if (fIntensCam) 2030 fIntensCam->SetNumUnsuitable(counts[aidx], aidx); 2031 else 2032 fCam->SetNumUnsuitable(counts[aidx], aidx); 2088 chargecam->SetNumUnsuitable(counts[aidx], aidx); 2033 2089 2034 2090 if (fGeom->InheritsFrom("MGeomCamMagic")) … … 2038 2094 counts.Reset(); 2039 2095 2040 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 2041 { 2042 MBadPixelsPix &bad = (*fBadPixels)[i]; 2096 for (Int_t i=0; i<badcam->GetSize(); i++) 2097 { 2098 2099 MBadPixelsPix &bad = (*badcam)[i]; 2100 2043 2101 if (bad.IsUnsuitable(MBadPixelsPix::kUnreliableRun)) 2044 2102 { … … 2049 2107 2050 2108 for (Int_t aidx=0; aidx<nareas; aidx++) 2051 if (fIntensCam) 2052 fIntensCam->SetNumUnreliable(counts[aidx], aidx); 2053 else 2054 fCam->SetNumUnreliable(counts[aidx], aidx); 2109 chargecam->SetNumUnreliable(counts[aidx], aidx); 2055 2110 2056 2111 *fLog << " " << setw(7) << "Unreliable Pixels: " … … 2069 2124 UInt_t countouter = 0; 2070 2125 2071 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 2072 { 2073 MBadPixelsPix &bad = (*fBadPixels)[i]; 2126 MBadPixelsCam *badcam = fIntensBad 2127 ? (MBadPixelsCam*)fIntensBad->GetCam() : fBadPixels; 2128 2129 for (Int_t i=0; i<badcam->GetSize(); i++) 2130 { 2131 MBadPixelsPix &bad = (*badcam)[i]; 2132 2074 2133 if (bad.IsUncalibrated(typ)) 2075 2134 {
Note:
See TracChangeset
for help on using the changeset viewer.