StTrackGeometry : Virtual Functions II
Implementation is provided in a derived class (but our analysis code only depends on the abstract interface)
class StHelixModel : public StTrackGeometry { … };
cout << track->geometry()->momentum() << endl;
// the call to StTrackGeometry::momentum() is really a call to
// StHelixModel::momentum() through the virtual pointer