Changeset 5137 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 09/25/04 14:01:50 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationQECam.cc
r5047 r5137 74 74 ///////////////////////////////////////////////////////////////////////////// 75 75 #include "MCalibrationQECam.h" 76 #include "MCalibrationQEPix.h" 76 77 77 78 #include <TOrdCollection.h> 79 #include <TGraphErrors.h> 80 #include <TH2D.h> 78 81 79 82 #include "MLog.h" 80 83 #include "MLogManip.h" 81 84 82 #include "MCalibrationQEPix.h"83 84 85 ClassImp(MCalibrationQECam); 85 86 86 87 using namespace std; 87 88 88 const Float_t MCalibrationQECam::gkPlexiglassQE = 0.9 6;89 const Float_t MCalibrationQECam::gkPlexiglassQE = 0.92; 89 90 const Float_t MCalibrationQECam::gkPlexiglassQEErr = 0.01; 90 91 91 // -------------------------------------------------------------------------- 92 92 // … … 785 785 } 786 786 787 788 789 790 791 792 793 787 // -------------------------------------------------------------------------- 788 // 789 // Returns a TGraphErrors correlating the corning blues with the 790 // calcualted quantum efficiency of each pixel, obtained with the F-Factor 791 // method. 792 // 793 TGraphErrors *MCalibrationQECam::GetGraphQEvsCorningBlues() const 794 { 795 796 const UInt_t size = GetSize(); 797 798 if (fCorningBlues.GetSize() == 0) 799 { 800 *fLog << warn << "Size of intialized Cornings Blue is zero, please use MCalibrationQECamMagic" << endl; 801 return NULL; 802 } 803 804 if (fCorningBlues.GetSize() != size) 805 *fLog << warn << "Sizes mismatch, cannot create Graph!! " << endl; 806 807 TArrayD qes(size); 808 TArrayD qeerrs(size); 809 TArrayD corns(size); 810 TArrayD cornerrs(size); 811 812 Int_t cnt = 0; 813 814 for (UInt_t i=0; i<size; i++) 815 { 816 MCalibrationQEPix &pix = (MCalibrationQEPix&)(*this)[i]; 817 if (pix.IsFFactorMethodValid() && fCorningBlues[i] > 0. && pix.GetQECascadesFFactorErr() > 0.) 818 { 819 qes [i] = pix.GetQECascadesFFactor(); 820 qeerrs[i] = pix.GetQECascadesFFactorErr(); 821 corns [i] = fCorningBlues[i]; 822 cornerrs[i] = 0.05; 823 cnt++; 824 } 825 } 826 827 TGraphErrors *gr = new TGraphErrors(cnt, 828 corns.GetArray(),qes.GetArray(), 829 cornerrs.GetArray(),qeerrs.GetArray()); 830 return gr; 831 } 832 833 // -------------------------------------------------------------------------- 834 // 835 // Returns a TGraphErrors correlating the corning reds with the 836 // calcualted quantum efficiency of each pixel, obtained with the F-Factor 837 // method. 838 // 839 TGraphErrors *MCalibrationQECam::GetGraphQEvsCorningReds() const 840 { 841 842 const UInt_t size = GetSize(); 843 844 if (fCorningReds.GetSize() == 0) 845 { 846 *fLog << warn << "Size of intialized Cornings Red is zero, please use MCalibrationQECamMagic" << endl; 847 return NULL; 848 } 849 850 if (fCorningReds.GetSize() != size) 851 *fLog << warn << "Sizes mismatch, cannot create Graph!! " << endl; 852 853 TArrayD qes(size); 854 TArrayD qeerrs(size); 855 TArrayD corns(size); 856 TArrayD cornerrs(size); 857 858 Int_t cnt = 0; 859 860 for (UInt_t i=0; i<size; i++) 861 { 862 MCalibrationQEPix &pix = (MCalibrationQEPix&)(*this)[i]; 863 if (pix.IsFFactorMethodValid() && fCorningReds[i] > 0. && pix.GetQECascadesFFactorErr() > 0.) 864 { 865 qes [i] = pix.GetQECascadesFFactor(); 866 qeerrs [i] = pix.GetQECascadesFFactorErr(); 867 corns [i] = fCorningReds[i]; 868 cornerrs[i] = 0.05; 869 cnt++; 870 } 871 872 } 873 874 TGraphErrors *gr = new TGraphErrors(cnt, 875 corns.GetArray(),qes.GetArray(), 876 cornerrs.GetArray(),qeerrs.GetArray()); 877 878 return gr; 879 } 880 881 TH2D *MCalibrationQECam::GetHistQEvsCorningBlues( const Int_t nbins, const Axis_t first, const Axis_t last ) const 882 { 883 884 const UInt_t size = GetSize(); 885 886 if (fCorningBlues.GetSize() == 0) 887 return NULL; 888 889 if (fCorningBlues.GetSize() != size) 890 *fLog << warn << "Sizes mismatch, cannot create Graph!! " << endl; 891 892 TH2D *h = new TH2D("hist","QE vs. Corning Blue",nbins,first,last,nbins,0.,0.35); 893 894 for (UInt_t i=0; i<size; i++) 895 { 896 MCalibrationQEPix &pix = (MCalibrationQEPix&)(*this)[i]; 897 if (pix.IsFFactorMethodValid() && fCorningBlues[i] > 0.) 898 h->Fill(fCorningBlues[i],pix.GetQECascadesFFactor()); 899 } 900 901 return h; 902 } 903 904 TH2D *MCalibrationQECam::GetHistQEvsCorningReds( const Int_t nbins, const Axis_t first, const Axis_t last ) const 905 { 906 907 const UInt_t size = GetSize(); 908 909 if (fCorningReds.GetSize() == 0) 910 return NULL; 911 912 if (fCorningReds.GetSize() != size) 913 *fLog << warn << "Sizes mismatch, cannot create Graph!! " << endl; 914 915 TH2D *h = new TH2D("hist","QE vs. Corning Red",nbins,first,last,nbins,0.,0.35); 916 917 for (UInt_t i=0; i<size; i++) 918 { 919 MCalibrationQEPix &pix = (MCalibrationQEPix&)(*this)[i]; 920 if (pix.IsFFactorMethodValid() && fCorningReds[i] > 0.) 921 h->Fill(fCorningReds[i],pix.GetQECascadesFFactor()); 922 } 923 924 return h; 925 } -
trunk/MagicSoft/Mars/mcalib/MCalibrationQECamMagic.cc
r4880 r5137 79 79 80 80 Double_t creds[577]; 81 82 creds[1] = 1.6; 83 creds[2] = 8.7; 84 creds[3] = 6.8; 85 creds[4] = 10.3; 86 creds[5] = 8.7; 87 creds[6] = -1.; 88 creds[7] = 1.3; 89 creds[8] = 0.4; 90 creds[9] = 7.7 ; 91 creds[10] = 9.8; 92 creds[11] = 5.9; 93 creds[12] = 7.4; 94 creds[13] = 7.4; 95 creds[14] = 7.0; 96 creds[15] = 7.2; 97 creds[16] = 6.8; 98 creds[17] = 6.9; 99 creds[18] = 6.6; 100 creds[19] = 1.8; 101 creds[20] = 4.9; 102 creds[21] = 7.1; 103 creds[22] = 7.7; 104 creds[23] = 8.9; 105 creds[24] = 11.9; 106 creds[25] = 1.6; 107 creds[26] = 9.3; 108 creds[27] = 5.8; 109 creds[28] = 9.0; 110 creds[29] = 6.5; 111 creds[30] = 6.1; 112 creds[31] = 8.1; 113 creds[32] = 6.7; 114 creds[33] = 7.0; 115 creds[34] = 7.1; 116 creds[35] = 7.8; 117 creds[36] = 6.9; 118 creds[37] = 0.9; 119 creds[38] = 3.3; 120 creds[39] = 7.1; 121 creds[40] = 5.8; 122 creds[41] = 4.4; 123 creds[42] = 8.1; 124 creds[43] = 6.0; 125 creds[44] = 6.3; 126 creds[45] = 6.0; 127 creds[46] = 8.0; 128 creds[47] = 0.6; 129 creds[48] = 7.2; 130 creds[49] = 5.6; 131 creds[50] = 7.3; 132 creds[51] = 8.0; 133 creds[52] = 9.1; 134 creds[53] = 1.4; 135 creds[54] = 6.9; 136 creds[55] = 9.1; 137 creds[56] = 6.4; 138 creds[57] = 6.1; 139 creds[58] = 6.2; 140 creds[59] = 7.7; 141 creds[60] = 5.1; 142 creds[61] = 7.9; 143 creds[62] = 6.9; 144 creds[63] = 3.3; 145 creds[64] = 3.7; 146 creds[65] = 5.8; 147 creds[66] = 8.0; 148 creds[67] = 7.3; 149 creds[68] = 7.3; 150 creds[69] = 9.1; 151 creds[70] = 4.0; 152 creds[71] = 8.2; 153 creds[72] = 8.7; 154 creds[73] = 9.1; 155 creds[74] = 8.2; 156 creds[75] = 9.0; 157 creds[76] = 7.8; 158 creds[77] = 7.5; 159 creds[78] = 1.3; 160 creds[79] = 6.9; 161 creds[80] = 8.7; 162 creds[81] = 7.6; 163 creds[82] = 5.6; 164 creds[83] = 10.4; 165 creds[84] = 6.1; 166 creds[85] = 0.9; 167 creds[86] = 7.7; 168 creds[87] = 7.4; 169 creds[88] = 6.9; 170 creds[89] = 7.0; 171 creds[90] = 3.3; 172 creds[91] = 7.1; 173 creds[92] = 5.8; 174 creds[93] = 7.2; 175 creds[94] = 5.4; 176 creds[95] = 7.4; 177 creds[96] = 6.6; 178 creds[97] = 0.0; 179 creds[98] = 6.9; 180 creds[99] = 7.3; 81 82 creds[0] = -1.; 83 creds[1] = 1.6; 84 creds[2] = 8.7; 85 creds[3] = 6.8; 86 creds[4] = 10.3; 87 creds[5] = 8.7; 88 creds[6] = -1.; 89 creds[7] = 1.3; 90 creds[8] = 0.4; 91 creds[9] = 7.7 ; 92 creds[10] = 9.8; 93 creds[11] = 5.9; 94 creds[12] = 7.4; 95 creds[13] = 7.4; 96 creds[14] = 7.0; 97 creds[15] = 7.2; 98 creds[16] = 6.8; 99 creds[17] = 6.9; 100 creds[18] = 6.6; 101 creds[19] = 1.8; 102 creds[20] = 4.9; 103 creds[21] = 7.1; 104 creds[22] = 7.7; 105 creds[23] = 8.9; 106 creds[24] = 11.9; 107 creds[25] = 1.6; 108 creds[26] = 9.3; 109 creds[27] = 5.8; 110 creds[28] = 9.0; 111 creds[29] = 6.5; 112 creds[30] = 6.1; 113 creds[31] = 8.1; 114 creds[32] = 6.7; 115 creds[33] = 7.0; 116 creds[34] = 7.1; 117 creds[35] = 7.8; 118 creds[36] = 6.9; 119 creds[37] = 0.9; 120 creds[38] = 3.3; 121 creds[39] = 7.1; 122 creds[40] = 5.8; 123 creds[41] = 4.4; 124 creds[42] = 8.1; 125 creds[43] = 6.0; 126 creds[44] = 6.3; 127 creds[45] = 6.0; 128 creds[46] = 8.0; 129 creds[47] = 0.6; 130 creds[48] = 7.2; 131 creds[49] = 5.6; 132 creds[50] = 7.3; 133 creds[51] = 8.0; 134 creds[52] = 9.1; 135 creds[53] = 1.4; 136 creds[54] = 6.9; 137 creds[55] = 9.1; 138 creds[56] = 6.4; 139 creds[57] = 6.1; 140 creds[58] = 6.2; 141 creds[59] = 7.7; 142 creds[60] = 5.1; 143 creds[61] = 7.9; 144 creds[62] = 6.9; 145 creds[63] = 3.3; 146 creds[64] = 3.7; 147 creds[65] = 5.8; 148 creds[66] = 8.0; 149 creds[67] = 7.3; 150 creds[68] = 7.3; 151 creds[69] = 9.1; 152 creds[70] = 4.0; 153 creds[71] = 8.2; 154 creds[72] = 8.7; 155 creds[73] = 9.1; 156 creds[74] = 8.2; 157 creds[75] = 9.0; 158 creds[76] = 7.8; 159 creds[77] = 7.5; 160 creds[78] = 1.3; 161 creds[79] = 6.9; 162 creds[80] = 8.7; 163 creds[81] = 7.6; 164 creds[82] = 5.6; 165 creds[83] = 10.4; 166 creds[84] = 6.1; 167 creds[85] = 0.9; 168 creds[86] = 7.7; 169 creds[87] = 7.4; 170 creds[88] = 6.9; 171 creds[89] = 7.0; 172 creds[90] = 3.3; 173 creds[91] = 7.1; 174 creds[92] = 5.8; 175 creds[93] = 7.2; 176 creds[94] = 5.4; 177 creds[95] = 7.4; 178 creds[96] = 6.6; 179 creds[97] = 0.0; 180 creds[98] = 6.9; 181 creds[99] = 7.3; 181 182 creds[100] = 8.7; 182 183 creds[101] = 6.5; … … 665 666 Double_t cblues[577]; 666 667 667 cblues[1] = 12.0; 668 cblues[2] = 12.2; 669 cblues[3] = 12.6; 670 cblues[4] = 12.7; 671 cblues[5] = 12.8; 672 cblues[6] = -1.; 673 cblues[7] = 10.8; 674 cblues[8] = 9.0; 675 cblues[9] = 12.2; 676 cblues[10] = 12.3; 677 cblues[11] = 11.7; 678 cblues[12] = 12.0; 679 cblues[13] = 12.1; 680 cblues[14] = 12.0; 681 cblues[15] = 12.6; 682 cblues[16] = 12.2; 683 cblues[17] = 12.6; 684 cblues[18] = 12.6; 685 cblues[19] = 11.5; 686 cblues[20] = 11.1; 687 cblues[21] = 11.2; 688 cblues[22] = 12.1; 689 cblues[23] = 12.8; 690 cblues[24] = 12.7; 691 cblues[25] = 12.8; 692 cblues[26] = 13.0; 693 cblues[27] = 13.0; 694 cblues[28] = 12.0; 695 cblues[29] = 12.4; 696 cblues[30] = 12.0; 697 cblues[31] = 12.1; 698 cblues[32] = 12.0; 699 cblues[33] = 12.2; 700 cblues[34] = 12.0; 701 cblues[35] = 12.5; 702 cblues[36] = 12.4; 703 cblues[37] = 10.3; 704 cblues[38] = 10.8; 705 cblues[39] = 11.4; 706 cblues[40] = 11.7; 707 cblues[41] = 12.1; 708 cblues[42] = 12.0; 709 cblues[43] = 12.4; 710 cblues[44] = 13.0; 711 cblues[45] = 12.7; 712 cblues[46] = 12.8; 713 cblues[47] = 10.5; 714 cblues[48] = 12.1; 715 cblues[49] = 12.1; 716 cblues[50] = 12.4; 717 cblues[51] = 12.3; 718 cblues[52] = 12.4; 719 cblues[53] = 11.7; 720 cblues[54] = 12.8; 721 cblues[55] = 12.0; 722 cblues[56] = 12.5; 723 cblues[57] = 12.2; 724 cblues[58] = 12.3; 725 cblues[59] = 12.3; 726 cblues[60] = 12.6; 727 cblues[61] = 11.6; 728 cblues[62] = 11.9; 729 cblues[63] = 11.8; 730 cblues[64] = 10.7; 731 cblues[65] = 10.9; 732 cblues[66] = 12.1; 733 cblues[67] = 12.5; 734 cblues[68] = 12.4; 735 cblues[69] = 12.1; 736 cblues[70] = 12.2; 737 cblues[71] = 13.1; 738 cblues[72] = 12.5; 739 cblues[73] = 12.4; 740 cblues[74] = 12.6; 741 cblues[75] = 12.5; 742 cblues[76] = 12.1; 743 cblues[77] = 12.5; 744 cblues[78] = 12.3; 745 cblues[79] = 12.0; 746 cblues[80] = 12.4; 747 cblues[81] = 12.4; 748 cblues[82] = 12.0; 749 cblues[83] = 12.3; 750 cblues[84] = 12.1; 751 cblues[85] = 11.3; 752 cblues[86] = 12.0; 753 cblues[87] = 12.0; 754 cblues[88] = 12.4; 755 cblues[89] = 12.3; 756 cblues[90] = 12.0; 757 cblues[91] = 11.4; 758 cblues[92] = 11.7; 759 cblues[93] = 11.9; 760 cblues[94] = 11.4; 761 cblues[95] = 11.1; 762 cblues[96] = 11.9; 763 cblues[97] = 9.2; 764 cblues[98] = 12.4; 765 cblues[99] = 11.5; 668 cblues[0] = -1.; 669 cblues[1] = 12.0; 670 cblues[2] = 12.2; 671 cblues[3] = 12.6; 672 cblues[4] = 12.7; 673 cblues[5] = 12.8; 674 cblues[6] = -1.; 675 cblues[7] = 10.8; 676 cblues[8] = 9.0; 677 cblues[9] = 12.2; 678 cblues[10] = 12.3; 679 cblues[11] = 11.7; 680 cblues[12] = 12.0; 681 cblues[13] = 12.1; 682 cblues[14] = 12.0; 683 cblues[15] = 12.6; 684 cblues[16] = 12.2; 685 cblues[17] = 12.6; 686 cblues[18] = 12.6; 687 cblues[19] = 11.5; 688 cblues[20] = 11.1; 689 cblues[21] = 11.2; 690 cblues[22] = 12.1; 691 cblues[23] = 12.8; 692 cblues[24] = 12.7; 693 cblues[25] = 12.8; 694 cblues[26] = 13.0; 695 cblues[27] = 13.0; 696 cblues[28] = 12.0; 697 cblues[29] = 12.4; 698 cblues[30] = 12.0; 699 cblues[31] = 12.1; 700 cblues[32] = 12.0; 701 cblues[33] = 12.2; 702 cblues[34] = 12.0; 703 cblues[35] = 12.5; 704 cblues[36] = 12.4; 705 cblues[37] = 10.3; 706 cblues[38] = 10.8; 707 cblues[39] = 11.4; 708 cblues[40] = 11.7; 709 cblues[41] = 12.1; 710 cblues[42] = 12.0; 711 cblues[43] = 12.4; 712 cblues[44] = 13.0; 713 cblues[45] = 12.7; 714 cblues[46] = 12.8; 715 cblues[47] = 10.5; 716 cblues[48] = 12.1; 717 cblues[49] = 12.1; 718 cblues[50] = 12.4; 719 cblues[51] = 12.3; 720 cblues[52] = 12.4; 721 cblues[53] = 11.7; 722 cblues[54] = 12.8; 723 cblues[55] = 12.0; 724 cblues[56] = 12.5; 725 cblues[57] = 12.2; 726 cblues[58] = 12.3; 727 cblues[59] = 12.3; 728 cblues[60] = 12.6; 729 cblues[61] = 11.6; 730 cblues[62] = 11.9; 731 cblues[63] = 11.8; 732 cblues[64] = 10.7; 733 cblues[65] = 10.9; 734 cblues[66] = 12.1; 735 cblues[67] = 12.5; 736 cblues[68] = 12.4; 737 cblues[69] = 12.1; 738 cblues[70] = 12.2; 739 cblues[71] = 13.1; 740 cblues[72] = 12.5; 741 cblues[73] = 12.4; 742 cblues[74] = 12.6; 743 cblues[75] = 12.5; 744 cblues[76] = 12.1; 745 cblues[77] = 12.5; 746 cblues[78] = 12.3; 747 cblues[79] = 12.0; 748 cblues[80] = 12.4; 749 cblues[81] = 12.4; 750 cblues[82] = 12.0; 751 cblues[83] = 12.3; 752 cblues[84] = 12.1; 753 cblues[85] = 11.3; 754 cblues[86] = 12.0; 755 cblues[87] = 12.0; 756 cblues[88] = 12.4; 757 cblues[89] = 12.3; 758 cblues[90] = 12.0; 759 cblues[91] = 11.4; 760 cblues[92] = 11.7; 761 cblues[93] = 11.9; 762 cblues[94] = 11.4; 763 cblues[95] = 11.1; 764 cblues[96] = 11.9; 765 cblues[97] = 9.2; 766 cblues[98] = 12.4; 767 cblues[99] = 11.5; 766 768 cblues[100] = 12.3; 767 769 cblues[101] = 11.0;
Note:
See TracChangeset
for help on using the changeset viewer.