3dfcfe77 |
1 | #ifndef ALIMPFASTSEGMENTATION_H |
2 | #define ALIMPFASTSEGMENTATION_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 management |
10 | /// \class AliMpFastSegmentation |
11 | /// \brief Fast version of AliMpVSegmentation |
12 | /// |
13 | // author Laurent Aphecetche |
14 | |
15 | #ifndef ROOT_TObject |
16 | # include "TObject.h" |
17 | #endif |
18 | |
19 | #ifndef ALI_MP_V_SEGMENTATION_H |
20 | # include "AliMpVSegmentation.h" |
21 | #endif |
22 | |
23 | #ifndef ROOT_TObjArray |
24 | # include "TObjArray.h" |
25 | #endif |
26 | |
27 | #ifndef ROOT_TExMap |
28 | # include "TExMap.h" |
29 | #endif |
30 | |
31 | #ifndef ROOT_TVector2 |
32 | # include "TVector2.h" |
33 | #endif |
34 | |
35 | class AliMpMotifPosition; |
36 | |
37 | class AliMpFastSegmentation : public AliMpVSegmentation |
38 | { |
39 | public: |
40 | AliMpFastSegmentation(AliMpVSegmentation* seg); |
41 | virtual ~AliMpFastSegmentation(); |
42 | |
43 | virtual AliMpVPadIterator* CreateIterator(const AliMpArea& area) const; |
44 | virtual AliMpVPadIterator* CreateIterator() const; |
45 | |
46 | virtual Int_t GetNeighbours(const AliMpPad& pad, TObjArray& neighbours, |
47 | Bool_t includeSelf=kFALSE, |
48 | Bool_t includeVoid=kFALSE) const; |
49 | |
168e9c4d |
50 | virtual Bool_t HasPadByIndices(Int_t ix, Int_t iy) const; |
51 | virtual Bool_t HasPadByLocation(Int_t manuId, Int_t manuChannel) const; |
3dfcfe77 |
52 | |
168e9c4d |
53 | virtual AliMpPad PadByLocation(Int_t manuId, Int_t manuChannel, Bool_t warning = true) const; |
54 | virtual AliMpPad PadByIndices (Int_t ix, Int_t iy, Bool_t warning = true) const; |
3dfcfe77 |
55 | virtual AliMpPad PadByPosition(const TVector2& position, Bool_t warning = true) const; |
56 | |
57 | virtual Int_t MaxPadIndexX() const; |
58 | virtual Int_t MaxPadIndexY() const; |
59 | virtual Int_t NofPads() const; |
60 | |
61 | virtual void GetAllElectronicCardIDs(TArrayI& ecn) const; |
62 | |
63 | virtual Int_t GetNofElectronicCards() const; |
64 | |
65 | virtual AliMp::PlaneType PlaneType() const; |
66 | |
67 | virtual TVector2 Dimensions() const; |
68 | |
69 | virtual TVector2 Position() const; |
70 | |
71 | virtual AliMpMotifPosition* MotifPosition(Int_t manuId) const; |
72 | |
73 | virtual Bool_t HasMotifPosition(Int_t manuId) const; |
74 | |
75 | virtual void Print(Option_t* opt="") const; |
76 | |
77 | /// Return helper class |
78 | AliMpVSegmentation* GetHelper() const { return fHelper; } |
79 | |
80 | /// Return segmentation station type |
81 | AliMp::StationType StationType() const { return fHelper->StationType(); } |
82 | |
83 | private: |
84 | AliMpFastSegmentation(const AliMpFastSegmentation& rhs); |
85 | AliMpFastSegmentation& operator=(const AliMpFastSegmentation& rhs); |
86 | |
87 | virtual AliMpMotifPosition* InternalMotifPosition(Int_t index) const; |
88 | |
89 | private: |
90 | AliMpVSegmentation* fHelper; ///< helper class (owner) |
91 | TObjArray fMotifPositions; ///< array of AliMpMotifPositions (not owner) |
92 | mutable TExMap fIxIy; ///< map of (ix,iy) -> index in array above |
93 | mutable TExMap fManuId; ///< map of (manuid) -> index in array above |
94 | TVector2 fPosition; ///< to compute pad positions |
95 | |
96 | ClassDef(AliMpFastSegmentation,1) // Variant implementation for AliMpVSegmentation |
97 | }; |
98 | |
99 | #endif |