AliRoot Core  v5-06-30 (35d6c57)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONContour.h
Go to the documentation of this file.
1 #ifndef ALIMUONCONTOUR_H
2 #define ALIMUONCONTOUR_H
3 
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6 
7 // $Id$
8 
13 // Author Laurent Aphecetche, Subatech
14 
15 #ifndef ROOT_TNamed
16 # include "TNamed.h"
17 #endif
18 
19 #ifndef ALI_MP_AREA_H
20 # include "AliMpArea.h"
21 #endif
22 
23 class AliMUONPolygon;
24 class TGeoHMatrix;
25 class TObjArray;
26 
27 class AliMUONContour : public TNamed
28 {
29 public:
30  AliMUONContour(const char* name="");
31  AliMUONContour(const char* name, const AliMpArea& area);
32  AliMUONContour(const AliMUONContour& rhs);
34  virtual ~AliMUONContour();
35 
36  AliMpArea Area() const;
37 
39  virtual TObject* Clone(const char* /*newname*/="") const { return new AliMUONContour(*this); }
40 
42  void Offset(Double_t x, Double_t y);
43 
45  void Transform(const TGeoHMatrix& matrix);
46 
47  void Add(const AliMUONPolygon& polygon);
48 
49  virtual void Copy(TObject& obj) const;
50 
51  Bool_t IsInside(Double_t x, Double_t y) const;
52 
53  virtual void Print(Option_t* opt="") const;
54 
56  Int_t NumberOfVertices() const { return fNofVertices; }
57 
58  Bool_t IsValid() const;
59 
61  const TObjArray* Polygons() const { return fPolygons; }
62 
63  void AssertOrientation(Bool_t autoCorrect=kFALSE);
64 
65 private:
67  Double_t fXmin;
68  Double_t fXmax;
69  Double_t fYmin;
70  Double_t fYmax;
71  Int_t fNofVertices;
72 
73  ClassDef(AliMUONContour,1) // 2D-contour of an object
74 };
75 
76 #endif
AliMpArea Area() const
#define TObjArray
Double_t fXmax
max x-value
A planar polygon.
void AssertOrientation(Bool_t autoCorrect=kFALSE)
A rectangle area positioned in plane..
Definition: AliMpArea.h:20
Int_t NumberOfVertices() const
Get the number of vertices of this contour.
virtual TObject * Clone(const char *="") const
Get a full copy of this object.
void Offset(Double_t x, Double_t y)
Add an offset to all points.
AliMUONContour & operator=(const AliMUONContour &rhs)
void Add(const AliMUONPolygon &polygon)
Int_t fNofVertices
total number of vertices
virtual void Copy(TObject &obj) const
const TObjArray * Polygons() const
Get the list of polygons we have.
Double_t fYmax
max y-value
Double_t fXmin
min x-value
virtual void Print(Option_t *opt="") const
Double_t fYmin
min y-value
virtual ~AliMUONContour()
2D contour
Bool_t IsInside(Double_t x, Double_t y) const
AliMUONContour(const char *name="")
void Transform(const TGeoHMatrix &matrix)
Apply a global transformation to all points.
TObjArray * fPolygons
the polygons that this contour is made of
Bool_t IsValid() const