#ifndef SPHERICALSURFACE_HH #define SPHERICALSURFACE_HH #include namespace dgs { class SphericalCoordinate; class SphericalSurface: public GeometryElement { public: // default: SphericalSurface(): _radius( 0 ), _theta_min( 0 ), _theta_max( 0 ), _phi( 0 ), _cvers("$Revision: 1.4 $") {} // angles in radians // theta = angle between radius and positive z axis // initial azimuthal edge in x-z plane (phi = 0) SphericalSurface( const double radius, const double theta_min, const double theta_max, const double phi ): _radius( radius ), _theta_min( theta_min ), _theta_max( theta_max ), _phi( phi ), _cvers("$Revision: 1.4 $") {} // RECO interface: SpacePoint local_to_global( const SphericalCoordinate& ) const; SphericalCoordinate global_to_local( const SpacePoint& ) const; // alignment interface: bool resize( const double dr, const double dtheta_min, const double dtheta_max, const double dphi ); bool position_child_at( const SphericalCoordinate&, GeometryElement& ); /// Get source code version. Kept to allow following code changes const std::string& code_version() const { return _cvers; } // output: friend std::ostream& operator << (std::ostream&, const SphericalSurface& ); // accessors: double get_radius() const { return _radius; } double get_theta_min() const { return _theta_min; } double get_theta_max() const { return _theta_max; } double get_phi() const { return _phi; } D0_OBJECT_SETUP( SphericalSurface ); private: double _radius; double _theta_min; double _theta_max; double _phi; SphericalCoordinate xform_to_local( const GeometryXform& ) const; GeometryXform local_to_xform( const SphericalCoordinate& ) const; /// RCS version std::string _cvers; // Replaced at checkout }; } #endif // SPHERICALSURFACE_HPP