[BLAST_ANAWARE] generic ntuple filter

From: Chris Crawford (chris2@lns.mit.edu)
Date: Wed Mar 17 2004 - 15:45:09 EST


hi,
  at the request of Genya, i've updated the init.C script with the
function 'filter(cut,ntuple,dir)' for generating an arbitrary filtered
ntuple. as an example of how to use it, i include a sample root session
with comments.
  you can add a third argument to filter to specify the directory of the
new ntuples, to avoid cluttering up $ANALDIR. note that you can only
create ntuples in $ANALDIR as the blast user.

// much faster than 'root flr.C 3800-3801'
root -l init.C+ ntuple=flr 3800-3801
root [1] filter("ntl+ntr==16","myntp") // creates new set of filtered
runs
root [2] .! ls -l $ANALDIR/my*
-rw-r--r-- 119198 /net/data/4/Analysis/data//myntp-3800.root
-rw-r--r-- 66433 /net/data/4/Analysis/data//myntp-3801.root
root [3] init("myntp") // load up the new ntuple series
root [4] myntp->Draw("ntl:ntr>>nn16") // see the effect of the filter
<TCanvas::MakeDefCanvas>: created default TCanvas with name c1
root [5] flr->Draw("ntl:ntr>>nn16") // the old chain still works too.

  also, i fixed a few bugs that had crept into init.C. we could also
use this script for standard filtered ntuples. hope this is useful.
--chris



This archive was generated by hypermail 2.1.2 : Mon Feb 24 2014 - 14:07:30 EST