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