Fine-grained retrieval of sports plays using tree-based alignment of trajectories