]>
Commit | Line | Data |
---|---|---|
dee1d5f1 | 1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
2 | * See cxx source for full Copyright notice */ | |
3 | ||
ea4cae7a | 4 | // $Id$ |
13985652 | 5 | // $MpId: AliMpVRowSegmentSpecial.h,v 1.10 2006/05/24 13:58:21 ivana Exp $ |
dee1d5f1 | 6 | |
7 | /// \ingroup sector | |
8 | /// \class AliMpVRowSegmentSpecial | |
9 | /// \brief Abstract base class for a special row segment composed of the | |
10 | /// pad rows. | |
11 | /// | |
13985652 | 12 | /// \author David Guez, Ivana Hrivnacova; IPN Orsay |
ea4cae7a | 13 | |
14 | #ifndef ALI_MP_V_ROW_SEGMENT_SPECIAL_H | |
15 | #define ALI_MP_V_ROW_SEGMENT_SPECIAL_H | |
16 | ||
5006ec94 | 17 | #include "AliMpContainers.h" |
18 | ||
2a7ea2e6 | 19 | #include "AliMpVRowSegment.h" |
20 | #include "AliMpVMotif.h" | |
5006ec94 | 21 | |
2a7ea2e6 | 22 | #include <TVector2.h> |
5006ec94 | 23 | #ifdef WITH_ROOT |
24 | #include <TArrayI.h> | |
25 | #include <TObjArray.h> | |
26 | #endif | |
27 | ||
2a7ea2e6 | 28 | #ifdef WITH_STL |
29 | #include <vector> | |
30 | #endif | |
ea4cae7a | 31 | |
32 | class AliMpRow; | |
33 | class AliMpPadRow; | |
34 | class AliMpVPadRowSegment; | |
35 | class AliMpIntPair; | |
36 | ||
37 | class AliMpVRowSegmentSpecial : public AliMpVRowSegment | |
38 | { | |
5006ec94 | 39 | public: |
40 | #ifdef WITH_STL | |
41 | typedef std::vector<AliMpPadRow*> PadRowVector; | |
42 | typedef std::vector<AliMpVMotif*> MotifVector; | |
43 | typedef std::vector<Int_t> MotifPositionIdVector; | |
44 | #endif | |
45 | #ifdef WITH_ROOT | |
46 | typedef TObjArray PadRowVector; | |
47 | typedef TObjArray MotifVector; | |
48 | typedef TArrayI MotifPositionIdVector; | |
49 | #endif | |
50 | ||
ea4cae7a | 51 | public: |
52 | AliMpVRowSegmentSpecial(AliMpRow* row, Double_t offsetX); | |
53 | AliMpVRowSegmentSpecial(); | |
54 | virtual ~AliMpVRowSegmentSpecial(); | |
55 | ||
56 | // methods | |
57 | void AddPadRow(AliMpPadRow* padRow); | |
58 | void UpdateMotifVector(); | |
59 | virtual void UpdatePadsOffset() = 0; | |
60 | virtual Double_t LeftBorderX() const = 0; | |
61 | virtual Double_t RightBorderX() const= 0; | |
62 | virtual Double_t HalfSizeY() const; | |
63 | ||
64 | // find methods | |
65 | virtual AliMpVMotif* FindMotif(const TVector2& position) const; | |
66 | virtual Int_t FindMotifPositionId(const TVector2& position) const; | |
67 | virtual Bool_t HasMotifPosition(Int_t motifPositionId) const; | |
68 | virtual TVector2 MotifCenter(Int_t motifPositionId) const; | |
69 | ||
70 | // geometry | |
71 | virtual TVector2 Position() const = 0; | |
72 | virtual TVector2 Dimensions() const; | |
73 | ||
74 | // set methods | |
75 | virtual void SetOffset(const TVector2& /*offset*/) {} | |
580c28fd | 76 | virtual void SetGlobalIndices(AliMpRow* rowBefore) = 0; |
ea4cae7a | 77 | virtual Int_t SetIndicesToMotifPosition(Int_t i, |
78 | const AliMpIntPair& indices) = 0; | |
79 | ||
80 | // get methods | |
81 | virtual AliMpRow* GetRow() const; | |
82 | virtual Int_t GetNofMotifs() const; | |
83 | virtual AliMpVMotif* GetMotif(Int_t i) const; | |
84 | virtual Int_t GetMotifPositionId(Int_t i) const; | |
85 | ||
86 | protected: | |
87 | // methods | |
88 | virtual TVector2 MotifCenterSlow(Int_t motifPositionId) const = 0; | |
89 | AliMpPadRow* FindPadRow(Double_t y) const; | |
90 | AliMpVPadRowSegment* FindPadRowSegment(Int_t motifPositionId) const; | |
91 | AliMpIntPair FindRelativeLowIndicesOf(Int_t motifPositionId) const; | |
92 | Int_t MaxNofPadsInRow() const; | |
93 | Bool_t HasMotif(const AliMpVMotif* motif) const; | |
94 | ||
95 | // get methods | |
96 | Int_t GetNofPadRows() const; | |
97 | AliMpPadRow* GetPadRow(Int_t i) const; | |
98 | Double_t GetOffsetX() const; | |
99 | ||
100 | private: | |
13e7956b | 101 | AliMpVRowSegmentSpecial(const AliMpVRowSegmentSpecial& right); |
102 | AliMpVRowSegmentSpecial& operator = (const AliMpVRowSegmentSpecial& right); | |
103 | ||
f79c58a5 | 104 | #ifdef WITH_ROOT |
105 | // static data members | |
106 | static const Int_t fgkMaxNofMotifPositionIds; // dimension of fMotifPositionIds | |
107 | #endif | |
108 | ||
ea4cae7a | 109 | // data members |
829425a5 | 110 | AliMpRow* fRow; ///< the row containing this segment |
111 | Double_t fOffsetX; ///< \brief the x position of the border that touches a standard | |
112 | /// row segment | |
113 | PadRowVector fPadRows; ///< pad rows vector | |
114 | MotifVector fMotifs; ///< motifs vector | |
115 | MotifPositionIdVector fMotifPositionIds; ///< motifs position Ids vector | |
5006ec94 | 116 | |
f79c58a5 | 117 | #ifdef WITH_ROOT |
829425a5 | 118 | Int_t fNofMotifPositionIds; ///< number of motif positions Ids |
f79c58a5 | 119 | #endif |
ea4cae7a | 120 | |
121 | ClassDef(AliMpVRowSegmentSpecial,1) //Row segment | |
122 | }; | |
123 | ||
124 | // inline functions | |
125 | ||
126 | inline Double_t AliMpVRowSegmentSpecial::GetOffsetX() const | |
127 | { return fOffsetX; } | |
128 | ||
129 | #endif //ALI_MP_V_ROW_SEGMENT_SPECIAL_H |