// SurfXYPlane.h #ifndef SurfXYPlane_H #define SurfXYPlane_H // Defines the pure suface correponding to a plane parallel to // the z-axis. // // The corresponding track parameters are: // u (cm) is fixed // 0 - v (cm) // 1 - z (cm) // 2 - dv/du // 3 - dz/du // 4 - q/p p is momentum of a track, q is its charge // // (u,v,z) forms a right-handed orthogonal coordinate system // // dist is closest distance between the z-axis and the plane // phi is an angle normal to the plane forms with the x-axis // phi is between 0 and 2*pi // phi is positive counterclockwise from x to u // This class serves as a base class for bounded cylinders. // // The forward direction for the surface is +u. #include "trfbase/Surface.h" namespace trf { class VTrack; class CrossStat; class SurfXYPlane : public Surface { public: // enums identifying surface parameters enum {NORMPHI = 0,DISTNORM = 1}; // track parameter indices enum { IV=0, IZ=1, IDVDU=2, IDZDU=3, IQP=4 }; public: // Return the type name. static TypeName get_type_name() { return "SurfXYPlane"; } // Return the creator. static ObjCreator get_creator(); // Return the type. static Type get_static_type() { return get_creator(); } protected: // attributes double _normphi,_distnorm; protected: // Output stream operator. // used by operator<<. virtual void ostr(std::ostream& stream) const; void raw_ostr(std::ostream& stream) const; // Return true if two surfaces have the same pure surface. // Argument may be safely downcast. bool safe_pure_equal(const Surface& srf) const; // Return true if this surface and the argument are in order. // See Surface::pure_less_than() for more information. // Argument may be safely downcast. bool safe_pure_less_than(const Surface& srf) const ; public: // constructor SurfXYPlane(double dist, double phi); // destructor virtual ~SurfXYPlane(); // pure type Type get_pure_type() const { return get_static_type(); }; // Write the object data. ObjData write_data() const; // Virtual constructor. SurfXYPlane* new_pure_surface() const; // Find crossing status for a track. CrossStat pure_status(const VTrack& trv) const; // Return the surface parameter. double get_parameter(int i) const; // Return the difference between two track vectors. TrackVector vec_diff(const TrackVector& vec1, const TrackVector& vec2) const; // Return the space point for a track vector. SpacePoint space_point(const TrackVector& vec) const; // Return the space vector for a track vector. SpacePath space_vector(const TrackVector& vec, TrackSurfaceDirection dir) const; }; } // end namespace trf #endif