Changeset 6412 for trunk/MagicSoft/Mars
- Timestamp:
- 02/12/05 17:38:06 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityChargeCam.cc
r6106 r6412 561 561 562 562 TString option(varname); 563 option.ToLower(); 563 564 564 565 TArrayF nr(size); … … 588 589 continue; 589 590 // 590 if (option.Contains(" RSigma"))591 if (option.Contains("rsigma")) 591 592 { 592 593 var [i] = pix.GetRSigma(); 593 594 varerr[i] = pix.GetRSigmaErr(); 594 595 } 595 if (option.Contains(" AbsTime"))596 if (option.Contains("abstime")) 596 597 { 597 598 var [i] = pix.GetAbsTimeMean(); 598 599 varerr[i] = pix.GetAbsTimeRms(); 599 600 } 600 if (option.Contains("ConversionHiLo")) 601 if (option.Contains("blackout")) 602 { 603 var [i] = pix.GetNumBlackout(); 604 varerr[i] = 0.; 605 } 606 if (option.Contains("pickup")) 607 { 608 var [i] = pix.GetNumPickup(); 609 varerr[i] = 0.; 610 } 611 if (option.Contains("outlier")) 612 { 613 var [i] = pix.GetNumPickup() + pix.GetNumBlackout(); 614 varerr[i] = 0.; 615 } 616 if (option.Contains("conversionhilo")) 601 617 { 602 618 var [i] = pix.GetConversionHiLo(); 603 619 varerr[i] = pix.GetConversionHiLoErr(); 604 620 } 605 if (option.Contains(" ConvertedMean"))621 if (option.Contains("convertedmean")) 606 622 { 607 623 var [i] = pix.GetConvertedMean(); 608 624 varerr[i] = pix.GetConvertedMeanErr(); 609 625 } 610 if (option.Contains(" ConvertedSigma"))626 if (option.Contains("convertedsigma")) 611 627 { 612 628 var [i] = pix.GetConvertedSigma(); 613 629 varerr[i] = pix.GetConvertedSigmaErr(); 614 630 } 615 if (option.Contains(" ConvertedRSigma"))631 if (option.Contains("convertedrsigma")) 616 632 { 617 633 var [i] = pix.GetConvertedRSigma(); 618 634 varerr[i] = pix.GetConvertedRSigmaErr(); 619 635 } 620 if (option.Contains(" MeanConvFADC2Phe"))636 if (option.Contains("meanconvfadc2phe")) 621 637 { 622 638 var [i] = pix.GetMeanConvFADC2Phe(); 623 639 varerr[i] = pix.GetMeanConvFADC2PheErr(); 624 640 } 625 if (option.Contains(" MeanFFactorFADC2Phot"))641 if (option.Contains("meanffactorfadc2phot")) 626 642 { 627 643 var [i] = pix.GetMeanFFactorFADC2Phot(); 628 644 varerr[i] = pix.GetMeanFFactorFADC2PhotErr(); 629 645 } 630 if (option.Contains(" Ped"))646 if (option.Contains("ped")) 631 647 { 632 648 var [i] = pix.GetPed(); 633 649 varerr[i] = pix.GetPedErr(); 634 650 } 635 if (option.Contains(" PedRms"))651 if (option.Contains("pedrms")) 636 652 { 637 653 var [i] = pix.GetPedRms(); 638 654 varerr[i] = pix.GetPedRmsErr(); 639 655 } 640 if (option.Contains(" PheFFactorMethod"))656 if (option.Contains("pheffactormethod")) 641 657 { 642 658 var [i] = pix.GetPheFFactorMethod(); 643 659 varerr[i] = pix.GetPheFFactorMethodErr(); 644 660 } 645 if (option.Contains(" RSigmaPerCharge"))661 if (option.Contains("rsigmapercharge")) 646 662 { 647 663 var [i] = pix.GetRSigmaPerCharge(); … … 674 690 675 691 TString option(varname); 692 option.ToLower(); 676 693 677 694 TArrayF vararea(size); … … 717 734 pvar = 0.; 718 735 736 if (option.Contains("rsigma")) 737 pvar = pix.GetRSigma(); 738 if (option.Contains("abstime")) 739 pvar = pix.GetAbsTimeMean(); 740 if (option.Contains("conversionhilo")) 741 pvar = pix.GetConversionHiLo(); 742 if (option.Contains("convertedmean")) 743 pvar = pix.GetConvertedMean(); 744 if (option.Contains("convertedsigma")) 745 pvar = pix.GetConvertedSigma(); 746 if (option.Contains("convertedrsigma")) 747 pvar = pix.GetConvertedRSigma(); 748 if (option.Contains("meanconvfadc2phe")) 749 pvar = pix.GetMeanConvFADC2Phe(); 750 if (option.Contains("meanffactorfadc2phot")) 751 pvar = pix.GetMeanFFactorFADC2Phot(); 752 if (option.Contains("ped")) 753 pvar = pix.GetPed(); 754 if (option.Contains("pedrms")) 755 pvar = pix.GetPedRms(); 756 if (option.Contains("pheffactormethod")) 757 pvar = pix.GetPheFFactorMethod(); 758 if (option.Contains("rsigmapercharge")) 759 pvar = pix.GetRSigmaPerCharge(); 760 761 variab += pvar; 762 variab2 += pvar*pvar; 763 num++; 764 765 camcharge.Fill(j,pvar); 766 camcharge.SetUsed(j); 767 } 768 769 if (num > 1) 770 { 771 variab /= num; 772 variance = (variab2 - variab*variab*num) / (num-1); 773 774 vararea[i] = variab; 775 if (variance > 0.) 776 varareaerr[i] = TMath::Sqrt(variance); 777 else 778 varareaerr[i] = 999999999.; 779 780 // 781 // Make also a Gauss-fit to the distributions. The RMS can be determined by 782 // outlier, thus we look at the sigma and the RMS and take the smaller one, afterwards. 783 // 784 h = camcharge.ProjectionS(TArrayI(),TArrayI(1,&aidx),"_py",750); 785 h->SetDirectory(NULL); 786 h->Fit("gaus","QL"); 787 TF1 *fit = h->GetFunction("gaus"); 788 789 Float_t ci2 = fit->GetChisquare(); 790 Float_t sigma = fit->GetParameter(2); 791 792 if (ci2 > 500. || sigma > varareaerr[i]) 793 { 794 h->Fit("gaus","QLM"); 795 fit = h->GetFunction("gaus"); 796 797 ci2 = fit->GetChisquare(); 798 sigma = fit->GetParameter(2); 799 } 800 801 const Float_t mean = fit->GetParameter(1); 802 const Float_t ndf = fit->GetNDF(); 803 804 *fLog << inf << "Camera Nr: " << i << endl; 805 *fLog << inf << option.Data() << " area idx: " << aidx << " Results: " << endl; 806 *fLog << inf << "Mean: " << Form("%4.3f",mean) 807 << "+-" << Form("%4.3f",fit->GetParError(1)) 808 << " Sigma: " << Form("%4.3f",sigma) << "+-" << Form("%4.3f",fit->GetParError(2)) 809 << " Chisquare: " << Form("%4.3f",fit->GetChisquare()) << " NDF : " << ndf << endl; 810 delete h; 811 gROOT->GetListOfFunctions()->Remove(fit); 812 813 if (sigma < varareaerr[i] && ndf > 2) 814 { 815 vararea [i] = mean; 816 varareaerr[i] = sigma; 817 } 818 } 819 else 820 { 821 vararea[i] = -1.; 822 varareaerr[i] = 0.; 823 } 824 825 nr[i] = i; 826 nrerr[i] = 0.; 827 } 828 829 TGraphErrors *gr = new TGraphErrors(size, 830 nr.GetArray(),vararea.GetArray(), 831 nrerr.GetArray(),varareaerr.GetArray()); 832 gr->SetTitle(Form("%s Area %3i Average",option.Data(),aidx)); 833 gr->GetXaxis()->SetTitle("Camera Nr."); 834 // gr->GetYaxis()->SetTitle("<Q> [1]"); 835 return gr; 836 } 837 838 839 // ------------------------------------------------------------------- 840 // 841 // Returns a TGraphErrors with the mean effective number of photon 842 // vs. the calibration camera number. With the string 'method', different 843 // calibration methods can be called. 844 // 845 TGraphErrors *MCalibrationIntensityChargeCam::GetPhotVsTime( const Option_t *method ) 846 { 847 848 const Int_t size = GetSize(); 849 850 if (size == 0) 851 return NULL; 852 853 TString option(method); 854 855 TArrayF photarr(size); 856 TArrayF photarrerr(size); 857 TArrayF nr(size); 858 TArrayF nrerr(size); 859 860 for (Int_t i=0;i<GetSize();i++) 861 { 862 // 863 // Get the calibration cam from the intensity cam 864 // 865 MCalibrationChargeCam *cam = (MCalibrationChargeCam*)GetCam(i); 866 867 // 868 // Get the calibration pix from the calibration cam 869 // 870 Float_t phot = 0.; 871 Float_t photerr = 0.; 872 873 if (option.Contains("BlindPixel")) 874 { 875 phot = cam->GetNumPhotonsBlindPixelMethod(); 876 photerr = cam->GetNumPhotonsBlindPixelMethodErr(); 877 } 878 if (option.Contains("FFactor")) 879 { 880 phot = cam->GetNumPhotonsFFactorMethod(); 881 photerr = cam->GetNumPhotonsFFactorMethodErr(); 882 } 883 if (option.Contains("PINDiode")) 884 { 885 phot = cam->GetNumPhotonsPINDiodeMethod(); 886 photerr = cam->GetNumPhotonsPINDiodeMethodErr(); 887 } 888 889 photarr[i] = phot; 890 photarrerr[i] = photerr; 891 892 nr[i] = i; 893 nrerr[i] = 0.; 894 } 895 896 TGraphErrors *gr = new TGraphErrors(size, 897 nr.GetArray(),photarr.GetArray(), 898 nrerr.GetArray(),photarrerr.GetArray()); 899 gr->SetTitle("Photons Average"); 900 gr->GetXaxis()->SetTitle("Camera Nr."); 901 gr->GetYaxis()->SetTitle("<N_phot> [1]"); 902 return gr; 903 } 904 905 // ------------------------------------------------------------------- 906 // 907 // Returns a TGraphErrors with the mean effective number of photo-electrons per 908 // area index 'aidx' vs. the calibration camera number 909 // 910 TGraphErrors *MCalibrationIntensityChargeCam::GetPhePerAreaVsTime( const Int_t aidx, const MGeomCam &geom) 911 { 912 913 const Int_t size = GetSize(); 914 915 if (size == 0) 916 return NULL; 917 918 TArrayF phearea(size); 919 TArrayF pheareaerr(size); 920 TArrayF time(size); 921 TArrayF timeerr(size); 922 923 for (Int_t i=0;i<GetSize();i++) 924 { 925 // 926 // Get the calibration cam from the intensity cam 927 // 928 MCalibrationChargeCam *cam = (MCalibrationChargeCam*)GetCam(i); 929 930 // 931 // Get the calibration pix from the calibration cam 932 // 933 const MCalibrationChargePix &apix = (MCalibrationChargePix&)cam->GetAverageArea(aidx); 934 const Float_t phe = apix.GetPheFFactorMethod(); 935 const Float_t pheerr = apix.GetPheFFactorMethodErr(); 936 937 phearea[i] = phe; 938 pheareaerr[i] = pheerr; 939 940 time[i] = i; 941 timeerr[i] = 0.; 942 } 943 944 TGraphErrors *gr = new TGraphErrors(size, 945 time.GetArray(),phearea.GetArray(), 946 timeerr.GetArray(),pheareaerr.GetArray()); 947 gr->SetTitle(Form("Phes Area %d Average",aidx)); 948 gr->GetXaxis()->SetTitle("Camera Nr."); 949 gr->GetYaxis()->SetTitle("<N_phes> [1]"); 950 return gr; 951 } 952 953 // ------------------------------------------------------------------- 954 // 955 // Returns a TGraphErrors with the event-by-event averaged charge per 956 // area index 'aidx' vs. the calibration camera number 957 // 958 TGraphErrors *MCalibrationIntensityChargeCam::GetChargePerAreaVsTime( const Int_t aidx, const MGeomCam &geom) 959 { 960 961 const Int_t size = GetSize(); 962 963 if (size == 0) 964 return NULL; 965 966 TArrayF chargearea(size); 967 TArrayF chargeareaerr(size); 968 TArrayF nr(size); 969 TArrayF nrerr(size); 970 971 for (Int_t i=0;i<GetSize();i++) 972 { 973 // 974 // Get the calibration cam from the intensity cam 975 // 976 MCalibrationChargeCam *cam = (MCalibrationChargeCam*)GetCam(i); 977 978 // 979 // Get the calibration pix from the calibration cam 980 // 981 const MCalibrationChargePix &apix = (MCalibrationChargePix&)cam->GetAverageArea(aidx); 982 const Float_t charge = apix.GetConvertedMean(); 983 const Float_t chargeerr = apix.GetConvertedSigma(); 984 985 chargearea[i] = charge; 986 chargeareaerr[i] = chargeerr; 987 988 nr[i] = i; 989 nrerr[i] = 0.; 990 } 991 992 TGraphErrors *gr = new TGraphErrors(size, 993 nr.GetArray(),chargearea.GetArray(), 994 nrerr.GetArray(),chargeareaerr.GetArray()); 995 gr->SetTitle(Form("Averaged Charges Area Idx %d",aidx)); 996 gr->GetXaxis()->SetTitle("Camera Nr."); 997 gr->GetYaxis()->SetTitle("<Q> [FADC cnts]"); 998 return gr; 999 } 1000 1001 TH1F *MCalibrationIntensityChargeCam::GetVarFluctuations( const Int_t aidx, const MGeomCam &geom, const Option_t *varname ) 1002 { 1003 1004 const Int_t size = GetSize(); 1005 1006 if (size == 0) 1007 return NULL; 1008 1009 TString option(varname); 1010 1011 TH1F *hist = new TH1F("hist",Form("%s - Rel. Fluctuations %s Pixel",option.Data(),aidx ? "Outer" : "Inner"), 1012 200,0.,100.); 1013 hist->SetXTitle("Relative Fluctuation [%]"); 1014 hist->SetYTitle("Nr. channels [1]"); 1015 hist->SetFillColor(kRed+aidx); 1016 1017 MCalibrationChargeCam *cam = (MCalibrationChargeCam*)GetCam(); 1018 1019 // 1020 // Loop over pixels 1021 // 1022 for (Int_t npix=0;npix<cam->GetSize();npix++) 1023 { 1024 if (geom[npix].GetAidx() != aidx) 1025 continue; 1026 1027 Double_t variab = 0.; 1028 Double_t variab2 = 0.; 1029 Double_t variance = 0.; 1030 Int_t num = 0; 1031 Float_t pvar = 0.; 1032 Float_t relrms = 99.9; 1033 // 1034 // Loop over the Cams for each pixel 1035 // 1036 for (Int_t i=0; i<GetSize(); i++) 1037 { 1038 MCalibrationChargeCam *cam = (MCalibrationChargeCam*)GetCam(i); 1039 // 1040 // Get the calibration pix from the calibration cam 1041 // 1042 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*cam)[npix]; 1043 // 1044 // Don't use bad pixels 1045 // 1046 if (!pix.IsFFactorMethodValid()) 1047 continue; 1048 719 1049 if (option.Contains("RSigma")) 720 1050 pvar = pix.GetRSigma(); … … 745 1075 variab2 += pvar*pvar; 746 1076 num++; 747 748 camcharge.Fill(j,pvar);749 camcharge.SetUsed(j);750 }751 752 if (num > 1)753 {754 variab /= num;755 variance = (variab2 - variab*variab*num) / (num-1);756 757 vararea[i] = variab;758 if (variance > 0.)759 varareaerr[i] = TMath::Sqrt(variance);760 else761 varareaerr[i] = 999999999.;762 763 //764 // Make also a Gauss-fit to the distributions. The RMS can be determined by765 // outlier, thus we look at the sigma and the RMS and take the smaller one, afterwards.766 //767 h = camcharge.ProjectionS(TArrayI(),TArrayI(1,&aidx),"_py",750);768 h->SetDirectory(NULL);769 h->Fit("gaus","QL");770 TF1 *fit = h->GetFunction("gaus");771 772 Float_t ci2 = fit->GetChisquare();773 Float_t sigma = fit->GetParameter(2);774 775 if (ci2 > 500. || sigma > varareaerr[i])776 {777 h->Fit("gaus","QLM");778 fit = h->GetFunction("gaus");779 780 ci2 = fit->GetChisquare();781 sigma = fit->GetParameter(2);782 }783 784 const Float_t mean = fit->GetParameter(1);785 const Float_t ndf = fit->GetNDF();786 787 *fLog << inf << "Camera Nr: " << i << endl;788 *fLog << inf << option.Data() << " area idx: " << aidx << " Results: " << endl;789 *fLog << inf << "Mean: " << Form("%4.3f",mean)790 << "+-" << Form("%4.3f",fit->GetParError(1))791 << " Sigma: " << Form("%4.3f",sigma) << "+-" << Form("%4.3f",fit->GetParError(2))792 << " Chisquare: " << Form("%4.3f",fit->GetChisquare()) << " NDF : " << ndf << endl;793 delete h;794 gROOT->GetListOfFunctions()->Remove(fit);795 796 if (sigma < varareaerr[i] && ndf > 2)797 {798 vararea [i] = mean;799 varareaerr[i] = sigma;800 }801 }802 else803 {804 vararea[i] = -1.;805 varareaerr[i] = 0.;806 }807 808 nr[i] = i;809 nrerr[i] = 0.;810 }811 812 TGraphErrors *gr = new TGraphErrors(size,813 nr.GetArray(),vararea.GetArray(),814 nrerr.GetArray(),varareaerr.GetArray());815 gr->SetTitle(Form("%s Area %3i Average",option.Data(),aidx));816 gr->GetXaxis()->SetTitle("Camera Nr.");817 // gr->GetYaxis()->SetTitle("<Q> [1]");818 return gr;819 }820 821 822 // -------------------------------------------------------------------823 //824 // Returns a TGraphErrors with the mean effective number of photon825 // vs. the calibration camera number. With the string 'method', different826 // calibration methods can be called.827 //828 TGraphErrors *MCalibrationIntensityChargeCam::GetPhotVsTime( const Option_t *method )829 {830 831 const Int_t size = GetSize();832 833 if (size == 0)834 return NULL;835 836 TString option(method);837 838 TArrayF photarr(size);839 TArrayF photarrerr(size);840 TArrayF nr(size);841 TArrayF nrerr(size);842 843 for (Int_t i=0;i<GetSize();i++)844 {845 //846 // Get the calibration cam from the intensity cam847 //848 MCalibrationChargeCam *cam = (MCalibrationChargeCam*)GetCam(i);849 850 //851 // Get the calibration pix from the calibration cam852 //853 Float_t phot = 0.;854 Float_t photerr = 0.;855 856 if (option.Contains("BlindPixel"))857 {858 phot = cam->GetNumPhotonsBlindPixelMethod();859 photerr = cam->GetNumPhotonsBlindPixelMethodErr();860 }861 if (option.Contains("FFactor"))862 {863 phot = cam->GetNumPhotonsFFactorMethod();864 photerr = cam->GetNumPhotonsFFactorMethodErr();865 }866 if (option.Contains("PINDiode"))867 {868 phot = cam->GetNumPhotonsPINDiodeMethod();869 photerr = cam->GetNumPhotonsPINDiodeMethodErr();870 }871 872 photarr[i] = phot;873 photarrerr[i] = photerr;874 875 nr[i] = i;876 nrerr[i] = 0.;877 }878 879 TGraphErrors *gr = new TGraphErrors(size,880 nr.GetArray(),photarr.GetArray(),881 nrerr.GetArray(),photarrerr.GetArray());882 gr->SetTitle("Photons Average");883 gr->GetXaxis()->SetTitle("Camera Nr.");884 gr->GetYaxis()->SetTitle("<N_phot> [1]");885 return gr;886 }887 888 // -------------------------------------------------------------------889 //890 // Returns a TGraphErrors with the mean effective number of photo-electrons per891 // area index 'aidx' vs. the calibration camera number892 //893 TGraphErrors *MCalibrationIntensityChargeCam::GetPhePerAreaVsTime( const Int_t aidx, const MGeomCam &geom)894 {895 896 const Int_t size = GetSize();897 898 if (size == 0)899 return NULL;900 901 TArrayF phearea(size);902 TArrayF pheareaerr(size);903 TArrayF time(size);904 TArrayF timeerr(size);905 906 for (Int_t i=0;i<GetSize();i++)907 {908 //909 // Get the calibration cam from the intensity cam910 //911 MCalibrationChargeCam *cam = (MCalibrationChargeCam*)GetCam(i);912 913 //914 // Get the calibration pix from the calibration cam915 //916 const MCalibrationChargePix &apix = (MCalibrationChargePix&)cam->GetAverageArea(aidx);917 const Float_t phe = apix.GetPheFFactorMethod();918 const Float_t pheerr = apix.GetPheFFactorMethodErr();919 920 phearea[i] = phe;921 pheareaerr[i] = pheerr;922 923 time[i] = i;924 timeerr[i] = 0.;925 }926 927 TGraphErrors *gr = new TGraphErrors(size,928 time.GetArray(),phearea.GetArray(),929 timeerr.GetArray(),pheareaerr.GetArray());930 gr->SetTitle(Form("Phes Area %d Average",aidx));931 gr->GetXaxis()->SetTitle("Camera Nr.");932 gr->GetYaxis()->SetTitle("<N_phes> [1]");933 return gr;934 }935 936 // -------------------------------------------------------------------937 //938 // Returns a TGraphErrors with the event-by-event averaged charge per939 // area index 'aidx' vs. the calibration camera number940 //941 TGraphErrors *MCalibrationIntensityChargeCam::GetChargePerAreaVsTime( const Int_t aidx, const MGeomCam &geom)942 {943 944 const Int_t size = GetSize();945 946 if (size == 0)947 return NULL;948 949 TArrayF chargearea(size);950 TArrayF chargeareaerr(size);951 TArrayF nr(size);952 TArrayF nrerr(size);953 954 for (Int_t i=0;i<GetSize();i++)955 {956 //957 // Get the calibration cam from the intensity cam958 //959 MCalibrationChargeCam *cam = (MCalibrationChargeCam*)GetCam(i);960 961 //962 // Get the calibration pix from the calibration cam963 //964 const MCalibrationChargePix &apix = (MCalibrationChargePix&)cam->GetAverageArea(aidx);965 const Float_t charge = apix.GetConvertedMean();966 const Float_t chargeerr = apix.GetConvertedSigma();967 968 chargearea[i] = charge;969 chargeareaerr[i] = chargeerr;970 971 nr[i] = i;972 nrerr[i] = 0.;973 }974 975 TGraphErrors *gr = new TGraphErrors(size,976 nr.GetArray(),chargearea.GetArray(),977 nrerr.GetArray(),chargeareaerr.GetArray());978 gr->SetTitle(Form("Averaged Charges Area Idx %d",aidx));979 gr->GetXaxis()->SetTitle("Camera Nr.");980 gr->GetYaxis()->SetTitle("<Q> [FADC cnts]");981 return gr;982 }983 984 TH1F *MCalibrationIntensityChargeCam::GetVarFluctuations( const Int_t aidx, const MGeomCam &geom, const Option_t *varname )985 {986 987 const Int_t size = GetSize();988 989 if (size == 0)990 return NULL;991 992 TString option(varname);993 994 TH1F *hist = new TH1F("hist",Form("%s - Rel. Fluctuations %s Pixel",option.Data(),aidx ? "Outer" : "Inner"),995 200,0.,100.);996 hist->SetXTitle("Relative Fluctuation [%]");997 hist->SetYTitle("Nr. channels [1]");998 hist->SetFillColor(kRed+aidx);999 1000 MCalibrationChargeCam *cam = (MCalibrationChargeCam*)GetCam();1001 1002 //1003 // Loop over pixels1004 //1005 for (Int_t npix=0;npix<cam->GetSize();npix++)1006 {1007 if (geom[npix].GetAidx() != aidx)1008 continue;1009 1010 Double_t variab = 0.;1011 Double_t variab2 = 0.;1012 Double_t variance = 0.;1013 Int_t num = 0;1014 Float_t pvar = 0.;1015 Float_t relrms = 99.9;1016 //1017 // Loop over the Cams for each pixel1018 //1019 for (Int_t i=0; i<GetSize(); i++)1020 {1021 MCalibrationChargeCam *cam = (MCalibrationChargeCam*)GetCam(i);1022 //1023 // Get the calibration pix from the calibration cam1024 //1025 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*cam)[npix];1026 //1027 // Don't use bad pixels1028 //1029 if (!pix.IsFFactorMethodValid())1030 continue;1031 1032 if (option.Contains("RSigma"))1033 pvar = pix.GetRSigma();1034 if (option.Contains("AbsTime"))1035 pvar = pix.GetAbsTimeMean();1036 if (option.Contains("ConversionHiLo"))1037 pvar = pix.GetConversionHiLo();1038 if (option.Contains("ConvertedMean"))1039 pvar = pix.GetConvertedMean();1040 if (option.Contains("ConvertedSigma"))1041 pvar = pix.GetConvertedSigma();1042 if (option.Contains("ConvertedRSigma"))1043 pvar = pix.GetConvertedRSigma();1044 if (option.Contains("MeanConvFADC2Phe"))1045 pvar = pix.GetMeanConvFADC2Phe();1046 if (option.Contains("MeanFFactorFADC2Phot"))1047 pvar = pix.GetMeanFFactorFADC2Phot();1048 if (option.Contains("Ped"))1049 pvar = pix.GetPed();1050 if (option.Contains("PedRms"))1051 pvar = pix.GetPedRms();1052 if (option.Contains("PheFFactorMethod"))1053 pvar = pix.GetPheFFactorMethod();1054 if (option.Contains("RSigmaPerCharge"))1055 pvar = pix.GetRSigmaPerCharge();1056 1057 variab += pvar;1058 variab2 += pvar*pvar;1059 num++;1060 1077 } 1061 1078
Note:
See TracChangeset
for help on using the changeset viewer.