"How do elementary schools determine whether someone is gifted?"
Public schools in SF? They don't.
Private gifted schools? Using psychologist-administered tests.
"If it isn't the student body or budget, what makes Rooftop better?"
During the most recent year for which data are available (2019) half of Rooftop 3rd graders were not meeting state standards in math. 45% were not meeting state standards in ELA (English Language Arts).
Public schools in SF? They don't.
Private gifted schools? Using psychologist-administered tests.
"If it isn't the student body or budget, what makes Rooftop better?"
During the most recent year for which data are available (2019) half of Rooftop 3rd graders were not meeting state standards in math. 45% were not meeting state standards in ELA (English Language Arts).
So I'm not sure what you mean by 'better'?