Hello people! How to read the branch momentum.fCoordinates.fX in tree? SetBranchAddress gives nulls.
Peace of code:
Double_t m_x[4] = { 0 };
tree->SetBranchAddress(“momentum.fCoordinates.fX”, &m_x[]);
You need to have equivalent types for it to work. You will probably either have to use tree->SetBranchAddress(“momentum.fCoordinates”, &m_x); or set it for each component individually. In any case, have you looked at RDataFrame? It’s probably easier to use it to process your data.
That’s right, only ROOT 6.14 and above have RDataFrame. In ROOT 6.10 and 6.12 it was called TDataFrame and was part of the ROOT::Experimental namespace.