//////////////////////////////////////////////////////////////////////// /// \class RAT::PMTConstructor /// /// \brief Class that constructs the PMT Logical Volume using \n /// the PMT parameters /// /// \author Phil Jones /// \author Aksel Hallin -- contact person /// /// REVISION HISTORY:\n /// 07/09 : P.Jones - First Revision, new file. \n /// 08/10 : P.Jones - Added model parameterization \n /// 03/12 : P.Jones - Split into base class to allow square and /// cylindrical derived classes. \n /// /// \details Takes the PMT parameters and constructs a PMT /// solid and places it into a logical volume /// //////////////////////////////////////////////////////////////////////// #ifndef __RAT_PMTConstructor__ #define __RAT_PMTConstructor__ #include #include #include #include class G4PVPlacement; class G4LogicalVolume; class GLG4TorusStack; class G4OpticalSurface; namespace RAT { class PMTConstructor : public ConstructorBase { public: /// Constructor for the class, needs parameters and a name PMTConstructor( const std::string& prefix, ///< PMT Volume base name, i.e. prefix const PMTConstructorParams& params ///< Parameters that define the pmt ); virtual ~PMTConstructor() {} /// Construct the solids and logical PMT volumes virtual void ConstructLogical() = 0; /// Second stage of construction, add the logical surfaces (post placement in mother volume) void ConstructPhysical( G4PVPlacement* bodyPhys ); /// Returns the logical volume for the bucket G4LogicalVolume* GetLogicalVolume(); /// Returns the Max height above the pmt equator of the bucket virtual double GetMaxHeight() = 0; /// Returns the Max depth below the pmt equator of the bucket (note returns a -ive number) virtual double GetMaxDepth() = 0; /// Returns the Max radius virtual double GetHexRadius() = 0; /// Returns the z coord of the base of the pure photocathode double GetPhotocathodeBase(); /// Returns the PMT type std::string GetType(); /// Returns the Photocathode surface G4OpticalSurface* GetPhotocathodeSurface(); /// Returns the Mirror surface G4OpticalSurface* GetMirrorSurface(); /// Returns the name of the optical model std::string GetModelType(); /// Returns the name of the params for the optical model std::string GetModelParams(); /// Returns the pmt shape inline PMTConstructorParams::EShape GetShape(); protected: /// Set the visualisation and detector properties void SetAttributes(); PMTConstructorParams fPMTParameters; ///< The parameters that define a PMT std::string fPrefix; ///< The name used for the solids G4LogicalVolume* fBodyLogic; ///< The body logical volume G4LogicalVolume* fInner1Logic; ///< The inner (1=Upper) logical G4LogicalVolume* fInner2Logic; ///< The inner overlap region logical, may be NULL if PMT has no overlap region G4LogicalVolume* fInner3Logic; ///< The inner (3=Lower) logical G4LogicalVolume* fDynode1Logic; ///< The dynode logical (or top only) G4LogicalVolume* fDynode2Logic; ///< The dynode logical (bottom or middle only) G4LogicalVolume* fDynode3Logic; ///< The dynode logical (bottom only) G4PVPlacement* fInner1Phys; G4PVPlacement* fInner2Phys; G4PVPlacement* fInner3Phys; private: ///To prevent usage PMTConstructor(); }; inline std::string PMTConstructor::GetType() { return fPMTParameters.fPMTType; } inline G4OpticalSurface* PMTConstructor::GetPhotocathodeSurface() { //Needed for optical Models return fPMTParameters.fPhotocathodeSurface; } inline G4OpticalSurface* PMTConstructor::GetMirrorSurface() { //Needed for optical Models return fPMTParameters.fMirrorSurface; } inline double PMTConstructor::GetPhotocathodeBase() { // Needed for GLG4 PMT optical model return fPMTParameters.fPCMirrorOverlapTop; } inline PMTConstructorParams::EShape PMTConstructor::GetShape() { return fPMTParameters.fShape; } } //::RAT #endif