]>
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 | ||
5f91c9e8 | 4 | // $Id$ |
dee1d5f1 | 5 | // $MpId: AliMpRowSegment.h,v 1.7 2005/08/26 15:43:36 ivana Exp $ |
6 | ||
7 | /// \ingroup sector | |
8 | /// \class AliMpRowSegment | |
9 | /// \brief A row segment composed of the the identic motifs. | |
10 | /// | |
11 | /// Authors: David Guez, Ivana Hrivnacova; IPN Orsay | |
5f91c9e8 | 12 | |
13 | #ifndef ALI_MP_ROW_SEGMENT_H | |
14 | #define ALI_MP_ROW_SEGMENT_H | |
15 | ||
16 | #include <TVector2.h> | |
17 | ||
18 | #include "AliMpVRowSegment.h" | |
19 | ||
20 | class AliMpRow; | |
21 | class AliMpVMotif; | |
ffb47139 | 22 | class AliMpIntPair; |
5f91c9e8 | 23 | |
24 | class AliMpRowSegment : public AliMpVRowSegment | |
25 | { | |
26 | public: | |
27 | AliMpRowSegment(AliMpRow* row, AliMpVMotif* motif, AliMpIntPair padOffset, | |
28 | Int_t nofMotifs, Int_t motifPositionId, Int_t motifPositionDId); | |
29 | AliMpRowSegment(); | |
30 | virtual ~AliMpRowSegment(); | |
31 | ||
32 | // methods | |
33 | virtual Double_t LeftBorderX() const; | |
34 | virtual Double_t RightBorderX() const; | |
35 | virtual Double_t HalfSizeY() const; | |
36 | ||
37 | // find methods | |
38 | virtual AliMpVMotif* FindMotif(const TVector2& position) const; | |
39 | virtual Int_t FindMotifPositionId(const TVector2& position) const; | |
40 | virtual Bool_t HasMotifPosition(Int_t motifPositionId) const; | |
41 | virtual TVector2 MotifCenter(Int_t motifPositionId) const; | |
42 | ||
43 | // geometry | |
44 | virtual TVector2 Position() const; | |
45 | virtual TVector2 Dimensions() const; | |
46 | ||
47 | // set methods | |
48 | virtual void SetOffset(const TVector2& offset); | |
580c28fd | 49 | virtual void SetGlobalIndices(AliMpRow* rowBefore); |
ffb47139 | 50 | virtual Int_t SetIndicesToMotifPosition(Int_t i, |
51 | const AliMpIntPair& indices); | |
5f91c9e8 | 52 | |
53 | // get methods | |
54 | virtual AliMpRow* GetRow() const; | |
55 | virtual Int_t GetNofMotifs() const; | |
ffb47139 | 56 | virtual AliMpVMotif* GetMotif(Int_t /*i*/) const; |
5f91c9e8 | 57 | virtual Int_t GetMotifPositionId(Int_t i) const; |
58 | ||
fb1bf5c0 | 59 | protected: |
60 | AliMpRowSegment(const AliMpRowSegment& right); | |
61 | AliMpRowSegment& operator = (const AliMpRowSegment& right); | |
62 | ||
5f91c9e8 | 63 | private: |
64 | // methods | |
65 | Double_t FirstMotifCenterX() const; | |
66 | Double_t LastMotifCenterX() const; | |
67 | Double_t MotifCenterX(Int_t motifPositionId) const; | |
68 | Double_t MotifCenterY(Int_t motifPositionId) const; | |
69 | Bool_t IsInside(const TVector2& position, Bool_t warn = true) const; | |
70 | ||
71 | // data members | |
72 | Int_t fNofMotifs; //number of motifs | |
73 | AliMpIntPair fPadOffset; //the offset in nof pads | |
74 | TVector2 fOffset; //the position of the centre of the first motif | |
75 | //(x wtr to left border, y wtr to row center) | |
76 | AliMpRow* fRow; //the row containing this segment | |
77 | AliMpVMotif* fMotif; //the motif | |
78 | Int_t fMotifPositionId; // the first motif position id | |
79 | Int_t fMotifPositionDId; // +1 if ids are increasing, -1 if decreasing | |
80 | ||
81 | ClassDef(AliMpRowSegment,1) //Row segment | |
82 | }; | |
83 | ||
84 | #endif //ALI_MP_ROW_SEGMENT_H | |
85 |