]>
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 | ||
2a7ea2e6 | 17 | #include "AliMpVRowSegment.h" |
18 | #include "AliMpVMotif.h" | |
5006ec94 | 19 | |
2a7ea2e6 | 20 | #include <TVector2.h> |
5006ec94 | 21 | #include <TArrayI.h> |
22 | #include <TObjArray.h> | |
ea4cae7a | 23 | |
24 | class AliMpRow; | |
25 | class AliMpPadRow; | |
26 | class AliMpVPadRowSegment; | |
27 | class AliMpIntPair; | |
28 | ||
29 | class AliMpVRowSegmentSpecial : public AliMpVRowSegment | |
30 | { | |
31 | public: | |
32 | AliMpVRowSegmentSpecial(AliMpRow* row, Double_t offsetX); | |
33 | AliMpVRowSegmentSpecial(); | |
34 | virtual ~AliMpVRowSegmentSpecial(); | |
35 | ||
f5671fc3 | 36 | // |
ea4cae7a | 37 | // methods |
f5671fc3 | 38 | // |
ea4cae7a | 39 | void AddPadRow(AliMpPadRow* padRow); |
40 | void UpdateMotifVector(); | |
f5671fc3 | 41 | /// Update pads offset |
ea4cae7a | 42 | virtual void UpdatePadsOffset() = 0; |
f5671fc3 | 43 | /// Return the x coordinate of the left border in the global coordinate system. |
ea4cae7a | 44 | virtual Double_t LeftBorderX() const = 0; |
f5671fc3 | 45 | /// Return the x coordinate of the right border in the global coordinate system. |
ea4cae7a | 46 | virtual Double_t RightBorderX() const= 0; |
f5671fc3 | 47 | /// Return the half size in y of this row segment. |
ea4cae7a | 48 | virtual Double_t HalfSizeY() const; |
49 | ||
f5671fc3 | 50 | // |
ea4cae7a | 51 | // find methods |
f5671fc3 | 52 | // |
ea4cae7a | 53 | virtual AliMpVMotif* FindMotif(const TVector2& position) const; |
54 | virtual Int_t FindMotifPositionId(const TVector2& position) const; | |
55 | virtual Bool_t HasMotifPosition(Int_t motifPositionId) const; | |
56 | virtual TVector2 MotifCenter(Int_t motifPositionId) const; | |
57 | ||
f5671fc3 | 58 | // |
ea4cae7a | 59 | // geometry |
f5671fc3 | 60 | // |
61 | /// Return the position of the row segment centre. | |
ea4cae7a | 62 | virtual TVector2 Position() const = 0; |
63 | virtual TVector2 Dimensions() const; | |
64 | ||
f5671fc3 | 65 | // |
ea4cae7a | 66 | // set methods |
f5671fc3 | 67 | // |
68 | /// Calculate offset | |
ea4cae7a | 69 | virtual void SetOffset(const TVector2& /*offset*/) {} |
f5671fc3 | 70 | /// Set global indices limits. |
580c28fd | 71 | virtual void SetGlobalIndices(AliMpRow* rowBefore) = 0; |
f5671fc3 | 72 | /// Set global indices to i-th motif position and returns next index in x. |
ea4cae7a | 73 | virtual Int_t SetIndicesToMotifPosition(Int_t i, |
74 | const AliMpIntPair& indices) = 0; | |
75 | ||
f5671fc3 | 76 | // |
ea4cae7a | 77 | // get methods |
f5671fc3 | 78 | // |
ea4cae7a | 79 | virtual AliMpRow* GetRow() const; |
80 | virtual Int_t GetNofMotifs() const; | |
81 | virtual AliMpVMotif* GetMotif(Int_t i) const; | |
82 | virtual Int_t GetMotifPositionId(Int_t i) const; | |
83 | ||
84 | protected: | |
85 | // methods | |
f5671fc3 | 86 | /// Return the coordinates of the motif specified with the given motif position Id \n |
ea4cae7a | 87 | virtual TVector2 MotifCenterSlow(Int_t motifPositionId) const = 0; |
88 | AliMpPadRow* FindPadRow(Double_t y) const; | |
89 | AliMpVPadRowSegment* FindPadRowSegment(Int_t motifPositionId) const; | |
90 | AliMpIntPair FindRelativeLowIndicesOf(Int_t motifPositionId) const; | |
91 | Int_t MaxNofPadsInRow() const; | |
92 | Bool_t HasMotif(const AliMpVMotif* motif) const; | |
93 | ||
94 | // get methods | |
95 | Int_t GetNofPadRows() const; | |
96 | AliMpPadRow* GetPadRow(Int_t i) const; | |
97 | Double_t GetOffsetX() const; | |
98 | ||
99 | private: | |
f5671fc3 | 100 | /// Not implemented |
13e7956b | 101 | AliMpVRowSegmentSpecial(const AliMpVRowSegmentSpecial& right); |
f5671fc3 | 102 | /// Not implemented |
13e7956b | 103 | AliMpVRowSegmentSpecial& operator = (const AliMpVRowSegmentSpecial& right); |
104 | ||
f79c58a5 | 105 | // static data members |
f5671fc3 | 106 | static const Int_t fgkMaxNofMotifPositionIds; ///< dimension of fMotifPositionIds |
f79c58a5 | 107 | |
ea4cae7a | 108 | // data members |
2294822d | 109 | AliMpRow* fRow; ///< the row containing this segment |
110 | Double_t fOffsetX; ///< \brief the x position of the border that touches a standard | |
111 | /// row segment | |
112 | TObjArray fPadRows; ///< pad rows vector | |
113 | TObjArray fMotifs; ///< motifs vector | |
114 | TArrayI fMotifPositionIds; ///< motifs position Ids vector | |
115 | Int_t fNofMotifPositionIds; ///< number of motif positions Ids | |
ea4cae7a | 116 | |
117 | ClassDef(AliMpVRowSegmentSpecial,1) //Row segment | |
118 | }; | |
119 | ||
120 | // inline functions | |
121 | ||
f5671fc3 | 122 | /// Return the x position of the border that touches a standard row segment |
ea4cae7a | 123 | inline Double_t AliMpVRowSegmentSpecial::GetOffsetX() const |
124 | { return fOffsetX; } | |
125 | ||
126 | #endif //ALI_MP_V_ROW_SEGMENT_SPECIAL_H |