X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUONPadStatusMaker.h;h=5eb2e3fa4287bf69bfd0d80aa7e42b58b61b08a0;hb=99dcb1427f60c66b9ffe35ed0ceb20f4c942a07f;hp=41cc91ecfaf9826d6d74ef391344c5424f2e673f;hpb=71a2d3aa63e94daa0244d8d6d1c7c162ae29a374;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONPadStatusMaker.h b/MUON/AliMUONPadStatusMaker.h index 41cc91ecfaf..5eb2e3fa428 100644 --- a/MUON/AliMUONPadStatusMaker.h +++ b/MUON/AliMUONPadStatusMaker.h @@ -6,7 +6,7 @@ // $Id$ -/// \ingroup reco +/// \ingroup rec /// \class AliMUONPadStatusMaker /// \brief Make a 2DStore of pad statuses, using different sources of information /// @@ -19,9 +19,11 @@ # include "TVector2.h" #endif +class TExMap; class AliMUONCalibrationData; -class AliMUONV2DStore; -class TMap; +class AliMUONVCalibParam; +class AliMUONVTrackerData; +class AliMUONVStore; class AliMUONPadStatusMaker : public TObject { @@ -29,17 +31,31 @@ public: AliMUONPadStatusMaker(const AliMUONCalibrationData& calibData); virtual ~AliMUONPadStatusMaker(); - AliMUONV2DStore* MakeGainStatus(const AliMUONV2DStore& gainValues) const; + /** Get access to internal status store (for debug only, as it may not be complete, + depending on whether you've already called PadStatus for all possible de,manu + combinations or not... + */ + AliMUONVStore* StatusStore() const { return fStatus; } - AliMUONV2DStore* MakeHVStatus(const TMap& hvMap) const; + AliMUONVCalibParam* PadStatus(Int_t detElemId, Int_t manuId) const; - AliMUONV2DStore* MakePedestalStatus(const AliMUONV2DStore& pedValues) const; - - /// Produces a status store. Should not return 0x0. - AliMUONV2DStore* MakeStatus() const; + Int_t PadStatus(Int_t detElemId, Int_t manuId, Int_t manuChannel) const; + + AliMUONVStore* NeighboursStore() const; + + AliMUONVCalibParam* Neighbours(Int_t detElemId, Int_t manuId) const; + + static TString AsString(Int_t status); - static AliMUONV2DStore* GeneratePadStatus(Int_t value); + static TString AsCondition(Int_t status); + /// Return Low and High limits for a0 parameter of gain (linear slope) + TVector2 GainA1Limits() const { return fGainA1Limits; } + /// Return Low and High limits for a1 parameter of gain (parabolic term) + TVector2 GainA2Limits() const { return fGainA2Limits; } + /// Return Low and High limits for thres parameter of gain + TVector2 GainThresLimits() const { return fGainThresLimits; } + /// Return Low and High threshold for St12 HV TVector2 HVSt12Limits() const { return fHVSt12Limits; } /// Return Low and High threshold for St345 HV @@ -50,6 +66,13 @@ public: /// Return Low and High threshold for pedestal sigma TVector2 PedSigmaLimits() const { return fPedSigmaLimits; } + /// Set Low and High limits for a0 parameter of gain (linear slope) + void GainA1Limits(float low, float high) { fGainA1Limits.Set(low,high); } + /// Set Low and High limits for a1 parameter of gain (parabolic term) + void GainA2Limits(float low, float high) { fGainA2Limits.Set(low,high); } + /// Set Low and High limits for thres parameter of gain + void GainThresLimits(float low, float high) { fGainThresLimits.Set(low,high); } + /// Set Low and High threshold for St12 HV void SetHVSt12Limits(float low, float high) { fHVSt12Limits.Set(low,high); } /// Set Low and High threshold for St345 HV @@ -60,43 +83,69 @@ public: /// Set Low and High threshold for pedestal sigma void SetPedSigmaLimits(float low, float high) { fPedSigmaLimits.Set(low,high); } + /// Set Low and High threshold for gain a0 term + void SetGainA1Limits(float low, float high) { fGainA1Limits.Set(low,high); } + /// Set Low and High threshold for gain a1 term + void SetGainA2Limits(float low, float high) { fGainA2Limits.Set(low,high); } + /// Set Low and High threshold for gain threshold term + void SetGainThresLimits(float low, float high) { fGainThresLimits.Set(low,high); } + + /// Set Low and High manu occupancy limits + void SetManuOccupancyLimits(float low, float high) { fManuOccupancyLimits.Set(low,high); } + /// Get manu occupancy limits + TVector2 ManuOccupancyLimits() const { return fManuOccupancyLimits; } + private: /// Not implemented AliMUONPadStatusMaker(const AliMUONPadStatusMaker&); /// Not implemented AliMUONPadStatusMaker& operator=(const AliMUONPadStatusMaker&); + + static void DecodeStatus(Int_t status, Int_t& pedStatus, Int_t& hvStatus, + Int_t& gainStatus, Int_t& otherStatus); + static Int_t BuildStatus(Int_t pedStatus, Int_t hvStatus, + Int_t gainStatus, Int_t otherStatus); -private: - - AliMUONV2DStore* Combine(const AliMUONV2DStore& store1, - const AliMUONV2DStore& store2, - Int_t binShift) const; - - Bool_t GetSt12Status(const TMap& hvMap, Int_t detElemId, Int_t sector, - Bool_t& hvChannelTooLow, - Bool_t& hvChannelTooHigh, - Bool_t& hvChannelON) const; - + AliMUONVCalibParam* ComputeStatus(Int_t detElemId, Int_t manuId) const; + + Bool_t HVSt12Status(Int_t detElemId, Int_t sector, + Bool_t& hvChannelTooLow, + Bool_t& hvChannelTooHigh, + Bool_t& hvChannelON) const; - Bool_t GetSt345Status(const TMap& hvMap, Int_t detElemId, Int_t pcbIndex, - Bool_t& hvChannelTooLow, - Bool_t& hvChannelTooHigh, - Bool_t& hvChannelON, - Bool_t& hvSwitchON) const; - void SetStatusSt12(AliMUONV2DStore& hvStatus, - Int_t detElemId, Int_t sector, Int_t status) const; + Bool_t HVSt345Status(Int_t detElemId, Int_t pcbIndex, + Bool_t& hvChannelTooLow, + Bool_t& hvChannelTooHigh, + Bool_t& hvChannelON, + Bool_t& hvSwitchON) const; - void SetStatusSt345(AliMUONV2DStore& hvStatus, - Int_t detElemId, Int_t pcbIndex, Int_t status) const; + Int_t HVStatus(Int_t detElemId, Int_t manuId) const; + Int_t OtherStatus(Int_t detElemId, Int_t manuId) const; + void SetHVStatus(Int_t detElemId, Int_t index, Int_t status) const; + private: /// General status enum EGeneralStatus { kMissing = (1<<7) }; + + /// Gain status + enum EGainStatus + { + kGainOK = 0, + kGainA1TooLow = (1<<1), + kGainA1TooHigh = (1<<2), + kGainA2TooLow = (1<<3), + kGainA2TooHigh = (1<<4), + kGainThresTooLow = (1<<5), + kGainThresTooHigh = (1<<6), + + kGainMissing = kMissing // please always use last bit for meaning "missing" + }; /// Pedestal status enum EPedestalStatus @@ -124,12 +173,35 @@ private: kHVMissing = kMissing // please always use last bit for meaning "missing" }; + /// Other + enum EOtherStatus + { + kManuOccupancyTooLow = (1<<1), + kManuOccupancyTooHigh = (1<<2) + }; + const AliMUONCalibrationData& fCalibrationData; //!< helper class to get data access (not owner) - TVector2 fPedMeanLimits; //!< Low and High threshold for pedestal mean - TVector2 fPedSigmaLimits; //!< Low and High threshold for pedestal sigma + TVector2 fGainA1Limits; //!< Low and High threshold for gain a0 parameter + TVector2 fGainA2Limits; //!< Low and High threshold for gain a1 parameter + TVector2 fGainThresLimits; //!< Low and High threshold for gain threshold parameter + TVector2 fHVSt12Limits; //!< Low and High threshold for St12 HV TVector2 fHVSt345Limits; //!< Low and High threshold for St345 HV + + TVector2 fPedMeanLimits; //!< Low and High threshold for pedestal mean + TVector2 fPedSigmaLimits; //!< Low and High threshold for pedestal sigma + + TVector2 fManuOccupancyLimits; //!< Low and High manu occupancy limits + + AliMUONVStore* fStatus; //!< statuses of the pads + + mutable TExMap* fHV; //!< cache of hv statuses + + AliMUONVStore* fPedestals; //!< pedestal values + AliMUONVStore* fGains; //!< gain values + + AliMUONVTrackerData* fTrackerData; //!< to get occupancies... ClassDef(AliMUONPadStatusMaker,0) // Creates pad statuses from ped,gain,hv };