]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONPadStatusMaker.h
Comments for Doxygen (mostly added comments for inline functions)
[u/mrichter/AliRoot.git] / MUON / AliMUONPadStatusMaker.h
1 #ifndef ALIMUONPADSTATUSMAKER_H
2 #define ALIMUONPADSTATUSMAKER_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice                               */
6
7 // $Id$
8
9 /// \ingroup reco
10 /// \class AliMUONPadStatusMaker
11 /// \brief Make a 2DStore of pad statuses, using different sources of information
12 /// 
13 //  Author Laurent Aphecetche
14
15 #ifndef ROOT_TObject
16 #  include "TObject.h"
17 #endif
18 #ifndef ROOT_TVector2
19 #  include "TVector2.h"
20 #endif
21
22 class AliMUONCalibrationData;
23 class AliMUONV2DStore;
24 class TMap;
25
26 class AliMUONPadStatusMaker : public TObject
27 {
28 public:
29   AliMUONPadStatusMaker(const AliMUONCalibrationData& calibData);
30   virtual ~AliMUONPadStatusMaker();
31       
32   AliMUONV2DStore* MakeGainStatus(const AliMUONV2DStore& gainValues) const;
33
34   AliMUONV2DStore* MakeHVStatus(const TMap& hvMap) const;
35
36   AliMUONV2DStore* MakePedestalStatus(const AliMUONV2DStore& pedValues) const;
37
38   /// Produces a status store. Should not return 0x0.
39   AliMUONV2DStore* MakeStatus() const;
40
41   static AliMUONV2DStore* GeneratePadStatus(Int_t value);
42
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; }
47   
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; }
52   
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); }
57
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); }
62   
63 private:
64   /// Not implemented
65   AliMUONPadStatusMaker(const AliMUONPadStatusMaker&);
66   /// Not implemented
67   AliMUONPadStatusMaker& operator=(const AliMUONPadStatusMaker&);
68   
69 private:
70   
71   AliMUONV2DStore* Combine(const AliMUONV2DStore& store1,
72                            const AliMUONV2DStore& store2,
73                            Int_t binShift) const;
74   
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;
79   
80   
81   Bool_t GetSt345Status(const TMap& hvMap, Int_t detElemId, Int_t pcbIndex,
82                         Bool_t& hvChannelTooLow,
83                         Bool_t& hvChannelTooHigh,
84                         Bool_t& hvChannelON,
85                         Bool_t& hvSwitchON) const;
86   
87   void SetStatusSt12(AliMUONV2DStore& hvStatus, 
88                      Int_t detElemId, Int_t sector, Int_t status) const;
89
90   void SetStatusSt345(AliMUONV2DStore& hvStatus,
91                       Int_t detElemId, Int_t pcbIndex, Int_t status) const;
92
93   
94 private:
95   /// General status
96   enum EGeneralStatus
97   {
98     kMissing = (1<<7)
99   };
100   
101   /// Pedestal status
102   enum EPedestalStatus
103   {
104     kPedOK = 0,
105     kPedMeanZero = (1<<1),
106     kPedMeanTooLow = (1<<2),
107     kPedMeanTooHigh = (1<<3),
108     kPedSigmaTooLow = (1<<4),
109     kPedSigmaTooHigh = (1<<5),
110     
111     kPedMissing = kMissing // please always use last bit for meaning "missing"
112   };
113   
114   /// HV Error
115   enum EHVError 
116   {
117     kHVOK = 0,
118     kHVError = (1<<0),
119     kHVTooLow = (1<<1),
120     kHVTooHigh = (1<<2),
121     kHVChannelOFF = (1<<3),
122     kHVSwitchOFF = (1<<4),
123
124     kHVMissing = kMissing // please always use last bit for meaning "missing"
125   };
126   
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
130   
131   TVector2 fHVSt12Limits; //!< Low and High threshold for St12 HV
132   TVector2 fHVSt345Limits; //!< Low and High threshold for St345 HV
133   
134   ClassDef(AliMUONPadStatusMaker,0) // Creates pad statuses from ped,gain,hv
135 };
136
137 #endif