X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;ds=sidebyside;f=MUON%2FAliMUONDigitCalibrator.h;h=d55b09902dbd0be120c91eeb83dc00340042e22f;hb=37285e2925d8ccbe8b4c3fb37a7f2584caad44c4;hp=81c9f232f2321f8d522bf6e59ec455d8b7984176;hpb=42825ed9b1f28be3083c5f41f662add6dc831720;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONDigitCalibrator.h b/MUON/AliMUONDigitCalibrator.h index 81c9f232f23..d55b09902db 100644 --- a/MUON/AliMUONDigitCalibrator.h +++ b/MUON/AliMUONDigitCalibrator.h @@ -21,31 +21,70 @@ class AliMUONLogger; class AliMUONVStore; class AliMUONVDigitStore; class AliMUONVDigit; +class AliMUONPadStatusMaker; +class AliMUONPadStatusMapMaker; +class AliMUONRecoParam; +class TExMap; class AliMUONDigitCalibrator : public TObject { public: - AliMUONDigitCalibrator(const AliMUONCalibrationData& calib, - Bool_t createAndUseStatusMap=kTRUE); + + AliMUONDigitCalibrator(Int_t runNumber, const char* calibMode="NOGAIN"); + + AliMUONDigitCalibrator(const AliMUONCalibrationData& calib, + const AliMUONRecoParam* recoParams, + const char* calibMode="NOGAIN"); + + AliMUONDigitCalibrator(const AliMUONCalibrationData& calib, + const char* calibMode="NOGAIN"); virtual ~AliMUONDigitCalibrator(); virtual void Calibrate(AliMUONVDigitStore& digitStore); - -private: - /// Not implemented - AliMUONDigitCalibrator(const AliMUONDigitCalibrator& other); - /// Not implemented - AliMUONDigitCalibrator& operator=(const AliMUONDigitCalibrator& other); - virtual void CalibrateDigit(AliMUONVDigit& digit); + Bool_t IsValidDigit(Int_t detElemId, Int_t manuId, Int_t manuChannel, + Int_t* statusMap=0x0) const; + + Float_t CalibrateDigit(Int_t detElemId, Int_t manuId, Int_t manuChannel, + Float_t adc, Float_t nsigmas=-1, + Bool_t* isSaturated=0x0) const; + + Int_t PadStatus(Int_t detElemId, Int_t manuId, Int_t manuChannel) const; + + Int_t StatusMap(Int_t detElemId, Int_t manuId, Int_t manuChannel) const; +private: + + /// Not implemented + AliMUONDigitCalibrator(const AliMUONDigitCalibrator& other); + /// Not implemented + AliMUONDigitCalibrator& operator=(const AliMUONDigitCalibrator& other); + + void Ctor(const char* calibMode, + const AliMUONCalibrationData& calib, + const AliMUONRecoParam* recoParams, + Bool_t deferredInitialization=kTRUE); + private: - const AliMUONCalibrationData& fCalibrationData; //!< Calibration data - AliMUONVStore* fStatusMap; //!< Channel status map - AliMUONLogger* fLogger; //!< to log repeated messages - - ClassDef(AliMUONDigitCalibrator,3) // Calibrate raw digit + AliMUONLogger* fLogger; //!< to log repeated messages + AliMUONPadStatusMaker* fStatusMaker; //!< to build pad statuses + AliMUONPadStatusMapMaker* fStatusMapMaker; //!< to build status map + AliMUONVStore* fPedestals; //!< pedestal values + AliMUONVStore* fGains; //!< gain values + Int_t fApplyGains; //!< whether we should apply gains or not, capa or not... + AliMUONVStore* fCapacitances; //!< capa values + Double_t fNumberOfBadPads; //!< # of times we've rejected a bad pad + Double_t fNumberOfPads; //!< # of pads we've seen + Double_t fChargeSigmaCut; //!< number of sigmas to cut on + UInt_t fMask; //!< mask used to cut bad channels + + static const Int_t fgkNoGain; //!< do not apply gain calib at all + static const Int_t fgkGainConstantCapa; //!< apply gain (from OCDB) with constant capa + static const Int_t fgkGain; //!< apply gain and capa (from OCDB) + static const Int_t fgkInjectionGain; //!< apply injection gain (from OCDB) + + ClassDef(AliMUONDigitCalibrator,10) // Calibrate raw digit }; #endif