Changeset 3434 for trunk/MagicSoft/Mars/mbadpixels
- Timestamp:
- 03/07/04 20:09:31 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mbadpixels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbadpixels/MBadPixelsPix.cc
r3433 r3434 38 38 39 39 const Char_t MBadPixelsPix::fgRunMask=MBadPixelsPix::kUnsuitableRun; 40 41 40 // ------------------------------------------------------------------------ 42 41 // … … 48 47 fName = name ? name : "MBadPixelsPix"; 49 48 fTitle = title ? title : "Container storeing bad pixel information for a single pixel"; 49 50 fInfo[1] = 0; 50 51 } 51 52 … … 59 60 { 60 61 fInfo[0] &= fgRunMask; 62 61 63 } 62 64 -
trunk/MagicSoft/Mars/mbadpixels/MBadPixelsPix.h
r3433 r3434 23 23 }; 24 24 25 // All types are initialized to normal behaviour 25 26 enum CalibrationType_t { 26 kHiGainSaturation = BIT(1),27 kLoGainSaturation = BIT(2),28 kHiGain Fitted = BIT(3),29 kLoGain Fitted = BIT(4),30 kC alcChargePedestal= BIT(5),31 kC alcChargeErrValid= BIT(6),32 kC alcChargeRelErrValid= BIT(7),33 kC alcChargeSigmaValid= BIT(8),34 kConv ersionHiLoValid= BIT(9),35 kHiGainOscillating = BIT(10),36 kLoGainOscillating = BIT(11),37 kMeanTimeInFirstBin = BIT(12),38 kMeanTimeInLastBin = BIT(13),39 kBlindPixelMethod Valid = BIT(14),40 kFFactorMethod Valid = BIT(15),41 kPINDiodeMethod Valid = BIT(16),42 kCombinedMethod Valid = BIT(17)27 kHiGainSaturation = BIT(1), 28 kLoGainSaturation = BIT(2), 29 kHiGainNotFitted = BIT(3), 30 kLoGainNotFitted = BIT(4), 31 kChargeIsPedestal = BIT(5), 32 kChargeErrNotValid = BIT(6), 33 kChargeRelErrNotValid = BIT(7), 34 kChargeSigmaNotValid = BIT(8), 35 kConvHiLoNotValid = BIT(9), 36 kHiGainOscillating = BIT(10), 37 kLoGainOscillating = BIT(11), 38 kMeanTimeInFirstBin = BIT(12), 39 kMeanTimeInLastBin = BIT(13), 40 kBlindPixelMethodNotValid = BIT(14), 41 kFFactorMethodNotValid = BIT(15), 42 kPINDiodeMethodNotValid = BIT(16), 43 kCombinedMethodNotValid = BIT(17) 43 44 }; 44 45 … … 61 62 62 63 // Calibration 63 void SetHiGainSaturation ( CalibrationType_t typ=kHiGainSaturation ) { fInfo[1] |= typ; } 64 void SetNoHiGainSaturation( CalibrationType_t typ=kHiGainSaturation ) { fInfo[1] &= ~typ; } 65 66 void SetLoGainSaturation ( CalibrationType_t typ=kLoGainSaturation ) { fInfo[1] |= typ; } 67 void SetNoLoGainSaturation( CalibrationType_t typ=kLoGainSaturation ) { fInfo[1] &= ~typ; } 68 69 void SetCombinedMethodValid ( CalibrationType_t typ=kCombinedMethodValid ) { fInfo[1] |= typ; } 70 void SetNoCombinedMethodValid( CalibrationType_t typ=kCombinedMethodValid ) { fInfo[1] &= ~typ; } 71 72 void SetPINDiodeMethodValid ( CalibrationType_t typ=kPINDiodeMethodValid ) { fInfo[1] |= typ; } 73 void SetNoPINDiodeMethodValid( CalibrationType_t typ=kPINDiodeMethodValid ) { fInfo[1] &= ~typ; } 74 75 void SetFFactorMethodValid ( CalibrationType_t typ=kFFactorMethodValid ) { fInfo[1] |= typ; } 76 void SetNoFFactorMethodValid( CalibrationType_t typ=kFFactorMethodValid ) { fInfo[1] &= ~typ; } 77 78 void SetBlindPixelMethodValid ( CalibrationType_t typ=kBlindPixelMethodValid ) { fInfo[1] |= typ; } 79 void SetNoBlindPixelMethodValid( CalibrationType_t typ=kBlindPixelMethodValid ) { fInfo[1] &= ~typ; } 80 81 void SetMeanTimeInLastBin ( CalibrationType_t typ=kMeanTimeInLastBin ) { fInfo[1] |= typ; } 82 void SetNoMeanTimeInLastBin( CalibrationType_t typ=kMeanTimeInLastBin ) { fInfo[1] &= ~typ; } 83 84 void SetMeanTimeInFirstBin ( CalibrationType_t typ=kMeanTimeInFirstBin ) { fInfo[1] |= typ; } 85 void SetNoMeanTimeInFirstBin( CalibrationType_t typ=kMeanTimeInFirstBin ) { fInfo[1] &= ~typ; } 86 87 void SetLoGainOscillating ( CalibrationType_t typ=kLoGainOscillating ) { fInfo[1] |= typ; } 88 void SetNoLoGainOscillating( CalibrationType_t typ=kLoGainOscillating ) { fInfo[1] &= ~typ; } 89 90 void SetHiGainOscillating ( CalibrationType_t typ=kHiGainOscillating ) { fInfo[1] |= typ; } 91 void SetNoHiGainOscillating( CalibrationType_t typ=kHiGainOscillating ) { fInfo[1] &= ~typ; } 92 93 void SetConversionHiLoValid ( CalibrationType_t typ=kConversionHiLoValid ) { fInfo[1] |= typ; } 94 void SetNoConversionHiLoValid( CalibrationType_t typ=kConversionHiLoValid ) { fInfo[1] &= ~typ; } 95 96 void SetCalcChargeSigmaValid ( CalibrationType_t typ=kCalcChargeSigmaValid ) { fInfo[1] |= typ; } 97 void SetNoCalcChargeSigmaValid( CalibrationType_t typ=kCalcChargeSigmaValid ) { fInfo[1] &= ~typ; } 98 99 void SetCalcChargeRelErrValid ( CalibrationType_t typ=kCalcChargeRelErrValid ) { fInfo[1] |= typ; } 100 void SetNoCalcChargeRelErrValid( CalibrationType_t typ=kCalcChargeRelErrValid ) { fInfo[1] &= ~typ; } 101 102 void SetCalcChargeErrValid ( CalibrationType_t typ=kCalcChargeErrValid ) { fInfo[1] |= typ; } 103 void SetNoCalcChargeErrValid( CalibrationType_t typ=kCalcChargeErrValid ) { fInfo[1] &= ~typ; } 104 105 void SetCalcChargePedestal ( CalibrationType_t typ=kCalcChargePedestal ) { fInfo[1] |= typ; } 106 void SetNoCalcChargePedestal( CalibrationType_t typ=kCalcChargePedestal ) { fInfo[1] &= ~typ; } 107 108 void SetLoGainFitted ( CalibrationType_t typ=kLoGainFitted ) { fInfo[1] |= typ; } 109 void SetNoLoGainFitted( CalibrationType_t typ=kLoGainFitted ) { fInfo[1] &= ~typ; } 110 111 void SetHiGainFitted ( CalibrationType_t typ=kHiGainFitted ) { fInfo[1] |= typ; } 112 void SetNoHiGainFitted( CalibrationType_t typ=kHiGainFitted ) { fInfo[1] &= ~typ; } 64 void SetHiGainSaturation ( CalibrationType_t typ=kHiGainSaturation ) 65 { fInfo[1] |= typ; } 66 void SetLoGainSaturation ( CalibrationType_t typ=kLoGainSaturation ) 67 { fInfo[1] |= typ; } 68 void SetCombinedMethodNotValid ( CalibrationType_t typ=kCombinedMethodNotValid ) 69 { fInfo[1] |= typ; } 70 void SetPINDiodeMethodNotValid ( CalibrationType_t typ=kPINDiodeMethodNotValid ) 71 { fInfo[1] |= typ; } 72 void SetFFactorMethodNotValid ( CalibrationType_t typ=kFFactorMethodNotValid ) 73 { fInfo[1] |= typ; } 74 void SetBlindPixelMethodNotValid ( CalibrationType_t typ=kBlindPixelMethodNotValid ) 75 { fInfo[1] |= typ; } 76 void SetMeanTimeInLastBin ( CalibrationType_t typ=kMeanTimeInLastBin ) 77 { fInfo[1] |= typ; } 78 void SetMeanTimeInFirstBin ( CalibrationType_t typ=kMeanTimeInFirstBin ) 79 { fInfo[1] |= typ; } 80 void SetLoGainOscillating ( CalibrationType_t typ=kLoGainOscillating ) 81 { fInfo[1] |= typ; } 82 void SetHiGainOscillating ( CalibrationType_t typ=kHiGainOscillating ) 83 { fInfo[1] |= typ; } 84 void SetConvHiLoNotValid ( CalibrationType_t typ=kConvHiLoNotValid ) 85 { fInfo[1] |= typ; } 86 void SetChargeSigmaNotValid ( CalibrationType_t typ=kChargeSigmaNotValid ) 87 { fInfo[1] |= typ; } 88 void SetChargeRelErrNotValid ( CalibrationType_t typ=kChargeRelErrNotValid ) 89 { fInfo[1] |= typ; } 90 void SetChargeErrNotValid ( CalibrationType_t typ=kChargeErrNotValid ) 91 { fInfo[1] |= typ; } 92 void SetChargeIsPedestal ( CalibrationType_t typ=kChargeIsPedestal ) 93 { fInfo[1] |= typ; } 94 void SetLoGainNotFitted ( CalibrationType_t typ=kLoGainNotFitted ) 95 { fInfo[1] |= typ; } 96 void SetHiGainNotFitted ( CalibrationType_t typ=kHiGainNotFitted ) 97 { fInfo[1] |= typ; } 113 98 114 99 // Getter … … 122 107 Bool_t IsBad() const { return fInfo[0]!=0; } 123 108 124 Bool_t IsLoGainBad() const { return (fInfo[1]&kLoGainSaturation 125 || !(fInfo[1]&kConversionHiLoValid) 126 || fInfo[1]&kLoGainOscillating ); } 127 Bool_t IsHiGainBad() const { return ( fInfo[1]&kHiGainSaturation 128 && !(fInfo[1]&kConversionHiLoValid) ) 129 || fInfo[1]&kHiGainOscillating ; } 130 Bool_t IsCalibrationSignalOK() const { return !( fInfo[1]&kCalcChargePedestal 131 || !(fInfo[1]&kCalcChargeErrValid) 132 || !(fInfo[1]&kCalcChargeRelErrValid) 133 || !(fInfo[1]&kCalcChargeSigmaValid) 134 || fInfo[1]&kMeanTimeInFirstBin 135 || fInfo[1]&kMeanTimeInLastBin ) ; } 136 Bool_t IsCalibrationFitOK() const { return ( fInfo[1]&kHiGainSaturation && kHiGainFitted ) 137 || ( fInfo[1]&kLoGainSaturation && kLoGainFitted ) ; } 138 Bool_t IsCalibrationOscillating() const { return ( fInfo[1]&kHiGainSaturation && kHiGainOscillating ) 139 || ( fInfo[1]&kLoGainSaturation && kLoGainOscillating ) ; } 140 Bool_t IsCalibrationResultOK() const { return ( IsCalibrationSignalOK() 141 && !(IsCalibrationOscillating()) 142 && IsCalibrationFitOK() 143 && (!fInfo[1]&kHiGainSaturation && !(IsHiGainBad()) 144 || fInfo[1]&kHiGainSaturation && !(IsLoGainBad())) );} 145 Bool_t IsCalibrationFFactorMethodOK() const { return ( IsCalibrationResultOK() 146 && (fInfo[1]&kFFactorMethodValid)) ; } 147 Bool_t IsCalibrationBlindPixelMethodOK() const { return ( IsCalibrationResultOK() 148 && (fInfo[1]&kBlindPixelMethodValid)) ; } 149 Bool_t IsCalibrationPINDiodeMethodOK() const { return ( IsCalibrationResultOK() 150 && (fInfo[1]&kPINDiodeMethodValid)) ; } 151 Bool_t IsCalibrationCombinedMethodOK() const { return ( IsCalibrationResultOK() 152 && (fInfo[1]&kCombinedMethodValid)) ; } 109 Bool_t IsHiGainSaturation () const 110 { return !(fInfo[1] | ~kHiGainSaturation == ~kHiGainSaturation ); } 111 Bool_t IsLoGainSaturation () const 112 { return !(fInfo[1] | ~kLoGainSaturation == ~kLoGainSaturation ); } 113 Bool_t IsCombinedMethodNotValid () const 114 { return !(fInfo[1] | ~kCombinedMethodNotValid == ~kCombinedMethodNotValid ); } 115 Bool_t IsPINDiodeMethodNotValid () const 116 { return !(fInfo[1] | ~kPINDiodeMethodNotValid == ~kPINDiodeMethodNotValid ); } 117 Bool_t IsFFactorMethodNotValid () const 118 { return !(fInfo[1] | ~kFFactorMethodNotValid == ~kFFactorMethodNotValid ); } 119 Bool_t IsBlindPixelMethodNotValid () const 120 { return !(fInfo[1] | ~kBlindPixelMethodNotValid == ~kBlindPixelMethodNotValid ); } 121 Bool_t IsMeanTimeInLastBin () const 122 { return !(fInfo[1] | ~kMeanTimeInLastBin == ~kMeanTimeInLastBin ); } 123 Bool_t IsMeanTimeInFirstBin () const 124 { return !(fInfo[1] | ~kMeanTimeInFirstBin == ~kMeanTimeInFirstBin ); } 125 Bool_t IsLoGainOscillating () const 126 { return !(fInfo[1] | ~kLoGainOscillating == ~kLoGainOscillating ); } 127 Bool_t IsHiGainOscillating () const 128 { return !(fInfo[1] | ~kHiGainOscillating == ~kHiGainOscillating ); } 129 Bool_t IsConvHiLoNotValid () const 130 { return !(fInfo[1] | ~kConvHiLoNotValid == ~kConvHiLoNotValid ); } 131 Bool_t IsChargeSigmaNotValid () const 132 { return !(fInfo[1] | ~kChargeSigmaNotValid == ~kChargeSigmaNotValid ); } 133 Bool_t IsChargeRelErrNotValid () const 134 { return !(fInfo[1] | ~kChargeRelErrNotValid == ~kChargeRelErrNotValid ); } 135 Bool_t IsChargeErrNotValid () const 136 { return !(fInfo[1] | ~kChargeErrNotValid == ~kChargeErrNotValid ); } 137 Bool_t IsChargeIsPedestal () const 138 { return !(fInfo[1] | ~kChargeIsPedestal == ~kChargeIsPedestal ); } 139 Bool_t IsLoGainNotFitted () const 140 { return !(fInfo[1] | ~kLoGainNotFitted == ~kLoGainNotFitted ); } 141 Bool_t IsHiGainNotFitted () const 142 { return !(fInfo[1] | ~kHiGainNotFitted == ~kHiGainNotFitted ); } 143 144 Bool_t IsLoGainBad() const { return IsLoGainSaturation() 145 || IsConvHiLoNotValid() 146 || IsLoGainOscillating() ;} 147 Bool_t IsHiGainBad() const { return ( IsHiGainSaturation() && IsConvHiLoNotValid() 148 || IsHiGainOscillating() ); } 149 Bool_t IsCalibrationSignalOK() const { return !( IsChargeIsPedestal() 150 || IsChargeErrNotValid() 151 || IsChargeRelErrNotValid() 152 || IsChargeSigmaNotValid() 153 || IsMeanTimeInFirstBin() 154 || IsMeanTimeInLastBin() ); } 155 Bool_t IsCalibrationFitOK() const { return !( (IsHiGainSaturation() && IsHiGainNotFitted()) 156 || ( IsLoGainSaturation() && IsLoGainNotFitted()) ); } 157 Bool_t IsCalibrationOscillating() const { return ( IsHiGainSaturation() && IsHiGainOscillating()) 158 || ( IsLoGainSaturation() && IsLoGainOscillating()) ; } 159 Bool_t IsCalibrationResultOK() const { return IsCalibrationSignalOK() 160 && !(IsCalibrationOscillating()) 161 && IsCalibrationFitOK() 162 && ( (!IsHiGainSaturation() && !IsHiGainBad()) 163 || (IsHiGainSaturation() && !IsLoGainBad()) ) ;} 164 Bool_t IsCalibrationFFactorMethodOK() const { return IsCalibrationResultOK() 165 && !IsFFactorMethodNotValid() ; } 166 Bool_t IsCalibrationBlindPixelMethodOK() const { return IsCalibrationResultOK() 167 && !IsBlindPixelMethodNotValid(); } 168 Bool_t IsCalibrationPINDiodeMethodOK() const { return IsCalibrationResultOK() 169 && !IsPINDiodeMethodNotValid() ; } 170 Bool_t IsCalibrationCombinedMethodOK() const { return IsCalibrationResultOK() 171 && !IsCombinedMethodNotValid(); } 153 172 154 173 void Merge(const MBadPixelsPix &pix);
Note:
See TracChangeset
for help on using the changeset viewer.