1 #ifndef ALIMUONCONTOUR_H
2 #define ALIMUONCONTOUR_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 /// \class AliMUONContour
13 // Author Laurent Aphecetche, Subatech
20 # include "AliMpArea.h"
27 class AliMUONContour : public TNamed
30 AliMUONContour(const char* name="");
31 AliMUONContour(const char* name, const AliMpArea& area);
32 AliMUONContour(const AliMUONContour& rhs);
33 AliMUONContour& operator=(const AliMUONContour& rhs);
34 virtual ~AliMUONContour();
36 AliMpArea Area() const;
38 /// Get a full copy of this object.
39 virtual TObject* Clone(const char* /*newname*/="") const { return new AliMUONContour(*this); }
41 /// Add an offset to all points
42 void Offset(Double_t x, Double_t y);
44 /// Apply a global transformation to all points
45 void Transform(const TGeoHMatrix& matrix);
47 void Add(const AliMUONPolygon& polygon);
49 virtual void Copy(TObject& obj) const;
51 Bool_t IsInside(Double_t x, Double_t y) const;
53 virtual void Print(Option_t* opt="") const;
55 /// Get the number of vertices of this contour
56 Int_t NumberOfVertices() const { return fNofVertices; }
58 Bool_t IsValid() const;
60 /// Get the list of polygons we have
61 const TObjArray* Polygons() const { return fPolygons; }
63 void AssertOrientation(Bool_t autoCorrect=kFALSE);
66 TObjArray* fPolygons; ///< the polygons that this contour is made of
67 Double_t fXmin; ///< min x-value
68 Double_t fXmax; ///< max x-value
69 Double_t fYmin; ///< min y-value
70 Double_t fYmax; ///< max y-value
71 Int_t fNofVertices; ///< total number of vertices
73 ClassDef(AliMUONContour,1) // 2D-contour of an object