///////////////////////////////////////////////////////////////////////////////
/// \class RAT::GeoSolidFactory
///
/// \brief Factory for solids
///
/// \author Phil G Jones
/// \author Aksel Hallin -- contact person
///
/// REVISION HISTORY:\n
/// 21/06/2013 : P G Jones - New file. \n
///
/// 14/11/2019 : N Barros - Adding an additional check to check for the Z split runtime
///
/// \details Factory for solids, base class for multiple solid factories. This
/// factory will build a single solid and place it in the virtual detector.
///
///////////////////////////////////////////////////////////////////////////////
#ifndef __RAT_GeoSolidFactory_hh__
#define __RAT_GeoSolidFactory_hh__
#include
#include
class G4VSolid;
class G4LogicalVolume;
class G4Material;
namespace RAT
{
class GeoSolidFactory : public GeoFactory
{
public:
/// Construct a GeoSolidFactory, name the factory solid
GeoSolidFactory() : GeoFactory( "solid" ) { }
/// Constructor for derived classes
///
/// @param[in] name of the factory
GeoSolidFactory( const std::string& name ) : GeoFactory( name ) { }
/// Construct the physical volume
///
/// @param[in] table defines the volume
/// @param[in] checkOverlaps when placing
virtual void Construct( DBLinkPtr table,
const bool checkOverlaps );
protected:
/// Place the volume in the virtual detector
///
/// @param[in] name of the volume
/// @param[in] table that defines the volume
/// @param[in] logicalVolume to place in the virtual detector
/// @param[in] checkOverlaps when placing
virtual void PlaceVolume( const std::string& name,
DBLinkPtr table,
G4LogicalVolume* const logicalVolume,
const bool checkOverlaps ) const;
/// Build the logical volume from the solid using the db table
///
/// @param[in] name of the volume
/// @param[in] table that defines the volume
/// @param[in] solid the logical volume extends
/// @param[in] material of the volume
/// @return pointer to the logical volume
G4LogicalVolume* BuildVolume( const std::string& name,
DBLinkPtr table,
G4VSolid* const solid,
G4Material* const material ) const;
};
} //::RAT
#endif