/////////////////////////////////////////////////////////////////////////////// /// \class RAT::GeoAmBeSourceFactory /// /// \brief AmBe source factory /// /// \author Yan Liu /// /// REVISION HISTORY:\n /// 30/08/2018 : Y.Liu - First Version /// /// \details Factory for the AmBe source. /// /// To load this geometry, use: /// /generator/add ambesource /// /generator/rate/set 62. /// /////////////////////////////////////////////////////////////////////////////// #ifndef __RAT_GeoAmBeFactory_hh__ #define __RAT_GeoAmBeFactory_hh__ #include #include #include namespace RAT { class GeoAmBeSourceFactory : public GeoFactory { public: GeoAmBeSourceFactory() : GeoFactory( "AmBeBuilder" ) { }; virtual void Construct( DBLinkPtr table, const bool checkOverlaps ); void LoadCalibCommon(string fCalInfo); string fSourceType; TVector3 fPosition; TVector3 fOrientationVector; int fOrientationCode; private: /// read colorName entry from table and apply value as color to logicalVolume void SetColor(DBLinkPtr table, G4String colorName, G4LogicalVolume *logicalVolume); /// multiply elements of vector v by unit std::vector MultiplyVectorByUnit(std::vector v, const double unit); }; } //::RAT #endif