]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpRow.h
- All mapping enums within namespace (AliMp).
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpRow.h
CommitLineData
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$
13985652 5// $MpId: AliMpRow.h,v 1.11 2006/05/24 13:58:21 ivana Exp $
dee1d5f1 6
7/// \ingroup sector
8/// \class AliMpRow
9/// \brief A row composed of the row segments.
10///
13985652 11/// \author David Guez, Ivana Hrivnacova; IPN Orsay
5f91c9e8 12
13#ifndef ALI_MP_ROW_H
14#define ALI_MP_ROW_H
15
5006ec94 16#include "AliMpContainers.h"
17
2a7ea2e6 18#include "AliMpVIndexed.h"
19#include "AliMpDirection.h"
5006ec94 20
2a7ea2e6 21#include <TVector2.h>
5006ec94 22#ifdef WITH_ROOT
23#include <TList.h>
24#endif
25
2a7ea2e6 26#ifdef WITH_STL
27#include <vector>
28#endif
5f91c9e8 29
30class AliMpVRowSegment;
31class AliMpVPadIterator;
32class AliMpMotifPosition;
33class AliMpMotifMap;
34
35class AliMpRow : public AliMpVIndexed
36{
5006ec94 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
5f91c9e8 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();
cddd101e 61 void SetGlobalIndices(AliMp::Direction constPadSizeDirection,
5f91c9e8 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
13e7956b 74 private:
fb1bf5c0 75 AliMpRow(const AliMpRow& right);
76 AliMpRow& operator = (const AliMpRow& right);
77
5f91c9e8 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
829425a5 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
5f91c9e8 89
829425a5 90 ClassDef(AliMpRow,1) // Row
5f91c9e8 91};
92
93// inline functions
94
95inline UInt_t AliMpRow::GetID() const { return fID; }
96inline AliMpMotifMap* AliMpRow::GetMotifMap() const { return fMotifMap; }
97
98#endif //ALI_MP_ROW_H
99