AliRoot Core  edcc906 (edcc906)
AliMpSector.h
Go to the documentation of this file.
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.14 2006/05/24 13:58:21 ivana Exp $
6 
12 
13 #ifndef ALI_MP_SECTOR_H
14 #define ALI_MP_SECTOR_H
15 
16 #include <TNamed.h>
17 
18 #include "AliMpDirection.h"
19 #include "AliMpPlaneType.h"
20 #include "AliMpEncodePair.h"
21 
22 #include <TString.h>
23 #include <TObjArray.h>
24 
25 class AliMpZone;
26 class AliMpRow;
27 class AliMpVRowSegment;
28 class AliMpVMotif;
29 class AliMpVPadIterator;
30 class AliMpMotifMap;
31 
32 class TArrayI;
33 
34 class AliMpSector : public TNamed
35 {
36  public:
37  AliMpSector(const TString& id, Int_t nofZones, Int_t nofRows,
38  AliMp::Direction direction,
39  Double_t offsetx, Double_t offsety);
40  AliMpSector();
41  virtual ~AliMpSector();
42 
43  // methods
44  virtual AliMpVPadIterator* CreateIterator() const;
45 
46  void SetRowSegmentOffsets();
47  void Initialize();
48  void PrintGeometry() const;
49 
50  // find methods
51  Int_t FindMotifPositionId(Double_t x, Double_t y) const;
52 
53  AliMpRow* FindRow(Int_t motifPositionId) const;
54  AliMpVRowSegment* FindRowSegment(Int_t motifPositionId) const;
55 
56 
57  // geometry
58  Double_t GetPositionX() const;
59  Double_t GetPositionY() const;
60  Double_t GetDimensionX() const;
61  Double_t GetDimensionY() const;
62 
63  //
64  // get methods
65 
66  Int_t GetNofZones() const;
67  AliMpZone* GetZone(Int_t i) const;
68 
69  Int_t GetNofRows() const;
70  AliMpRow* GetRow(Int_t i) const;
71 
74 
75  Double_t GetMinPadDimensionX() const;
76  Double_t GetMinPadDimensionY() const;
77  Double_t GetMaxPadDimensionX() const;
78  Double_t GetMaxPadDimensionY() const;
79  MpPair_t GetMaxPadIndices() const;
80  Int_t GetNofPads() const;
81 
82  AliMpMotifMap* GetMotifMap() const;
83 
84  Int_t GetNofMotifPositions() const;
85  void GetAllMotifPositionsIDs(TArrayI& ecn) const;
86 
87  virtual void Print(Option_t* opt="") const;
88 
89 
90  private:
92  AliMpSector(const AliMpSector& right);
94  AliMpSector& operator = (const AliMpSector& right);
95 
96  // methods
97  AliMpRow* FindRow(Double_t y) const;
98  AliMpVRowSegment* FindRowSegment(Double_t x, Double_t y) const;
99 
100  void SetRowOffsets();
101  void SetMotifPositions();
102  void SetGlobalIndices();
103  void SetMinMaxPadDimensions();
104  void SetMaxPadIndices();
105  void SetNofPads();
106  void SetDimensions();
107 
108  // data members
109  TString fID;
110  Double_t fOffsetX;
111  Double_t fOffsetY;
112  Double_t fDimensionX;
113  Double_t fDimensionY;
118  Double_t fMinPadDimensionX;
119  Double_t fMinPadDimensionY;
120  Double_t fMaxPadDimensionX;
121  Double_t fMaxPadDimensionY;
123  Int_t fNofPads;
124 
125  ClassDef(AliMpSector,3) // Sector
126 };
127 
128 // inline functions
129 
132 { return fDirection; }
133 
135 inline Double_t AliMpSector::GetMinPadDimensionX() const
136 { return fMinPadDimensionX; }
137 
139 inline Double_t AliMpSector::GetMinPadDimensionY() const
140 { return fMinPadDimensionY; }
141 
143 inline Double_t AliMpSector::GetMaxPadDimensionX() const
144 { return fMaxPadDimensionX; }
145 
147 inline Double_t AliMpSector::GetMaxPadDimensionY() const
148 { return fMaxPadDimensionY; }
149 
152 { return fLMaxPadIndices; }
153 
155 inline Int_t AliMpSector::GetNofPads() const
156 { return fNofPads; }
157 
160 { return fMotifMap; }
161 
162 #endif //ALI_MP_SECTOR_H
163 
Int_t GetNofRows() const
void SetNofPads()
virtual AliMpVPadIterator * CreateIterator() const
void SetRowOffsets()
Double_t fOffsetX
sector x position
Definition: AliMpSector.h:110
Double_t GetDimensionX() const
#define TObjArray
AliMpMotifMap * fMotifMap
motif map
Definition: AliMpSector.h:116
Int_t fNofPads
total number of pads
Definition: AliMpSector.h:123
TObjArray fRows
rows
Definition: AliMpSector.h:115
Double_t GetMaxPadDimensionY() const
Return minimum y pad dimensions.
Definition: AliMpSector.h:147
Double_t GetMinPadDimensionX() const
Return minimum x pad dimensions.
Definition: AliMpSector.h:135
Double_t fMaxPadDimensionX
miximum pad x dimensions
Definition: AliMpSector.h:120
AliMpSector & operator=(const AliMpSector &right)
Not implemented.
Double_t fOffsetY
sector y position
Definition: AliMpSector.h:111
TObjArray fZones
zones
Definition: AliMpSector.h:114
A region of pads of the same dimensions composed of subzones.
Definition: AliMpZone.h:25
Double_t fDimensionX
sector x dimension
Definition: AliMpSector.h:112
AliMp::PlaneType GetPlaneType() const
An interface for a row segment.
virtual void Print(Option_t *opt="") const
MpPair_t GetMaxPadIndices() const
Return maximum pad indices.
Definition: AliMpSector.h:151
void SetMaxPadIndices()
Double_t fMinPadDimensionX
minimum pad x dimensions
Definition: AliMpSector.h:118
void PrintGeometry() const
void Initialize()
AliMp::Direction GetDirection() const
Return the direction of constant pad size.
Definition: AliMpSector.h:131
Motif map containers.
Definition: AliMpMotifMap.h:34
An interface for an iterator over pads.
void SetRowSegmentOffsets()
Int_t GetNofZones() const
TString fID
sector ID
Definition: AliMpSector.h:109
Double_t GetPositionX() const
Int_t FindMotifPositionId(Double_t x, Double_t y) const
A row composed of the row segments.
Definition: AliMpRow.h:26
Double_t fMinPadDimensionY
minimum pad y dimensions
Definition: AliMpSector.h:119
A sector (quadrant) of the MUON chamber of stations 1 and 2.
Definition: AliMpSector.h:34
Double_t GetPositionY() const
AliMpMotifMap * GetMotifMap() const
Return the motif map.
Definition: AliMpSector.h:159
Abstract base class for a motif with its unique ID and the motif type.
Definition: AliMpVMotif.h:24
Int_t MpPair_t
void SetMotifPositions()
void SetDimensions()
Double_t GetMaxPadDimensionX() const
Return maximum x pad dimensions.
Definition: AliMpSector.h:143
virtual ~AliMpSector()
Int_t GetNofPads() const
Return total number of pads.
Definition: AliMpSector.h:155
AliMpRow * FindRow(Int_t motifPositionId) const
void SetGlobalIndices()
void SetMinMaxPadDimensions()
void GetAllMotifPositionsIDs(TArrayI &ecn) const
AliMp::Direction fDirection
the direction of constant pad size
Definition: AliMpSector.h:117
AliMpVRowSegment * FindRowSegment(Int_t motifPositionId) const
Double_t GetDimensionY() const
AliMpRow * GetRow(Int_t i) const
Int_t GetNofMotifPositions() const
Double_t GetMinPadDimensionY() const
Return maximum y pad dimensions.
Definition: AliMpSector.h:139
AliMpZone * GetZone(Int_t i) const
Double_t fDimensionY
sector y dimension
Definition: AliMpSector.h:113
Double_t fMaxPadDimensionY
miximum pad y dimensions
Definition: AliMpSector.h:121
MpPair_t fLMaxPadIndices
maximum pad indices
Definition: AliMpSector.h:122