Changeset 4776 for trunk/MagicSoft
- Timestamp:
- 08/27/04 20:00:21 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc
r4603 r4776 40 40 // - fLoGainPedRmsSquare and fLoGainPedRmsSquareVar (see CalcLoGainPedestal()) 41 41 // - fRSigmaSquare and fRSigmaSquareVar (see CalcReducedSigma() ) 42 // - fPheFFactorMethod and fPheFFactorMethodVar (see CalcFFactorMethod() ) 42 // - fPheFFactorMethod and fPheFFactorMethodVar (see CalcFFactor() ) 43 // - fMeanConvFADC2Phe and fMeanConvFADC2PheVar (see CalcConvFFactor() ) 43 44 // 44 45 // The following variables are set by MHCalibrationChargeCam: … … 746 747 // 747 748 // If fRSigmaSquare is smaller than 0 (i.e. has not yet been set), 748 // set kFFactorMethodValid to kFALSE andreturn kFALSE749 // return kFALSE 749 750 // 750 751 // Calculate the number of photo-electrons with the F-Factor method: … … 768 769 // - If fPheFFactorMethod is less than fPheFFactorMethodLimit, 769 770 // set kFFactorMethodValid to kFALSE and return kFALSE 770 // else: Set kFFactorMethodValid to kTRUE and return kTRUE 771 // 772 Bool_t MCalibrationChargePix::CalcFFactorMethod() 773 { 774 771 // 772 Bool_t MCalibrationChargePix::CalcFFactor() 773 { 775 774 776 775 if (fRSigmaSquare < 0.) … … 810 809 // 811 810 const Float_t pheRelVar = ffactorsquareRelVar + meanSquareRelVar + rsigmaSquareRelVar; 812 fPheFFactorMethodVar =pheRelVar * fPheFFactorMethod * fPheFFactorMethod;811 fPheFFactorMethodVar = pheRelVar * fPheFFactorMethod * fPheFFactorMethod; 813 812 814 813 if (IsDebug()) … … 825 824 return kFALSE; 826 825 826 } 827 828 // ------------------------------------------------------------------ 829 // 830 // If fPheFFactorMethod is smaller than 0 (i.e. has not yet been set), 831 // return kFALSE 832 // 833 // If GetCovertedMean() is smaller than 0 (i.e. has not yet been set), 834 // return kFALSE 835 // 836 // Calculate fMeanConvFADC2Phe with the following formula: 837 // 838 // fMeanConvFADC2Phe = fPheFFactorMethod / GetConvMean(); 839 // 840 // Calculate the rel. variance of fMeanConvFADC2Phe, taking into account that 841 // in the calculation of the number of phe's one mean square has already been used. 842 // Now, dividing by another mean, one mean calcels out, one cannot directly propagate 843 // the errors, but instead havs to take into account this cancellation: 844 // 845 // convrelvar = ffactorsquareRelVar + GetMeanRelVar() + rsigmaSquareRelVar; 846 // 847 // If confrelvar is smaller than 0. or greater than fConvFFactorRelVarLimit, 848 // return kFALSE 849 // 850 // Calculate the variance of fMeanConvFADC2Phe with the formula: 851 // 852 // fMeanConvFADC2PheVar = convrelvar * fMeanConvFADC2Phe * fMeanConvFADC2Phe; 853 // 854 // Set kFFactorMethodValid to kTRUE and 855 // return kTRUE 856 // 857 Bool_t MCalibrationChargePix::CalcConvFFactor() 858 { 859 860 if (fPheFFactorMethod <= 0.) 861 return kFALSE; 862 827 863 const Float_t convmean = GetConvertedMean(); 828 829 830 if (convmean > 0.) 831 fMeanConvFADC2Phe = fPheFFactorMethod / GetConvertedMean(); 832 else 833 fMeanConvFADC2Phe = -1.; 864 865 if (convmean <= 0.) 866 return kFALSE; 867 868 fMeanConvFADC2Phe = fPheFFactorMethod / convmean; 834 869 835 870 if (IsDebug()) … … 841 876 } 842 877 843 if (fMeanConvFADC2Phe < 0. ) 844 return kFALSE; 845 878 const Float_t ffactorsquareRelVar = 4.* GetFFactorRelVar(); 879 const Float_t rsigmaSquareRelVar = fRSigmaSquareVar / fRSigmaSquare / fRSigmaSquare; 846 880 // 847 881 // In the calculation of the number of phe's one mean square has already been used. -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h
r4333 r4776 110 110 void CalcLoGainPedestal ( const Float_t logainsamples, const Int_t aidx ); 111 111 Bool_t CalcReducedSigma ( ); 112 Bool_t CalcFFactorMethod (); 112 Bool_t CalcFFactor ( ); 113 Bool_t CalcConvFFactor ( ); 113 114 Bool_t CalcMeanFFactor ( const Float_t nphotons, const Float_t nphotonsrelvar ); 114 115
Note:
See TracChangeset
for help on using the changeset viewer.