Updated comments for Doxygen
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpSector.h
... / ...
CommitLineData
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: AliMpSector.h,v 1.13 2006/05/23 13:07:44 ivana Exp $
6
7/// \ingroup sector
8/// \class AliMpSector
9/// \brief A sector (quadrant) of the MUON chamber of stations 1 and 2.
10///
11/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
12
13#ifndef ALI_MP_SECTOR_H
14#define ALI_MP_SECTOR_H
15
16#include <TNamed.h>
17
18#include "AliMpContainers.h"
19
20#include "AliMpDirection.h"
21#include "AliMpPlaneType.h"
22#include "AliMpIntPair.h"
23
24#include <TString.h>
25#include <TVector2.h>
26#ifdef WITH_ROOT
27#include <TObjArray.h>
28#endif
29
30#ifdef WITH_STL
31#include <vector>
32#endif
33
34class AliMpZone;
35class AliMpRow;
36class AliMpVRowSegment;
37class AliMpVMotif;
38class AliMpVPadIterator;
39class AliMpMotifMap;
40
41class TArrayI;
42
43class AliMpSector : public TNamed
44{
45 public:
46#ifdef WITH_STL
47 typedef std::vector<AliMpRow*> RowVector;
48 typedef std::vector<AliMpZone*> ZoneVector;
49#endif
50#ifdef WITH_ROOT
51 typedef TObjArray RowVector;
52 typedef TObjArray ZoneVector;
53#endif
54
55 public:
56 AliMpSector(const TString& id, Int_t nofZones, Int_t nofRows,
57 AliMpDirection direction, const TVector2& offset);
58 AliMpSector();
59 virtual ~AliMpSector();
60
61 // methods
62 virtual AliMpVPadIterator* CreateIterator() const;
63 void SetRowSegmentOffsets();
64 void Initialize();
65 void PrintGeometry() const;
66
67 // find methods
68 AliMpRow* FindRow(const TVector2& position) const;
69 AliMpVMotif* FindMotif(const TVector2& position) const;
70 Int_t FindMotifPositionId(const TVector2& position) const;
71
72 AliMpRow* FindRow(Int_t motifPositionId) const;
73 AliMpVRowSegment* FindRowSegment(Int_t motifPositionId) const;
74 TVector2 FindPosition(Int_t motifPositionId) const;
75
76 AliMpZone* FindZone(const TVector2& padDimensions) const;
77
78 // geometry
79 TVector2 Position() const;
80 TVector2 Dimensions() const;
81
82 //
83 // get methods
84
85 Int_t GetNofZones() const;
86 AliMpZone* GetZone(Int_t i) const;
87
88 Int_t GetNofRows() const;
89 AliMpRow* GetRow(Int_t i) const;
90
91 AliMpDirection GetDirection() const;
92 AliMpPlaneType GetPlaneType() const;
93
94 TVector2 GetMinPadDimensions() const;
95 AliMpIntPair GetMaxPadIndices() const;
96 Int_t GetNofPads() const;
97
98 AliMpMotifMap* GetMotifMap() const;
99 void GetAllMotifPositionsIDs(TArrayI& ecn) const;
100
101 virtual void Print(Option_t* opt="") const;
102
103
104 protected:
105 AliMpSector(const AliMpSector& right);
106 AliMpSector& operator = (const AliMpSector& right);
107
108 private:
109 // methods
110 AliMpVRowSegment* FindRowSegment(const TVector2& position) const;
111 void SetRowOffsets();
112 void SetMotifPositions();
113 void SetGlobalIndices();
114 void SetMinPadDimensions();
115 void SetMaxPadIndices();
116 void SetNofPads();
117
118 // data members
119 TString fID; ///< sector ID
120 TVector2 fOffset; ///< sector position
121 ZoneVector fZones; ///< zones
122 RowVector fRows; ///< rows
123 AliMpMotifMap* fMotifMap; ///< motif map
124 AliMpDirection fDirection;///< the direction of constant pad size
125 TVector2 fMinPadDimensions; ///< minimal pad dimensions
126 AliMpIntPair fMaxPadIndices; ///< maximum pad indices
127 Int_t fNofPads; ///< total number of pads
128
129
130 ClassDef(AliMpSector,1) // Sector
131};
132
133// inline functions
134
135inline AliMpDirection AliMpSector::GetDirection() const
136{ return fDirection; }
137
138inline TVector2 AliMpSector::GetMinPadDimensions() const
139{ return fMinPadDimensions; }
140
141inline AliMpIntPair AliMpSector::GetMaxPadIndices() const
142{ return fMaxPadIndices; }
143
144inline Int_t AliMpSector::GetNofPads() const
145{ return fNofPads; }
146
147inline AliMpMotifMap* AliMpSector::GetMotifMap() const
148{ return fMotifMap; }
149
150#endif //ALI_MP_SECTOR_H
151