Post-selection inference for models characterized by quadratic constraints