ROOT logo
#ifndef ALIMUONCONTOUR_H
#define ALIMUONCONTOUR_H

/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice                               */

// $Id$

/// \ingroup geometry
/// \class AliMUONContour
/// \brief 2D contour
/// 
// Author Laurent Aphecetche, Subatech

#ifndef ROOT_TNamed
#  include "TNamed.h"
#endif

#ifndef ALI_MP_AREA_H
#  include "AliMpArea.h"
#endif

class AliMUONPolygon;
class TGeoHMatrix;
class TObjArray;

class AliMUONContour : public TNamed
{
public:
  AliMUONContour(const char* name="");
  AliMUONContour(const char* name, const AliMpArea& area);
  AliMUONContour(const AliMUONContour& rhs);
  AliMUONContour& operator=(const AliMUONContour& rhs);
  virtual ~AliMUONContour();
  
  AliMpArea Area() const;
  
  /// Get a full copy of this object.
  virtual TObject* Clone(const char* /*newname*/="") const { return new AliMUONContour(*this); }
  
  /// Add an offset to all points
  void Offset(Double_t x, Double_t y);
  
  /// Apply a global transformation to all points
  void Transform(const TGeoHMatrix& matrix);
  
  void Add(const AliMUONPolygon& polygon);
  
  virtual void Copy(TObject& obj) const;
    
  Bool_t IsInside(Double_t x, Double_t y) const;

  virtual void Print(Option_t* opt="") const;
  
  /// Get the number of vertices of this contour
  Int_t NumberOfVertices() const { return fNofVertices; }
  
  Bool_t IsValid() const;
  
  /// Get the list of polygons we have
  const TObjArray* Polygons() const { return fPolygons; }
  
  void AssertOrientation(Bool_t autoCorrect=kFALSE);
  
private:
  TObjArray* fPolygons; ///< the polygons that this contour is made of
  Double_t fXmin; ///< min x-value
  Double_t fXmax; ///< max x-value
  Double_t fYmin; ///< min y-value
  Double_t fYmax; ///< max y-value
  Int_t fNofVertices; ///< total number of vertices
  
  ClassDef(AliMUONContour,1) // 2D-contour of an object
};

#endif
 AliMUONContour.h:1
 AliMUONContour.h:2
 AliMUONContour.h:3
 AliMUONContour.h:4
 AliMUONContour.h:5
 AliMUONContour.h:6
 AliMUONContour.h:7
 AliMUONContour.h:8
 AliMUONContour.h:9
 AliMUONContour.h:10
 AliMUONContour.h:11
 AliMUONContour.h:12
 AliMUONContour.h:13
 AliMUONContour.h:14
 AliMUONContour.h:15
 AliMUONContour.h:16
 AliMUONContour.h:17
 AliMUONContour.h:18
 AliMUONContour.h:19
 AliMUONContour.h:20
 AliMUONContour.h:21
 AliMUONContour.h:22
 AliMUONContour.h:23
 AliMUONContour.h:24
 AliMUONContour.h:25
 AliMUONContour.h:26
 AliMUONContour.h:27
 AliMUONContour.h:28
 AliMUONContour.h:29
 AliMUONContour.h:30
 AliMUONContour.h:31
 AliMUONContour.h:32
 AliMUONContour.h:33
 AliMUONContour.h:34
 AliMUONContour.h:35
 AliMUONContour.h:36
 AliMUONContour.h:37
 AliMUONContour.h:38
 AliMUONContour.h:39
 AliMUONContour.h:40
 AliMUONContour.h:41
 AliMUONContour.h:42
 AliMUONContour.h:43
 AliMUONContour.h:44
 AliMUONContour.h:45
 AliMUONContour.h:46
 AliMUONContour.h:47
 AliMUONContour.h:48
 AliMUONContour.h:49
 AliMUONContour.h:50
 AliMUONContour.h:51
 AliMUONContour.h:52
 AliMUONContour.h:53
 AliMUONContour.h:54
 AliMUONContour.h:55
 AliMUONContour.h:56
 AliMUONContour.h:57
 AliMUONContour.h:58
 AliMUONContour.h:59
 AliMUONContour.h:60
 AliMUONContour.h:61
 AliMUONContour.h:62
 AliMUONContour.h:63
 AliMUONContour.h:64
 AliMUONContour.h:65
 AliMUONContour.h:66
 AliMUONContour.h:67
 AliMUONContour.h:68
 AliMUONContour.h:69
 AliMUONContour.h:70
 AliMUONContour.h:71
 AliMUONContour.h:72
 AliMUONContour.h:73
 AliMUONContour.h:74
 AliMUONContour.h:75
 AliMUONContour.h:76