]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpRow.h
trigger geometry part made more compact
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpRow.h
1 // $Id$
2 // Category: sector
3 //
4 // Class AliMpRow
5 // --------------
6 // Class describing a row composed of the row segments.
7 //
8 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
9
10 #ifndef ALI_MP_ROW_H
11 #define ALI_MP_ROW_H
12
13 #include <TString.h>
14 #include <TVector2.h>
15
16 #include "AliMpSectorTypes.h"
17 #include "AliMpVIndexed.h"
18 #include "AliMpDirection.h"
19
20 class AliMpVRowSegment;
21 class AliMpVPadIterator;
22 class AliMpMotifPosition;
23 class AliMpMotifMap;
24
25 class AliMpRow : public AliMpVIndexed
26 {
27   public:
28     AliMpRow(Int_t id, AliMpMotifMap* motifMap);
29     AliMpRow();
30     virtual ~AliMpRow();
31   
32     // methods
33     void  AddRowSegment(AliMpVRowSegment* rowSegment);
34     void  AddRowSegmentInFront(AliMpVRowSegment* rowSegment);
35     AliMpVRowSegment*  FindRowSegment(Double_t x) const;
36     Double_t  LowBorderY() const;
37     Double_t  UpperBorderY() const;
38     virtual AliMpVPadIterator* CreateIterator() const;
39     
40     void      SetRowSegmentOffsets(const TVector2& offset);
41     Double_t  SetOffsetY(Double_t offsetY);
42     void      SetMotifPositions();
43     void      SetGlobalIndices(AliMpDirection constPadSizeDirection, 
44                                AliMpRow* rowBefore);
45
46     // geometry
47     TVector2  Position() const;
48     TVector2  Dimensions() const;    
49
50     // get methods
51     UInt_t   GetID() const;
52     Int_t    GetNofRowSegments() const;
53     AliMpVRowSegment*  GetRowSegment(Int_t i) const;
54     AliMpMotifMap*     GetMotifMap() const;
55
56   private:
57     // methods
58     AliMpVRowSegment*    FindRowSegment(Int_t ix) const;
59     AliMpMotifPosition*  FindMotifPosition(AliMpVRowSegment* segment, Int_t ix) const;
60     void SetHighIndicesLimits(Int_t iy);
61     void CheckEmpty() const;
62   
63     // data members
64     UInt_t            fID;      // row ID
65     Double_t          fOffsetY; // the y position of the centre of motifs
66     RowSegmentVector  fSegments;// row segments
67     AliMpMotifMap*    fMotifMap;// the motif map associated with its sector
68
69   ClassDef(AliMpRow,1)  //Row
70 };
71
72 // inline functions
73
74 inline  UInt_t  AliMpRow::GetID() const { return fID; }
75 inline  AliMpMotifMap*  AliMpRow::GetMotifMap() const { return fMotifMap; }
76
77 #endif //ALI_MP_ROW_H
78