Changeset 3559
- Timestamp:
- 03/19/04 23:01:55 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbadpixels/MBadPixelsPix.cc
r3500 r3559 17 17 ! 18 18 ! Author(s): Thomas Bretz, 1/2004 <mailto:tbretz@astro.uni-wuerzburg.de> 19 ! 19 ! Markus Gaug, 3/2004 <mailto:markus@ifae.es> 20 ! 20 21 ! Copyright: MAGIC Software Development, 2000-2004 21 22 ! -
trunk/MagicSoft/Mars/mbadpixels/MBadPixelsPix.h
r3493 r3559 41 41 kMeanTimeInFirstBin = BIT(12), 42 42 kMeanTimeInLastBin = BIT(13), 43 kNotCalibrated = BIT(14) 43 kDeviatingNumPhes = BIT(14), 44 kNotCalibrated = BIT(15) 44 45 }; 45 46 … … 69 70 void SetLoGainNotFitted () { fInfo[1] |= kLoGainNotFitted; } 70 71 void SetHiGainNotFitted () { fInfo[1] |= kHiGainNotFitted; } 72 void SetDeviatingNumPhes () { fInfo[1] |= kDeviatingNumPhes; } 71 73 72 74 // Getter … … 90 92 Bool_t IsLoGainNotFitted () const { return fInfo[1] & kLoGainNotFitted; } 91 93 Bool_t IsHiGainNotFitted () const { return fInfo[1] & kHiGainNotFitted; } 94 Bool_t IsDeviatingNumPhes () const { return fInfo[1] & kDeviatingNumPhes; } 92 95 96 93 97 Bool_t IsLoGainBad() const { return IsLoGainSaturation() || IsConvHiLoNotValid() || IsLoGainOscillating() ;} 94 98 Bool_t IsHiGainBad() const { return (IsHiGainSaturation() && IsConvHiLoNotValid()) || IsHiGainOscillating(); } -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r3556 r3559 365 365 for (UInt_t i=0; i<npixels; i++) 366 366 { 367 367 368 MCalibrationChargePix &pix = (*fCam) [i]; 368 369 MCalibrationQEPix &pqe = (*fQECam) [i]; … … 506 507 Int_t MCalibrationChargeCalc::PostProcess() 507 508 { 509 510 if (GetNumExecutions()==0) 511 return kFALSE; 508 512 509 513 // … … 626 630 } 627 631 } 632 628 633 fCam->SetReadyToSave(); 629 630 return kTRUE; 631 } 634 635 PrintInfo(); 636 637 return kTRUE; 638 } 639 640 void MCalibrationChargeCalc::PrintInfo() 641 { 642 643 *fLog << inf << endl; 644 *fLog << GetDescriptor() << ": Calibration statistics:" << endl; 645 *fLog << dec << setfill(' '); 646 647 UInt_t countinner = 0; 648 UInt_t countouter = 0; 649 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 650 { 651 MBadPixelsPix &bad = (*fBadPixels)[i]; 652 if (bad.IsOK()) 653 { 654 if (fGeom->GetPixRatio(i) == 1.) 655 countinner++; 656 else 657 countouter++; 658 } 659 } 660 661 *fLog << " " << setw(7) << "Successfully calibrated Pixels: " 662 << "Inner: " << countinner << " Outer: " << countouter << endl; 663 664 countinner = 0; 665 countouter = 0; 666 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 667 { 668 MBadPixelsPix &bad = (*fBadPixels)[i]; 669 if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) 670 { 671 if (fGeom->GetPixRatio(i) == 1.) 672 countinner++; 673 else 674 countouter++; 675 } 676 } 677 678 *fLog << " " << setw(7) << "Bad Pixels: " 679 << "Inner: " << countinner << " Outer: " << countouter << endl; 680 681 countinner = 0; 682 countouter = 0; 683 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 684 { 685 MBadPixelsPix &bad = (*fBadPixels)[i]; 686 if (bad.IsUnsuitable(MBadPixelsPix::kUnreliableRun)) 687 { 688 if (fGeom->GetPixRatio(i) == 1.) 689 countinner++; 690 else 691 countouter++; 692 } 693 } 694 695 *fLog << " " << setw(7) << "Unreliable Pixels: " 696 << "Inner: " << countinner << " Outer: " << countouter << endl; 697 698 *fLog << inf << endl; 699 *fLog << GetDescriptor() << ": Errors statistics:" << endl; 700 701 countinner = 0; 702 countouter = 0; 703 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 704 { 705 MBadPixelsPix &bad = (*fBadPixels)[i]; 706 if (bad.IsChargeIsPedestal()) 707 { 708 if (fGeom->GetPixRatio(i) == 1.) 709 countinner++; 710 else 711 countouter++; 712 } 713 } 714 715 *fLog << " " << setw(7) << "Signal less than 3 Pedestal RMS: " 716 << "Inner: " << countinner << " Outer: " << countouter << endl; 717 718 countinner = 0; 719 countouter = 0; 720 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 721 { 722 MBadPixelsPix &bad = (*fBadPixels)[i]; 723 if (bad.IsChargeErrNotValid()) 724 { 725 if (fGeom->GetPixRatio(i) == 1.) 726 countinner++; 727 else 728 countouter++; 729 } 730 } 731 732 *fLog << " " << setw(7) << "Signal Error smaller than 0: " 733 << "Inner: " << countinner << " Outer: " << countouter << endl; 734 735 countinner = 0; 736 countouter = 0; 737 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 738 { 739 MBadPixelsPix &bad = (*fBadPixels)[i]; 740 if (bad.IsChargeRelErrNotValid()) 741 { 742 if (fGeom->GetPixRatio(i) == 1.) 743 countinner++; 744 else 745 countouter++; 746 } 747 } 748 749 *fLog << " " << setw(7) << "Signal Error bigger than Mean Signal: " 750 << "Inner: " << countinner << " Outer: " << countouter << endl; 751 752 countinner = 0; 753 countouter = 0; 754 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 755 { 756 MBadPixelsPix &bad = (*fBadPixels)[i]; 757 if (bad.IsChargeSigmaNotValid()) 758 { 759 if (fGeom->GetPixRatio(i) == 1.) 760 countinner++; 761 else 762 countouter++; 763 } 764 } 765 766 *fLog << " " << setw(7) << "Signal Sigma smaller than Pedestal RMS: " 767 << "Inner: " << countinner << " Outer: " << countouter << endl; 768 769 countinner = 0; 770 countouter = 0; 771 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 772 { 773 MBadPixelsPix &bad = (*fBadPixels)[i]; 774 if (bad.IsLoGainSaturation()) 775 { 776 if (fGeom->GetPixRatio(i) == 1.) 777 countinner++; 778 else 779 countouter++; 780 } 781 } 782 783 *fLog << " " << setw(7) << "Pixels with Low Gain Saturation: " 784 << "Inner: " << countinner << " Outer: " << countouter << endl; 785 786 countinner = 0; 787 countouter = 0; 788 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 789 { 790 MBadPixelsPix &bad = (*fBadPixels)[i]; 791 if (bad.IsMeanTimeInFirstBin()) 792 { 793 if (fGeom->GetPixRatio(i) == 1.) 794 countinner++; 795 else 796 countouter++; 797 } 798 } 799 800 *fLog << " " << setw(7) << "Pixels with Mean Abs. Arr. Time in First Bin: " 801 << "Inner: " << countinner << " Outer: " << countouter << endl; 802 803 countinner = 0; 804 countouter = 0; 805 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 806 { 807 MBadPixelsPix &bad = (*fBadPixels)[i]; 808 if (bad.IsMeanTimeInLastBin()) 809 { 810 if (fGeom->GetPixRatio(i) == 1.) 811 countinner++; 812 else 813 countouter++; 814 } 815 } 816 817 *fLog << " " << setw(7) << "Pixels with Mean Abs. Arr. Time in Last 2 Bins: " 818 << "Inner: " << countinner << " Outer: " << countouter << endl; 819 820 countinner = 0; 821 countouter = 0; 822 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 823 { 824 MBadPixelsPix &bad = (*fBadPixels)[i]; 825 if (bad.IsHiGainOscillating()) 826 { 827 if (fGeom->GetPixRatio(i) == 1.) 828 countinner++; 829 else 830 countouter++; 831 } 832 } 833 834 *fLog << " " << setw(7) << "Pixels with changing Hi Gain signal over time: " 835 << "Inner: " << countinner << " Outer: " << countouter << endl; 836 837 countinner = 0; 838 countouter = 0; 839 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 840 { 841 MBadPixelsPix &bad = (*fBadPixels)[i]; 842 if (bad.IsLoGainOscillating()) 843 { 844 if (fGeom->GetPixRatio(i) == 1.) 845 countinner++; 846 else 847 countouter++; 848 } 849 } 850 851 *fLog << " " << setw(7) << "Pixels with changing Lo Gain signal over time: " 852 << "Inner: " << countinner << " Outer: " << countouter << endl; 853 854 countinner = 0; 855 countouter = 0; 856 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 857 { 858 MBadPixelsPix &bad = (*fBadPixels)[i]; 859 if (!bad.IsCalibrationFitOK()) 860 { 861 if (fGeom->GetPixRatio(i) == 1.) 862 countinner++; 863 else 864 countouter++; 865 } 866 } 867 868 *fLog << " " << setw(7) << "Pixels with unsuccessful signal fit: " 869 << "Inner: " << countinner << " Outer: " << countouter << endl; 870 871 countinner = 0; 872 countouter = 0; 873 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 874 { 875 MBadPixelsPix &bad = (*fBadPixels)[i]; 876 if (bad.IsDeviatingNumPhes()) 877 { 878 if (fGeom->GetPixRatio(i) == 1.) 879 countinner++; 880 else 881 countouter++; 882 } 883 } 884 885 *fLog << " " << setw(7) << "Pixels with deviating number of phes: " 886 << "Inner: " << countinner << " Outer: " << countouter << endl; 887 888 } -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h
r3556 r3559 66 66 Float_t &avped, Float_t &avrms); 67 67 void FinalizeAvPedestals(MCalibrationChargePix &cal, Float_t avped, Float_t avrms, Int_t avnum); 68 69 68 Bool_t FinalizeCharges(MCalibrationChargePix &cal, MBadPixelsPix &bad); 69 void PrintInfo(); 70 70 71 71 public: -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc
r3551 r3559 13 13 ! * in supporting documentation. It is provided "as is" without express 14 14 ! * or implied warranty. 15 16 15 ! * 17 16 ! … … 895 894 if (nphe < lowerpheinnerlimit || nphe > upperpheinnerlimit) 896 895 { 896 bad[idx].SetDeviatingNumPhes(); 897 897 bad[idx].SetUnsuitable(MBadPixelsPix::kUnreliableRun); 898 898 continue; … … 909 909 if (nphe < lowerpheouterlimit || nphe > upperpheouterlimit) 910 910 { 911 bad[idx].SetDeviatingNumPhes(); 911 912 bad[idx].SetUnsuitable(MBadPixelsPix::kUnreliableRun); 912 913 continue; -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc
r3555 r3559 697 697 } 698 698 699 if ( fAbsTimeMean > (Float_t)upperedge- 1)700 { 701 *fLog << warn << "WARNING: Mean ArrivalTime in last extraction binof the Pixel " << fPixId << endl;702 *fLog << fAbsTimeMean << " " << (Float_t)upperedge- 1. << endl;699 if ( fAbsTimeMean > (Float_t)upperedge-2) 700 { 701 *fLog << warn << "WARNING: Mean ArrivalTime in last two extraction bins of the Pixel " << fPixId << endl; 702 *fLog << fAbsTimeMean << " " << (Float_t)upperedge-2. << endl; 703 703 bad->SetMeanTimeInLastBin(); 704 704 bad->SetUnsuitable(MBadPixelsPix::kUnsuitableRun); -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h
r3555 r3559 115 115 kExcluded, 116 116 kChargeValid, kTimeFitValid, 117 kHiGainFitted, kLoGainFitted,118 117 kBlindPixelMethodValid, kFFactorMethodValid, 119 118 kPINDiodeMethodValid, kCombinedMethodValid }; … … 185 184 void SetLoGainSaturation ( const Bool_t b = kTRUE ); 186 185 void SetExcluded ( const Bool_t b = kTRUE ); 187 void SetHiGainFitted ( const Bool_t b = kTRUE );188 void SetLoGainFitted ( const Bool_t b = kTRUE );189 186 void SetBlindPixelMethodValid( const Bool_t b = kTRUE ); 190 187 void SetFFactorMethodValid ( const Bool_t b = kTRUE ); … … 268 265 Bool_t IsHiGainSaturation() const; 269 266 Bool_t IsLoGainSaturation() const; 270 Bool_t IsHiGainFitted() const;271 Bool_t IsLoGainFitted() const;272 Bool_t IsFitted() const;273 267 Bool_t IsBlindPixelMethodValid() const; 274 268 Bool_t IsPINDiodeMethodValid() const;
Note:
See TracChangeset
for help on using the changeset viewer.