#ifndef TUBULARSECTION_HH #define TUBULARSECTION_HH //============================================================================ // // Class : TubularSection // Created : 19-JAN-1998 by Stephen Kahn // Purpose : TUBS type GeometryElement // //============================================================================ #include #include #include #include namespace dgs { class CylindricalCoordinate; /// A tubular section. class TubularSection : public TubularShell { private: /// Lower phi double _phi_lower; /// Upper phi double _phi_upper; /// Tube section center CartesianCoordinate _Tube_Section_Ctr; /// Convert local point to global one SpacePoint local_to_global(const CartesianCoordinate&) const; /// Convert global point to local one CartesianCoordinate global_to_local(const SpacePoint&) const; /// Support for positioning children. CartesianCoordinate xform_to_local( const GeometryXform&) const; /// Support for positioning children. GeometryXform local_to_xform(const CartesianCoordinate&) const; /// RCS version std::string _cvers; // Replaced at checkout public : /// Default constructor TubularSection(): _cvers("$Revision: 1.8 $"){} /// Fill tubular section void fill_TubularSection( const double dz, const double ri, const double ro, const double phi1, const double phi2) ; /// Get lower phi double get_phi_lower() const { return _phi_lower;} /// Get upper phi double get_phi_upper() const { return _phi_upper;} /// Set center of tubular section as x,y,z Cartesian point void set_center_xyz( double, double, double); void set_center_xyz(); /// Position child surface at specified local point bool position_child_at(const CartesianCoordinate&, GeometryElement& ); bool position_child_at( const GeometryXform&, GeometryElement&); /// Set xform void set_Xform( double, double, double, double); /// Get center of tubular section CartesianCoordinate get_center() { return _Tube_Section_Ctr; } /// Get source code version. Kept to allow following code changes const std::string& code_version() const { return _cvers; } D0_OBJECT_SETUP(TubularSection); // persistent class }; } #endif // TUBULARSECTION_HH