// LayerCylinder.h #ifndef LayerCylinder_H #define LayerCylinder_H // This is a simple layer consisting of one cylindrical surface. // Propagation assumes tracks originate from inside the cylinder; // i.e. forward for tracks inside and backward for tracks outside. // Clusters may be associated with the layer via a cluster finder. // // ObjStream example: // // [ BSurfCylinder mycyl r=30.0 zmin=-65. zmax=65. ] // [ LayerCylinder mylyr surface=@mycyl finder=@myfind ] // #include "trflayer/Layer.h" #include "BSurfCylinder.h" #include "trflayer/ClusterFindManager.h" namespace trf { class LayerCylinder : public Layer { private: // static attributes public: // static methods // Return the type name. static TypeName get_type_name() { return "LayerCylinder"; } // Return the creator. static ObjCreator get_creator(); // Return the type. static Type get_static_type() { return get_creator(); } private: // attributes // surface SurfacePtr _psrf; // cluster finder MutableClusterFindManagerPtr _pfind; // Miss. // If defined, a copy of this miss is added to the status after // updating with track. MissPtr _pmiss; private: // implement Layer methods // output stream void ostr(std::ostream& stream) const; // propagate to this layer void _propagate(const LTrack& trl, const Propagator& prop,\ LTrackList& ltracks) const; public: // constructors // constructor // Set pfind = 0 if no clusters are associated with layer. LayerCylinder(double r, double zmin, double zmax, const MutableClusterFindManagerPtr& pfind =MutableClusterFindManagerPtr(0), const MissPtr& pmiss =MissPtr(0) ); // constructor from a SurfCylinder // Set pfind = 0 if no clusters are associated with layer. LayerCylinder(const Ptr& psrf, const MutableClusterFindManagerPtr& pfind =MutableClusterFindManagerPtr(0), const MissPtr& pmiss =MissPtr(0) ); // destructor ~LayerCylinder(); public: // implement Layer methods // Return the type. Type get_type() const { return get_static_type(); } // Write the object data. ObjData write_data() const; // Return the list of surfaces. SurfaceList get_cluster_surfaces() const; // return the list of clusters ClusterList get_clusters() const; // Return the clusters associated with a surface. ClusterList get_clusters(SurfacePtr psrf) const; // add a cluster // cluster surface is required to match this cylinder int add_cluster(const ClusterPtr& pclu); // add a cluster associated with a surface // cluster surface and pointer surface are required to match // this cylinder int add_cluster(const ClusterPtr& pclu, SurfacePtr psrf); // drop clusters void drop_clusters(); public: // methods specific to this subclass // Return the surface. const SurfacePtr& get_surface() const { return _psrf; } // Return the finder. const ClusterFindManagerPtr get_finder() const { return _pfind; } }; } // end namespace trf; #endif