2c780493 |
1 | #ifndef ALIMUONPADSTATUSMAPMAKER_H |
2 | #define ALIMUONPADSTATUSMAPMAKER_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 |
10 | /// \class AliMUONPadStatusMapMaker |
11 | /// \brief Convert a pad status container into a pad status *map* container |
12 | /// |
13 | /// \author Laurent Aphecetche |
14 | |
15 | #ifndef ROOT_TObject |
16 | # include "TObject.h" |
17 | #endif |
18 | |
19 | class AliMUONV2DStore; |
20 | class AliMpPad; |
21 | class TObjArray; |
22 | class AliMpVSegmentation; |
23 | class TVector2; |
24 | class TStopwatch; |
25 | |
26 | class AliMUONPadStatusMapMaker : public TObject |
27 | { |
28 | public: |
29 | AliMUONPadStatusMapMaker(); |
30 | virtual ~AliMUONPadStatusMapMaker(); |
31 | |
32 | static Int_t SelfDeadMask() { return fgkSelfDead; } |
33 | |
34 | AliMUONV2DStore* MakePadStatusMap(const AliMUONV2DStore& status, |
35 | Int_t mask); |
4f8ed2e4 |
36 | |
37 | static AliMUONV2DStore* MakeEmptyPadStatusMap(); |
38 | |
2c780493 |
39 | |
40 | private: |
41 | AliMUONPadStatusMapMaker(const AliMUONPadStatusMapMaker&); |
42 | AliMUONPadStatusMapMaker& operator=(const AliMUONPadStatusMapMaker&); |
43 | |
44 | private: |
45 | |
46 | Int_t BitNumber(const AliMpPad& centerPad, const AliMpPad& testPad) const; |
47 | |
48 | Int_t ComputeStatusMap(const TObjArray& neighbours, Int_t detElemId) const; |
49 | |
50 | Int_t GetPadStatus(Int_t detElemId, const AliMpPad& pad) const; |
51 | |
52 | Bool_t IsValid(const AliMpPad& pad, const TVector2& shift) const; |
53 | |
54 | private: |
55 | static Int_t fgkSelfDead; //!< status bit map to tell a pad is bad |
56 | const AliMUONV2DStore* fStatus; //!< status store |
57 | Int_t fMask; //!< mask to be tested |
58 | const AliMpVSegmentation* fSegmentation; //!< segmentation of current de |
59 | |
60 | enum EBitNumbers |
61 | { |
62 | kLeftBottomBit = 6, |
63 | kLeftBit = 7, |
64 | kLeftTopBit = 8, |
65 | kBottomBit = 11, |
66 | kCenterBit = 12, |
67 | kTopBit = 13, |
68 | kRightBottomBit = 16, |
69 | kRightBit = 17, |
70 | kRightTopBit = 18 |
71 | }; |
72 | |
73 | TStopwatch* fTimerComputeStatusMap; //!< to time the ComputeStatusMap() method |
74 | |
75 | ClassDef(AliMUONPadStatusMapMaker,0) // Pad status map maker |
76 | }; |
77 | |
78 | #endif |