// McTrackState.cpp #include "McTrackState.hpp" #include using std::endl; using std::ostream; using namespace trf; //********************************************************************** // Default constructor. McTrackState::McTrackState() { } //********************************************************************** // Constructor from s and track. McTrackState::McTrackState(double s, const VTrack& trv) : _s(s), _trv(trv), _id(0) { } //********************************************************************** // Constructor from s, surface and track vector. McTrackState:: McTrackState(double s, const SurfacePtr& psrf, const TrackVector& vec) : _s(s), _trv(psrf,vec), _id(0) { } //********************************************************************** // Destructor. McTrackState::McTrackState(const McTrackState& trk) : _s(trk._s),_trv(trk._trv),_id(trk._id) { } McTrackState::~McTrackState() { } //********************************************************************** // Ordering. bool operator<(const McTrackState& lhs, const McTrackState& rhs) { return lhs.s() < rhs.s(); } //********************************************************************** // Equality. bool operator==(const McTrackState& lhs, const McTrackState& rhs) { return (lhs.s() == rhs.s()) && (lhs.track() == rhs.track() ); } //********************************************************************** // Output stream. ostream& operator<<(ostream& stream, const McTrackState& rhs) { if ( rhs.is_valid() ) { stream << "Path distance is " << rhs.s() << "." << endl; stream << "Detector Element Id is " <