]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpRowSegmentSpecial.h
Coding conventions corrections only
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpRowSegmentSpecial.h
1 // $Id$
2 // Category: sector
3 //
4 // Class AliMpRowSegmentSpecial
5 // ----------------------------
6 // Class describing a special row segment composed of the 
7 // pad rows.
8 //
9 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
10
11 #ifndef ALI_MP_ROW_SEGMENT_SPECIAL_H
12 #define ALI_MP_ROW_SEGMENT_SPECIAL_H
13
14 #include <TVector2.h>
15
16 #include "AliMpSectorTypes.h"
17 #include "AliMpVRowSegment.h"
18 #include "AliMpVMotif.h"
19
20 class AliMpRow;
21 class AliMpPadRow;
22 class AliMpPadRowSegment;
23
24 class AliMpRowSegmentSpecial : public AliMpVRowSegment
25 {
26   public:
27     AliMpRowSegmentSpecial(AliMpRow* row, Double_t offsetX);
28     AliMpRowSegmentSpecial();
29     virtual ~AliMpRowSegmentSpecial();
30     
31     // methods
32     void  AddPadRow(AliMpPadRow* padRow);
33     void  UpdateMotifVector();
34     void  UpdatePadsOffset();
35     virtual Double_t  LeftBorderX() const;
36     virtual Double_t  RightBorderX() const;
37     virtual Double_t  HalfSizeY() const;
38
39     // find methods
40     virtual AliMpVMotif*  FindMotif(const TVector2& position) const;    
41     virtual Int_t     FindMotifPositionId(const TVector2& position) const;
42     virtual Bool_t    HasMotifPosition(Int_t motifPositionId) const;
43     virtual TVector2  MotifCenter(Int_t motifPositionId) const;
44
45     // geometry
46     virtual TVector2  Position() const;
47     virtual TVector2  Dimensions() const;
48
49     // set methods
50     virtual void      SetOffset(const TVector2& offset) {}
51     virtual void      SetGlobalIndices();
52     virtual Int_t     SetIndicesToMotifPosition(Int_t i, AliMpIntPair indices);
53
54     // get methods
55     virtual AliMpRow*     GetRow() const;
56     virtual Int_t         GetNofMotifs() const;
57     virtual AliMpVMotif*  GetMotif(Int_t i) const;
58     virtual Int_t         GetMotifPositionId(Int_t i) const;
59
60   private:
61     // methods
62     AliMpPadRow*         FindPadRow(Double_t y) const;
63     AliMpPadRowSegment*  FindPadRowSegment(Int_t motifPositionId) const;
64     AliMpPadRowSegment*  FindMostRightPadRowSegment(Int_t motifPositionId) const;
65     AliMpIntPair         FindRelativeLowIndicesOf(Int_t motifPositionId) const;
66     TVector2  MotifCenterSlow(Int_t motifPositionId) const;
67     Int_t     GetNofPadRows() const;
68     AliMpPadRow*  GetPadRow(Int_t i) const;
69     Int_t     MaxNofPadsInRow() const;
70     Bool_t    HasMotif(const AliMpVMotif* motif) const;
71     
72     // data members
73     Double_t      fOffsetX; //the x position of the border that touches a standard
74                             //row segment
75     AliMpRow*     fRow;     //the row containing this segment 
76     PadRowVector  fPadRows; //pad rows vector
77     MotifVector   fMotifs;  //motifs vector
78     MotifPositionIdVector  fMotifPositionIds; //motifs position Ids vector
79     
80   ClassDef(AliMpRowSegmentSpecial,1)  //Row segment
81 };
82
83 #endif //ALI_MP_ROW_SEGMENT_SPECIAL_H