Changeset 3601 for trunk/MagicSoft/Mars/mbadpixels/MBadPixelsPix.h
- Timestamp:
- 03/29/04 18:55:40 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbadpixels/MBadPixelsPix.h
r3559 r3601 27 27 28 28 // All types are initialized to normal behaviour 29 enum CalibrationType_t {30 kHiGain Saturation= BIT(1),31 kLoGain Saturation = BIT(2),29 enum UncalibratedType_t { 30 kHiGainNotCalibrated = BIT(1), 31 kLoGainNotCalibrated = BIT(2), 32 32 kHiGainNotFitted = BIT(3), 33 33 kLoGainNotFitted = BIT(4), 34 k ChargeIsPedestal= BIT(5),35 k ChargeErrNotValid= BIT(6),36 k ChargeRelErrNotValid= BIT(7),37 kCharge SigmaNotValid= BIT(8),38 kC onvHiLoNotValid = BIT(9),39 k HiGainOscillating= BIT(10),40 k LoGainOscillating= BIT(11),34 kHiGainOscillating = BIT(5), 35 kLoGainOscillating = BIT(6), 36 kLoGainSaturation = BIT(7), 37 kChargeIsPedestal = BIT(8), 38 kChargeErrNotValid = BIT(9), 39 kChargeRelErrNotValid = BIT(10), 40 kChargeSigmaNotValid = BIT(11), 41 41 kMeanTimeInFirstBin = BIT(12), 42 kMeanTimeInLastBin = BIT(13), 43 kDeviatingNumPhes = BIT(14), 44 kNotCalibrated = BIT(15) 42 kMeanTimeInLast2Bins = BIT(13), 43 kDeviatingNumPhes = BIT(14) 45 44 }; 46 45 … … 53 52 54 53 // Setter 55 void SetUnsuitable(UnsuitableType_t typ) { fInfo[0] |= typ; } 56 57 // Calibration 58 void SetHiGainSaturation () { fInfo[1] |= kHiGainSaturation; } 59 void SetLoGainSaturation () { fInfo[1] |= kLoGainSaturation; } 60 void SetNotCalibrated () { fInfo[1] |= kNotCalibrated; } 61 void SetMeanTimeInLastBin () { fInfo[1] |= kMeanTimeInLastBin; } 62 void SetMeanTimeInFirstBin () { fInfo[1] |= kMeanTimeInFirstBin; } 63 void SetLoGainOscillating () { fInfo[1] |= kLoGainOscillating; } 64 void SetHiGainOscillating () { fInfo[1] |= kHiGainOscillating; } 65 void SetConvHiLoNotValid () { fInfo[1] |= kConvHiLoNotValid; } 66 void SetChargeSigmaNotValid () { fInfo[1] |= kChargeSigmaNotValid; } 67 void SetChargeRelErrNotValid () { fInfo[1] |= kChargeRelErrNotValid; } 68 void SetChargeErrNotValid () { fInfo[1] |= kChargeErrNotValid; } 69 void SetChargeIsPedestal () { fInfo[1] |= kChargeIsPedestal; } 70 void SetLoGainNotFitted () { fInfo[1] |= kLoGainNotFitted; } 71 void SetHiGainNotFitted () { fInfo[1] |= kHiGainNotFitted; } 72 void SetDeviatingNumPhes () { fInfo[1] |= kDeviatingNumPhes; } 54 void SetUnsuitable ( UnsuitableType_t typ ) { fInfo[0] |= typ; } 55 void SetUncalibrated( UncalibratedType_t typ ) { fInfo[1] |= typ; } 73 56 74 57 // Getter 75 Bool_t IsUnsuitable(UnsuitableType_t typ) const { return fInfo[0]&typ; } 58 Bool_t IsUnsuitable ( UnsuitableType_t typ ) const { return fInfo[0]&typ; } 59 Bool_t IsUncalibrated( UncalibratedType_t typ ) const { return fInfo[1]&typ; } 76 60 77 61 Bool_t IsOK() const { return fInfo[0]==0; } 78 62 Bool_t IsBad() const { return fInfo[0]!=0; } 79 63 80 Bool_t IsHiGainSaturation () const { return fInfo[1] & kHiGainSaturation ; } 81 Bool_t IsLoGainSaturation () const { return fInfo[1] & kLoGainSaturation ; } 82 Bool_t IsNotCalibrated () const { return fInfo[1] & kNotCalibrated; } 83 Bool_t IsMeanTimeInLastBin () const { return fInfo[1] & kMeanTimeInLastBin; } 84 Bool_t IsMeanTimeInFirstBin () const { return fInfo[1] & kMeanTimeInFirstBin; } 85 Bool_t IsLoGainOscillating () const { return fInfo[1] & kLoGainOscillating; } 86 Bool_t IsHiGainOscillating () const { return fInfo[1] & kHiGainOscillating; } 87 Bool_t IsConvHiLoNotValid () const { return fInfo[1] & kConvHiLoNotValid; } 88 Bool_t IsChargeSigmaNotValid () const { return fInfo[1] & kChargeSigmaNotValid; } 89 Bool_t IsChargeRelErrNotValid () const { return fInfo[1] & kChargeRelErrNotValid; } 90 Bool_t IsChargeErrNotValid () const { return fInfo[1] & kChargeErrNotValid; } 91 Bool_t IsChargeIsPedestal () const { return fInfo[1] & kChargeIsPedestal; } 92 Bool_t IsLoGainNotFitted () const { return fInfo[1] & kLoGainNotFitted; } 93 Bool_t IsHiGainNotFitted () const { return fInfo[1] & kHiGainNotFitted; } 94 Bool_t IsDeviatingNumPhes () const { return fInfo[1] & kDeviatingNumPhes; } 64 Bool_t IsLoGainBad() const { return IsUnsuitable (kUnsuitableRun ) 65 || IsUncalibrated(kLoGainSaturation ) 66 || IsUncalibrated(kLoGainNotCalibrated) 67 || IsUncalibrated(kLoGainOscillating ) ; } 68 Bool_t IsHiGainBad() const { return IsUnsuitable (kUnsuitableRun ) 69 || IsUncalibrated(kHiGainNotCalibrated) 70 || IsUncalibrated(kHiGainOscillating ) ; } 95 71 96 97 Bool_t IsLoGainBad() const { return IsLoGainSaturation() || IsConvHiLoNotValid() || IsLoGainOscillating() ;} 98 Bool_t IsHiGainBad() const { return (IsHiGainSaturation() && IsConvHiLoNotValid()) || IsHiGainOscillating(); } 72 Bool_t IsCalibrationSignalOK() const { return !( IsUncalibrated(kChargeIsPedestal ) 73 || IsUncalibrated(kChargeErrNotValid ) 74 || IsUncalibrated(kChargeRelErrNotValid) 75 || IsUncalibrated(kChargeSigmaNotValid ) 76 || IsUncalibrated(kMeanTimeInFirstBin ) 77 || IsUncalibrated(kMeanTimeInLast2Bins ) ); } 99 78 100 Bool_t IsCalibrationSignalOK() const { return !( IsChargeIsPedestal() 101 || IsChargeErrNotValid() 102 || IsChargeRelErrNotValid() 103 || IsChargeSigmaNotValid() 104 || IsMeanTimeInFirstBin() 105 || IsMeanTimeInLastBin() ); } 106 Bool_t IsCalibrationFitOK() const { return !( (!IsHiGainSaturation() && IsHiGainNotFitted()) 107 || ( IsHiGainSaturation() && IsLoGainNotFitted()) ); } 108 Bool_t IsCalibrationOscillating() const { return ( !IsHiGainSaturation() && IsHiGainOscillating()) 109 || ( IsHiGainSaturation() && IsLoGainOscillating()) ; } 110 Bool_t IsCalibrationResultOK() const { return !IsUnsuitable(kUnsuitableRun) && 111 IsCalibrationSignalOK() 112 && !IsCalibrationOscillating() 113 && ( (!IsHiGainSaturation() && !IsHiGainBad()) 114 || (IsHiGainSaturation() && !IsLoGainBad()) ) ;} 79 Bool_t IsCalibrationResultOK() const { return !IsUnsuitable(kUnsuitableRun) 80 && IsCalibrationSignalOK() 81 && !IsHiGainBad() 82 && !IsLoGainBad() ; } 115 83 116 84 void Merge(const MBadPixelsPix &pix);
Note:
See TracChangeset
for help on using the changeset viewer.