// ClusFindXYPlane1.h #ifndef ClusFindXYPlane1_H #define ClusFindXYPlane1_H // Cluster finder for a XYPlane layer. It maintains a map of // clusters of type HitXYPlane1 indexed by position // the clusters near a track can be retrieved quickly. // // A track is defined to be near a cluster if the chi-square difference // between the corresponding hit measurement and prediction is less // than _max_chsq_diff. #include #include "trflayer/ClusterFindManager.h" #include "SurfXYPlane.h" namespace trf { class ClusFindXYPlane1 : public ClusterFindManager { private: // typedefs // Map of cluster pointers indexed by position. #ifndef DEFECT_NO_STDLIB_NAMESPACES typedef std::map > ClusterMap; #else typedef map > ClusterMap; #endif public: // static methods // Return the type name. static TypeName get_type_name() { return "ClusFindXYPlane1"; } // Return the creator. static ObjCreator get_creator(); // Return the type. static Type get_static_type() { return get_creator(); } private: // attributes // surface SurfXYPlane _sxyp; // stereo angle double _wv; double _wz; // maximum allowed chi-square difference double _max_chsq_diff; // clusters ClusterMap _clusters; private: // methods void ostr(std::ostream& stream) const; public: // methods // constructor ClusFindXYPlane1(double dist, double phi, double wv, double wz, double max_chsq_diff); // destructor ~ClusFindXYPlane1(); // add a cluster int add_cluster(const ClusterPtr& pclu); // drop all clusters void drop_clusters(); // Return the surface. const Surface& get_surface() const { return _sxyp; }; // Return all the clusters. ClusterList get_clusters() const; // Return all the clusters near a track at the surface. ClusterList get_clusters(const ETrack& tre) const; double get_max_chsq_diff() const { return _max_chsq_diff ;} // Return the type. Type get_type() const { return get_static_type(); } // Write the object data. ObjData write_data() const; }; } // end namespace trf #endif