]>
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$ |
5006ec94 | 5 | // $MpId: AliMpVRowSegmentSpecial.h,v 1.7 2005/09/26 16:12:11 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 | /// | |
12 | /// Authors: 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 | ||
19 | #ifdef WITH_STL | |
20 | #include <vector> | |
21 | #endif | |
22 | ||
23 | #ifdef WITH_ROOT | |
24 | #include <TArrayI.h> | |
25 | #include <TObjArray.h> | |
26 | #endif | |
27 | ||
ea4cae7a | 28 | #include <TVector2.h> |
29 | ||
ea4cae7a | 30 | #include "AliMpVRowSegment.h" |
31 | #include "AliMpVMotif.h" | |
32 | ||
33 | class AliMpRow; | |
34 | class AliMpPadRow; | |
35 | class AliMpVPadRowSegment; | |
36 | class AliMpIntPair; | |
37 | ||
38 | class AliMpVRowSegmentSpecial : public AliMpVRowSegment | |
39 | { | |
5006ec94 | 40 | public: |
41 | #ifdef WITH_STL | |
42 | typedef std::vector<AliMpPadRow*> PadRowVector; | |
43 | typedef std::vector<AliMpVMotif*> MotifVector; | |
44 | typedef std::vector<Int_t> MotifPositionIdVector; | |
45 | #endif | |
46 | #ifdef WITH_ROOT | |
47 | typedef TObjArray PadRowVector; | |
48 | typedef TObjArray MotifVector; | |
49 | typedef TArrayI MotifPositionIdVector; | |
50 | #endif | |
51 | ||
ea4cae7a | 52 | public: |
53 | AliMpVRowSegmentSpecial(AliMpRow* row, Double_t offsetX); | |
54 | AliMpVRowSegmentSpecial(); | |
55 | virtual ~AliMpVRowSegmentSpecial(); | |
56 | ||
57 | // methods | |
58 | void AddPadRow(AliMpPadRow* padRow); | |
59 | void UpdateMotifVector(); | |
60 | virtual void UpdatePadsOffset() = 0; | |
61 | virtual Double_t LeftBorderX() const = 0; | |
62 | virtual Double_t RightBorderX() const= 0; | |
63 | virtual Double_t HalfSizeY() const; | |
64 | ||
65 | // find methods | |
66 | virtual AliMpVMotif* FindMotif(const TVector2& position) const; | |
67 | virtual Int_t FindMotifPositionId(const TVector2& position) const; | |
68 | virtual Bool_t HasMotifPosition(Int_t motifPositionId) const; | |
69 | virtual TVector2 MotifCenter(Int_t motifPositionId) const; | |
70 | ||
71 | // geometry | |
72 | virtual TVector2 Position() const = 0; | |
73 | virtual TVector2 Dimensions() const; | |
74 | ||
75 | // set methods | |
76 | virtual void SetOffset(const TVector2& /*offset*/) {} | |
580c28fd | 77 | virtual void SetGlobalIndices(AliMpRow* rowBefore) = 0; |
ea4cae7a | 78 | virtual Int_t SetIndicesToMotifPosition(Int_t i, |
79 | const AliMpIntPair& indices) = 0; | |
80 | ||
81 | // get methods | |
82 | virtual AliMpRow* GetRow() const; | |
83 | virtual Int_t GetNofMotifs() const; | |
84 | virtual AliMpVMotif* GetMotif(Int_t i) const; | |
85 | virtual Int_t GetMotifPositionId(Int_t i) const; | |
86 | ||
87 | protected: | |
fb1bf5c0 | 88 | AliMpVRowSegmentSpecial(const AliMpVRowSegmentSpecial& right); |
89 | AliMpVRowSegmentSpecial& operator = (const AliMpVRowSegmentSpecial& right); | |
90 | ||
ea4cae7a | 91 | // methods |
92 | virtual TVector2 MotifCenterSlow(Int_t motifPositionId) const = 0; | |
93 | AliMpPadRow* FindPadRow(Double_t y) const; | |
94 | AliMpVPadRowSegment* FindPadRowSegment(Int_t motifPositionId) const; | |
95 | AliMpIntPair FindRelativeLowIndicesOf(Int_t motifPositionId) const; | |
96 | Int_t MaxNofPadsInRow() const; | |
97 | Bool_t HasMotif(const AliMpVMotif* motif) const; | |
98 | ||
99 | // get methods | |
100 | Int_t GetNofPadRows() const; | |
101 | AliMpPadRow* GetPadRow(Int_t i) const; | |
102 | Double_t GetOffsetX() const; | |
103 | ||
104 | private: | |
f79c58a5 | 105 | #ifdef WITH_ROOT |
106 | // static data members | |
107 | static const Int_t fgkMaxNofMotifPositionIds; // dimension of fMotifPositionIds | |
108 | #endif | |
109 | ||
ea4cae7a | 110 | // data members |
111 | AliMpRow* fRow; //the row containing this segment | |
112 | Double_t fOffsetX; //the x position of the border that touches a standard | |
113 | //row segment | |
114 | PadRowVector fPadRows; //pad rows vector | |
115 | MotifVector fMotifs; //motifs vector | |
116 | MotifPositionIdVector fMotifPositionIds; //motifs position Ids vector | |
5006ec94 | 117 | |
f79c58a5 | 118 | #ifdef WITH_ROOT |
5006ec94 | 119 | Int_t fNofMotifPositionIds; // number of motif positions Ids |
f79c58a5 | 120 | #endif |
ea4cae7a | 121 | |
122 | ClassDef(AliMpVRowSegmentSpecial,1) //Row segment | |
123 | }; | |
124 | ||
125 | // inline functions | |
126 | ||
127 | inline Double_t AliMpVRowSegmentSpecial::GetOffsetX() const | |
128 | { return fOffsetX; } | |
129 | ||
130 | #endif //ALI_MP_V_ROW_SEGMENT_SPECIAL_H |