// CheckChiSquare.h #ifndef CheckChiSquare_H #define CheckChiSquare_H // Return true if the track chi-square is at or below a threshold. // // ObjStream example: // // [ mycheck CheckChiSquare max_chisq=12.3 ] // #include #include "Checker.h" #include "trfcut/CutID.hpp" namespace trf { class CheckChiSquare : public Checker { public: // static methods // Return the type name. static TypeName get_type_name() { return "CheckChiSquare"; } // Return the creator. static ObjCreator get_creator(); // Return the type. static Type get_static_type() { return get_creator(); } private: // attributes // chi-square threshold double _max_chisq; // Cut recorder cut id. CutID _cut_id; private: // methods // output stream void ostr(std::ostream& stream) const; public: // methods // constructor CheckChiSquare(double max_chisq, const std::string& cut_name=""); // Return the type. Type get_type() const { return get_static_type(); } // Write the object data. ObjData write_data() const; // Return max chi-square. double get_max_chisq() const { return _max_chisq; } // return the status for the specified track bool status_with_record(const MTrack& trm, CutRecord* pred) const; }; } // end namespace trf #endif