def makePlotOp(OP = (), cutTree = None, cut = None, label = ""): """docstring for makePlotOp""" out = [] if OP[1] != None: plotpset = deepcopy(OP[1]) plotpset.DirName = label print plotpset.DirName op = eval(OP[0]+"(plotpset.ps())") else: op = eval(OP[0]) out.append(op) cutTree.TAttach(cut,op) alpha = OP_CommonAlphaTCut(0.55) dump = EventDump() skim_ps=PSet( SkimName = "myskim", DropBranches = False, Branches = [ " keep * " ] ) skim = SkimOp(skim_ps.ps()) # out.append(skim) # out.append(skim_ps) cutTree.TAttach(cut,alpha) #cutTree.TAttach(cut,dump) #cutTree.TAttach(cut,skim) #cutTree.TAttach(alpha,dump) #cutTree.TAttach(alpha,skim) out.append(skim) out.append(alpha) out.append(dump) return out pass
def makePlotOp(OP=(), cutTree=None, cut=None, label=""): """docstring for makePlotOp""" out = [] if OP[1] != None: plotpset = deepcopy(OP[1]) plotpset.DirName = label print plotpset.DirName op = eval(OP[0] + "(plotpset.ps())") else: op = eval(OP[0]) out.append(op) cutTree.TAttach(cut, op) alpha = OP_CommonAlphaTCut(0.55) dump = EventDump() skim_ps = PSet(SkimName="myskim", DropBranches=False, Branches=[" keep * "]) skim = SkimOp(skim_ps.ps()) # out.append(skim) # out.append(skim_ps) cutTree.TAttach(cut, alpha) cutTree.TAttach(alpha, dump) # cutTree.TAttach(alpha,skim) out.append(alpha) out.append(dump) return out pass
def AddBinedHist(cutTree=None, OP=(), cut=None, htBins=[], TriggerDict=None, lab=""): """docstring for AddBinedHist""" out = [] if TriggerDict is not None: for lower, upper in zip(htBins, htBins[1:] + [None]): # print "Lower , Upper =", lower , upper if int(lower) == 325 and upper is None: continue if int(lower) == 375 and upper is None: continue # print "continue should have happened now" lowerCut = eval("RECO_CommonHTCut(%d)" % lower) triggerps = PSet(Verbose=False, UsePreScaledTriggers=False, Triggers=[]) triggerps.Triggers = TriggerDict["%d%s" % (lower, "_%d" % upper if upper else "")] Trigger = OP_MultiTrigger(triggerps.ps()) out.append(triggerps) out.append(Trigger) out.append(lowerCut) cutTree.TAttach(cut, Trigger) cutTree.TAttach(Trigger, lowerCut) if upper: upperCut = eval("RECO_CommonHTLessThanCut(%d)" % upper) out.append(upperCut) cutTree.TAttach(lowerCut, upperCut) pOps = makePlotOp(cutTree=cutTree, OP=OP, cut=upperCut if upper else lowerCut, label="%s%d%s" % (lab, lower, "_%d" % upper if upper else "")) out.append(pOps) else: for lower, upper in zip(htBins, htBins[1:] + [None]): # print "Lower , Upper =", lower , upper if int(lower) == 325 and upper is None: continue if int(lower) == 375 and upper is None: continue # print "continue should have happened now" lowerCut = eval("RECO_CommonHTCut(%d)" % lower) out.append(lowerCut) cutTree.TAttach(cut, lowerCut) if upper: upperCut = eval("RECO_CommonHTLessThanCut(%d)" % upper) out.append(upperCut) cutTree.TAttach(lowerCut, upperCut) pOps = makePlotOp(cutTree=cutTree, OP=OP, cut=upperCut if upper else lowerCut, label="%s%d%s" % (lab, lower, "_%d" % upper if upper else "")) out.append(pOps) return out pass
def evList_to_pset(fname, debug=False): """ Takes an input event list file and converts to a PSet suitable for use in analysis code.""" """NOTE: made for txt file format 'Run:LS:Event' """ import sys from icf.core import PSet with open(fname, "r") as f: p = PSet() runList = [] lumiSList = [] evList = [] for line in f: lineTmp = line.split(":") #fill each list runList.append(int(lineTmp[0])) lumiSList.append(int(lineTmp[1])) evList.append(int(lineTmp[2])) #create new entry in the PSet for each list p._quiet_set("Run", runList) p._quiet_set("Lumi", lumiSList) p._quiet_set("Event", evList) return p.ps()
def createRatioPlots(ratio, truth=False, pt_default=50., ht_default=350., pt1_default=125., pt2_default=100.): # Define pT bins to be used pt_min = 20 pt_max = 50 pt_step = 10 # Define x3 from pT and HT defaults for analysis x3_default = (2. * pt_default) / (ht_default + pt_default) factor = (2. - x3_default) / x3_default # Determine maximum values for HT and Meff (from max pT value) ht_max = pt_max * 1. * factor meff_max = pt_max * 1. + ht_max # Iterate through AlphaT values for ii in range(0, 11): alphat = 500 + ii * 5 # Iterate through pT values for pt in range(pt_min, pt_max + pt_step, pt_step): # Define HT and Meff from pT value ht = pt * 1. * factor meff = pt * 1. + ht # Define scaled pT values appropriate for given Meff pt1 = pt1_default * meff / meff_max pt2 = pt2_default * meff / meff_max # Iterate through scaled pT values for jj in range(0.8, 1.2, 0.1): # Define scaled pT values appropriate for given Meff pt1 *= jj pt2 *= jj # Define histograms dir = "Ratio" + str(alphat) + "Pt" + str(pt) + "Scale" + str( jj) ratio.append( RobPlottingOps( PSet( DirName=dir, MinObjects=2, MaxObjects=8, Ratio=True, MinJetPt=pt * 1., MinJetPt1=pt1, MinJetPt2=pt2, UseGen=truth, MinGenPt=pt_min * 1., MaxGenMET=10., AlphaTcut=(alphat / 1000.), ).ps()))
def AddBinedHist(cutTree = None, OP = (), cut = None, htBins = [],TriggerDict = None,lab = ""): """docstring for AddBinedHist""" out = [] if TriggerDict is not None: for lower,upper in zip(htBins,htBins[1:]+[None]): # print "Lower , Upper =", lower , upper if int(lower) == 325 and upper is None: continue if int(lower) == 375 and upper is None: continue if int(lower) == 475 and upper is None: continue if int(lower) == 675 and upper is None: continue # print "continue should have happened now" lowerCut = eval("RECO_CommonHTCut(%d)"%lower) triggerps = PSet(Verbose = False, UsePreScaledTriggers = False, Triggers = []) triggerps.Triggers = TriggerDict["%d%s"%(lower, "_%d"%upper if upper else "")] Trigger = OP_MultiTrigger( triggerps.ps() ) out.append(triggerps) out.append(Trigger) out.append(lowerCut) cutTree.TAttach(cut,Trigger) cutTree.TAttach(Trigger,lowerCut) if upper: upperCut = eval("RECO_CommonHTLessThanCut(%d)"%upper) out.append(upperCut) cutTree.TAttach(lowerCut,upperCut) pOps = makePlotOp(cutTree = cutTree, OP = OP, cut = upperCut if upper else lowerCut, label = "%s%d%s"%(lab,lower, "_%d"%upper if upper else "")) out.append(pOps) else: for lower,upper in zip(htBins,htBins[1:]+[None]): # print "Lower , Upper =", lower , upper if int(lower) == 325 and upper is None: continue if int(lower) == 375 and upper is None: continue if int(lower) == 475 and upper is None: continue if int(lower) == 675 and upper is None: continue # print "continue should have happened now" lowerCut = eval("RECO_CommonHTCut(%d)"%lower) out.append(lowerCut) cutTree.TAttach(cut,lowerCut) if upper: upperCut = eval("RECO_CommonHTLessThanCut(%d)"%upper) out.append(upperCut) cutTree.TAttach(lowerCut,upperCut) pOps = makePlotOp(cutTree = cutTree, OP = OP, cut = upperCut if upper else lowerCut, label = "%s%d%s"%(lab,lower, "_%d"%upper if upper else "")) out.append(pOps) return out pass
def setup_light_tree(baton, main, data, dont_use_gen, trigger_info): import wpol.electron_id as electron_id import libAlex as alex tree_cfg = PSet( DoGen = not (data or dont_use_gen), TriggerInfo = trigger_info, ElectronCuts80 = electron_id.eff_80, ElectronCuts70 = electron_id.eff_70, ElectronCuts60 = electron_id.eff_60, Isolation = True, HoverE = True, DeltaEtaAtVtx = True, DeltaPhiAtVtx = True, SigmaIEtaIEta = True, Conversions = True, ConversionsExtra = True, SupressErrors = True ) baton.tree2 = alex.AlexTree("light_tree_lt4jets", tree_cfg.ps()) main.tree.TAttach(main.GetOp("lt4_jets"), baton.tree2) return baton
def AddHistPairWithL1(cutTree = None,cut = None, RefTrig = None, TestTrig = None, L1ListRef = None,L1ListTest = None): """docstring for AddBinedHist""" out = [] refTrigs = None if "Mu" in RefTrig: refTrigs = [TestTrig,RefTrig] else: refTrigs = [TestTrig] refPlots = PL_TriggerTurnOns( PSet(DirName = RefTrig+"_For_"+TestTrig,MinObjects =0 , MaxObjects = 15,Plots = True, ReWeight = True if "Mu" not in RefTrig else False, TriggerReWeight = refTrigs, Verbose = False, ReWeightL1 = False, L1TriggerReWeight = [L1ListRef]).ps()) testTrigPlots = PL_TriggerTurnOns( PSet(DirName = TestTrig+"_From_"+RefTrig,MinObjects = 0, MaxObjects = 15,Plots = True, ReWeight = True, TriggerReWeight = [TestTrig], Verbose = False, ReWeightL1 = True, L1TriggerReWeight = [L1ListTest]).ps()) refTrigPS = PSet(Verbose = False,UsePreScaledTriggers = True,Triggers = [] ) refTrigPS.Triggers = [RefTrig] refTrigOP = OP_MultiTrigger( refTrigPS.ps() ) testTrigPS = PSet(Verbose = False,UsePreScaledTriggers = True,Triggers = [] ) testTrigPS.Triggers = [TestTrig] print "RefTrig = %s, testTrig = %s"%(refTrigPS.Triggers[0],testTrigPS.Triggers[0]) testTrigOP = OP_MultiTrigger( testTrigPS.ps() ) cutTree.TAttach(cut,refTrigOP) cutTree.TAttach(refTrigOP,refPlots) cutTree.TAttach(refTrigOP,testTrigOP) cutTree.TAttach(testTrigOP,testTrigPlots) out.append(refTrigOP) out.append(refPlots) out.append(testTrigPlots) out.append(testTrigOP) return out pass
def metScaleSystematic(a, shiftdir, lepton): """ Apply the pfmet scale systematic as a MET filter. a : analysis object shiftdir : True (False) for upwards (downwards) shift lepton : 'Muon' or 'Electron' """ pfmet_jecunc = PSet( #the location of the JECUncertainty txt file jecuncfile = "GR_R_42_V19_AK5PF_Uncertainty.txt", jecuncfileresidual = "GR_R_42_V19_AK5PF_L2L3Residual.txt", #either Muon or Electron lepton = lepton, #the jet threshold to consider for the JEC Uncertainties pfjetthresh = 10.0, #the percentage/100 to shift the unclustered energy by unclusteredshift = 0.1, #whether or not to apply the shift upwards (True) or downwards (False) shiftup = shiftdir ) pfmetjecunc = wpol.pfMETJECUnc(pfmet_jecunc.ps()) a.AddMETFilter("pfMET", pfmetjecunc) return pfmetjecunc
def CorrectionPset(susydir, corrfile): CorFile = open(susydir + corrfile, "r") Eta1 = [] Eta2 = [] Corr = [] for aRow in CorFile: rows = aRow.split() for coloum in rows: Eta1.append(float(rows[0])) Eta2.append(float(rows[1])) Corr.append(float(rows[5])) ps = PSet(EtaLow=Eta1, EtaHi=Eta2, Correction=Corr) return ps
from data.Multijet_json291010 import * from data.MultiJet_Run2010B_PromptReco_v2_408 import * from data.JetMET_Run2010A_PromptReco_v4_11092010 import * from data.JetMET_Run2010A_PromptReco_v4_24092010 import * from data.edward_data_skim_allJetTo_Json151010 import * from data.Jet_MultiJet_JetMet_38_JSonUpTo151010 import * from data.MultiJet_json221010 import * #from icf.utils import local_ntuple import icf.utils as utils id_working_point = eid.eff_80 pf_ele_id = PSet( IsoPF = 0.2, EleMva = 0.4, LostHits = 1., ElecDxy = 0.04, ElecDz = 1. ) pf_mu_id = PSet( IsoPF = 0.2, ValidHits = 11., MuonID = True, MuonDxy = 0.02, MuonDz = 1. ) sig_id = PSet( Cuts = id_working_point, Isolation = True, HoverE = True,
# Analyses MHT_METCut = OP_MHToverMET(1.25,50.) # AK5 Calo json_ouput = JSONOutput("filtered") json_lost = JSONOutput("lost") alphaT = OP_CommonAlphaTCut(0.53) # json = JSONFilter("Json Mask", json_to_pset("/home/hep/db1110/public_html/Golden2011.json")) evDump = EventDump() # htTriggerEmu = OP_TriggerHT_Emu(250.,40.) cutTreeData = Tree("Data") out = [] skim_ps=PSet( SkimName = "myskim", DropBranches = False, Branches = [ " keep * " ] ) badEvents =runLumiCutter(PSet(Run= [166033,162811, 163233, 163374, 163589, 163759, 163817, 165121, 165364, 165415, 165467, 165472, 165506, 165567, 165570, 165993, 166034, 166049, 166380, 166514, 166565, 166701, 166842, 166864, 166960, 167102, 167282, 167284, 167675, 167807, 167830, 167830, 167898, 167913, 167913, 170876, 170876, 171050, 171050, 171156, 171178, 171178, 171369, 171484, 171484, 171578, 171578, 171812, 171876, 171897, 172033, 172791, 172791, 172799, 172802, 172822, 172822, 172868, 172868, 172949, 172952, 173198, 173241, 173241, 173243, 173380, 173389, 173439, 173657, 173657, 173692, 173692, 173692, 175975, 175990, 176023, 176023, 176201, 176286, 176286, 176304, 176309, 176309, 176547, 176548, 176701, 176702, 176765, 176771, 176771, 176771, 176795, 176796, 176796, 176799, 176844, 176886, 176928, 176933, 176982, 177053, 177074, 177096, 177183, 177183, 177201, 177201, 177222, 177730, 177782, 177782, 177782, 177788, 177875, 178098, 178420, 178421, 178421, 178479, 178479, 178703, 178786, 178786, 178803, 178803, 178920, 178970, 179411, 179411, 179411, 179411, 179434, 179497, 179547, 179889, 180072, 180072, 180076, 180076, 180241, 180241, 180241],Lumi =[0,4, 274, 671, 46, 182, 118, 242, 1132, 812, 113, 493, 57, 540, 696, 778, 203, 57, 637, 12, 12, 79, 7, 318, 60, 6, 38, 891, 517, 1406, 171, 458, 1334, 12, 14, 180, 415, 53, 92, 211, 149, 731, 61, 358, 79, 347, 696, 323, 382, 295, 256, 664, 67, 203, 304, 1922, 616, 1755, 553, 933, 680, 665, 16, 759, 13, 199, 283, 307, 68, 90, 2250, 89, 927, 179, 56, 60, 65, 135, 166, 62, 186, 484, 696, 28, 624, 8, 399, 110, 148, 64, 78, 42, 10, 45, 153, 61, 378, 7, 82, 4, 530, 488, 129, 9, 98, 258, 63, 59, 213, 160, 73, 79, 22, 148, 183, 53, 111, 230, 189, 68, 177, 194, 67, 152, 55, 207, 157, 10, 23, 6, 96, 83, 192, 233, 169, 61, 80, 201, 229, 129, 65, 99]).ps()) skim = SkimOp(skim_ps.ps()) # cutTreeData.Attach(json) triggers = ["HLT_HT250_AlphaT0p55_v1","HLT_HT250_AlphaT0p55_v2","HLT_HT250_AlphaT0p53_v2","HLT_HT250_AlphaT0p53_v3","HLT_HT250_AlphaT0p53_v4","HLT_HT250_AlphaT0p53_v5","HLT_HT250_AlphaT0p53_v6","HLT_HT250_AlphaT0p55_v2","HLT_HT250_AlphaT0p58_v3","HLT_HT300_AlphaT0p52_v1","HLT_HT300_AlphaT0p52_v2","HLT_HT300_AlphaT0p52_v3","HLT_HT300_AlphaT0p52_v4","HLT_HT300_AlphaT0p52_v5","HLT_HT300_AlphaT0p53_v5","HLT_HT300_AlphaT0p53_v6","HLT_HT300_AlphaT0p53_v6","HLT_HT300_AlphaT0p54_v5","HLT_HT350_AlphaT0p51_v1","HLT_HT350_AlphaT0p51_v2","HLT_HT350_AlphaT0p51_v3","HLT_HT350_AlphaT0p51_v4","HLT_HT350_AlphaT0p51_v5","HLT_HT350_AlphaT0p52_v1","HLT_HT350_AlphaT0p52_v2","HLT_HT350_AlphaT0p52_v2","HLT_HT350_AlphaT0p53_v10","HLT_HT400_AlphaT0p51_v1","HLT_HT400_AlphaT0p51_v2","HLT_HT400_AlphaT0p51_v3","HLT_HT400_AlphaT0p51_v4","HLT_HT400_AlphaT0p51_v5","HLT_HT400_AlphaT0p51_v6","HLT_HT400_AlphaT0p51_v7","HLT_HT400_AlphaT0p51_v7","HLT_HT400_AlphaT0p51_v10"] triggers = ["HLT_HT250_v5"] CheckPreOverLapsOp = CheckPreOverLaps() # for trig in triggers: # op = JSONOutput("%s"%(trig)) # trigCut = CheckTrigExists( PSet(TrigExistsList = ["%s"%(trig)]).ps() ) # trigCut = OP_MultiTrigger( PSet(Verbose = True,UsePreScaledTriggers = True,Triggers = ["%s"%(trig)] ).ps() )
# conf_ak5_jMCpt.Common.print_out() anal_ak5_jptMC = Analysis("AK5JPT") addCutFlowMC(anal_ak5_jptMC) # AK7 Calo conf_ak7_caloMC = deepcopy(defaultConfig) conf_ak7_caloMC.Ntuple = deepcopy(ak7_calo) conf_ak7_caloMC.XCleaning = deepcopy(default_cc) conf_ak7_caloMC.Common = deepcopy(default_common) # conf_ak5_calo.Common.print_out() anal_ak7_caloMC = Analysis("AK7Calo") addCutFlowMC(anal_ak7_caloMC) outDir = "../results_" + strftime("%d_%b_%H") + "//NoSmear37/" ensure_dir(outDir) testFile = PSet( Name="SingleEvent", Format=("ICF", 3), File="/home/hep/elaird1/84_darrens_event/event.root", Weight=1.0, ) anal_ak5_caloMC.Run(outDir, conf_ak5_caloMC, MC) # anal_ak5_pfMC.Run(outDir,conf_ak5_pfMC,MC) # anal_ak5_pfMC.Run("../results_"+strftime("%d_%b_%H")+"//NoSmear",conf_ak5_pfMC,[QCD_AllPtBins_7TeV_Pythia]) # anal_ak5_jptMC.Run("../results_"+strftime("%d_%b_%H")+"//NoSmear",conf_ak5_jptMC,MC) # anal_ak5_jptMC.Run("../results_"+strftime("%d_%b_%H")+"//NoSmear",conf_ak5_jptMC,[QCD_AllPtBins_7TeV_Pythia]) # anal_ak7_caloMC.Run("../results_"+strftime("%d_%b_%H")+"//NoSmear",conf_ak7_caloMC,MC) # anal_ak7_caloMC.Run("../results_"+strftime("%d_%b_%H")+"//NoSmear",conf_ak7_caloMC,[QCD_AllPtBins_7TeV_Pythia])
Pythia8=[QCD_Pt_0to15_7TeV_pythia8_Summer10_START36_V10_S09_v1,QCD_Pt_15to20_7TeV_pythia8_Summer10_START36_V10_S09_v1,QCD_Pt_20to30_7TeV_pythia8_Summer10_START36_V10_S09_v1,QCD_Pt_30to50_7TeV_pythia8_Summer10_START36_V10_S09_v2,QCD_Pt_50to80_7TeV_pythia8_Summer10_START36_V10_S09_v1,QCD_Pt_80to120_7TeV_pythia8_Summer10_START36_V10_S09_v1,QCD_Pt_120to170_7TeV_pythia8_Summer10_START36_V10_S09_v1,QCD_Pt_170to230_7TeV_pythia8_Summer10_START36_V10_S09_v2,QCD_Pt_230to300_7TeV_pythia8_Summer10_START36_V10_S09_v2,QCD_Pt_300to380_7TeV_pythia8_Summer10_START36_V10_S09_v1,QCD_Pt_380to470_7TeV_pythia8_Summer10_START36_V10_S09_v1,QCD_Pt_470to600_7TeV_pythia8_Summer10_START36_V10_S09_v1,QCD_Pt_600to800_7TeV_pythia8_Summer10_START36_V10_S09_v1,QCD_Pt_800to1000_7TeV_pythia8_Summer10_START36_V10_S09_v2,QCD_Pt_1000to1400_7TeV_pythia8_Summer10_START36_V10_S09_v2,QCD_Pt_1400to1800_7TeV_pythia8_Summer10_START36_V10_S09_v2,QCD_Pt_1800to2200_7TeV_pythia8_Summer10_START36_V10_S09_v2,QCD_Pt_2200to2600_7TeV_pythia8_Summer10_START36_V10_S09_v2,QCD_Pt_3000to3500_7TeV_pythia8_Summer10_START36_V10_S09_v2] # CMSSW_3_8_4_patch3 V14-00-02 samples from montecarlo.QCD_Pythia6_384patch3_V14_00_02_ALL import * from montecarlo.QCD_Pythia8_384patch3_V14_00_02_ALL import * from data.Jet_15pb_WithTP_json221010 import * AllMC = QCD_Pythia6_384patch3_V14_00_02_ALL+QCD_Pythia8_384patch3_V14_00_02_ALL+MC+Pythia8 # ----------------------------------------------------------------------------- #Plot the common plots! pset1 = PSet( DirName = "AllNoTrigger", MinObjects = 0, MaxObjects = 15, StandardPlots = True, ) pset2 = PSet( DirName = "AllWithTrigger", MinObjects = 0, MaxObjects = 15, StandardPlots = True, ) pset3 = PSet( DirName = "AllCutsNoTrigger", MinObjects = 0, MaxObjects = 15, StandardPlots = True, ) pset4 = PSet(
conf_ak5_caloData = deepcopy(defaultConfig) conf_ak5_caloData.Ntuple = deepcopy(ak5_calo) conf_ak5_caloData.XCleaning = deepcopy(default_cc) conf_ak5_caloData.Common = deepcopy(default_common) # conf_ak5_calo.Common.print_out() anal_ak5_caloData = Analysis("AK5Calo") addCutFlowData(anal_ak5_caloData) # AK5 PF conf_ak5_pfData = deepcopy(defaultConfig) conf_ak5_pfData.Ntuple = deepcopy(ak5_pf) conf_ak5_pfData.XCleaning = deepcopy(default_cc) conf_ak5_pfData.Common = deepcopy(default_common) anal_ak5_pfData = Analysis("AK5PF") addCutFlowData(anal_ak5_pfData) from data.Run2011.HT_Run2011_promptReco_DCS import * from data.Run2011.RA1ToBurn import * from data.Run2011.HT42_incomplete import * from data.Run2011.HT_Run2011A import * from data.Run2011.HTRun2011AB import * test = PSet(Name="test", Format=("ICF", 3), Weight=1.0, File="../../Ntuples/375_newFormat.root") outdir = "../results_" + strftime("%d_%b_%H") + "/Data/" ensure_dir(outdir) anal_ak5_caloData.Run(outdir, conf_ak5_caloData, [HTRun2011AB]) #HT_Run2011A])
from libHadronic import * from icf.core import PSet, Analysis from icf.config import defaultConfig from copy import deepcopy # from montecarlo.LMx import * # from bryn_samples import * # from montecarlo.WJets_Madgraph import * # ----------------------------------------------------------------------------- # Samples #from local_samples import * # from met_samples import * # from JetMetTau139375_Uncleaned import * f = PSet(Name="Testing", File=["../SusyCAF_Tree_9_1.root"], Format=("ICF", 2), Weight=1.0) # ----------------------------------------------------------------------------- # Reading the collections from the ntuple default_ntuple = deepcopy(defaultConfig.Ntuple) default_ntuple.Electrons = PSet( Prefix="electron", Suffix="Pat", LooseID="EIDLoose", TightID="EIDTight", ) default_ntuple.Muons = PSet( Prefix="muon", Suffix="Pat",
conf.Common.Jets.EtCut = 20.0 conf.Common.Jets.EtaCut = 5.0 conf.Common.Muons.EtaCut = 2.4 conf.Common.Muons.PtCut = 15.0 conf.Common.Muons.TrkIsoCut = -1. conf.Common.Muons.CombIsoCut = 0.1 conf.Common.Electrons.PtCut = 15.0 conf.Common.Electrons.EtaCut = 2.4 conf.Common.Photons.EtCut = 30. conf.Common.Electrons.ApplyID = False # Create the analysis a = Analysis("KinCorrection") tree = Tree("Main") Trigger = PSet(McAnal=False, MSugraScan=0., TriggerBits=PSet(bit1="")) ssdlTrigg = SSDLTrigger("Trigger", Trigger.ps()) ZeroMuons = OP_NumComMuons("==", 0) KinCorrParPlus = PSet( zMassMin=71., zMassMax=111., BarrelEtaMax=1.4442, EndCapEtaMin=1.56, EndCapEtaMax=2.5, MinElecRescaledPt=0., c_ErNu_pt=0., wID=+24., ##24 W+, -24 W- mW=80.398, mZ=90.188,
from icf.core import PSet, Analysis from icf.config import defaultConfig from copy import deepcopy from icf.JetCorrections import * # ----------------------------------------------------------------------------- # Samples #import yours in your running script # ----------------------------------------------------------------------------- # Reading the collections from the ntuple default_ntuple = deepcopy(defaultConfig.Ntuple) default_ntuple.Electrons = PSet( Prefix="electron", Suffix="Pat", LooseID="EIDLoose", TightID="EIDTight", ) default_ntuple.Muons = PSet( Prefix="muon", Suffix="Pat", LooseID="IsGlobalMuon", TightID="IDGlobalMuonPromptTight", ) default_ntuple.SecMuons = PSet(Prefix="muon", Suffix="PF") default_ntuple.Taus = PSet(Prefix="tau", Suffix="Pat", LooseID="TauIdbyTaNCfrOnePercent", TightID="TauIdbyTaNCfrTenthPercent") default_ntuple.Jets = PSet( Prefix="ic5Jet",
unCorLeadJetCut = OP_UnCorLeadJetCut(40.) # ----------------------------------------------------------------------------- # Common plots plots_comjet = OP_ComJetPlots("CommonJetPlots",6) plots_objkin = OP_ObjKinPlots("ObjectKinePlots",100,6) plots_common = OP_CommonPlots("CommonPlots") plots_kinsuite = OP_KinSuiteComPlot("KinSuitePlots",6,2) pset1 = PSet( DirName = "MT2", MinObjects = 2, MaxObjects = 10, Mt2DiJet = False,#MT2 plots of Dijet system NOT USED HERE Mt2Multi_Jet = False,#As above for multiJet Mt2Compare = False,#Compares the above methods MHT = True, #Plots MHT Variables DalitzMT2 = False, # A testing/idea for putting MT2 in with Dalitz plots, also False Development = True, #Development area, here is where the JetMET PAS plots have been developed, Needs tidying, will be put in to a File of its own, for the moment everything you want will be in here ) pset2 = PSet( DirName = "MT2after", MinObjects = 2, MaxObjects = 10, Mt2DiJet = False,#MT2 plots of Dijet system NOT USED HERE Mt2Multi_Jet = False,#As above for multiJet Mt2Compare = False,#Compares the above methods MHT = True, #Plots MHT Variables DalitzMT2 = False, # A testing/idea for putting MT2 in with Dalitz plots, also False
try: os.makedirs(path) except OSError as exc: # Python >2.5 if exc.errno == errno.EEXIST: pass else: raise # ----------------------------------------------------------------------------- # Reading the collections from the ntuple default_ntuple = deepcopy(defaultConfig.Ntuple) default_ntuple.Electrons = PSet( Prefix="electron", Suffix="Pat", LooseID="EIDLoose", TightID="EIDTight", ) default_ntuple.Muons = PSet( Prefix="muon", Suffix="Pat", LooseID="IsGlobalMuon", TightID="IDGlobalMuonPromptTight", ) default_ntuple.SecMuons = PSet(Prefix="muon", Suffix="PF") default_ntuple.Taus = PSet(Prefix="tau", Suffix="Pat", LooseID="TauIdbyTaNCfrOnePercent", TightID="TauIdbyTaNCfrTenthPercent") default_ntuple.Jets = PSet( Prefix="ic5Jet",
#anal_ak5_caloMC.Run("../results_100_100_50_eff",conf_ak5_calo,[LM4]) #anal_ak5_caloMC.Run("../results_100_100_50_eff",conf_ak5_calo,[LM5]) #QCD #anal_ak5_caloMC.Run("../results_100_100_50_eff",conf_ak5_calo,[QCD_AllPtBins_7TeV_Pythia]) #anal_ak5_caloMC.Run("../results_100_100_50_eff",conf_ak5_calo,QCD_Pythia8_ALL) #anal_ak5_caloMC.Run("../results_100_100_50_eff",conf_ak5_calo,QCD_MadGraph_ALL) # #anal_ak5_caloMC.Run("../results_100_100_50_eff",conf_ak5_calo,QCD_Pythia6_384patch3_V14_00_02_ALL) #anal_ak5_caloMC.Run("../results_100_100_50_eff",conf_ak5_calo,QCD_Pythia8_384patch3_V14_00_02_ALL) #anal_ak5_caloMC.Run("../results_100_100_50_eff",conf_ak5_calo,[PhotonJet_AllPtBins_7TeV_Pythia]) #anal_ak5_caloMC.Run("../results_100_100_50_eff",conf_ak5_calo,PhotonJet_MadGraph_ALL) #anal_ak5_caloMC.Run("../results_100_100_50_eff",conf_ak5_calo,[ttbarTauola]) #wjets_madgraph_vols.FirstEntry = 0 #wjets_madgraph_vols.LastEntry = 199999 #anal_ak5_caloMC.Run("../results_100_100_50_eff",conf_ak5_calo,[wjets_madgraph]) #anal_ak5_caloMC.Run("../results_100_100_50_eff",conf_ak5_calo,[wjets_madgraph_vols]) #anal_ak5_caloMC.Run("../results_100_100_50_eff",conf_ak5_calo,[zjets_madgraph]) #anal_ak5_caloMC.Run("../results_100_100_50_eff",conf_ak5_calo,[Zinvisible_jets]) myMagical14events = PSet( #from 15pb-1 Name="14magicalEvents", Weight=1., Format=("ICF", 2), File=[ "/vols/cms02/whyntie/public/ntuple_14eventsPassingAlphaT_15invpb.root", ]) #anal_ak5_caloData.Run("../results_100_100_50_eff",conf_ak5_calo,[myMagical14events]) #15.0865/pb
#!/usr/bin/env python """ Plot settings for Bryn's plotting operations. """ from libbryn import * from icf.core import PSet from copy import deepcopy #plot configuration pset_2om = PSet( DirName="250_infGev_2om", MinObjects=2, MaxObjects=15, StandardPlots=True, ) pset_2eq = PSet( DirName="250_infGev_2eq", MinObjects=2, MaxObjects=2, StandardPlots=True, ) pset_3om = PSet( DirName="250_infGev_3om", MinObjects=3, MaxObjects=15, StandardPlots=True,
# Notes: # * A few variables need the 38 ntuples (pixel hits, number of chambers). from icf.core import PSet vbtfmuonidps = PSet( Verbose = False, LooseCuts = PSet( #ID variables RequireTrackerMuon = False, RequireGlobalMuon = True, ChiSquaredCut = 999999., NumChambersCut = 0, NumGlobalHits = 0, NumTrackerHits = 0, NumPixelHits = 0, DxyCut = 9999999., ),#end of LooseCuts TightCuts = PSet( #ID variables RequireTrackerMuon = True, RequireGlobalMuon = True, ChiSquaredCut = 10.0, NumChambersCut = 2, NumGlobalHits = 1, NumTrackerHits = 10, NumPixelHits = 1, DxyCut = 0.2, #it's in cm, right? This should be 2mm. ),#end of TightCuts )#end of VBTF electron ID PSet
"HLT_HT550_v6", "HLT_HT550_v7", "", ] NoQcdOption = False if ( dataset == 2 or dataset == 3 ) : NoQcdOption = True # ----------------------------------------------------------------------------- # Reading the collections from the ntuple default_ntuple = deepcopy(defaultConfig.Ntuple) default_ntuple.Electrons=PSet( Prefix="electron", Suffix="Pat", LooseID="EIDLoose", TightID="EIDTight", ) default_ntuple.Muons=PSet( Prefix="muon", Suffix="Pat", LooseID="IsGlobalMuon", TightID="IDGlobalMuonPromptTight", ) default_ntuple.Taus=PSet( Prefix="tau", Suffix="Pat", LooseID="TauIdbyTaNCfrOnePercent", TightID="TauIdbyTaNCfrTenthPercent"
from samples.LMx import * from samples.tt import * from samples.zjets_madgraph_filepset import * #import samples.JetMetTau as data from samples.wjets import * #from icf.utils import local_ntuple import icf.utils as utils id_working_point = eid.eff_80 sig_id = PSet( Cuts = id_working_point, Isolation = True, HoverE = True, DeltaEtaAtVtx = True, DeltaPhiAtVtx = True, SigmaIEtaIEta = True, Conversions = True, Ctrl = False ) bg_id = PSet( Cuts = id_working_point, Isolation = True, HoverE = True, DeltaEtaAtVtx = False, DeltaPhiAtVtx = False, SigmaIEtaIEta = True, Conversions = True, Ctrl = True )
class eWPol: def __init__(self, data, loose_id, tight_id, trigger_bits = ( "HLT_Ele10_LW_L1R", # run < 140041 "HLT_Ele15_SW_L1R", # run <= 143962 "HLT_Ele15_SW_CaloEleId_L1R", # run <= 146427 "HLT_Ele17_SW_CaloEleId_L1R", # run <= 147116 "HLT_Ele17_SW_TightEleId_L1R", # run <= 148818 "HLT_Ele22_SW_TighterEleId_L1R_v2", # run <= 149180 "HLT_Ele22_SW_TighterEleId_L1R_v3" # run >= 149181 ), pf_mht = True, mht_cuts = [50, 75, 100 ], met_cuts = [10, 20, 30, 40], mt_cuts = [30, 50, 70], lepton_type = "Electron", ele_jet_dr = 0.3, lep_ptcut = 25., name = "eWPol", ignore_gen = False, event_no_dump = True ): self.name = name self.jet_dr = wpol.EleJetDRFilter(ele_jet_dr) self.loose_ele_id = wpol.CustomEleId(loose_id.ps()) self.tight_ele_id = wpol.CustomEleId(tight_id.ps()) self.lep_pt_cut = lep_ptcut self.pol_plots_cfg = PSet( DoGen = not (data or ignore_gen), LeptonType = lepton_type, METThreshold = 40., NLeptons = 1 ) self.ops = [] # Basic event selection triggers = PSet(Triggers=trigger_bits) self.ops.append(("basic_plots_pretrig", wpol.eWPolBasicPlots("eWPolBasicPlots_PreTrigger", self.pol_plots_cfg.ps()))) self.ops.append(("trigger", fwk.OP_MultiTrigger( triggers.ps() ))) self.ops.append(("basic_plots_posttrig", wpol.eWPolBasicPlots("eWPolBasicPlots_PostTrigger", self.pol_plots_cfg.ps()))) self.ops.append(("good_events", fwk.OP_GoodEventSelection())) # Basic object cuts self.ops.append(("datamc_one_ele", wpol.DataMCPlots("RECO_DataMCPlots_OneEle"))) self.ops.append(("one_ele", fwk.OP_NumComElectrons("==", 1))) self.ops.append(("basic_plots_gteqoneele", wpol.eWPolBasicPlots("eWPolBasicPlots_GTEQOneEle", self.pol_plots_cfg.ps()))) self.ops.append(("good_ele", wpol.ApplyLeptonCut(lepton_type, lep_ptcut, self.tight_ele_id, 1, True))) self.ops.append(("datamc_one_wp70_ele", wpol.DataMCPlots("RECO_DataMCPlots_OneWP70Ele"))) self.ops.append(("three_charge", wpol.ChargeAgreement())) self.ops.append(("basic_plots_oneele", wpol.eWPolBasicPlots("eWPolBasicPlots_OneEle", self.pol_plots_cfg.ps()))) # self.ops.append(("z_mass", wpol.MassWindowCut(lepton_type, # PSet( MassLower = 76., # MassUpper = 106., # MatchCharge = True, # NetCharge = 0).ps() ))) self.ops.append(("zero_mu", fwk.OP_NumComMuons("==", 0))) self.ops.append(("lt4_jets", fwk.OP_NumComJets("<", 4))) self.ops.append(("pol_plots_premht", wpol.RECO_ElPolPlots( "RECO_ElPolPlots_PreMHT", self.pol_plots_cfg.ps()))) # Pre MHT Cut self.ops.append(("basic_plots_premht", wpol.eWPolBasicPlots("eWPolBasicPlots_PreMHT", self.pol_plots_cfg.ps()))) # self.ops.append(("datamc_plots_premht", wpol.DataMCPlots( # "RECO_DataMCPlots_PreMHT2"))) # MHT Cuts and plots self.mht_cuts = {} self.pol_plots = {} self.datamc_plots = {} for mht in mht_cuts: if pf_mht: self.mht_cuts[mht] = wpol.OP_PFMHTCut(mht) else: self.mht_cuts[mht] = fwk.RECO_CommonMHTCut(mht) self.pol_plots["mht%d" % mht] = wpol.RECO_ElPolPlots( "RECO_ElPolPlots_PostMHT%d" % mht, self.pol_plots_cfg.ps()) self.datamc_plots["mht%d" % mht] = wpol.DataMCPlots( "RECO_DataMCPlots_PostMHT%d" % mht) # MET Cuts and plots self.met_cuts = {} for mht in mht_cuts: for met in met_cuts: self.met_cuts[(mht, met)] = fwk.OP_PFMETCut(met) self.pol_plots["mht%d_met%d" % (mht, met)] = wpol.RECO_ElPolPlots( "RECO_ElPolPlots_PostMHT%dMET%d" % (mht, met), self.pol_plots_cfg.ps()) # MT Cuts and plots self.mt_cuts = {} for mht in mht_cuts: for mt in mt_cuts: self.mt_cuts[(mht, mt)] = wpol.ePFMTCut(lepton_type, mt) self.pol_plots["mht%d_mt%d" % (mht, mt)] = wpol.RECO_ElPolPlots( "RECO_ElPolPlots_PostMHT%dMT%d" % (mht, mt), self.pol_plots_cfg.ps()) self.datamc_plots["mht%d_mt%d" % (mht, mt)] = wpol.DataMCPlots( "RECO_DataMCPlots_PostMHT%dMT%d" % (mht, mt)) self.cuts = {} self.tree = fwk.Tree(self.name) if event_no_dump: self.event_no_dump = wpol.EventNoDump("EventNoDump_MT50", "event_no") def buildTree(self, basic_plots=True, pol_plots=True, vetos = [], tree = None, root_op = None): if tree is None: tree = self.tree veto_list = vetos if not basic_plots: veto_list.append("basic_plots") if not pol_plots: veto_list.append("pol_plots") ops_ = [] for name, op in self.ops: veto = False print name for v in vetos: if name.startswith(v): print "Removing operation '%s' from tree" % name veto = True if not veto: ops_.append((name, op)) if root_op is None: tree.Attach(ops_[0][1]) else: tree.TAttach(root_op, ops_[0][1]) idx = 1 for name, op in ops_[1:]: tree.TAttach(ops_[idx-1][1], op) idx += 1 for mht, mht_op in self.mht_cuts.iteritems(): tree.TAttach(ops_[idx-1][1], mht_op) if pol_plots: tree.TAttach(mht_op, self.pol_plots["mht%d" % mht]) tree.TAttach(mht_op, self.datamc_plots["mht%d" % mht]) for (mht, met), met_op in self.met_cuts.iteritems(): tree.TAttach(self.mht_cuts[mht], met_op) if pol_plots: tree.TAttach(met_op, self.pol_plots["mht%d_met%d" % (mht, met)]) for(mht, mt), mt_op in self.mt_cuts.iteritems(): tree.TAttach(self.mht_cuts[mht], mt_op) if pol_plots: tree.TAttach(mt_op, self.pol_plots["mht%d_mt%d" % (mht, mt)]) tree.TAttach(mt_op, self.datamc_plots["mht%d_mt%d" % (mht, mt)]) # Fringe hack if mht == 50 and self.event_no_dump is not None: tree.TAttach(mt_op, self.event_no_dump) def installFilters(self, a): a.AddElectronFilter("PostCC", self.loose_ele_id) a.AddJetFilter("PostCC", self.jet_dr) def GetOp(self, name): for n, o in self.ops: if n == name: return o return None
import setupSUSY from libFrameworkSUSY import * from libHadronic import * from liballhadronic import * from icf.core import PSet, Analysis from icf.config import defaultConfig from copy import deepcopy # ----------------------------------------------------------------------------- # Reading the collections from the ntuple default_ntuple = deepcopy(defaultConfig.Ntuple) default_ntuple.Electrons = PSet( Prefix="electron", Suffix="Pat", LooseID="EIDLoose", TightID="EIDTight", ) default_ntuple.Muons = PSet( Prefix="muon", Suffix="Pat", LooseID="IsGlobalMuon", TightID="IDGlobalMuonPromptTight", ) default_ntuple.Taus = PSet(Prefix="tau", Suffix="Pat", LooseID="TauIdbyTaNCfrOnePercent", TightID="TauIdbyTaNCfrTenthPercent")
# ----------------------------------------------------------------------------- # Necessary includes import setupSUSY from libFrameworkSUSY import * from libHadronic import * from icf.core import PSet,Analysis from icf.config import defaultConfig from copy import deepcopy from icf.JetCorrections import * mSuGraScanPlots_beforeAll_pset = PSet(DirectoryName = "mSuGraScan_beforeAll") #mSuGra scan plots mSuGraScanPlots_before_150_pset = PSet(DirectoryName = "mSuGraScan_before_150") mSuGraScanPlots_before_250_pset = PSet(DirectoryName = "mSuGraScan_before_250") mSuGraScanPlots_before_350_pset = PSet(DirectoryName = "mSuGraScan_before_350") mSuGraScanPlots_150_pset = PSet(DirectoryName = "mSuGraScan_150") mSuGraScanPlots_250_pset = PSet(DirectoryName = "mSuGraScan_250") mSuGraScanPlots_350_pset = PSet(DirectoryName = "mSuGraScan_350") #Bkgd Estimation Plots TanjaBkgdEstPlots_g1jets = PSet(DirectoryName = "BkgdEstPlots_g1jets", MinObjects=2, MaxObjects=9,
QCD_Pt_1400to1800_7TeV_pythia8_Summer10_START36_V10_S09_v2, QCD_Pt_1800to2200_7TeV_pythia8_Summer10_START36_V10_S09_v2, QCD_Pt_2200to2600_7TeV_pythia8_Summer10_START36_V10_S09_v2, QCD_Pt_2600to3000_7TeV_pythia8_Summer10_START36_V10_S09_v2, QCD_Pt_3000to3500_7TeV_pythia8_Summer10_START36_V10_S09_v2 ] QCD_PYTHIA6 = [ QCD_Pt80_7TeV_Pythia, QCD_Pt170_7TeV_Pythia, QCD_Pt300_7TeV_Pythia, QCD_Pt470_7TeV_Pythia, QCD_Pt800_7TeV_Pythia, QCD_Pt1400_7TeV_Pythia ] pset_standard_hadronic_smallPFMET_noLowerLimit = PSet( DirName="HadronicCommon_smallPFMET_noLowerLimit", MinObjects=1, MaxObjects=10, StandardPlots=True, CountPlots=False, DeadECALPlots=True, BabyPlots=True) pset_standard_hadronic_beforeAlphaT = deepcopy( pset_standard_hadronic_smallPFMET_noLowerLimit) pset_standard_hadronic_beforeAlphaT.DirName = "HadronicCommon_beforeAlphaT" pset_standard_hadronic_PFMET = deepcopy( pset_standard_hadronic_smallPFMET_noLowerLimit) pset_standard_hadronic_PFMET.DirName = "HadronicCommon_PFMET" pset_standard_hadronic_PFMET_babyMHT = deepcopy( pset_standard_hadronic_smallPFMET_noLowerLimit) pset_standard_hadronic_PFMET_babyMHT.DirName = "HadronicCommon_PFMET_babyMHT"
) ElHad_Prompt_deadecal_ps._quiet_set("Accept", False) ElHad_Prompt_Cut_BE = EventSelector(ElHad_May10ReReco_deadecal_ps.ps()) ElHad_Prompt_TP_deadecal_ps = getDeadECALList( "../python/deadecal/ElectronHad_Run2011A_PromptReco_v4_missed1Job_filteredEventsTP_cfi.py" ) ElHad_Prompt_TP_deadecal_ps._quiet_set("Accept", False) ElHad_Prompt_Cut_TP = EventSelector(ElHad_May10ReReco_TP_deadecal_ps.ps()) # Trigger trg_set1 = PSet(Triggers=["HLT_Mu5_HT200_v*"], Verbose=False, UsePreScaledTriggers=False) trg_set2 = PSet( # Triggers = ["HLT_Mu8_HT200_v*","HLT_Mu15_HT200_v*","HLT_Mu20_HT200_v*","HLT_Mu30_HT200_v*","HLT_HT200_Mu5_PFMHT35_v*""HLT_HT*_Mu*_PFMHT*_v*"], Triggers=["HLT_Mu*_HT*_v*", "HLT_HT*_Mu*_PFMHT*_v*"], Verbose=False, UsePreScaledTriggers=False, ) trg_set4 = PSet( # Triggers = ["HLT_Mu15_v*","HLT_Mu20_v*","HLT_IsoMu17_v*"], Triggers=["HLT_Mu15_HT200_v*", "HLT_Mu8_HT200_v*"], Verbose=False, UsePreScaledTriggers=False, ) # Electron triggers etrg_set1 = PSet( Triggers=[ "HLT_Ele10_CaloIdL_CaloIsoVL_TrkIdVL_TrkIsoVL_HT200_v*", "HLT_Ele10_CaloIdT_CaloIsoVL_TrkIdT_TrkIsoVL_HT200_v*", ],
QCD_Pt_300to380_7TeV_pythia8_Summer10_START36_V10_S09_v1, QCD_Pt_30to50_7TeV_pythia8_Summer10_START36_V10_S09_v2, QCD_Pt_380to470_7TeV_pythia8_Summer10_START36_V10_S09_v1, QCD_Pt_470to600_7TeV_pythia8_Summer10_START36_V10_S09_v1, QCD_Pt_50to80_7TeV_pythia8_Summer10_START36_V10_S09_v1, QCD_Pt_600to800_7TeV_pythia8_Summer10_START36_V10_S09_v1, QCD_Pt_800to1000_7TeV_pythia8_Summer10_START36_V10_S09_v2, QCD_Pt_80to120_7TeV_pythia8_Summer10_START36_V10_S09_v1] # ----------------------------------------------------------------------------- # Reading the collections from the ntuple default_ntuple = deepcopy(defaultConfig.Ntuple) default_ntuple.Electrons=PSet( Prefix="electron", Suffix="Pat", LooseID="EIDLoose", TightID="EIDTight", ) default_ntuple.Muons=PSet( Prefix="muon", Suffix="Pat", LooseID="IsGlobalMuon", TightID="IDGlobalMuonPromptTight", ) default_ntuple.Taus=PSet( Prefix="tau", Suffix="Pat", LooseID="TauIdbyTaNCfrOnePercent", TightID="TauIdbyTaNCfrTenthPercent" ) default_ntuple.Jets=PSet(
def __init__(self, data, loose_id, tight_id, trigger_bits = ( "HLT_Ele10_LW_L1R", # run < 140041 "HLT_Ele15_SW_L1R", # run <= 143962 "HLT_Ele15_SW_CaloEleId_L1R", # run <= 146427 "HLT_Ele17_SW_CaloEleId_L1R", # run <= 147116 "HLT_Ele17_SW_TightEleId_L1R", # run <= 148818 "HLT_Ele22_SW_TighterEleId_L1R_v2", # run <= 149180 "HLT_Ele22_SW_TighterEleId_L1R_v3" # run >= 149181 ), pf_mht = True, mht_cuts = [50, 75, 100 ], met_cuts = [10, 20, 30, 40], mt_cuts = [30, 50, 70], lepton_type = "Electron", ele_jet_dr = 0.3, lep_ptcut = 25., name = "eWPol", ignore_gen = False, event_no_dump = True ): self.name = name self.jet_dr = wpol.EleJetDRFilter(ele_jet_dr) self.loose_ele_id = wpol.CustomEleId(loose_id.ps()) self.tight_ele_id = wpol.CustomEleId(tight_id.ps()) self.lep_pt_cut = lep_ptcut self.pol_plots_cfg = PSet( DoGen = not (data or ignore_gen), LeptonType = lepton_type, METThreshold = 40., NLeptons = 1 ) self.ops = [] # Basic event selection triggers = PSet(Triggers=trigger_bits) self.ops.append(("basic_plots_pretrig", wpol.eWPolBasicPlots("eWPolBasicPlots_PreTrigger", self.pol_plots_cfg.ps()))) self.ops.append(("trigger", fwk.OP_MultiTrigger( triggers.ps() ))) self.ops.append(("basic_plots_posttrig", wpol.eWPolBasicPlots("eWPolBasicPlots_PostTrigger", self.pol_plots_cfg.ps()))) self.ops.append(("good_events", fwk.OP_GoodEventSelection())) # Basic object cuts self.ops.append(("datamc_one_ele", wpol.DataMCPlots("RECO_DataMCPlots_OneEle"))) self.ops.append(("one_ele", fwk.OP_NumComElectrons("==", 1))) self.ops.append(("basic_plots_gteqoneele", wpol.eWPolBasicPlots("eWPolBasicPlots_GTEQOneEle", self.pol_plots_cfg.ps()))) self.ops.append(("good_ele", wpol.ApplyLeptonCut(lepton_type, lep_ptcut, self.tight_ele_id, 1, True))) self.ops.append(("datamc_one_wp70_ele", wpol.DataMCPlots("RECO_DataMCPlots_OneWP70Ele"))) self.ops.append(("three_charge", wpol.ChargeAgreement())) self.ops.append(("basic_plots_oneele", wpol.eWPolBasicPlots("eWPolBasicPlots_OneEle", self.pol_plots_cfg.ps()))) # self.ops.append(("z_mass", wpol.MassWindowCut(lepton_type, # PSet( MassLower = 76., # MassUpper = 106., # MatchCharge = True, # NetCharge = 0).ps() ))) self.ops.append(("zero_mu", fwk.OP_NumComMuons("==", 0))) self.ops.append(("lt4_jets", fwk.OP_NumComJets("<", 4))) self.ops.append(("pol_plots_premht", wpol.RECO_ElPolPlots( "RECO_ElPolPlots_PreMHT", self.pol_plots_cfg.ps()))) # Pre MHT Cut self.ops.append(("basic_plots_premht", wpol.eWPolBasicPlots("eWPolBasicPlots_PreMHT", self.pol_plots_cfg.ps()))) # self.ops.append(("datamc_plots_premht", wpol.DataMCPlots( # "RECO_DataMCPlots_PreMHT2"))) # MHT Cuts and plots self.mht_cuts = {} self.pol_plots = {} self.datamc_plots = {} for mht in mht_cuts: if pf_mht: self.mht_cuts[mht] = wpol.OP_PFMHTCut(mht) else: self.mht_cuts[mht] = fwk.RECO_CommonMHTCut(mht) self.pol_plots["mht%d" % mht] = wpol.RECO_ElPolPlots( "RECO_ElPolPlots_PostMHT%d" % mht, self.pol_plots_cfg.ps()) self.datamc_plots["mht%d" % mht] = wpol.DataMCPlots( "RECO_DataMCPlots_PostMHT%d" % mht) # MET Cuts and plots self.met_cuts = {} for mht in mht_cuts: for met in met_cuts: self.met_cuts[(mht, met)] = fwk.OP_PFMETCut(met) self.pol_plots["mht%d_met%d" % (mht, met)] = wpol.RECO_ElPolPlots( "RECO_ElPolPlots_PostMHT%dMET%d" % (mht, met), self.pol_plots_cfg.ps()) # MT Cuts and plots self.mt_cuts = {} for mht in mht_cuts: for mt in mt_cuts: self.mt_cuts[(mht, mt)] = wpol.ePFMTCut(lepton_type, mt) self.pol_plots["mht%d_mt%d" % (mht, mt)] = wpol.RECO_ElPolPlots( "RECO_ElPolPlots_PostMHT%dMT%d" % (mht, mt), self.pol_plots_cfg.ps()) self.datamc_plots["mht%d_mt%d" % (mht, mt)] = wpol.DataMCPlots( "RECO_DataMCPlots_PostMHT%dMT%d" % (mht, mt)) self.cuts = {} self.tree = fwk.Tree(self.name) if event_no_dump: self.event_no_dump = wpol.EventNoDump("EventNoDump_MT50", "event_no")
from data.JetMET_Run2010A_PromptReco_v4_24092010 import * from data.edward_data_skim_allJetTo_Json151010 import * from data.Jet_MultiJet_JetMet_38_JSonUpTo151010 import * from data.MultiJet_json221010 import * #from icf.utils import local_ntuple import icf.utils as utils id_working_point = eid.eff_80 sig_id = PSet( Cuts = id_working_point, Isolation = True, HoverE = True, DeltaEtaAtVtx = True, DeltaPhiAtVtx = True, SigmaIEtaIEta = True, Conversions = True, CorrEEMisalig = True, Ctrl = False, Mu = True ) bg_id = PSet( Cuts = id_working_point, Isolation = True, HoverE = True, DeltaEtaAtVtx = False, DeltaPhiAtVtx = False, SigmaIEtaIEta = True, Conversions = True, CorrEEMisalig = True,
from libHadronic import * from icf.core import PSet,Analysis from icf.config import defaultConfig from copy import deepcopy # ----------------------------------------------------------------------------- # Samples # put yout samples in here or import a file containing your data samples from met_samples import * # ----------------------------------------------------------------------------- # Reading the collections from the ntuple default_ntuple = deepcopy(defaultConfig.Ntuple) default_ntuple.Electrons=PSet( Prefix="electron", Suffix="Pat", LooseID="EIDLoose", TightID="EIDTight", ) default_ntuple.Muons=PSet( Prefix="muon", Suffix="Pat", LooseID="IsGlobalMuon", TightID="IDGlobalMuonPromptTight", ) default_ntuple.Taus=PSet( Prefix="tau", Suffix="Pat", ) default_ntuple.Jets=PSet( Prefix="ic5Jet", Suffix="Pat",
ps = PSet(EtaLow=Eta1, EtaHi=Eta2, Correction=Corr) return ps YourSusyDir = commands.getoutput('echo $SUSY_WORKING_SW_DIR') caloResCorrections = CorrectionPset( YourSusyDir, "/framework/python/icf/ResidualJetEnergyCorrections.txt") ak5pfResCorrections = CorrectionPset( YourSusyDir, "/framework/python/icf/Spring10DataV2_L2L3Residual_AK5PF.txt") evDiagPs = PSet( LatexFilename="diagSlides.tex", Triggers=[ "HLT_HT100U", "HLT_HT120U", "HLT_HT140U", "HLT_HT150U_v3", "HLT_HT160U_v1", "HLT_HT160U_v3", ], # CaloJetCorrections = caloResCorrections.ps(), ) evDiag = OP_PFDiagnosticSlideMaker(evDiagPs.ps(), caloResCorrections.ps(), ak5pfResCorrections.ps()) #cutTreeData.TAttach(MHToverMET2om_350plus,evDisplay) cutTreeData.TAttach(MHToverMET2om_350plus, evId) cutTreeData.TAttach(MHToverMET2om_350plus, evDiag) # # # number of common jets = 2 cutTreeData.TAttach(count_total, numComJets2Please) cutTreeData.TAttach(numComJets2Please, count_numComJets2eq)
import setupSUSY from libFrameworkSUSY import * from libHadronic import * from icf.core import PSet,Analysis from time import strftime from time import strftime from Binned_DiMuon_Config import * mu_id = PSet( doJetLoop = False, MuID = "Tight", MinPt = 10., MaxEta = 2.5, MaxIsolation = 0.1, DRMuJet = 0.3, MaxGlbTrkDxy = 0.02, MinGlbTrkNumOfValidHits = 11, SegMatch2GlbMu = 1, PixelHitsOnInrTrk = 1, MaxInrTrkDz = 1. ) """mu_id = PSet( doJetLoop = False, MuID = "Tight", MinPt = 10., MaxEta = 2.5, MaxIsolation = 5.0, DRMuJet = 0.3, MaxGlbTrkDxy = 0.02,
conf.Common.Muons.PtCut = 15.0 conf.Common.Muons.TrkIsoCut = -1. conf.Common.Muons.CombIsoCut = 0.1 conf.Common.Electrons.PtCut = 15.0 conf.Common.Electrons.EtaCut = 2.4 conf.Common.Photons.EtCut=30. conf.Common.Electrons.ApplyID=False # Create the analysis a = Analysis("KinCorrection") tree = Tree("Main") Trigger=PSet( McAnal =False, MSugraScan = 0., TriggerBits=PSet( bit1="" ) ) ssdlTrigg=SSDLTrigger("Trigger",Trigger.ps()) ZeroMuons = OP_NumComMuons("==", 0) KinCorrParPlus = PSet( zMassMin = 71., zMassMax = 111., BarrelEtaMax = 1.4442, EndCapEtaMin = 1.56,
#conf.Ntuple.Taus.Prefix="tauHPS" conf.Ntuple.Taus.Suffix="PF" conf.Common.Taus.TightID = False conf.Common.Taus.ApplyID = False conf.Common.Taus.PtCut = 15.0 conf.Common.Taus.EtaCut = 2.4 IsoTightTau=2 IsoLooseTau=0 UseHPS=True tau_id = PSet( TauSource=conf.Ntuple.Taus.Prefix, tauIDbyIso = IsoTightTau, AgainstElectron = True, AgainstMuon = True, UseHps = UseHPS ) ele_id = PSet( OldNtu = False, Cuts = lepconf.ele_ptThres_vbtf80, IsolationSR = False, # high pt IsoBarEC = True, HoverE = True, DeltaAtVtx = True, SigmaIEtaIEta = True, Conversions = True, ConversionsExtra = True, # not in ntuple V00-08
from validation.cutCounters_cff import * #TW for convenience... from copy import deepcopy from SUSYSignalScan.plottingStuff_cfg import tripleScale,smsOps,addBinnedStuff,isCmssm,isSms from hadronic.samples_cff import * from montecarlo.PhysicsProcesses_mSUGRA_tanbeta10Fall10v1 import * from montecarlo.PhysicsProcesses_mSUGRA_tanbeta3Fall10v1 import * from SUSYSignalScan.utils import * import os mu_id = PSet( MuID = "Tight", MinPt = 10., MaxEta = 2.5, MaxIsolation = 0.1, DRMuJet = 0.3, MaxGlbTrkDxy = 0.02, MinGlbTrkNumOfValidHits = 11, SegMatch2GlbMu = 1, PixelHitsOnInrTrk = 1, MaxInrTrkDz = 1., doJetLoop = False, ) def mkdir(path) : try: os.makedirs(path) except OSError as e : if e.errno!=17 : raise e def checkSwitches(d) : assert d["model"] in ["T1","T2","T2bb","T2tt","tanB3","tanB10","tanB40","tanB50"]
#!/usr/bin/env python # standard imports import setupSUSY from libFrameworkSUSY import * import libOneLepton as one import libWPol as wpol from copy import deepcopy from icf.core import PSet, Analysis # The leptonic specicif settings&files from onelepton_settings import * from onelepton_MC_samples import * from onelepton.filters import metScaleSystematic, vertexReweighting, metResolutionSystematic syst_ps = PSet(Polarisation=True, Lepton="Muon", METResolution=True) syst_plots = one.SystematicsPlots("Systematics", syst_ps.ps()) syst = Analysis("Systematics") tree = Tree("Main") syst += tree tree.Attach(syst_plots) syst.Run("./systematics", conf, samplesMC)
conf_ak5_caloData.Common = deepcopy(default_common) # conf_ak5_calo.Common.print_out() anal_ak5_caloData = Analysis("AK5Calo") addCutFlowData(anal_ak5_caloData) # AK5 PF conf_ak5_pfData = deepcopy(defaultConfig) conf_ak5_pfData.Ntuple = deepcopy(ak5_pf) conf_ak5_pfData.XCleaning = deepcopy(default_cc) conf_ak5_pfData.Common = deepcopy(default_common) anal_ak5_pfData = Analysis("AK5PF") addCutFlowData(anal_ak5_pfData) tedSkim = PSet(Name="TedSkim", Format=("ICF", 3), Weight=1.0, File="../resultsWithSingleTop//Data/AK5Calo_Jets.root") #"~elaird1/public_html/73_candidates/v3/350_bin/calo.root") from data.Run2011.HT_Run2011_promptReco_DCS import * from data.Run2011.HT42_incomplete import * from data.Run2011.RA1ToBurn import * outDir = "../results/Data43" ensure_dir(outDir) anal_ak5_caloData.Run(outDir, conf_ak5_caloData, [HT42_incomplete]) # from data.MultiJet_Run2010B_Nov4ReReco_v1 import * # # anal_ak5_pfData.Run("../results/Data",conf_ak5_pfData,[HT_Run2011_promptReco_DCS]) # anal_ak5_jptData.Run("../results/",conf_ak5_jptData,data)
oddPhoton = OP_OddPhoton() numComElectrons = OP_NumComElectrons("<=",0) numComMuons = OP_NumComMuons("<=",0) numComPhotons = OP_NumComPhotons("<=",0) # ----------------------------------------------------------------------------- # Test module from allhadronic.algorithms_cfi import * ps = PSet( Verbose = False, AlphaT = [0.55], DirName = "Test", nMax = 6, Algorithms = AlgorithmsPSet, ) test = Scaling(ps.ps()) # ----------------------------------------------------------------------------- # Cut flow cut_flow = Tree("MC") cut_flow.Attach(selection) cut_flow.TAttach(selection,numComPhotons) cut_flow.TAttach(numComPhotons,oddPhoton) cut_flow.TAttach(oddPhoton,numComElectrons) cut_flow.TAttach(numComElectrons,oddElectron) cut_flow.TAttach(oddElectron,numComMuons)
QCD_Pt_2200to2600_7TeV_pythia8_Summer10_START36_V10_S09_v2, QCD_Pt_3000to3500_7TeV_pythia8_Summer10_START36_V10_S09_v2 ] MCS = [QCD_Pt_230to300_7TeV_pythia8_Summer10_START36_V10_S09_v2] ttWPlottingOpsMHT120 = RECO_ttWPlotting("ttW_AfterMHT120") ttWPlottingOps100 = RECO_ttWPlotting("ttW_After250") ttWPlottingOps350 = RECO_ttWPlotting("ttW_After350") ttWPlottingOpsAT = RECO_ttWPlotting("ttW_AfterAT") psetS = PSet(DirName="After_350Gev", MinObjects=2, MaxObjects=9, StandardPlots=True, DeadECALPlots=False, CleaningControlPlots=False, MECPlots=False, DeadECALFile="./deadRegionList_START36_V9.txt", DeadECAL_MinJetPtCut=10., DeadECAL_MinBiasCut=0.5) HadStandard350 = HadronicCommonPlots(psetS.ps()) psetMHT = PSet( # DirName = "HadronicCommon_1", # MinObjects = 2, # MaxObjects = 6, # StandardPlots = False, # DeadECALPlots = True, # CleaningControlPlots = True, # MECPlots = True, # DeadECALFile = "./deadRegionList_START36_V9.txt",
if exc.errno == errno.EEXIST: pass else: raise #============= Triggers ============== mutriggerps = PSet( Verbose = False, UsePreScaledTriggers = False, Triggers = [ "HLT_HT250_AlphaT0p55_v1", "HLT_HT250_AlphaT0p55_v2", "HLT_HT250_AlphaT0p53_v2", "HLT_HT250_AlphaT0p53_v3", "HLT_HT250_AlphaT0p53_v4", "HLT_HT250_AlphaT0p53_v5", "HLT_HT250_AlphaT0p55_v2", "HLT_HT250_AlphaT0p58_v3", "HLT_HT250_AlphaT0p60_v3", ] ) MuTrigger = OP_MultiTrigger(mutriggerps.ps()) #=========================================== #============ Plotting Ops ======================= generic_pset = PSet( DirName = "MuonAnalysis", FolderName = "Muon275"
# conf_ak5_calo.Common.print_out() anal_ak5_caloData = Analysis("AK5Calo") addCutFlowData(anal_ak5_caloData) # AK5 PF conf_ak5_pfData = deepcopy(defaultConfig) conf_ak5_pfData.Ntuple = deepcopy(ak5_pf) conf_ak5_pfData.XCleaning = deepcopy(default_cc) conf_ak5_pfData.Common = deepcopy(default_common) anal_ak5_pfData = Analysis("AK5PF") addCutFlowData(anal_ak5_pfData) tedSkim = PSet(Name="TedSkim", Format=("ICF", 3), Weight=1.0, File="../results_" + strftime("%d_%b_%H") + "/WithSingleTop//Data/AK5Calo_Jets.root") #"~elaird1/public_html/73_candidates/v3/350_bin/calo.root") from data.Run2011.HT_Run2011_promptReco_DCS import * from data.Run2011.HT42_incomplete import * from data.Run2011.RA1ToBurn import * from data.Run2011.HTRun2011AB import * outDir = "../results_" + strftime("%d_%b_%H") + "//Data37" ensure_dir(outDir) # HT42_incomplete.LastEntry = 100 # HT42_incomplete.File = HT42_incomplete.File[0:1] anal_ak5_caloData.Run(outDir, conf_ak5_caloData, [HTRun2011AB])
#conf.Ntuple.Taus.Prefix="tauHPS" #conf.Ntuple.Taus.Suffix="PF" conf.Ntuple.Taus.Suffix="PF" conf.Common.Taus.TightID = False conf.Common.Taus.ApplyID = False conf.Common.Taus.PtCut = 15.0 conf.Common.Taus.EtaCut = 2.3 IsoTightTau=1 IsoLooseTau=0 tau_id = PSet( TauSource=conf.Ntuple.Taus.Prefix, tauIDbyIso = IsoTightTau, # tauIDbyDecay = True, AgainstElectron = True, AgainstMuon = True ) ele_id = PSet( Cuts = lepconf.ele_ptThres_vbtf80, ) muon_id = PSet(#we're missing the ecalvetoDep and hcalvetoDep in the ntuples (for MIP requirement) - AGB 22/10/10 Cuts = lepconf.muonCuts, ) elecSelFilter=CustomEleId(ele_id.ps()) muonSelFilter=CustomMuonId(muon_id.ps()) tauSelFilter=CustomTauId(tau_id.ps())
# Configuration # ==================================== tag = "DeltaInv" mht_cut = 100.0 gen_match = False lepton_type = "Electron" my_ntuple_path = "/home/alex/Research/Samples/ICF" id_working_point = eid.eff_70 id_working_point_noIso = eid.eff_80 sig_id = PSet( Cuts=id_working_point_noIso, useIso=False, Isolation=True, HoverE=True, DeltaAtVtx=True, SigmaIEtaIEta=True, Conversions=True, ) bg_id = PSet( Cuts=id_working_point_noIso, useIso=False, Isolation=True, HoverE=True, DeltaAtVtx=False, SigmaIEtaIEta=True, Conversions=True, )
from icf.core import PSet, Analysis from icf.config import defaultConfig from icf.utils import json_to_pset from allhadronic.golden_cff import * from copy import deepcopy pwd = commands.getoutput('echo $SUSY_WORKING_SW_DIR') output_dir = pwd + "/results/v60" # ----------------------------------------------------------------------------- # Reading the collections from the ntuple default_ntuple = deepcopy(defaultConfig.Ntuple) default_ntuple.Electrons = PSet( Prefix="electron", Suffix="Pat", LooseID="EIDLoose", TightID="EIDTight", ) default_ntuple.Muons = PSet( Prefix="muon", Suffix="Pat", LooseID="IsGlobalMuon", TightID="IDGlobalMuonPromptTight", ) default_ntuple.Taus = PSet(Prefix="tau", Suffix="Pat", LooseID="TauIdbyTaNCfrOnePercent", TightID="TauIdbyTaNCfrTenthPercent")
elif ( VetoesOption == "NoEGamma" ) : cut_flow.TAttach(selection_duplicate,numComMuons) cut_flow.TAttach(numComMuons,oddMuon) cut_flow.TAttach(oddMuon,qcdBkgdEst) elif ( VetoesOption == "NoVetoes" ) : cut_flow.TAttach(selection_duplicate,qcdBkgdEst) elif ( VetoesOption == "NoOddVetoes" ) : cut_flow.TAttach(selection_duplicate,numComPhotons) cut_flow.TAttach(numComPhotons,numComElectrons) cut_flow.TAttach(numComElectrons,numComMuons) cut_flow.TAttach(numComMuons,qcdBkgdEst) if ( True and FilterOption > -1 ) : skim_ps = PSet( SkimName = "Skim", Branches = ["keep *"], DropBranches = False, ) skim = SkimOp( skim_ps.ps() ) cut_flow.TAttach(qcdBkgdEst,skim) # ----------------------------------------------------------------------------- # dataset Darren=PSet( Name="Darren", Format=("ICF",3), File=[ "root://xrootd.grid.hep.ph.ic.ac.uk/store/user/henning/ICF/automated/2011_11_11_14_03_49/HT.Run2011A-May10ReReco-v1.AOD/SusyCAF_Tree_1000_2_5ze.root" , "root://xrootd.grid.hep.ph.ic.ac.uk/store/user/henning/ICF/automated/2011_11_11_14_03_49/HT.Run2011A-May10ReReco-v1.AOD/SusyCAF_Tree_1001_2_QRR.root" , "root://xrootd.grid.hep.ph.ic.ac.uk/store/user/henning/ICF/automated/2011_11_11_14_03_49/HT.Run2011A-May10ReReco-v1.AOD/SusyCAF_Tree_1002_2_56x.root" ,
from icf.core import PSet, Analysis from icf.config import defaultConfig from copy import deepcopy from icf.JetCorrections import * # ----------------------------------------------------------------------------- # Samples #import yours in your running script # ----------------------------------------------------------------------------- # Reading the collections from the ntuple default_ntuple = deepcopy(defaultConfig.Ntuple) default_ntuple.Electrons = PSet( Prefix="electron", Suffix="Pat", LooseID="EIDLoose", TightID="EIDTight", ) default_ntuple.Muons = PSet( Prefix="muon", Suffix="Pat", LooseID="IsGlobalMuon", TightID="IDGlobalMuonPromptTight", ) default_ntuple.Taus = PSet(Prefix="tau", Suffix="Pat", LooseID="TauIdbyTaNCfrOnePercent", TightID="TauIdbyTaNCfrTenthPercent") default_ntuple.Jets = PSet( Prefix="ic5Jet", Suffix="Pat",
#from icf.core import PSet # This is the default configuration from icf.config import defaultConfig # import default configuration conf=defaultConfig ele_id = PSet( Cuts = lepconf.ele_ptThres_vbtf80, IsolationSR = True, # high pt HoverE = True, DeltaAtVtx = True, SigmaIEtaIEta = True, Conversions = True, ConversionsExtra = False, # not in ntuple V08 IsolationPF = False, LowPtSel = True, LowPtID = True, LowPtIso = True ) muon_id = PSet( Cuts = lepconf.muonCuts, IsolationPF = False, IsolationSR = True, LowPtIso = True, MuonID = True,
# Common cut definitions #Avaiable criteria for MC and for Data are at current slightly different Hence the making of two trees #DataOnly! from icf.JetCorrections import * corPset = CorrectionPset("ResidualJetEnergyCorrections.txt") corPset = CorrectionPset("Spring10DataV2_L2L3Residual_AK5PF.txt") JetCorrections = JESCorrections( corPset.ps() ,True) NoiseFilt= OP_HadronicHBHEnoiseFilter() selection = OP_GoodEventSelection() HT_Trigger_PS = PSet( Verbose = False, UsePreScaledTriggers = False, Triggers = [ ] ) Cross_Trigger_PS = PSet( Verbose = False, UsePreScaledTriggers = False, Triggers =[] ) def PreScaledPair(cutTree = None, cut = None, NumeratorTrig = None, DenominatorTrig = None,Label = "", Debug = False): if str(type(NumeratorTrig)) != "<type 'list'>": NumeratorTrig = [NumeratorTrig] if str(type(DenominatorTrig)) != "<type 'list'>":
# This is the default configuration from icf.config import defaultConfig # import default configuration conf=defaultConfig ele_id = PSet( ParticleFlow=True, OldNtu = False, Cuts = lepconf.ele_ptThres_vbtf80, IsolationSR = True, # high pt HoverE = True, DeltaAtVtx = True, SigmaIEtaIEta = True, Conversions = True, ConversionsExtra = True, # not in ntuple V08 IsolationPF = False, LowPtSel = True, LowPtID = True, LowPtIso = True, ChargeComp = True, D0sel = True ) muon_id = PSet( ParticleFlow=True, Cuts = lepconf.muonCuts, IsolationPF = False,
#config.XCleaning.ResolveConflicts=True #config.XCleaning.Jets.PtCut=40. #config.XCleaning.Jets.EtaCut=3. #config.XCleaning.Photons.EtCut=40. #config.XCleaning.Photons.IDReq=2 config.Common.ApplyXCleaning=False config.Common.Jets.PtCut=40. config.Common.Jets.EtaCut=2.5 config.Common.Photons.EtCut=80. config.Common.Photons.IDReq=2 # ----------------------------------------------------------------------------- # User Variables SelectedJetCuts = PSet( Et = 80., DeltaR = 0.4 ) SelectedPhotonCuts = PSet( Et = 80., EtaEBMax = 1.4442, EtaEEMin = 1.56, EtaEEMax = 2.5, IDReq = 3 ) selected_jets = SelectedJets(SelectedJetCuts.ps()) selected_photons = SelectedPhotons(SelectedPhotonCuts.ps()) # ----------------------------------------------------------------------------- # Cut/Filter Operations Trigger_PSet = PSet(