Issue with TTree cloning

Dear experts,

I have a little issue with the filling of TTrees that are created in this way:

First I have a TTree that is created normally (inside a given class), with several branches:

actually there are many many branches, and I need to create 5 other TTrees with the same structure, but that are filled with different constrains. So basically in my output rootfile I need to 6 TTrees filled with different events.

So what I do is, after the first TTree definition:

[quote]
tree_purity_GenPi=(TTree*)tree_purity_GenElecB->Clone();
tree_purity_GenX=(TTree*)tree_purity_GenElecB->Clone();
tree_purity_NonGenElec=(TTree*)tree_purity_GenElecB->Clone();
tree_purity_NonGenPi=(TTree*)tree_purity_GenElecB->Clone();
tree_purity_NonGenX=(TTree*)tree_purity_GenElecB->Clone();
tree_purity_GenPi->SetName(“tree_purity_GenPi”);
tree_purity_GenX->SetName(“tree_purity_GenX”);
tree_purity_NonGenElec->SetName(“tree_purity_NonGenElec”);
tree_purity_NonGenPi->SetName(“tree_purity_NonGenPi”);
tree_purity_NonGenX->SetName(“tree_purity_NonGenX”);
[/quote];

Then in the analysis code, I fill the different TTrees in this way:

Each branch of each TTree is filled with the value zero (while these values are definitely not zero), apart the first one that is filled normally, and the number of times they are filled is correct, I checked it with the screen display.

Do you see anything fishy in the definition of these TTrees?

Thanks in advance for your help,

Simon