Selecting events from multiple branch

Hi,

I have a root file with two trees:
a) UnCleaned (the branches are EventNumber, mass and direction)
b) Cleaned (branches are EventNumber, direction)

Now, ‘Cleaned’ is strictly a subset of ‘Uncleaned’. My question is how do I histogram all the Cleaned.direction events with a cut like Uncleaned.mass <5).

I would greatly appreciate any help.

Cheers
Erdos

PS the above scenario is purposefully simplified. I want to learn how to work with multiple trees at the same time!

Maybe I don’t understand the question, but why not:

for(Int_t i=0;cleantr->GetEntry(i) && uncleantr->GetEntry(i);i++ )
          if(unclean_mass<5)
             h1->add(clean_direction)
h1->Draw()

where the branches and whatnot have been set in the obvious way?