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;
26 class AliMUONPadStatusMaker : public TObject
29 AliMUONPadStatusMaker(const AliMUONCalibrationData& calibData);
30 virtual ~AliMUONPadStatusMaker();
32 AliMUONVStore* MakeGainStatus(const AliMUONVStore& gainValues) const;
34 AliMUONVStore* MakeHVStatus(const TMap& hvMap) const;
36 AliMUONVStore* MakePedestalStatus(const AliMUONVStore& pedValues) const;
38 /// Produces a status store. Should not return 0x0.
39 AliMUONVStore* MakeStatus() const;
41 static AliMUONVStore* GeneratePadStatus(Int_t value);
43 /// Return Low and High threshold for St12 HV
44 TVector2 HVSt12Limits() const { return fHVSt12Limits; }
45 /// Return Low and High threshold for St345 HV
46 TVector2 HVSt345Limits() const { return fHVSt345Limits; }
48 /// Return Low and High threshold for pedestal mean
49 TVector2 PedMeanLimits() const { return fPedMeanLimits; }
50 /// Return Low and High threshold for pedestal sigma
51 TVector2 PedSigmaLimits() const { return fPedSigmaLimits; }
53 /// Set Low and High threshold for St12 HV
54 void SetHVSt12Limits(float low, float high) { fHVSt12Limits.Set(low,high); }
55 /// Set Low and High threshold for St345 HV
56 void SetHVSt345Limits(float low, float high) { fHVSt345Limits.Set(low,high); }
58 /// Set Low and High threshold for pedestal mean
59 void SetPedMeanLimits(float low, float high) { fPedMeanLimits.Set(low,high); }
60 /// Set Low and High threshold for pedestal sigma
61 void SetPedSigmaLimits(float low, float high) { fPedSigmaLimits.Set(low,high); }
65 AliMUONPadStatusMaker(const AliMUONPadStatusMaker&);
67 AliMUONPadStatusMaker& operator=(const AliMUONPadStatusMaker&);
71 AliMUONVStore* Combine(const AliMUONVStore& store1,
72 const AliMUONVStore& store2,
73 Int_t binShift) const;
75 Bool_t GetSt12Status(const TMap& hvMap, Int_t detElemId, Int_t sector,
76 Bool_t& hvChannelTooLow,
77 Bool_t& hvChannelTooHigh,
78 Bool_t& hvChannelON) const;
81 Bool_t GetSt345Status(const TMap& hvMap, Int_t detElemId, Int_t pcbIndex,
82 Bool_t& hvChannelTooLow,
83 Bool_t& hvChannelTooHigh,
85 Bool_t& hvSwitchON) const;
87 void SetStatusSt12(AliMUONVStore& hvStatus,
88 Int_t detElemId, Int_t sector, Int_t status) const;
90 void SetStatusSt345(AliMUONVStore& hvStatus,
91 Int_t detElemId, Int_t pcbIndex, Int_t status) const;
105 kPedMeanZero = (1<<1),
106 kPedMeanTooLow = (1<<2),
107 kPedMeanTooHigh = (1<<3),
108 kPedSigmaTooLow = (1<<4),
109 kPedSigmaTooHigh = (1<<5),
111 kPedMissing = kMissing // please always use last bit for meaning "missing"
121 kHVChannelOFF = (1<<3),
122 kHVSwitchOFF = (1<<4),
124 kHVMissing = kMissing // please always use last bit for meaning "missing"
127 const AliMUONCalibrationData& fCalibrationData; //!< helper class to get data access (not owner)
128 TVector2 fPedMeanLimits; //!< Low and High threshold for pedestal mean
129 TVector2 fPedSigmaLimits; //!< Low and High threshold for pedestal sigma
131 TVector2 fHVSt12Limits; //!< Low and High threshold for St12 HV
132 TVector2 fHVSt345Limits; //!< Low and High threshold for St345 HV
134 ClassDef(AliMUONPadStatusMaker,0) // Creates pad statuses from ped,gain,hv