// ClusterFinder.h #ifndef ClusterFinder_H #define ClusterFinder_H #include #include "trfbase/Algorithm.h" // A finder provides access to a list of clusters associated with // a surface. It provides a method to return the complete list and a // method to return clusters near a specified track at the surface. // // This class is abstract; subclasses provide concrete implementations // for specific surfaces and clusters. // // Layers construct these cluster finders and include them in the layer // status objects returned after layer propagation. // #include "trfbase/Hit.h" namespace trf { class CutRecord; class ClusterContainer; class ClusterFinder : public Algorithm { private: // data // Flags to identify infinite loop. mutable bool _def1; mutable bool _def2; public: // static methods // Return the type name. static TypeName get_type_name() { return "ClusterFinder"; } // Return the creator. static ObjCreator get_creator(); // Return the type. static Type get_static_type() { return get_creator(); } public: // methods // constructor ClusterFinder(); // destructor virtual ~ClusterFinder(); // Return the generic type of this class. // Subclasses must not override. Type get_generic_type() const { return get_static_type(); } // Return the surface. virtual const Surface& get_surface() const =0; // Return all the clusters associated with this surface. virtual ClusterList get_clusters() const =0; // Return all the clusters near the specified track at the surface. // This method is now obselete. Use get_cluster_container. virtual ClusterList get_clusters(const ETrack& tre) const; // Return all the clusters near the specified track at the surface // and generate CutRecords. // This method is now obselete. Use get_cluster_container. virtual ClusterList get_clusters_with_records( const ETrack& tre, const CutRecord* pcut_record, std::map< ClusterPtr, CutRecord*>* precs) const; // Return the clusters near a track in a cluster container. // Default implementation insures backward compatibility using // the obselete get_clusters(const ETrack&) or // get_clusters_with_records. virtual const ClusterContainer& get_cluster_container( const ETrack& tre, const CutRecord* pcut_record, std::map< ClusterPtr, CutRecord*>* precs) const; }; } // end namespace trf #endif