// LayerXYPlane.h #ifndef LayerXYPlane_H #define LayerXYPlane_H // This is a layer consisting of one XYPlane surface. // Clusters may be associated with the layer via a cluster finder. #include "SurfXYPlane.h" #include "trflayer/Layer.h" #include "trflayer/ClusterFindManager.h" #include "SurfXYPlanePtr.h" namespace trf { class LayerXYPlane : public Layer { public: // static methods // Return the type name. static TypeName get_type_name() { return "LayerXYPlane"; } // Return the creator. static ObjCreator get_creator(); // Return the type. static Type get_static_type() { return get_creator(); } protected: // XYPlane surface SurfXYPlanePtr _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. LayerXYPlane( const SurfXYPlanePtr& xyptr, MutableClusterFindManagerPtr pfind = MutableClusterFindManagerPtr(0) ); //copy constructor LayerXYPlane(const LayerXYPlane&); const LayerXYPlane& operator=(const LayerXYPlane&); // destructor ~LayerXYPlane(); 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 XYPlane 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); // to get access to surface parameters. double get_XYPlane_parameter(int i) const { return _srf->get_parameter(i); }; const SurfXYPlanePtr& get_surface() const {return _srf;} const MutableClusterFindManagerPtr& get_finder() const {return _pfind;} }; } // end namespace trf #endif