Added copy constructor and assignement operator (I. Hrivnacova)
[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,
5f91c9e8 31 AliMpDirection direction);
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;
55
56 // get methods
57 Int_t GetNofZones() const;
58 AliMpZone* GetZone(Int_t i) const;
59 Int_t GetNofRows() const;
60 AliMpRow* GetRow(Int_t i) const;
61 AliMpDirection GetDirection() const;
62 TVector2 GetMinPadDimensions() const;
63 AliMpMotifMap* GetMotifMap() const;
64
fb1bf5c0 65 protected:
66 AliMpSector(const AliMpSector& right);
67 AliMpSector& operator = (const AliMpSector& right);
68
5f91c9e8 69 private:
70 // methods
71 AliMpVRowSegment* FindRowSegment(const TVector2& position) const;
72 void SetRowOffsets();
73 void SetMotifPositions();
74 void SetGlobalIndices();
75 void SetMinPadDimensions();
76
77 // data members
78 TString fID; // sector ID
79 TVector2 fOffset; // sector position
80 ZoneVector fZones; // zones
81 RowVector fRows; // rows
82 AliMpMotifMap* fMotifMap; // motif map
83 AliMpDirection fDirection;// the direction of constant pad size
84 TVector2 fMinPadDimensions; // minimal pad dimensions
85
86 ClassDef(AliMpSector,1) //Sector
87};
88
89// inline functions
90
91inline AliMpDirection AliMpSector::GetDirection() const
92{ return fDirection; }
93
94inline TVector2 AliMpSector::GetMinPadDimensions() const
95{ return fMinPadDimensions; }
96
97inline AliMpMotifMap* AliMpSector::GetMotifMap() const
98{ return fMotifMap; }
99
100#endif //ALI_MP_SECTOR_H
101