// SurfDCA.h #ifndef SurfDCA_h #define SurfDCA_h // Defines the pure surface corresponding to the point (Distance) // of Closest Approach (DCA) of a track from a given origin. // The surface parameter is the angle alpha from the radial direction // to the direction of the track: // alpha = phi_direction-phi_position . // By definition, alpha = +/- pi/2 for the DCA surface. // A track on a DCA surface would be parametrized by: // (r, phi_position, z, tan(lamda), q/pT). // In order to make the parameters continous when a track crosses // the origin, however, a modified set of parameters has been chosen: // alpha_positive = abs(alpha) = pi/2 for the DCA surface, // (r, z, phi_direction, tan(lamda), q/pT) for a track, // where: // r_signed = sign(alpha) * r // phi_direction = alpha + phi_position // // The method get_parameter is designed to always return +pi/2 // and the method safe_pure_equal is designed to always return true. // // The crossing status of a track and the DCA surface is defined // as following: // at - the pure surface of the track is the DCA surface // on - the track vector is on the DCA surface, // i.e. the angle from the radial direction to // the direction of the track is equal to pi/2 // (in absolute value) // inside - the track vector points towards the origin, // i.e. the angle from the radial direction to // the direction of the track is greater than pi/2 // (in absolute value) // outside - the track vector points away from the origin, // i.e. the angle from the radial direction to // the direction of the track is less than pi/2 // (in absolute value) // // Note that all angles are defined from -pi to pi. // // ObjsStream example: // // [ dca SurfDCA ] // #include "trfbase/Surface.h" namespace trf { class VTrack; class CrossStat; class SurfDCA : public Surface { // Parameters ****************************************** public: // enums // Track parameters. enum { IRSIGNED=0, IZ=1, IPHID=2, ITLM=3, IQPT=4 }; // Surface Parameters enum { IX =0 , IY=1 }; public: // static methods // Return the type name. static TypeName get_type_name() { return "SurfDCA"; } // Return the creator. static ObjCreator get_creator(); // Return the type. static Type get_static_type() { return get_creator(); } // Methods ********************************************* public: // constructor SurfDCA (double x=0.,double y=0.); SurfDCA (const SurfDCA& dca); // destructor virtual ~SurfDCA(); // virtual constructor SurfDCA* new_pure_surface() const; // Return the type. Type get_pure_type() const { return get_static_type(); } // Write the object data. ObjData write_data() const; // return the surface parameter double get_parameter(int i) const; // return crossing status for a track CrossStat pure_status( const VTrack& trv ) 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; // return q/p double qoverp(const TrackVector& vec) const; double get_x() const {return _x;} double get_y() const {return _y;} protected: // Output stream operator. // used by operator<<. virtual void 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 two surfaces are ordered. // Argument may be safely downcast. bool safe_pure_less_than(const Surface& srf) const; // Return the direction - always Forward. TrackSurfaceDirection get_direction(const TrackVector& vec) const; private: double _x; double _y; }; } // end namespace trf #endif