Changeset 4986 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 09/14/04 00:11:10 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 10 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h
r4933 r4986 14 14 #pragma link C++ class MCalibrationIntensityCam+; 15 15 #pragma link C++ class MCalibrationIntensityChargeCam+; 16 #pragma link C++ class MCalibrationIntensityBlindCam+; 16 17 #pragma link C++ class MCalibrationIntensityQECam+; 17 18 #pragma link C++ class MCalibrationIntensityRelTimeCam+; … … 31 32 #pragma link C++ class MCalibrationChargeCam+; 32 33 #pragma link C++ class MCalibrationChargePix+; 34 #pragma link C++ class MCalibrationBlindCam+; 35 #pragma link C++ class MCalibrationBlindPix+; 36 #pragma link C++ class MCalibrationBlindCamOneOldStyle+; 37 #pragma link C++ class MCalibrationBlindCamTwoNewStyle+; 33 38 #pragma link C++ class MCalibrationChargeBlindCamOneOldStyle+; 34 39 #pragma link C++ class MCalibrationChargeBlindCamTwoNewStyle+; -
trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc
r4967 r4986 89 89 MCalibrationCam::MCalibrationCam(const char *name, const char *title) 90 90 : fPulserColor(kNONE), 91 fPixels(NULL), fAverageAreas(NULL), fAverageSectors(NULL) 92 { 93 94 fAverageBadAreas = new TClonesArray("MBadPixelsPix",1); 95 fAverageBadSectors = new TClonesArray("MBadPixelsPix",1); 91 fPixels(NULL), fAverageAreas(NULL), fAverageSectors(NULL), 92 fAverageBadAreas(NULL), fAverageBadSectors(NULL) 93 { 96 94 97 95 fNumHiGainFADCSlices.Set(1); … … 125 123 delete fAverageSectors; 126 124 127 delete fAverageBadAreas; 128 delete fAverageBadSectors; 125 if (fAverageBadAreas) 126 delete fAverageBadAreas; 127 128 if (fAverageBadSectors) 129 delete fAverageBadSectors; 129 130 130 131 } -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r4967 r4986 1 /* ======================================================================== *\1 /* ======================================================================== *\ 2 2 ! 3 3 ! * … … 208 208 #include "MCalibrationChargePix.h" 209 209 #include "MCalibrationChargePINDiode.h" 210 #include "MCalibration ChargeBlindPix.h"211 #include "MCalibration ChargeBlindCam.h"210 #include "MCalibrationBlindPix.h" 211 #include "MCalibrationBlindCam.h" 212 212 213 213 #include "MExtractedSignalCam.h" … … 317 317 fCam = NULL; 318 318 fIntensCam = NULL; 319 fBlindPixel = NULL;320 319 fBlindCam = NULL; 321 320 fPINDiode = NULL; … … 404 403 // 405 404 // Search for the following input containers and give a warning if not existing: 406 // - MCalibration ChargeBlindPix405 // - MCalibrationBlindPix 407 406 // - MCalibrationChargePINDiode 408 407 // … … 426 425 // 427 426 // - MCalibrationChargeCam 428 // - MCalibration ChargeBlindPix (if existing)427 // - MCalibrationBlindPix (if existing) 429 428 // - MCalibrationChargePINDiode (if existing) 430 429 // … … 456 455 // Optional Containers 457 456 // 458 fBlindPixel = (MCalibrationChargeBlindPix*)pList->FindObject("MCalibrationChargeBlindPix"); 459 if (!fBlindPixel) 460 { 461 fBlindCam = (MCalibrationChargeBlindCam*)pList->FindObject("MCalibrationChargeBlindCam"); 462 if (!fBlindCam) 463 { 457 fBlindCam = (MCalibrationBlindCam*)pList->FindObject("MCalibrationBlindCam"); 458 if (!fBlindCam) 459 { 464 460 *fLog << endl; 465 461 *fLog << warn << GetDescriptor() 466 << ": MCalibration ChargeBlindPix nor MCalibrationChargeBlindCam "462 << ": MCalibrationBlindPix nor MCalibrationBlindCam " 467 463 << " found... no Blind Pixel method! " << endl; 468 } 469 } 470 464 } 465 471 466 fPINDiode = (MCalibrationChargePINDiode*)pList->FindObject("MCalibrationChargePINDiode"); 472 467 if (!fPINDiode) … … 603 598 fCam->SetPulserColor( fPulserColor ); 604 599 605 if (fBlindPixel)606 fBlindPixel->SetColor( fPulserColor );607 608 600 if (fBlindCam) 609 fBlindCam->Set Color( fPulserColor );601 fBlindCam->SetPulserColor( fPulserColor ); 610 602 611 603 if (fPINDiode) … … 640 632 // 641 633 // Call MParContainer::SetReadyToSave() for fIntensCam, fCam, fQECam, fBadPixels and 642 // fBlind Pixeland fPINDiode if they exist634 // fBlindCam and fPINDiode if they exist 643 635 // 644 636 // Print out some statistics … … 658 650 << ": MCalibrationChargePINDiode is declared not valid... no PIN Diode method! " << endl; 659 651 fPINDiode = NULL; 660 }661 662 if (fBlindPixel)663 if (!fBlindPixel->IsValid())664 {665 *fLog << warn << GetDescriptor()666 << ": MCalibrationChargeBlindPix is declared not valid... no Blind Pixel method! " << endl;667 fBlindPixel = NULL;668 652 } 669 653 … … 766 750 // Finalize Blind Pixel 767 751 // 768 if (fBlindPixel) 769 if (FinalizeBlindPixel()) 770 fQECam->SetBlindPixelMethodValid(kTRUE); 771 else 772 fQECam->SetBlindPixelMethodValid(kFALSE); 773 else 774 if (FinalizeBlindCam()) 775 fQECam->SetBlindPixelMethodValid(kTRUE); 776 else 777 fQECam->SetBlindPixelMethodValid(kFALSE); 752 if (FinalizeBlindCam()) 753 fQECam->SetBlindPixelMethodValid(kTRUE); 754 else 755 fQECam->SetBlindPixelMethodValid(kFALSE); 778 756 779 757 // … … 812 790 fBadPixels->SetReadyToSave(); 813 791 814 if (fBlindPixel)815 fBlindPixel->SetReadyToSave();816 792 if (fBlindCam) 817 793 fBlindCam->SetReadyToSave(); … … 1407 1383 1408 1384 1385 1409 1386 // ------------------------------------------------------------------------ 1410 1387 // 1411 // Returns kFALSE if pointer to MCalibration ChargeBlindPixis NULL1388 // Returns kFALSE if pointer to MCalibrationBlindCam is NULL 1412 1389 // 1413 1390 // The check returns kFALSE if: … … 1417 1394 // 1418 1395 // Calls: 1419 // - MCalibrationChargeBlindPix::CalcFluxInsidePlexiglass() 1420 // 1421 Bool_t MCalibrationChargeCalc::FinalizeBlindPixel() 1422 { 1423 1424 if (!fBlindPixel) 1425 return kFALSE; 1426 1427 const Float_t lambda = fBlindPixel->GetLambda(); 1428 const Float_t lambdaerr = fBlindPixel->GetLambdaErr(); 1429 const Float_t lambdacheck = fBlindPixel->GetLambdaCheck(); 1430 1431 if (2.*(lambdacheck-lambda)/(lambdacheck+lambda) > fLambdaCheckLimit) 1432 { 1433 *fLog << warn << GetDescriptor() 1434 << Form("%s%4.2f%s%4.2f%s%4.2f%s",": Lambda: ",lambda," and Lambda-Check: ", 1435 lambdacheck," differ by more than ",fLambdaCheckLimit," in the Blind Pixel ") 1436 << endl; 1437 return kFALSE; 1438 } 1439 1440 if (lambdaerr > fLambdaErrLimit) 1441 { 1442 *fLog << warn << GetDescriptor() 1443 << Form("%s%4.2f%s%4.2f%s",": Error of Fitted Lambda: ",lambdaerr," is greater than ", 1444 fLambdaErrLimit," in Blind Pixel ") << endl; 1445 return kFALSE; 1446 } 1447 1448 if (!fBlindPixel->CalcFluxInsidePlexiglass()) 1449 { 1450 *fLog << warn << "Could not calculate the flux of photons from the Blind Pixel, " 1451 << "will skip Blind Pixel Calibration " << endl; 1452 return kFALSE; 1453 } 1454 1455 return kTRUE; 1456 } 1457 1458 // ------------------------------------------------------------------------ 1459 // 1460 // Returns kFALSE if pointer to MCalibrationChargeBlindCam is NULL 1461 // 1462 // The check returns kFALSE if: 1463 // 1464 // 1) fLambda and fLambdaCheck are separated relatively to each other by more than fLambdaCheckLimit 1465 // 2) BlindPixel has an fLambdaErr greater than fLambdaErrLimit 1466 // 1467 // Calls: 1468 // - MCalibrationChargeBlindPix::CalcFluxInsidePlexiglass() 1396 // - MCalibrationBlindPix::CalcFluxInsidePlexiglass() 1469 1397 // 1470 1398 Bool_t MCalibrationChargeCalc::FinalizeBlindCam() … … 1478 1406 Int_t nvalid = 0; 1479 1407 1480 for ( UInt_t i=0; i<fBlindCam->GetNumBlindPixels(); i++)1481 { 1482 1483 MCalibration ChargeBlindPix &blindpix =(*fBlindCam)[i];1408 for (Int_t i=0; i<fBlindCam->GetSize(); i++) 1409 { 1410 1411 MCalibrationBlindPix &blindpix = (MCalibrationBlindPix&)(*fBlindCam)[i]; 1484 1412 1485 1413 if (!blindpix.IsValid()) … … 1858 1786 // Loop over pixels: 1859 1787 // 1860 // - Continue, if not MCalibration ChargeBlindPix::IsFluxInsidePlexiglassAvailable() and set:1788 // - Continue, if not MCalibrationBlindPix::IsFluxInsidePlexiglassAvailable() and set: 1861 1789 // MCalibrationQEPix::SetBlindPixelMethodValid(kFALSE,fPulserColor) 1862 1790 // 1863 1791 // - Calculate the quantum efficiency with the formula: 1864 1792 // 1865 // QE = Num.Phes / MCalibration ChargeBlindPix::GetFluxInsidePlexiglass()1793 // QE = Num.Phes / MCalibrationBlindPix::GetFluxInsidePlexiglass() 1866 1794 // / MGeomPix::GetA() * MCalibrationQECam::GetPlexiglassQE() 1867 1795 // … … 1880 1808 // Set the results in the MCalibrationChargeCam 1881 1809 // 1810 /* 1882 1811 if (fBlindPixel) 1883 1812 { … … 1901 1830 } 1902 1831 } 1832 */ 1903 1833 // 1904 1834 // With the knowledge of the overall photon flux, calculate the … … 1910 1840 MCalibrationQEPix &qepix = (MCalibrationQEPix&) (*fQECam)[i]; 1911 1841 1912 if (!fBlind Pixel)1842 if (!fBlindCam) 1913 1843 { 1914 1844 qepix.SetBlindPixelMethodValid(kFALSE, fPulserColor); … … 1916 1846 } 1917 1847 1848 /* 1918 1849 if (!fBlindPixel->IsFluxInsidePlexiglassAvailable()) 1919 1850 { … … 1921 1852 continue; 1922 1853 } 1923 1854 */ 1855 1924 1856 MBadPixelsPix &bad = (*fBadPixels)[i]; 1925 1857 if (bad.IsUnsuitable (MBadPixelsPix::kUnsuitableRun)) … … 1935 1867 1936 1868 const Float_t qe = pix.GetPheFFactorMethod() 1937 / fBlindPixel->GetFluxInsidePlexiglass()1869 // / fBlindPixel->GetFluxInsidePlexiglass() 1938 1870 / geo.GetA() 1939 1871 * fQECam->GetPlexiglassQE(); 1940 1872 1941 const Float_t qerelvar = fBlindPixel->GetFluxInsidePlexiglassRelVar()1942 +fQECam->GetPlexiglassQERelVar()1873 const Float_t qerelvar = /* fBlindPixel->GetFluxInsidePlexiglassRelVar() 1874 + */ fQECam->GetPlexiglassQERelVar() 1943 1875 + pix.GetPheFFactorMethodRelVar(); 1944 1876 -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h
r4947 r4986 31 31 class MPedestalPix; 32 32 class MCalibrationChargePINDiode; 33 class MCalibrationChargeBlindCam; 34 class MCalibrationChargeBlindPix; 33 class MCalibrationBlindCam; 35 34 class MCalibrationChargePix; 36 35 class MCalibrationChargeCam; … … 84 83 MCalibrationIntensityChargeCam *fIntensCam; // Calibrated Charges of all pixels 85 84 MCalibrationChargeCam *fCam; // Calibrated Charges of all pixels 86 MCalibrationChargeBlindPix *fBlindPixel; // Calibrated Charges of the Blind Pixel 87 MCalibrationChargeBlindCam *fBlindCam; // Calibrated Charges of the Blind Pixels 85 MCalibrationBlindCam *fBlindCam; // Calibrated Charges of the Blind Pixels 88 86 MCalibrationChargePINDiode *fPINDiode; // Calibrated Charges of the PIN Diode 89 87 MCalibrationQECam *fQECam; // Calibrated Quantum Efficiencies of all pixels … … 112 110 Bool_t FinalizeCharges ( MCalibrationChargePix &cal, MBadPixelsPix &bad, const char* what); 113 111 Bool_t FinalizePINDiode (); 114 Bool_t FinalizeBlindPixel ();115 112 Bool_t FinalizeBlindCam (); 116 113 Bool_t FinalizeFFactorMethod (); -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc
r4967 r4986 129 129 fTitle = title ? title : "Storage container for the Calibration Information in the camera"; 130 130 131 fPixels = new TClonesArray("MCalibrationChargePix",1); 132 fAverageAreas = new TClonesArray("MCalibrationChargePix",1); 133 fAverageSectors = new TClonesArray("MCalibrationChargePix",1); 131 fPixels = new TClonesArray("MCalibrationChargePix",1); 132 fAverageAreas = new TClonesArray("MCalibrationChargePix",1); 133 fAverageSectors = new TClonesArray("MCalibrationChargePix",1); 134 fAverageBadAreas = new TClonesArray("MBadPixelsPix",1); 135 fAverageBadSectors = new TClonesArray("MBadPixelsPix",1); 134 136 135 137 Clear(); -
trunk/MagicSoft/Mars/mcalib/MCalibrationPix.cc
r4333 r4986 102 102 } 103 103 104 105 // ----------------------------------------------------- 106 // 107 // copy 'constructor' 108 // 109 void MCalibrationPix::Copy(TObject& object) const 110 { 111 112 MCalibrationPix &pix = (MCalibrationPix&)object; 113 114 // 115 // Copy the data members 116 // 117 pix.fPixId = fPixId; 118 pix.fFlags = fFlags; 119 pix.fHiGainMean = fHiGainMean; 120 pix.fHiGainMeanVar = fHiGainMeanVar; 121 pix.fHiGainNumBlackout = fHiGainNumBlackout; 122 pix.fHiGainNumPickup = fHiGainNumPickup; 123 pix.fHiGainSigma = fHiGainSigma; 124 pix.fHiGainSigmaVar = fHiGainSigmaVar; 125 pix.fHiGainProb = fHiGainProb; 126 pix.fLoGainMean = fLoGainMean; 127 pix.fLoGainMeanVar = fLoGainMeanVar; 128 pix.fLoGainNumBlackout = fLoGainNumBlackout; 129 pix.fLoGainNumPickup = fLoGainNumPickup; 130 pix.fLoGainSigma = fLoGainSigma; 131 pix.fLoGainSigmaVar = fLoGainSigmaVar; 132 pix.fLoGainProb = fLoGainProb; 133 134 } 135 136 104 137 // -------------------------------------------------------------------------- 105 138 // -
trunk/MagicSoft/Mars/mcalib/MCalibrationPix.h
r4333 r4986 34 34 ~MCalibrationPix() {} 35 35 36 virtual void Clear(Option_t *o=""); 37 36 void Clear(Option_t *o=""); 37 void Copy(TObject& object) const; 38 38 39 // Setter 39 40 void SetPixId( const Int_t i ) { fPixId = i; } -
trunk/MagicSoft/Mars/mcalib/MCalibrationQECam.cc
r4882 r4986 110 110 fTitle = title ? title : "Storage container for the calibrated Quantum Efficiency of the camera"; 111 111 112 fPixels = new TClonesArray("MCalibrationQEPix",1); 113 fAverageAreas = new TClonesArray("MCalibrationQEPix",1); 114 fAverageSectors = new TClonesArray("MCalibrationQEPix",1); 112 fPixels = new TClonesArray("MCalibrationQEPix",1); 113 fAverageAreas = new TClonesArray("MCalibrationQEPix",1); 114 fAverageSectors = new TClonesArray("MCalibrationQEPix",1); 115 fAverageBadAreas = new TClonesArray("MBadPixelsPix",1); 116 fAverageBadSectors = new TClonesArray("MBadPixelsPix",1); 115 117 116 118 fFlags.Set(MCalibrationCam::gkNumPulserColors); -
trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCam.cc
r4269 r4986 112 112 fTitle = title ? title : "Container for Relative Time Calibration Information"; 113 113 114 fPixels = new TClonesArray("MCalibrationRelTimePix",1); 115 fAverageAreas = new TClonesArray("MCalibrationRelTimePix",1); 116 fAverageSectors = new TClonesArray("MCalibrationRelTimePix",1); 114 fPixels = new TClonesArray("MCalibrationRelTimePix",1); 115 fAverageAreas = new TClonesArray("MCalibrationRelTimePix",1); 116 fAverageSectors = new TClonesArray("MCalibrationRelTimePix",1); 117 fAverageBadAreas = new TClonesArray("MBadPixelsPix",1); 118 fAverageBadSectors = new TClonesArray("MBadPixelsPix",1); 117 119 118 120 } -
trunk/MagicSoft/Mars/mcalib/MCalibrationTestCam.cc
r4649 r4986 89 89 fTitle = title ? title : "Storage container for the Calibration Test Information in the camera"; 90 90 91 fPixels = new TClonesArray("MCalibrationTestPix",1);92 fAverageAreas = new TClonesArray("MCalibrationTestPix",1);93 fAverageSectors = new TClonesArray("MCalibrationTestPix",1);91 fPixels = new TClonesArray("MCalibrationTestPix",1); 92 fAverageAreas = new TClonesArray("MCalibrationTestPix",1); 93 fAverageSectors = new TClonesArray("MCalibrationTestPix",1); 94 94 95 95 Clear(); -
trunk/MagicSoft/Mars/mcalib/Makefile
r4934 r4986 38 38 MCalibrationIntensityCam.cc \ 39 39 MCalibrationIntensityChargeCam.cc \ 40 MCalibrationIntensityBlindCam.cc \ 40 41 MCalibrationIntensityQECam.cc \ 41 42 MCalibrationIntensityRelTimeCam.cc \ … … 55 56 MCalibrationChargeCam.cc \ 56 57 MCalibrationChargePix.cc \ 58 MCalibrationBlindCam.cc \ 59 MCalibrationBlindPix.cc \ 60 MCalibrationBlindCamOneOldStyle.cc \ 61 MCalibrationBlindCamTwoNewStyle.cc \ 57 62 MCalibrationChargeBlindCamOneOldStyle.cc \ 58 63 MCalibrationChargeBlindCamTwoNewStyle.cc \
Note:
See TracChangeset
for help on using the changeset viewer.