ROOT logo
#ifndef ALIMUONCONTOURMAKER_H
#define ALIMUONCONTOURMAKER_H

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

// $Id$

/// \ingroup geometry
/// \class AliMUONContourMaker
/// \brief Creator/merger of AliMUONContour objects
/// 
// Author Laurent Aphecetche, Subatech

#ifndef ROOT_TObject
#  include "TObject.h"
#endif

#ifndef ROOT_TMap
#include "TMap.h"
#endif

class AliMUONContour;
class TObjArray;
class TArrayD;

class AliMUONContourMaker : public TObject
{
public:
  AliMUONContourMaker();
  virtual ~AliMUONContourMaker();
  
  AliMUONContour* CreateContour(const TObjArray& polygons, const char* name=0x0) const;

  AliMUONContour* MergeContour(const TObjArray& contours, const char* name=0x0) const;

private:
  
  AliMUONContour* FinalizeContour(const TObjArray& verticals, const TObjArray& horizontals) const;
  
  void GetYPositions(const TObjArray& polygonVerticalEdges, TArrayD& yPositions) const;
  
  void GetVerticalEdges(const TObjArray& polygons, TObjArray& polygonVerticalEdges) const;

  void SortPoints(const TObjArray& polygonVerticalEdges, TObjArray& sortedPoints) const;
  
  void Sweep(const TObjArray& polygonVerticalEdges, TObjArray& contourVerticalEdges) const;

  void VerticalToHorizontal(const TObjArray& verticalEdges, TObjArray& horizontalEdges) const;
  
  ClassDef(AliMUONContourMaker,1) // Maker/merger of AliMUONContour objects
};

#endif
 AliMUONContourMaker.h:1
 AliMUONContourMaker.h:2
 AliMUONContourMaker.h:3
 AliMUONContourMaker.h:4
 AliMUONContourMaker.h:5
 AliMUONContourMaker.h:6
 AliMUONContourMaker.h:7
 AliMUONContourMaker.h:8
 AliMUONContourMaker.h:9
 AliMUONContourMaker.h:10
 AliMUONContourMaker.h:11
 AliMUONContourMaker.h:12
 AliMUONContourMaker.h:13
 AliMUONContourMaker.h:14
 AliMUONContourMaker.h:15
 AliMUONContourMaker.h:16
 AliMUONContourMaker.h:17
 AliMUONContourMaker.h:18
 AliMUONContourMaker.h:19
 AliMUONContourMaker.h:20
 AliMUONContourMaker.h:21
 AliMUONContourMaker.h:22
 AliMUONContourMaker.h:23
 AliMUONContourMaker.h:24
 AliMUONContourMaker.h:25
 AliMUONContourMaker.h:26
 AliMUONContourMaker.h:27
 AliMUONContourMaker.h:28
 AliMUONContourMaker.h:29
 AliMUONContourMaker.h:30
 AliMUONContourMaker.h:31
 AliMUONContourMaker.h:32
 AliMUONContourMaker.h:33
 AliMUONContourMaker.h:34
 AliMUONContourMaker.h:35
 AliMUONContourMaker.h:36
 AliMUONContourMaker.h:37
 AliMUONContourMaker.h:38
 AliMUONContourMaker.h:39
 AliMUONContourMaker.h:40
 AliMUONContourMaker.h:41
 AliMUONContourMaker.h:42
 AliMUONContourMaker.h:43
 AliMUONContourMaker.h:44
 AliMUONContourMaker.h:45
 AliMUONContourMaker.h:46
 AliMUONContourMaker.h:47
 AliMUONContourMaker.h:48
 AliMUONContourMaker.h:49
 AliMUONContourMaker.h:50
 AliMUONContourMaker.h:51
 AliMUONContourMaker.h:52
 AliMUONContourMaker.h:53
 AliMUONContourMaker.h:54