Changeset 4334 for trunk/MagicSoft
- Timestamp:
- 06/23/04 00:34:54 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r4322 r4334 482 482 fNumHiGainSamples = fCam->GetNumHiGainFADCSlices(); 483 483 fNumLoGainSamples = fCam->GetNumLoGainFADCSlices(); 484 484 485 fSqrtHiGainSamples = TMath::Sqrt(fNumHiGainSamples); 485 486 fSqrtLoGainSamples = TMath::Sqrt(fNumLoGainSamples); … … 504 505 } 505 506 507 if (IsDebug()) 508 pix.SetDebug(); 506 509 } 507 510 … … 743 746 const Float_t num = TMath::Sqrt((Float_t)fPedestals->GetTotalEntries()); 744 747 748 745 749 // 746 750 // set them in the calibration camera … … 815 819 return kFALSE; 816 820 } 817 821 818 822 if (!cal.CalcFFactorMethod()) 819 823 { -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h
r4242 r4334 81 81 82 82 // enums 83 enum { kHiLoGainCalibration };83 enum { kHiLoGainCalibration, kDebug }; 84 84 85 85 // functions … … 108 108 109 109 void Clear(const Option_t *o=""); 110 111 Bool_t IsDebug() const { return TESTBIT(fFlags,kDebug); } 110 112 111 113 void SetChargeLimit ( const Float_t f=fgChargeLimit ) { fChargeLimit = f; } … … 122 124 void SkipHiLoGainCalibration ( const Bool_t b=kTRUE ) 123 125 { b ? CLRBIT(fFlags, kHiLoGainCalibration) : SETBIT(fFlags, kHiLoGainCalibration); } 126 void SetDebug ( const Bool_t b=kTRUE ) 127 { b ? CLRBIT(fFlags, kDebug ) : SETBIT(fFlags, kDebug ); } 124 128 125 129 ClassDef(MCalibrationChargeCalc, 1) // Task calculating Calibration Containers and Quantum Efficiencies -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc
r4332 r4334 695 695 const Float_t pedRmsSquareVar = IsHiGainSaturation() ? fLoGainPedRmsSquareVar : 0.25*fPedVar*pedRmsSquare; 696 696 697 if (IsDebug()) 698 { 699 *fLog << dbginf << "ID: " << GetPixId() 700 << " HiGainSaturation: " << IsHiGainSaturation() 701 << " Sigma: " << sigma 702 << " Var.Sigma: " << sigmavar 703 << " PedRmsSquare: " << pedRmsSquare 704 << " pedRmsSquareVar: " << pedRmsSquareVar 705 << endl; 706 } 707 697 708 const Float_t sigmaSquare = sigma * sigma; 698 709 const Float_t sigmaSquareVar = 4. * sigmavar * sigmaSquare; … … 703 714 fRSigmaSquare = sigmaSquare - pedRmsSquare; 704 715 716 if (IsDebug()) 717 { 718 *fLog << dbginf << "ID: " << GetPixId() 719 << " Red.Sigma Square: " << fRSigmaSquare 720 << endl; 721 } 722 705 723 if (fRSigmaSquare <= 0.) 706 724 { … … 711 729 } 712 730 731 713 732 fRSigmaSquareVar = 4. * (sigmaSquareVar + pedRmsSquareVar); 733 734 if (IsDebug()) 735 { 736 *fLog << dbginf << "ID: " << GetPixId() 737 << " Var.Red.Sigma Square: " << fRSigmaSquareVar 738 << endl; 739 } 714 740 715 741 return kTRUE; … … 746 772 { 747 773 774 748 775 if (fRSigmaSquare < 0.) 749 776 return kFALSE; … … 765 792 fPheFFactorMethod = ffactorsquare * meanSquare / fRSigmaSquare; 766 793 794 if (IsDebug()) 795 { 796 *fLog << dbginf << "ID: " << GetPixId() 797 << " F-Factor Square: " << ffactorsquare 798 << " Mean Square: " << meanSquare 799 << " Red.Sigma Square: " << fRSigmaSquare 800 << " Photo-electrons: " << fPheFFactorMethod 801 << endl; 802 } 803 767 804 if (fPheFFactorMethod < fPheFFactorMethodLimit) 768 805 return kFALSE; … … 774 811 fPheFFactorMethodVar = pheRelVar * fPheFFactorMethod * fPheFFactorMethod; 775 812 813 if (IsDebug()) 814 { 815 *fLog << dbginf << "ID: " << GetPixId() 816 << " Rel.Var.F-Factor Square: " << ffactorsquareRelVar 817 << " Rel.Var. Mean Square: " << meanSquareRelVar 818 << " Rel.Var. Red.Sigma Square: " << rsigmaSquareRelVar 819 << " Rel.Var. Photo-electrons: " << pheRelVar 820 << endl; 821 } 822 776 823 if (fPheFFactorMethodVar < 0. ) 777 824 return kFALSE; 778 779 fMeanConvFADC2Phe = fPheFFactorMethod / GetConvertedMean(); 780 825 826 const Float_t convmean = GetConvertedMean(); 827 828 829 if (convmean > 0.) 830 fMeanConvFADC2Phe = fPheFFactorMethod / GetConvertedMean(); 831 else 832 fMeanConvFADC2Phe = -1.; 833 834 if (IsDebug()) 835 { 836 *fLog << dbginf << "ID: " << GetPixId() 837 << " Converted Mean: " << convmean 838 << " Conversion FADC2Phe: " << fMeanConvFADC2Phe 839 << endl; 840 } 841 781 842 if (fMeanConvFADC2Phe < 0. ) 782 843 return kFALSE; … … 790 851 const Float_t limit = IsHiGainSaturation() ? fConvFFactorRelVarLimit * 4. : fConvFFactorRelVarLimit; 791 852 853 if (IsDebug()) 854 { 855 *fLog << dbginf << "ID: " << GetPixId() 856 << " Rel.Var.Red.Sigma: " << rsigmaSquareRelVar 857 << " Rel.Var.Mean: " << GetMeanRelVar() 858 << " Rel.Var.F-Factor: " << ffactorsquareRelVar 859 << " Rel.Var.Conversion FADC2Phe: " << convrelvar 860 << endl; 861 } 862 792 863 if (convrelvar > limit || convrelvar < 0.) 793 864 { … … 816 887 { 817 888 889 890 if (IsDebug()) 891 { 892 *fLog << dbginf << "ID: " << GetPixId() 893 << " Number photons: " << nphotons 894 << " Rel.Var.Number photons: " << nphotonsrelvar 895 << " Red.Sigma Square: " << fRSigmaSquare 896 << " Mean: " << GetMean() 897 << endl; 898 } 899 900 818 901 if (nphotons <= 0.) 819 902 { … … 830 913 fMeanFFactorFADC2Phot = TMath::Sqrt(fRSigmaSquare * nphotons) / GetMean() ; 831 914 915 if (IsDebug()) 916 { 917 *fLog << dbginf << "ID: " << GetPixId() 918 << " F-Factor FADC2Phot: " << fMeanFFactorFADC2Phot 919 << endl; 920 } 921 832 922 if (fMeanFFactorFADC2Phot < 0.) 833 923 { … … 841 931 842 932 fMeanFFactorFADC2PhotVar = ffactorrelvar * fMeanFFactorFADC2Phot * fMeanFFactorFADC2Phot; 933 934 if (IsDebug()) 935 { 936 *fLog << dbginf << "ID: " << GetPixId() 937 << " Rel.Var.Red.Sigma: " << 0.25 * fRSigmaSquareVar / ( fRSigmaSquare * fRSigmaSquare) 938 << " Rel.Var.Mean: " << GetMeanRelVar() 939 << " Rel.Var.photons: " << 0.25 * nphotonsrelvar 940 << " Rel.Var.F-Factor FADC2Phot: " << ffactorrelvar 941 << endl; 942 } 843 943 844 944 return kTRUE; … … 896 996 const Float_t elecRmsSquareVar = 4.*elecPedRmsVar * elecRmsSquare; 897 997 998 if (IsDebug()) 999 { 1000 *fLog << dbginf << "ID: " << GetPixId() 1001 << " Ped.Rms Square: " << pedRmsSquare 1002 << " Elec.Rms Square: " << elecRmsSquare 1003 << " Ped.Rms.Square Var.: " << pedRmsSquareVar 1004 << " Elec.Rms Square Var.: " << elecRmsSquareVar 1005 << endl; 1006 } 1007 1008 898 1009 Float_t higainNsbSquare = pedRmsSquare - elecRmsSquare; 899 Float_t higainNsbSquareRelVar = (pedRmsSquareVar + elecRmsSquareVar) 900 / (higainNsbSquare * higainNsbSquare) ; 901 902 if (higainNsbSquare < 0. )1010 Float_t higainNsbSquareRelVar = (pedRmsSquareVar + elecRmsSquareVar); 1011 1012 1013 if (higainNsbSquare < 0.001) 903 1014 higainNsbSquare = 0.; 1015 else 1016 higainNsbSquareRelVar /= (higainNsbSquare * higainNsbSquare) ; 1017 1018 if (IsDebug()) 1019 { 1020 *fLog << dbginf << "ID: " << GetPixId() 1021 << " HiGain NSB Square: " << higainNsbSquare 1022 << " Rel.Var.HiGain NSB Square: " << higainNsbSquareRelVar 1023 << endl; 1024 } 904 1025 905 1026 // … … 917 1038 fLoGainPedRmsSquareVar = logainNsbSquareVar + elecRmsSquareVar; 918 1039 1040 if (IsDebug()) 1041 { 1042 *fLog << dbginf << "ID: " << GetPixId() 1043 << " LoGain Ped Rms Square: " << fLoGainPedRmsSquare 1044 << " Var.Ped Rms Square: " << fLoGainPedRmsSquareVar 1045 << endl; 1046 } 1047 1048 919 1049 } 920 1050 -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r4312 r4334 155 155 : fRuns(0), fExtractor(NULL), fTimeExtractor(NULL), 156 156 fColor(MCalibrationCam::kNONE), fDisplayType(kNormalDisplay), 157 fRelTimes(kFALSE), fDataCheck(kFALSE) 157 fRelTimes(kFALSE), fDataCheck(kFALSE), fDebug(kFALSE) 158 158 { 159 159 … … 1004 1004 calcalc.SetOutputPath(fOutputPath); 1005 1005 calcalc.SetOutputFile(Form("%s-ChargeCalibStat.txt",(const char*)fRuns->GetRunsAsFileName())); 1006 if (fDebug) 1007 calcalc.SetDebug(); 1006 1008 1007 1009 MCalibrationRelTimeCalc timecalc; -
trunk/MagicSoft/Mars/mjobs/MJCalibration.h
r4197 r4334 57 57 Bool_t fRelTimes; // Flag if relative times have to be calibrated 58 58 Bool_t fDataCheck; // Flag if the data check is run on raw data 59 59 Bool_t fDebug; 60 60 61 void DisplayResult(MParList &plist); 61 62 Bool_t WriteResult(); … … 97 98 void SetDataCheck (const Bool_t b=kTRUE) { fDataCheck = b; SetDataCheckDisplay(); } 98 99 100 // Debug 101 void SetDebug (const Bool_t b=kTRUE) { fDebug = b; } 102 99 103 // Devices 100 104 void SetUseBlindPixel( const Bool_t b=kTRUE );
Note:
See TracChangeset
for help on using the changeset viewer.