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); |
36 | |
37 | private: |
38 | AliMUONPadStatusMapMaker(const AliMUONPadStatusMapMaker&); |
39 | AliMUONPadStatusMapMaker& operator=(const AliMUONPadStatusMapMaker&); |
40 | |
41 | private: |
42 | |
43 | Int_t BitNumber(const AliMpPad& centerPad, const AliMpPad& testPad) const; |
44 | |
45 | Int_t ComputeStatusMap(const TObjArray& neighbours, Int_t detElemId) const; |
46 | |
47 | Int_t GetPadStatus(Int_t detElemId, const AliMpPad& pad) const; |
48 | |
49 | Bool_t IsValid(const AliMpPad& pad, const TVector2& shift) const; |
50 | |
51 | private: |
52 | static Int_t fgkSelfDead; //!< status bit map to tell a pad is bad |
53 | const AliMUONV2DStore* fStatus; //!< status store |
54 | Int_t fMask; //!< mask to be tested |
55 | const AliMpVSegmentation* fSegmentation; //!< segmentation of current de |
56 | |
57 | enum EBitNumbers |
58 | { |
59 | kLeftBottomBit = 6, |
60 | kLeftBit = 7, |
61 | kLeftTopBit = 8, |
62 | kBottomBit = 11, |
63 | kCenterBit = 12, |
64 | kTopBit = 13, |
65 | kRightBottomBit = 16, |
66 | kRightBit = 17, |
67 | kRightTopBit = 18 |
68 | }; |
69 | |
70 | TStopwatch* fTimerComputeStatusMap; //!< to time the ComputeStatusMap() method |
71 | |
72 | ClassDef(AliMUONPadStatusMapMaker,0) // Pad status map maker |
73 | }; |
74 | |
75 | #endif |