0. General code clean-up, including messages, and the like.
[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$
5006ec94 5// $MpId: AliMpRow.h,v 1.8 2005/09/26 16:12:11 ivana Exp $
dee1d5f1 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
5f91c9e8 12
13#ifndef ALI_MP_ROW_H
14#define ALI_MP_ROW_H
15
5006ec94 16#include "AliMpContainers.h"
17
18#ifdef WITH_STL
19#include <vector>
20#endif
21
22#ifdef WITH_ROOT
23#include <TList.h>
24#endif
25
5f91c9e8 26#include <TVector2.h>
27
5f91c9e8 28#include "AliMpVIndexed.h"
29#include "AliMpDirection.h"
30
31class AliMpVRowSegment;
32class AliMpVPadIterator;
33class AliMpMotifPosition;
34class AliMpMotifMap;
35
36class AliMpRow : public AliMpVIndexed
37{
38 public:
5006ec94 39#ifdef WITH_STL
40 typedef std::vector<AliMpVRowSegment*> RowSegmentVector;
41#endif
42#ifdef WITH_ROOT
43 typedef TList RowSegmentVector;
44#endif
45
46 public:
5f91c9e8 47 AliMpRow(Int_t id, AliMpMotifMap* motifMap);
48 AliMpRow();
49 virtual ~AliMpRow();
50
51 // methods
52 void AddRowSegment(AliMpVRowSegment* rowSegment);
53 void AddRowSegmentInFront(AliMpVRowSegment* rowSegment);
54 AliMpVRowSegment* FindRowSegment(Double_t x) const;
55 Double_t LowBorderY() const;
56 Double_t UpperBorderY() const;
57 virtual AliMpVPadIterator* CreateIterator() const;
58
59 void SetRowSegmentOffsets(const TVector2& offset);
60 Double_t SetOffsetY(Double_t offsetY);
61 void SetMotifPositions();
62 void SetGlobalIndices(AliMpDirection constPadSizeDirection,
63 AliMpRow* rowBefore);
64
65 // geometry
66 TVector2 Position() const;
67 TVector2 Dimensions() const;
68
69 // get methods
70 UInt_t GetID() const;
71 Int_t GetNofRowSegments() const;
72 AliMpVRowSegment* GetRowSegment(Int_t i) const;
73 AliMpMotifMap* GetMotifMap() const;
74
fb1bf5c0 75 protected:
76 AliMpRow(const AliMpRow& right);
77 AliMpRow& operator = (const AliMpRow& right);
78
5f91c9e8 79 private:
80 // methods
81 AliMpVRowSegment* FindRowSegment(Int_t ix) const;
82 AliMpMotifPosition* FindMotifPosition(AliMpVRowSegment* segment, Int_t ix) const;
83 void SetHighIndicesLimits(Int_t iy);
84 void CheckEmpty() const;
85
86 // data members
87 UInt_t fID; // row ID
88 Double_t fOffsetY; // the y position of the centre of motifs
89 RowSegmentVector fSegments;// row segments
90 AliMpMotifMap* fMotifMap;// the motif map associated with its sector
91
92 ClassDef(AliMpRow,1) //Row
93};
94
95// inline functions
96
97inline UInt_t AliMpRow::GetID() const { return fID; }
98inline AliMpMotifMap* AliMpRow::GetMotifMap() const { return fMotifMap; }
99
100#endif //ALI_MP_ROW_H
101