I am trying to adding a new columns to TChain instances that I want to analyse.
New columns will have a new value from existing value in the instance with specific formula.
I followed introduction to add a new column to existing TTree as explained in the page of TTree class descripttion, but ROOT says: Warning in TChain Fill may not use this method
I don’t want to a temporary measure for the solution such as merging input files so on, but I want to strict solution how to solve such problem in such case that I must add a new column when I am working with TChain.
Hi @Nikel ,
something you can do is reading the TChain and writing out a separate TTree with the new branch. You can then add the new TTree as a friend of the TChain in order to “paste” them together horizontally (see e.g. the documentation of AddFriend).