////////////////////////////////////////////////////////////////////////
/// \class RAT::ConcentratorConstructor
///
/// \brief Base class for Concentrator Constructors.
///
/// \author Phil Jones
/// \author Aksel Hallin -- 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
///
///
////////////////////////////////////////////////////////////////////////
#ifndef __RAT_ConcentratorConstructor__
#define __RAT_ConcentratorConstructor__
#include
#include
#include
class G4LogicalVolume;
class G4VSolid;
namespace RAT
{
class ConcentratorConstructor : public ConstructorBase
{
public:
/// Constructor for the class, needs parameters and a name
ConcentratorConstructor( const std::string& prefix,///< Prefix to name objects
const ConcentratorConstructorParams& params ///< Parameters to build concentrator
);
virtual ~ConcentratorConstructor() {}
/// Constructs the logical volume
virtual void Construct();
/// Produces a concentrator shaped solid volume
virtual G4VSolid* ProduceSolid( const std::string& name,
int numPoints,
double* z,
double* rInner,
double* rOuter );
/// Returns the Max height above the pmt equator of the concentrator
virtual double GetMaxHeight() = 0;
/// Returns the Max depth below the pmt equator of the concentrator (note returns a -ive number)
virtual double GetMaxDepth() = 0;
/// 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() = 0;
/// Returns the number of petals
virtual int GetNumPetals();
/// Returns the offset from the pmt equator (in Z) where the concentrator should be placed
virtual double GetOffset();
/// Returns the maximum radius from the origin in xy plane.
virtual double GetMaxRadius() = 0;
/// Returns the logical volume for the concentrator
G4LogicalVolume* GetLogicalVolume();
/// Returns the name of the model
std::string GetModelType();
/// Returns the name of the params for the model
std::string GetModelParams();
protected:
/// Produces all the Z rho coordinates for the solids
virtual void ProduceZRhoCoords( int& numPoints,
double** z,
double** petalInner,
double** petalOuter,
double** plasticInner,
double** plasticOuter,
double** zEnvelope,
double** envelopeInner,
double** envelopeOuter );
/// Produces the Petal part of the coords
virtual double ProduceZRhoCoordsPetal( int& numPoints,
double** z,
double** petalInner,
double** petalOuter,
double** plasticInner,
double** plasticOuter,
double** zEnvelope,
double** envelopeInner,
double** envelopeOuter ) = 0;
std::string fPrefix; //!