How to distinguish trees when drag-n-drop

Hi,
I have several trees on the page, and I need them enable drag-n-drop among trees or inside themselves. However, d-n-d behaviors are different from tree pairs. I tried the arguments sObject and tObject in onDrag method, with sObject==tObject, but it only can tell whether tObject is sObject, how can I know which is which? For example, how can I know the name or id of the objects?

Currently, I use setUserData() method for every node in the tree so that the trees can be distinguished, but I think maybe it’s not necessary.
Thanks!

I suddenly realize the objects can be compared directly.
so, globally obj1, obj2, … can be compared with sObject or tObject.