That’s an odd assertion to make when the full pharmacodynamics and mechanism of action are unknown. Modafinil doesn’t increase your cognitive performance in the way that a substituted phenethylamine would. Focus and attention are certainly related to wakefulness, but wakefulness in and of itself doesn’t increase cognitive performance.
Substituted phenethylamines[1] are derivative compounds of phenethylamine. Many substituted phenethylamines are stimulants, while some are psychedelic too. Dopamine, epinephrine, amphetamine, pseudoephedrine, MDMA, and many others are considered to be substitued phenethylamines.
[1] https://en.wikipedia.org/wiki/Substituted_phenethylamine