modified ttTree.cpp