]>
Commit | Line | Data |
---|---|---|
5f91c9e8 | 1 | // $Id$ |
2 | // Category: basic | |
3 | // | |
4 | // Class AliMpArea | |
5 | // ---------------- | |
6 | // Class that defines a rectangle area positioned in plane.. | |
7 | // | |
8 | // Authors: David Guez, Ivana Hrivnacova; IPN Orsay | |
9 | ||
10 | #ifndef ALI_MP_AREA_H | |
11 | #define ALI_MP_AREA_H | |
12 | ||
13 | #include <TObject.h> | |
14 | #include <TVector2.h> | |
15 | ||
16 | class AliMpArea : public TObject | |
17 | { | |
18 | public: | |
19 | AliMpArea(const TVector2& position, const TVector2& dimensions); | |
20 | AliMpArea(const AliMpArea& rhs); | |
21 | AliMpArea(); | |
22 | virtual ~AliMpArea(); | |
23 | ||
24 | // operators | |
25 | AliMpArea& operator = (const AliMpArea& right); | |
26 | ||
27 | // methods | |
28 | Double_t LeftBorder() const; | |
29 | Double_t RightBorder() const; | |
30 | Double_t UpBorder() const; | |
31 | Double_t DownBorder() const; | |
32 | ||
33 | TVector2 LeftDownCorner() const; | |
34 | TVector2 LeftUpCorner() const; | |
35 | TVector2 RightDownCorner() const; | |
36 | TVector2 RightUpCorner() const; | |
37 | ||
38 | // get methods | |
39 | TVector2 Position() const; | |
40 | TVector2 Dimensions() const; | |
41 | Bool_t IsValid() const; | |
42 | ||
43 | private: | |
44 | // data members | |
45 | TVector2 fPosition; // position | |
46 | TVector2 fDimensions;// dimensions (half lengths) | |
47 | Bool_t fValidity; // validity | |
48 | ||
49 | ClassDef(AliMpArea,1) //utility class for area iterators | |
50 | }; | |
51 | ||
52 | ostream& operator << (ostream &stream,const AliMpArea& area); | |
53 | ||
54 | // inline functions | |
55 | ||
56 | inline TVector2 AliMpArea::Position() const { return fPosition; } | |
57 | inline TVector2 AliMpArea::Dimensions() const { return fDimensions; } | |
58 | inline Bool_t AliMpArea::IsValid() const { return fValidity; } | |
59 | ||
60 | #endif //ALI_MP_AREA_H |