[ROOT] FW: pruning events in a tree

From: Dubois, Richard (richard@SLAC.stanford.edu)
Date: Thu Apr 17 2003 - 06:09:14 MEST


Sorry if this arrives twice... Not sure if root.cern.ch handles the list anymore...

 

-----Original Message-----
From: Dubois, Richard 
Sent: Wednesday, April 16, 2003 9:00 PM
To: 'Root Discussion'
Subject: pruning events in a tree

 

I'd like to make a copy of a tree, but excise events (not branches) that fail some cut. It looks like using TTree::CloneTree(0) to start off, followed by TTree::CopyTree("","",1,ievent) to copy ievent (if it passes the cuts) would do the trick. I'm looking for a generic solution so I don't have to tell Root much about the new tree. Is that a pipe dream? :-)

 

 There is a note about setting the branches for the TTree in the doc. Is this referring to the original or cloned tree?

 

 When I try this, I get an output file, but it looks like just a header.

 

 Is there a recipe for doing this? 3.04.02 on RH 7.2.

 

Thanks,

 

Richard

--

Richard Dubois

Stanford Linear Accelerator Center

Stanford, CA

650-926-3824

650-926-8616 (FAX)

http://www.slac.stanford.edu/~richard

 



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET