// HitCylPhiZ.h #ifndef HitCylPhiZ_H #define HitCylPhiZ_H // Describes a phi-z measurement on a cylinder. // phiz = phi + stereo*z // // This is a very simple hit. It produces one prediction with fixed // measurement which is simply the phiz of the track. // ObjStream examples: // // [ myclus ClusCylPhi radius=30.0 phiz=0.2634 dphiz=0.0012 stereo=.012 ] // #include "trfbase/McCluster.h" #include "SurfCylinder.h" namespace trf { //********************************************************************** class ClusCylPhiZ : public McCluster { public: // static methods // Return the type name. static TypeName get_type_name() { return "ClusCylPhiZ"; } // Return the creator. static ObjCreator get_creator(); // Return the type. static Type get_static_type() { return get_creator(); } private: // attributes // the surface SurfCylinder _scy; // the phi-z mixing double _stereo; // the measurement double _phi; // the error (standard deviation) for the measurement double _dphi; 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 ClusCylPhiZ(double radius, double phi, double dphi, double stereo); // constructor with MC ID's ClusCylPhiZ(double radius, double phi, double dphi, double stereo, const McIdList& mcids); // copy constructor ClusCylPhiZ(const ClusCylPhiZ& rhs); // destructor ~ClusCylPhiZ( ); // Return 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 _scy; }; // return the stereo pitch double get_stereo() const { return _stereo; }; // return phiz double get_phiz() const { return _phi; }; // return dphiz double get_dphiz() const { return _dphi; }; // Return the radius. double get_radius() const { return _scy.get_radius(); } // there are no more predictions. Hit* new_next_prediction() const { return 0; }; }; //********************************************************************** class HitCylPhiZ : public Hit { // Only ClusCylPhiZ is allowd to construct HitCylPhiZ objects. friend class ClusCylPhiZ; public: // static methods // Return the type name. static TypeName get_type_name() { return "HitCylPhiZ"; } // Return the creator. static ObjCreator get_creator(); // Return the type. static Type get_static_type() { return get_creator(); } private: // prediction for phi double _phi_pre; // error matrix for phi double _ephi_pre; private: // output stream void ostr(std::ostream& stream) const; // equality bool equal(const Hit& hit) const; // constructor HitCylPhiZ(double phi, double ephi); public: // copy constructor HitCylPhiZ(const HitCylPhiZ& lhs); // destructor ~HitCylPhiZ( ); // 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 ClusCylPhiZ reference to the cluster const ClusCylPhiZ& get_full_cluster() const { return (const ClusCylPhiZ&) *_pclus; }; }; } // end namspace trf #endif