#!/bin/env python # # Given a list of susynt files, report the ones where events were flagged as having 'susypropagator' events. # # # # [email protected] # Oct 2014 import glob import math import optparse import os import sys import utils r = utils.import_root() from plot_comparison import parse_input usage=""" %prog input1 [input2 ...] [options] where input1, input2, ... are SusyNt files or dirs or filelist.txt Example: %prog \ /gdata/atlas/ucintprod/SusyNt/susy_n0155/*/*root \ -v \ """ # general settings histoname='rawCutFlow' initial_label = 'Initial' # see SusyNtMaker::makeCutFlow()
#!/bin/env python # # Example showing how to read a SusyNt ntuple and call the SusyNtTools functions # # [email protected] # June 2014 import glob import os import utils r = utils.import_root() from cutflow import SkipEvent, Cutflow def main(): utils.load_packages() utils.generate_dicts() utils.import_SUSYDefs_enums() sample_name = 'Sherpa_CT10_lllnu_WZ' input_dir = '/var/tmp/susynt_dev/data/ntup_susy/' #input_dir = '/var/tmp/susynt_dev/data/ntup_common/' input_files = glob.glob(os.path.join(input_dir, '*.root*')) chain = r.TChain('susyNt') for f in input_files : chain.Add(f) num_entries = chain.GetEntries() num_entries_to_process = num_entries if num_entries<1e4 else int(1e4) print "About to loop on %d entries"%num_entries_to_process run_with_chain(chain, num_entries_to_process) def run_with_chain(tree, n_max_entries=-1):