Added the sector offset in zones.dat files and
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpSector.h
CommitLineData
5f91c9e8 1// $Id$
2// Category: sector
3//
4// Class AliMpSector
5// -----------------
6// Class describing the sector of the MUON chamber of station 1.
7//
8// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
9
10#ifndef ALI_MP_SECTOR_H
11#define ALI_MP_SECTOR_H
12
5f91c9e8 13#include <TObject.h>
14#include <TString.h>
15#include <TVector2.h>
16
17#include "AliMpSectorTypes.h"
18#include "AliMpDirection.h"
19
20class AliMpZone;
21class AliMpRow;
22class AliMpVRowSegment;
23class AliMpVMotif;
24class AliMpVPadIterator;
25class AliMpMotifMap;
26
27class AliMpSector : public TObject
28{
29 public:
ffb47139 30 AliMpSector(const TString& id, Int_t nofZones, Int_t nofRows,
14b7b896 31 AliMpDirection direction, const TVector2& offset);
5f91c9e8 32 AliMpSector();
33 virtual ~AliMpSector();
34
35 // methods
36 virtual AliMpVPadIterator* CreateIterator() const;
37 void SetRowSegmentOffsets();
38 void Initialize();
39 void PrintGeometry() const;
40
41 // find methods
42 AliMpRow* FindRow(const TVector2& position) const;
43 AliMpVMotif* FindMotif(const TVector2& position) const;
44 Int_t FindMotifPositionId(const TVector2& position) const;
45
46 AliMpRow* FindRow(Int_t motifPositionId) const;
47 AliMpVRowSegment* FindRowSegment(Int_t motifPositionId) const;
48 TVector2 FindPosition(Int_t motifPositionId) const;
49
50 AliMpZone* FindZone(const TVector2& padDimensions) const;
51
52 // geometry
53 TVector2 Position() const;
54 TVector2 Dimensions() const;
14b7b896 55 TVector2 Offset() const;
5f91c9e8 56
57 // get methods
58 Int_t GetNofZones() const;
59 AliMpZone* GetZone(Int_t i) const;
60 Int_t GetNofRows() const;
61 AliMpRow* GetRow(Int_t i) const;
62 AliMpDirection GetDirection() const;
63 TVector2 GetMinPadDimensions() const;
64 AliMpMotifMap* GetMotifMap() const;
65
fb1bf5c0 66 protected:
67 AliMpSector(const AliMpSector& right);
68 AliMpSector& operator = (const AliMpSector& right);
69
5f91c9e8 70 private:
71 // methods
72 AliMpVRowSegment* FindRowSegment(const TVector2& position) const;
73 void SetRowOffsets();
74 void SetMotifPositions();
75 void SetGlobalIndices();
76 void SetMinPadDimensions();
77
78 // data members
79 TString fID; // sector ID
80 TVector2 fOffset; // sector position
81 ZoneVector fZones; // zones
82 RowVector fRows; // rows
83 AliMpMotifMap* fMotifMap; // motif map
84 AliMpDirection fDirection;// the direction of constant pad size
85 TVector2 fMinPadDimensions; // minimal pad dimensions
86
87 ClassDef(AliMpSector,1) //Sector
88};
89
90// inline functions
91
14b7b896 92inline TVector2 AliMpSector::Offset() const
93{ return fOffset; }
94
5f91c9e8 95inline AliMpDirection AliMpSector::GetDirection() const
96{ return fDirection; }
97
98inline TVector2 AliMpSector::GetMinPadDimensions() const
99{ return fMinPadDimensions; }
100
101inline AliMpMotifMap* AliMpSector::GetMotifMap() const
102{ return fMotifMap; }
103
104#endif //ALI_MP_SECTOR_H
105