improve LogicalSegment.cpp/h