optixTriangle: how to shoot rays to specific set of co-ordinates?

At which part of the ray tracing pipeline of the optixTriangle sample will I be able to check the hit/miss event?

Not sure if you’re trolling now. :-)

Please scroll down inside the optixTriangle.cu file and look at the __closesthit__ch() and __miss__ms() programs.

The OptiX Programming Guide explains what each program domain does:
https://raytracing-docs.nvidia.com/optix8/guide/index.html#basic_concepts_and_definitions#program-and-data-model

Of you only need to determine if you hit or missed something, you wouldn’t even need one of these programs.
That would be a visibility test ray which can be implemented with just a miss program or an anyhit program like described here when following the links in this post:
https://forums.developer.nvidia.com/t/optix-payload-value-incorrect/294505/8