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