// LayerZPlane.h #ifndef LayerZPlane_H #define LayerZPlane_H // This is a layer consisting of one ZPlane surface. // Clusters may be associated with the layer via a cluster finder. #include "SurfZPlane.h" #include "trflayer/Layer.h" #include "trflayer/ClusterFindManager.h" #include "SurfZPlanePtr.h" namespace trf { class LayerZPlane : public Layer { public: // static methods // Return the type name. static TypeName get_type_name() { return "LayerZPlane"; } // Return the creator. static ObjCreator get_creator(); // Return the type. static Type get_static_type() { return get_creator(); } protected: // ZPlane surface SurfZPlanePtr _srf; // cluster finder MutableClusterFindManagerPtr _pfind; private: // implement Layer methods // output stream void ostr(std::ostream& stream) const; protected: // propagate to this layer void _propagate(const LTrack& trl, const Propagator& prop,LTrackList&) const; public: // constructors // constructor // Set pfind = 0 if no clusters are associated with layer. LayerZPlane( const SurfZPlanePtr& zptr, MutableClusterFindManagerPtr pfind = MutableClusterFindManagerPtr(0)); LayerZPlane(const LayerZPlane&) ; const LayerZPlane& operator=(const LayerZPlane&) ; // destructor ~LayerZPlane(); public: // implement Layer methods // Return the type. Type get_type() const { return get_static_type(); } // Write the object data. ObjData write_data() const; Layer::SurfaceList get_cluster_surfaces() const; // We do have clusters. bool has_clusters() const { return true; } // return the list of clusters ClusterList get_clusters() const; ClusterList get_clusters(SurfacePtr psrf) const; public: // methods specific to this subclass // drop clusters void drop_clusters(); // add a cluster // surface is required to match this ZPlane int add_cluster(const ClusterPtr& pclu); // Add a cluster to a particular surface in the layer. // Default here is to crash or return an error. int add_cluster(const ClusterPtr& pclu, SurfacePtr psrf); const SurfZPlanePtr& get_surface() const {return _srf;} const MutableClusterFindManagerPtr& get_finder() const {return _pfind;} }; } // end namespace trf #endif