]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONPadStatusMaker.h
Compilation with Root v5-15-3
[u/mrichter/AliRoot.git] / MUON / AliMUONPadStatusMaker.h
CommitLineData
2c780493 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
22class AliMUONCalibrationData;
23class AliMUONV2DStore;
24class TMap;
25
26class AliMUONPadStatusMaker : public TObject
27{
28public:
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 AliMUONV2DStore* MakeStatus() const;
39
40 TVector2 HVSt12Limits() const { return fHVSt12Limits; }
41 TVector2 HVSt345Limits() const { return fHVSt345Limits; }
42
43 TVector2 PedMeanLimits() const { return fPedMeanLimits; }
44 TVector2 PedSigmaLimits() const { return fPedSigmaLimits; }
45
46 void SetHVSt12Limits(float low, float high) { fHVSt12Limits.Set(low,high); }
47 void SetHVSt345Limits(float low, float high) { fHVSt345Limits.Set(low,high); }
48
49 void SetPedMeanLimits(float low, float high) { fPedMeanLimits.Set(low,high); }
50 void SetPedSigmaLimits(float low, float high) { fPedSigmaLimits.Set(low,high); }
51
52private:
53 AliMUONPadStatusMaker(const AliMUONPadStatusMaker&);
54 AliMUONPadStatusMaker& operator=(const AliMUONPadStatusMaker&);
55
56private:
57
58 AliMUONV2DStore* Combine(const AliMUONV2DStore& store1,
59 const AliMUONV2DStore& store2,
60 Int_t binShift) const;
61
62 Bool_t GetSt12Status(const TMap& hvMap, Int_t detElemId, Int_t sector,
63 Bool_t& hvChannelTooLow,
64 Bool_t& hvChannelTooHigh,
65 Bool_t& hvChannelON) const;
66
67
68 Bool_t GetSt345Status(const TMap& hvMap, Int_t detElemId, Int_t pcbIndex,
69 Bool_t& hvChannelTooLow,
70 Bool_t& hvChannelTooHigh,
71 Bool_t& hvChannelON,
72 Bool_t& hvSwitchON) const;
73
74 void SetStatusSt12(AliMUONV2DStore& hvStatus,
75 Int_t detElemId, Int_t sector, Int_t status) const;
76
77 void SetStatusSt345(AliMUONV2DStore& hvStatus,
78 Int_t detElemId, Int_t pcbIndex, Int_t status) const;
79
80
81private:
82
83 enum EPedestalStatus
84 {
85 kPedOK = 0,
86 kPedMeanZero = (1<<1),
87 kPedMeanTooLow = (1<<2),
88 kPedMeanTooHigh = (1<<3),
89 kPedSigmaTooLow = (1<<4),
90 kPedSigmaTooHigh = (1<<5)
91 };
92
93 enum EHVError
94 {
95 kHVOK = 0,
96 kHVError = (1<<0),
97 kHVTooLow = (1<<1),
98 kHVTooHigh = (1<<2),
99 kHVChannelOFF = (1<<3),
100 kHVSwitchOFF = (1<<4)
101
102 };
103
104 const AliMUONCalibrationData& fCalibrationData; //!< helper class to get data access (not owner)
105 TVector2 fPedMeanLimits; //!< Low and High threshold for pedestal mean
106 TVector2 fPedSigmaLimits; //!< Low and High threshold for pedestal sigma
107
108 TVector2 fHVSt12Limits; //!< Low and High threshold for St12 HV
109 TVector2 fHVSt345Limits; //!< Low and High threshold for St345 HV
110
111 ClassDef(AliMUONPadStatusMaker,0) // Creates pad statuses from ped,gain,hv
112};
113
114#endif