// GTrackPropagator.h #ifndef GTrackPropagator_H #define GTrackPropagator_H // This class propagates a global track to a surface, i.e. it takes // a global track and surface as input and produces a global track // state and the new surface. // // It does not attempt to refit the track, but does the best job it // can of producing a fit at the specified surface using the fit or // fits at neighboring surfaces. // // Presently an optimal fit can only be obtained before the first cluster // if the first hit if its cluster is optimal or after the last cluster if // its fit is optimal. There is no smoothing so optimal fits cannot be // obtained for intermediate points. // // If the TRF++ propagator is not provided (pointer is null), then // only surfaces crresponding to existing states are available. // // The default constructor has different behavior. It constructs a // default propagator (that returned by GtrTrfPropagator(2.0) is used). // It is expected that this will eventually be changed so that the // propagator is taken from the global track. // // If there is not such state or if the propagator is provided and the // the propagation fails, an invalid state is returned. #include #include "trfbase/SurfacePtr.h" #include "trfbase/PropagatorPtr.h" #include "GTrack.hpp" class GTrackPropagator { private: // attributes // TRF++ propagator trf::PropagatorPtr _pprop; public: // methods // Default constructor. // A default propagator is constructed. GTrackPropagator(); // Constructor from a propagator. explicit GTrackPropagator(const trf::PropagatorPtr& pprop); // destructor ~GTrackPropagator(); // Return the TRF++ propagator pointer. const trf::PropagatorPtr& get_propagator() const { return _pprop; } // Propagate track to a surface over a specified s-range. // A reference to an invalid state is returned if the surface // cannot be reached. // GTrackState propagate(const GTrack& gtr, const trf::SurfacePtr& srf, double s1 =GTrack::SMIN, double s2 =GTrack::SMAX) const; }; // output stream std::ostream& operator<<(std::ostream& stream, const GTrackPropagator& gtr); // equality bool operator==(const GTrackPropagator& lhs, const GTrackPropagator& rhs); // inequality inline bool operator!=(const GTrackPropagator& lhs, const GTrackPropagator& rhs) { return ! (lhs == rhs); } #endif