]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpRow.h
Moving kNoAliases setting in Process() to the right place
[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.11 2006/05/24 13:58:21 ivana Exp $
6
7 /// \ingroup sector
8 /// \class AliMpRow
9 /// \brief A row composed of the row segments.
10 ///
11 /// \author David Guez, Ivana Hrivnacova; IPN Orsay
12
13 #ifndef ALI_MP_ROW_H
14 #define ALI_MP_ROW_H
15
16 #include "AliMpContainers.h"
17
18 #include "AliMpVIndexed.h"
19 #include "AliMpDirection.h"
20
21 #include <TVector2.h>
22 #ifdef WITH_ROOT
23 #include <TList.h>
24 #endif
25
26 #ifdef WITH_STL
27 #include <vector>
28 #endif
29
30 class AliMpVRowSegment;
31 class AliMpVPadIterator;
32 class AliMpMotifPosition;
33 class AliMpMotifMap;
34
35 class AliMpRow : public AliMpVIndexed
36 {
37   public:
38 #ifdef WITH_STL
39     typedef std::vector<AliMpVRowSegment*>  RowSegmentVector;
40 #endif
41 #ifdef WITH_ROOT
42     typedef TList  RowSegmentVector;
43 #endif
44
45   public:
46     AliMpRow(Int_t id, AliMpMotifMap* motifMap);
47     AliMpRow();
48     virtual ~AliMpRow();
49   
50     // methods
51     void  AddRowSegment(AliMpVRowSegment* rowSegment);
52     void  AddRowSegmentInFront(AliMpVRowSegment* rowSegment);
53     AliMpVRowSegment*  FindRowSegment(Double_t x) const;
54     Double_t  LowBorderY() const;
55     Double_t  UpperBorderY() const;
56     virtual AliMpVPadIterator* CreateIterator() const;
57     
58     void      SetRowSegmentOffsets(const TVector2& offset);
59     Double_t  SetOffsetY(Double_t offsetY);
60     void      SetMotifPositions();
61     void      SetGlobalIndices(AliMp::Direction constPadSizeDirection, 
62                                AliMpRow* rowBefore);
63
64     // geometry
65     TVector2  Position() const;
66     TVector2  Dimensions() const;    
67
68     // get methods
69     UInt_t   GetID() const;
70     Int_t    GetNofRowSegments() const;
71     AliMpVRowSegment*  GetRowSegment(Int_t i) const;
72     AliMpMotifMap*     GetMotifMap() const;
73
74   private:
75     AliMpRow(const AliMpRow& right);
76     AliMpRow&  operator = (const AliMpRow& right);
77
78     // methods
79     AliMpVRowSegment*    FindRowSegment(Int_t ix) const;
80     AliMpMotifPosition*  FindMotifPosition(AliMpVRowSegment* segment, Int_t ix) const;
81     void SetHighIndicesLimits(Int_t iy);
82     void CheckEmpty() const;
83   
84     // data members
85     UInt_t            fID;      ///< row ID
86     Double_t          fOffsetY; ///< the y position of the centre of motifs
87     RowSegmentVector  fSegments;///< row segments
88     AliMpMotifMap*    fMotifMap;///< the motif map associated with its sector
89
90   ClassDef(AliMpRow,1)  // Row
91 };
92
93 // inline functions
94
95 inline  UInt_t  AliMpRow::GetID() const { return fID; }
96 inline  AliMpMotifMap*  AliMpRow::GetMotifMap() const { return fMotifMap; }
97
98 #endif //ALI_MP_ROW_H
99