Changeset 3174
- Timestamp:
- 02/16/04 00:31:25 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3173 r3174 9 9 * mcalib/Makefile 10 10 * mcalib/CalibLinkDef.h 11 12 * mcalib/MHCalibrationChargePix.[h,cc] 13 - new base class for the calibration charges histogram pixel. 14 Derives from MH and can be filled with the MH with the MH 15 functions. 16 11 17 * mcalib/MExtractPINDiode.[h,cc] 12 18 - new signal extractor for the PIN Diode -
trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h
r3173 r3174 17 17 #pragma link C++ class MHCalibrationBlindPixel+; 18 18 #pragma link C++ class MHCalibrationPixel+; 19 #pragma link C++ class MHCalibrationChargePix+; 19 20 20 21 #pragma link C++ class MMcCalibrationCalc++; -
trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.cc
r3124 r3174 60 60 // MalibrationCam::SkipBlindPixelFits() (skip all blind 61 61 // pixel fits) 62 // MalibrationCam::SkipPinDiodeFits() (skip all PIN Diode63 // fits)64 62 // 65 63 // Hi-Gain vs. Lo-Gain Calibration (very memory-intensive) … … 106 104 107 105 #include "MCalibrationBlindPix.h" 108 #include "MCalibrationPINDiode.h"109 106 110 107 ClassImp(MCalibrationCalc); … … 112 109 using namespace std; 113 110 114 const UInt_t MCalibrationCalc::f BlindPixelId= 559;115 const UInt_t MCalibrationCalc::f PINDiodeId= 9999;111 const UInt_t MCalibrationCalc::fgBlindPixelId = 559; 112 const UInt_t MCalibrationCalc::fgPINDiodeId = 9999; 116 113 const Byte_t MCalibrationCalc::fgSaturationLimit = 254; 117 114 const Int_t MCalibrationCalc::fgBlindPixelFirst = 3; … … 149 146 CLRBIT(fFlags, kHiGainOverFlow); 150 147 CLRBIT(fFlags, kLoGainOverFlow); 151 // As long as we don't have the PIN Diode:152 CLRBIT(fFlags, kUsePinDiodeFit);153 148 154 149 fBlindPixelFirst = 0; … … 178 173 { 179 174 return fCalibrations->GetBlindPixel(); 180 }181 182 MCalibrationPINDiode *MCalibrationCalc::GetPINDiode() const183 {184 return fCalibrations->GetPINDiode();185 175 } 186 176 … … 313 303 314 304 // Exclude the blind pixel and the PIN Diode from normal pixel calibration: 315 if (i == f BlindPixelId)305 if (i == fgBlindPixelId) 316 306 pix.SetExcluded(); 317 307 318 if (i == f PINDiodeId)308 if (i == fgPINDiodeId) 319 309 pix.SetExcluded(); 320 310 … … 395 385 // 396 386 MCalibrationBlindPix &blindpixel = *(fCalibrations->GetBlindPixel()); 397 MCalibrationPINDiode &pindiode = *(fCalibrations->GetPINDiode());398 387 399 388 MRawEvtPixelIter pixel(fRawEvt); … … 457 446 { 458 447 459 case f BlindPixelId:448 case fgBlindPixelId: 460 449 461 450 if (TESTBIT(fFlags,kUseBlindPixelFit)) … … 556 545 557 546 break; 558 case fPINDiodeId:559 560 if (TESTBIT(fFlags,kUsePinDiodeFit))561 {562 563 if (!pindiode.FillCharge(sumhi))564 *fLog << warn565 << "Overflow or Underflow occurred filling PINDiode: sum = "566 << sumhi << endl;567 568 if (!pindiode.FillAbsTime(abstime))569 *fLog << warn570 << "Overflow or Underflow occurred filling PINDiode abs. time = "571 << abstime << endl;572 573 if (!pindiode.FillGraphs(sumhi,sumlo))574 *fLog << warn575 << "Overflow or Underflow occurred filling PINDiode: eventnr = " << endl;576 577 } /* if use PIN Diode */578 579 // break;580 581 547 default: 582 548 … … 662 628 const Int_t nslices = fBlindPixelLast-fBlindPixelFirst+1; 663 629 const Float_t sqrslice = TMath::Sqrt((Float_t)nslices); 664 // 665 // retrieve the pedestal pix of the blind pixel 666 // 667 if (fPedestals->GetHistSize() > fBlindPixelId) 668 { 669 MHPedestalPixel &pedhist = (*fPedestals)(fBlindPixelId); 670 pedestal = pedhist.GetChargeMean()*nslices; 671 pederr = pedhist.GetChargeMeanErr()*nslices; 672 // 673 // Fitted sigma: 1. one sqrt(Nr. slices) for the division which is not 674 // not appropriate: sigma(real)/slice = GetSigma*sqrt(nslices) 675 // 2. another sqrt(Nr. slices) to calculate back to number 676 // of slices 677 // 678 pedsigma = pedhist.GetChargeSigma()*nslices; 679 pedsigmaerr = pedhist.GetChargeSigmaErr()*nslices; 680 } 681 else 682 { 683 MPedestalPix &pedpix = (*fPedestals)[fBlindPixelId]; 684 pedestal = pedpix.GetPedestal()*nslices; 685 pederr = pedpix.GetPedestalRms()*nslices/nentries; 686 pedsigma = pedpix.GetPedestalRms()*sqrslice; 687 pedsigmaerr = pederr/2.; 688 } 630 631 MPedestalPix &pedpix = (*fPedestals)[fgBlindPixelId]; 632 pedestal = pedpix.GetPedestal()*nslices; 633 pederr = pedpix.GetPedestalRms()*nslices/nentries; 634 pedsigma = pedpix.GetPedestalRms()*sqrslice; 635 pedsigmaerr = pederr/2.; 689 636 // 690 637 // retrieve the histogram containers … … 779 726 780 727 781 if ( TESTBIT(fFlags,kUsePinDiodeFit) &&fCalibrations->IsPINDiodeMethodValid())728 if (fCalibrations->IsPINDiodeMethodValid()) 782 729 { 783 730 if (!fCalibrations->CalcFluxOutsidePlexiglass()) 784 731 { 785 732 *fLog << err 786 << "Could not calculate the number of photons from the blind pixel " << endl; 787 *fLog << err 788 << "You can try to calibrate using the MCalibrationCalc::SkipPINDiodeFit()" << endl; 733 << "Could not calculate the number of photons from the PIN Diode " << endl; 789 734 fCalibrations->SetPINDiodeMethodValid(kFALSE); 790 735 } -
trunk/MagicSoft/Mars/mcalib/Makefile
r3173 r3174 47 47 MHCalibrationPINDiode.cc \ 48 48 MHCalibrationPixel.cc \ 49 MHCalibrationChargePix.cc \ 49 50 MMcCalibrationCalc.cc \ 50 51 MExtractPINDiode.cc \
Note:
See TracChangeset
for help on using the changeset viewer.