#!/usr/bin/env python # $Id: HWGHiggsExample.py 873 2010-07-07 00:04:39Z verm $ __author__ = 'Christopher K. Vermilion' __email__ = 'verm@uw.edu' __modified__ = '$Date: 2010-07-06 17:04:39 -0700 (Tue, 06 Jul 2010) $' __copyright__ = 'Copyright 2010 Christopher K. Vermilion' __license__ = 'GPL http://www.gnu.org/licenses/gpl.html' import sys from SpartyJetConfig import * from ROOT import gSystem gSystem.Load('libFastPruneTool.so') #=============================================== # This script implements the BDRS Higgs analysis. See the SpartyJet # example examples_py/FJToolExample.py for more details on the # implementation of filtering tools. # Create a jet builder--------------------------- builder = SJ.JetBuilder(SJ.ERROR) # Configure input ------------------------------- input = SJ.HuskyInput(sys.argv[1]) builder.configure_input(input) # Configure algorithms -------------------------- # Start with AntiKt12 antikt12 = SJ.FastJet.FastJetFinder('AntiKt12',fj.antikt_algorithm,1.2,False) builder.add_default_alg(antikt12) builder.add_jetTool(SJ.JetPtSelectorTool(200*input.getGeV())) AKTparent = SJ.ForkToolParent('AntiKt12Parent') builder.add_jetTool(AKTparent, 'AntiKt12') # Recluster with CA, forking again for comparison to just CA AKTchild = SJ.ForkToolChild(AKTparent, 'CA12') builder.add_custom_alg(SJ.JetAlgorithm(AKTchild)) builder.add_jetTool(SJ.FastJet.FastJetRecluster('CA12cluster', fj.cambridge_algorithm, 1.5, False), 'CA12') CAparent = SJ.ForkToolParent('CA12Parent') builder.add_jetTool(CAparent, 'CA12') # BDRS Mass-drop filter analysis child = SJ.ForkToolChild(CAparent, 'CA12MDF') builder.add_custom_alg(SJ.JetAlgorithm(child)) # Input min pt cut #builder.add_jetTool_input(SJ.JetPtSelectorTool(0.5*input.getGeV())) # PDG id cut -- remove muons (13) and neutrinos (12, 14, 16) ids = stdVector(-12, 12, 14, -14, 16, -16, 13, -13) builder.add_jetTool_input(SJ.JetInputPdgIdSelectorTool(ids)) # Input eta cut builder.add_jetTool_input(SJ.JetEtaCentralSelectorTool(-5.0,5.0)) #======Here is where the algorithms defined above will run ====== # Add MassDrop and Filter tools, a la BDRS Higgs analysis subjetFinder = SJ.MassDropTool(0.67, 0.09, 1, 'MassDrop') builder.add_jetTool(subjetFinder, 'CA12MDF') # Require two subjets after MassDrop tool builder.add_jetTool(SJ.SubjetCutTool(subjetFinder, 2), 'CA12MDF') builder.add_jetTool(SJ.FastJet.BDRSFilterTool(1.2, 0.3, 3), 'CA12MDF') # Configure output-------------------------------- builder.add_text_output("../data/output/HWGHiggsExample.dat") builder.configure_output("SpartyJet_Tree",sys.argv[2]) # Run SpartyJet builder.print_event_every(100) builder.process_events()