1 #ifndef ALIMUONPADSTATUSMAKER_H
2 #define ALIMUONPADSTATUSMAKER_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 /// \class AliMUONPadStatusMaker
11 /// \brief Make a 2DStore of pad statuses, using different sources of information
13 // Author Laurent Aphecetche
19 # include "TVector2.h"
22 class AliMUONCalibrationData;
23 class AliMUONV2DStore;
26 class AliMUONPadStatusMaker : public TObject
29 AliMUONPadStatusMaker(const AliMUONCalibrationData& calibData);
30 virtual ~AliMUONPadStatusMaker();
32 AliMUONV2DStore* MakeGainStatus(const AliMUONV2DStore& gainValues) const;
34 AliMUONV2DStore* MakeHVStatus(const TMap& hvMap) const;
36 AliMUONV2DStore* MakePedestalStatus(const AliMUONV2DStore& pedValues) const;
38 /// Produces a status store. Should not return 0x0.
39 AliMUONV2DStore* MakeStatus() const;
41 static AliMUONV2DStore* GeneratePadStatus(Int_t value);
43 TVector2 HVSt12Limits() const { return fHVSt12Limits; }
44 TVector2 HVSt345Limits() const { return fHVSt345Limits; }
46 TVector2 PedMeanLimits() const { return fPedMeanLimits; }
47 TVector2 PedSigmaLimits() const { return fPedSigmaLimits; }
49 void SetHVSt12Limits(float low, float high) { fHVSt12Limits.Set(low,high); }
50 void SetHVSt345Limits(float low, float high) { fHVSt345Limits.Set(low,high); }
52 void SetPedMeanLimits(float low, float high) { fPedMeanLimits.Set(low,high); }
53 void SetPedSigmaLimits(float low, float high) { fPedSigmaLimits.Set(low,high); }
56 AliMUONPadStatusMaker(const AliMUONPadStatusMaker&);
57 AliMUONPadStatusMaker& operator=(const AliMUONPadStatusMaker&);
61 AliMUONV2DStore* Combine(const AliMUONV2DStore& store1,
62 const AliMUONV2DStore& store2,
63 Int_t binShift) const;
65 Bool_t GetSt12Status(const TMap& hvMap, Int_t detElemId, Int_t sector,
66 Bool_t& hvChannelTooLow,
67 Bool_t& hvChannelTooHigh,
68 Bool_t& hvChannelON) const;
71 Bool_t GetSt345Status(const TMap& hvMap, Int_t detElemId, Int_t pcbIndex,
72 Bool_t& hvChannelTooLow,
73 Bool_t& hvChannelTooHigh,
75 Bool_t& hvSwitchON) const;
77 void SetStatusSt12(AliMUONV2DStore& hvStatus,
78 Int_t detElemId, Int_t sector, Int_t status) const;
80 void SetStatusSt345(AliMUONV2DStore& hvStatus,
81 Int_t detElemId, Int_t pcbIndex, Int_t status) const;
94 kPedMeanZero = (1<<1),
95 kPedMeanTooLow = (1<<2),
96 kPedMeanTooHigh = (1<<3),
97 kPedSigmaTooLow = (1<<4),
98 kPedSigmaTooHigh = (1<<5),
100 kPedMissing = kMissing // please always use last bit for meaning "missing"
109 kHVChannelOFF = (1<<3),
110 kHVSwitchOFF = (1<<4),
112 kHVMissing = kMissing // please always use last bit for meaning "missing"
115 const AliMUONCalibrationData& fCalibrationData; //!< helper class to get data access (not owner)
116 TVector2 fPedMeanLimits; //!< Low and High threshold for pedestal mean
117 TVector2 fPedSigmaLimits; //!< Low and High threshold for pedestal sigma
119 TVector2 fHVSt12Limits; //!< Low and High threshold for St12 HV
120 TVector2 fHVSt345Limits; //!< Low and High threshold for St345 HV
122 ClassDef(AliMUONPadStatusMaker,0) // Creates pad statuses from ped,gain,hv