// Surface.h #ifndef Surface_H #define Surface_H // TRF++ base class to describe a surface. // // There are two conceptual levels of concrete surfaces: // 1. Pure surfaces are unbounded and are used to specify the set // of track parameters used in VTrack. They derive directly // from Surface. Typically these are named SurfXXX. // 2. Bounded surfaces are derived from pure surfaces. // Typically these are named BSurfXXX. // // Typically the first two track parameters specify the position on the // surface, the next two the direction of the track and the last is // q/p where q is the charge (in natural units where the electron is -1) // and p is the total momentum in GeV/c. Note that the radius of // curvature (in cm) is then Rc = cos(tht) / [ 0.003 * (q/p) * B ] // where B is the magnetic field in Tesla and tht is the angle between the // field and the direction. Also 0.003 is actually 0.0029979.... // // This is an abstract class. Classes VTrack and Hit maintain pointers // of this type. // #include #include "trfobj/TrfObject.h" #include "TrackSurfaceDirection.h" class SpacePoint; class SpacePointVector; class SpacePath; namespace trf { class CrossStat; class TrackVector; class Surface; class VTrack; class ETrack; // Output stream operator. std::ostream& operator<<(std::ostream& stream, const Surface& srf); class Surface : public TrfObject { // Statics ************************************************************ public: // Return the type name. static TypeName get_type_name() { return "Surface"; } // Return the creator. static ObjCreator get_creator(); // Return the type. static Type get_static_type() { return get_creator(); } // Methods and friends implemented here. ***************************** public: // constructor Surface(); // destructor virtual ~Surface(); // Return the full type. // This implementation returns the pure type ==> // Pure surfaces need not override. // Bound surfaces should override. Type get_type() const; // Return the generic type of this class. // Subclasses must not override. Type get_generic_type() const; // Return whether this surface is pure. bool is_pure( ) const { return get_type() == get_pure_type(); }; // Return true if two surfaces are exactly the same // including bounds. bool bound_equal(const Surface& srf) const; // Return true if two surfaces have the same pure surface. bool pure_equal(const Surface& srf) const; // Ordering operator. Returns true if this surface comes before the // argument surface. Comparison is based on the pure parameters only. // As usual exactly one of a