Some trackpads have special functions that can be used together with a special driver (like scroll bars at the border of the trackpad). In this case it might be possible to detect the presence of a certain device driver (e.g. Acme Trackpad driver).
Howerver this would only work for some track pad models!
You could always detect an USB trackpad by the VID/PID.
However both methods would only work for trackpad models known by your program.
Other trackpads (especially PS/2 ones - maybe built in into laptops) do not identify themselfes as trackpads - they "tell" the computer that they are an ordinary mouse.
There is no chance to detect such a trackpad!