// CheckCylDca.h #ifndef CheckCylDca_H #define CheckCylDca_H // Return true if the track z intercept at the beamline is // at or below a threshold. // // ObjStream example: // // [ mycheck CheckCylDca max_dca=100. bfield=2.0 ] // // To use the global bfield: // // [ mycheck CheckCylDca bfield=@bfield ] // #include #include "trffind/Checker.h" #include "trfcut/CutID.hpp" #include "trfbase/ObjDoublePtr.h" namespace trf { class CheckCylDca : public Checker { public: // static methods // Return the type name. static TypeName get_type_name() { return "CheckCylDca"; } // Return the creator. static ObjCreator get_creator(); // Return the type. static Type get_static_type() { return get_creator(); } private: // attributes // z intercept threshold double _max_dca; // b field ObjDoublePtr _bfield; private: // methods // output stream void ostr(std::ostream& stream) const; public: // methods // constructor CheckCylDca(double max_dca, ObjDoublePtr bfield, 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 z intercept. double get_max_dca() const { return _max_dca; } // Return bfield. double get_bfield() const { return (*_bfield)(); } // return the status for the specified track bool status_with_record(const MTrack& trm, CutRecord* prec) const; // Cut recorder cut id. CutID _cut_id; }; } // end namespace trf #endif