// HitZPlane1.h #ifndef HitZPlane1_H #define HitZPlane1_H // Describes a x-y measurement on a ZPlane. // axy = wx*x + wy*y // // This is a very simple hit. It produces one prediction with fixed // measurement which is simply the axy of the track. #include "trfbase/Hit.h" #include "trfbase/McCluster.h" #include "SurfZPlane.h" namespace trf { //********************************************************************** class ClusZPlane1 : public McCluster { public: // static methods // Return the type name. static TypeName get_type_name() { return "ClusZPlane1"; } // Return the creator. static ObjCreator get_creator(); // Return the type. static Type get_static_type() { return get_creator(); } private: // attributes // the surface SurfZPlane _szp; // the x axis weight double _wx; // the y axis weight double _wy; // measurement double _axy; // the error (standard deviation) for the measurement double _daxy; private: // methods // output stream void ostr(std::ostream& stream) const; // equality bool equal(const Cluster& clus) const; // generate first (and only) track prediction HitList _predict(const ETrack& tre) const; public: // methods // constructor ClusZPlane1(double zpos, double wx, double wy, double axy,double daxy); ClusZPlane1(double zpos, double wx, double wy, double axy,double daxy,const McIdList& mcids ); // copy constructor ClusZPlane1(const ClusZPlane1& rhs); // destructor ~ClusZPlane1( ); // return a unique address specifying the type Type get_type() const { return get_static_type(); }; // Write the object data. ObjData write_data() const; // return the surface const Surface& get_surface() const { return _szp; }; // return the wx pitch double get_wx() const { return _wx; }; // return the wy pitch double get_wy() const { return _wy; }; // return axy double get_axy() const { return _axy; }; // return daxy double get_daxy() const { return _daxy; }; // there are no more predictions. Hit* new_next_prediction() const { return 0; }; }; //********************************************************************** class HitZPlane1 : public Hit { // Only ClusZPlane1 is allowed to construct HitZPlane1 objects. friend class ClusZPlane1; public: // Return the type name. static TypeName get_type_name() { return "HitZPlane1"; } // Return the creator. static ObjCreator get_creator(); // Return the type. static Type get_static_type() { return get_creator(); } private: // prediction for axy double _axy_pre; // error matrix for axy double _eaxy_pre; private: // output stream void ostr(std::ostream& stream) const; // equality bool equal(const Hit& hit) const; // constructor HitZPlane1(double axy, double eaxy); public: // copy constructor HitZPlane1(const HitZPlane1& lhs); // destructor ~HitZPlane1( ); // Return the type. Type get_type() const { return get_static_type(); } // Write the object data. ObjData write_data() const; // return the dimension int size() const { return 1; }; // return the measured hit vector HitVector measured_vector() const; // return the measured hit error HitError measured_error() const; // return the predicted hit vector HitVector predicted_vector() const; // return the predicted hit error HitError predicted_error() const; // return the derivative HitDerivative dhit_dtrack() const; // return the difference between prediction and measurement HitVector difference_vector() const; // update the prediction void update( const ETrack& tre); // return a ClusZPlane1 reference to the cluster const ClusZPlane1& get_full_cluster() const { return (const ClusZPlane1&) *_pclus; }; }; } // end namespace trf #endif