// FilterShares.h #ifndef FilterShares_H #define FilterShares_H // Filter which deletes tracks which share a specified number of // clusters. The track with the larger chi-square is rejected. The // processing is done in order of increasing chi-square so that // tracks can only be rejected by accepted tracks. // // ObjStream example: // // [ myfilt FilterShares min_share_count=3 ] // [ myfilt FilterShares min_share_count=3 last_match=true ] // #include "Filter.h" namespace trf { class FilterShares : public Filter { public: // static methods // Return the type name. static TypeName get_type_name() { return "FilterShares"; } // Return the creator. static ObjCreator get_creator(); // Return the type. static Type get_static_type() { return get_creator(); } private: // attributes // minimum number of shared hits int _nshare; // flag indicating if last hits are required to match bool _last_match; private: // methods // output stream void ostr(std::ostream& stream) const; public: // methods // constructor FilterShares(int nshare, bool last_match =false); // Return the type. Type get_type() const { return get_static_type(); } // Write the object data. ObjData write_data() const; // Return minimum number of hits at which tracks must share to // be filtered. int get_min_share_count() const { return _nshare; } // process a list of tracks FlagArray process(MTrackArray& trms) const; }; } #endif