// ClusFindZPlane2.h #ifndef ClusFindZPlane2_H #define ClusFindZPlane2_H // Cluster finder for a ZPlane layer. It maintains a map of // clusters of type HitZPlane2 indexed by x 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 "SurfZPlane.h" #include "trflayer/ClusterContainerStandard.h" namespace trf { class ClusFindZPlane2 : public ClusterFindManager { private: // typedefs public: // static methods // Return the type name. static TypeName get_type_name() { return "ClusFindZPlane2"; } // Return the creator. static ObjCreator get_creator(); // Return the type. static Type get_static_type() { return get_creator(); } private: // attributes // surface SurfZPlane _szp; // maximum allowed chi-square difference double _max_chsq_diff; // clusters ClusterContainerStandard _box; mutable ClusterContainerStandard _outbox; private: // methods void ostr(std::ostream& stream) const; public: // methods // constructor ClusFindZPlane2(double zpos, double max_chsq_diff = -1.); // destructor ~ClusFindZPlane2(); // add a cluster int add_cluster(const ClusterPtr& pclu); // drop all clusters void drop_clusters(); // Return the surface. const Surface& get_surface() const { return _szp; }; // 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; const ClusterContainer& get_cluster_container( const ETrack& tre, const CutRecord* pcut_record, std::map< ClusterPtr, CutRecord*>* precs) 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; private: void fill_container(const ETrack& tre) const; }; } // end namespace trf #endif