####################################################################### import user # look for .pythonrc.py for user init import ROOT import PyCintex import AthenaROOTAccess.transientTree v = ROOT.TLorentzVector() spartyjetdir = '/lapp_data/atlas/delsart/testARA/spartyjet/libs/' ROOT.gSystem.Load(spartyjetdir+"libJetCore.so") # ROOT.gSystem.Load(spartyjetdir+"libCDFJet.so") ROOT.gSystem.Load(spartyjetdir+"libFastJet.so") # ROOT.gSystem.Load(spartyjetdir+"libExtras.so") # ROOT.gSystem.Load(spartyjetdir+"libATLASJet.so") SJ = ROOT.SpartyJet ####################################################################### ## Ususal ARA set-up ################################################## # Put your AOD file here. aodFile = 'test.AOD.root' f = ROOT.TFile.Open (aodFile) assert f.IsOpen() # Fill this in if you want to change the names of the transient branches. branchNames = {} #branchNames['ElectronCollection'] = 'ele' #branchNames['PhotonCollection'] = 'gam' tt = AthenaROOTAccess.transientTree.makeTree(f, branchNames = branchNames) # tt is the transient tree "CollectionTree_trans" containing the (proxies) to # all available transient data object in the file f. # The original, persistent tree is declared as a friend # of CollectionTree_trans, so that the transient tree will provide # access to both transient data objects and to their persistent counterparts. ####################################################################### ## Set-up SpartyJet ################################################### # instantiate an ARA input reader for spartyjet : input = ROOT.ARAClusterInputMaker() input.set_tree_collection_name(tt, "CaloCalTopoCluster") # give it the ARA ttree input.set_name("CaloCalTopoCluster") # set the name of the input # ------------------------------------------------ # Create a JetBuilder builder = SJ.JetBuilder() builder.configure_input(input) # configure input and output pt cuts builder.set_default_cut(0,1000) # configure algorithms -------------------------------------- # add a Kt algo fj = SJ.fastjet.FastJetFinder("FastJet",False,False) builder.add_default_alg(fj,True) # add a SIScone algo builder.add_default_alg( SJ.fastjet.SISConeFinder("SISCone"),True); # set output variable type builder.output_var_style.array_type = "array" builder.output_var_style.base_type = "float" # set output tree/ file builder.configure_output("myTree","outN.root") print "configure_output ok !!" # now reun #builder.silent_mode() builder.process_events(10) #builder.process_events(6000)