Cocaine itself is one of the metabolites that is looked for, but there are others, like benzoylecgonine, which is also abundant in hair follicles.
The amount and ratio of these two indicates active cocaine use, if they did not detect any benzoylecgonine, they know that the kid did not touch coke, and it was just in the sample, if they found it in a good ratio, they
know it was actual use.
See the attached paper for more info (or look it up yourself, it's open access: doi/10.1002/dta.1903 )
EDIT: Conclusion if you're lazy:
View attachment 6102538