We are unable to help you with so little information about your problem. Please state at least the version of ROOT you are using, the OS, and attach the script you are trying to run.
I cannot try to reproduce your problem because I do not have the input file. From your macro it is unclear to me what you are trying to do. Do you want to fill a TTree with a variable from your dataset? If yes, there is a problem with your macro. I don’t see anywhere a place where you fill your data in, only adding variables to a RooFit dataset.