Hi,
another useful piece of information is to have a look to other posts on this forum such as this one, where Pythia events are generated and analysed in parallel with TDataFrame Error in <TTree::Branch>: The pointer specified for event is not of a class known to ROOT
Cheers,
Danilo