Raycast painted tree/terrain problem

I would like to use raycasting and differentiate a hit between trees painted by the terrain tree painting tool and the terrain itself. Is there a simple/efficient way to do this? Apparently the colliders of the trees become part of the terrain collider when painting, so I don’t know how to differentiate a raycast hit on a tree from a hit on the terrain. Would really appreciate some answers. I’m trying to avoid placing all of my trees manually.