////////////////////////////////////////////////////////////////////////
/// \class RAT::RATConcentratorConstructor
///
/// \brief   Class that constructs the Concentrator Logical Volume using
///          the concentrator parameters
///
/// \author  Phil Jones <p.jones22@physics.ox.ac.uk>
/// \author Aksel Hallin <aksel.hallin@ualberta.ca> -- contact person
///
/// REVISION HISTORY:\n
///     07/09 : P.Jones - First Revision, new file. \n
///     05/10 : P.Jones - Added plastic back surface, and logical envelope \n
///     08/10 : P.Jones - Added model parameterization \n
///     01/11 : P.Jones - Added data input option \n
///     04/11 : P.Jones - Split into SNO and RAT concentrator definitions \n
///
/// \details  Takes the concentrator parameters and constructs a
///          concentrator solid and places it into a logical volume.
///          This class build the RAT defined concentrator.
///
///
////////////////////////////////////////////////////////////////////////

#ifndef __RAT_RATConcentratorConstructor__
#define __RAT_RATConcentratorConstructor__

#include <RAT/ConcentratorConstructor.hh>

namespace RAT
{

class RATConcentratorConstructor : public ConcentratorConstructor
{
public:
  /// Constructor for the class, needs parameters and a name
  RATConcentratorConstructor( const std::string& prefix,///< Prefix to name objects
							  const ConcentratorConstructorParams& params ///< Parameters to build concentrator
                            );
  /// Returns the Max height above the pmt equator of the concentrator
  virtual double GetMaxHeight();
  /// Returns the Max depth below the pmt equator of the concentrator (note returns a -ive number)
  virtual double GetMaxDepth();
  /// Returns the radius of the concentrator, for a hex shape this is the distance of the plane that has \n
  /// a normal that passes through the origin (See G4Polyhedra definition).
  virtual double GetHexRadius();
  /// Returns the maximum radius from the origin in xy plane.
  virtual double GetMaxRadius();

protected:
  /// Converts the ellipse fit into z, rho coords in conc params
  virtual double ProduceZRhoCoordsPetal( int& numPoints,
                                         double** z,
                                         double** petalInner,
                                         double** petalOuter,
                                         double** plasticInner,
                                         double** plasticOuter,
                                         double** zEnvelope,
                                         double** envelopeInner,
                                         double** envelopeOuter );
};

} //::RAT

#endif