TTree Branch Leaf to hold a structure of arrays

Try to move “Int_t numPFCands;” to the last position in your structure (i.e. below “Int_t pdgid[2000];”).
If it helps, see [url]TTree with ‘C struct’