Object name in a tree

I have a question about Event example. When I read the tree produced by Event, I can access the object and call its methods in a simple way:

T->Scan(“event.GetNtrack()”)

I don’t understand where exactly the mapping between the class name, stored object name and the branch name is defined. Is the object name really stored or its defined in the library? In this example the object name and branch name are the same, but I have another example where it’s not the case. Is there a way to list all object names that can be called in TTree::Draw and TTree::Scan, i.e.(T->Draw(“object_name.method()”)?

Thanks,
Dmitriy

I think I can answer my question myself. A valid object name in a tree is simply a branch name or an alias to it ( TTree::GetListOfAliases() ).

Dmitriy

Indeed.
Philippe