How to strip a ttree? CopyTree issue

if I want to create a new TTree from a old one with a cut X, how can I do it?
I tried CopyTree(X) :

TTree *TTree::CopyTree(const char *selection, Option_t *option, Long64_t
nentries, Long64_t firstentry)

If a Tree has an array branch i.e.: m[10]/F
and we try CopyTree(“m < 10”), it will copy all the EVENTS where there is (at least) one m[i] that match the selection.

But I want that it copies only the CANDIDATES of “m <10”. Thtas the same idea when you insert a cut in the Draw function. How can I do it?

CopyTree cannot change your internal arrays. Up to you to implement
the logic and the redefinition of the array. Proceed as shown in tutorial copytree3.C