#from HToZaToLLGG.Dataset.Run2017.ALP_PrivateSample_hpg import * from HToZaToLLGG.Sequence.RecoSequence import * from HToZaToLLGG.Config.KinematicPlot import * from Plotter.Plotter import Plotter from Plotter.PlotEndModule import PlotEndModule import ROOT, os User = os.environ['USER'] #out_path = "SignalRegion/2020-01-30_Run2017/" #out_path = "SignalRegion/2020-02-03_Run2017/" out_path = "SignalRegion/2020-02-04_Run2017/" lumi = 41.4 nCores = 3 outputDir = system.getStoragePath() + "/" + User + "/HToZaToLLGG/" + out_path nEvents = -1 disableProgressBar = False componentList = [ ZGGToLLGG, ALP_HToZa_M15, ALP_HToZa_M30, ] justEndSequence = False plots = lepton_plots + photon_plots + general_plots for p in plots: p.plotSetting.line_color_dict[ALP_HToZa_M15.name] = ROOT.kRed p.plotSetting.line_color_dict[ALP_HToZa_M30.name] = ROOT.kBlue
from Core.ComponentList import * from Core.Dataset import Dataset from Utils.System import system from Utils.SumWeight import handleSumWeight #bkgTreeDir = "/raid/raid7/lucien/Higgs/DarkZ-NTuple/20180806/SkimTree_MC80X_ZXCRSelection/" #bkgTreeDir = "/raid/raid7/lucien/Higgs/DarkZ-NTuple/20180806/SkimTree_MC80X_HIG-16-041-ZXCRSelection_v2/" bkgTreeDir = system.getStoragePath( ) + "/lucien/Higgs/DarkZ-NTuple/20190402/SkimTree_DarkPhoton_ZX_Run2018Data_m4l70/" bkgTreeDirT2 = "/cms/data/store/user/t2/users/klo/Higgs/DarkZ/NTuples/ZPlusX_Early2017_v1/" predCRTreeDir = system.getStoragePath( ) + "/lucien/Higgs/DarkZ-NTuple/20190402/SkimTree_DarkPhoton_ZX_Run2018Data_m4l70/" inUFTier2 = False saveSumWeightTxt = False sumWeightHist = "Ana/sumWeights" # ____________________________________________________________________________________________________________________________________________ || # Z+X predCR_cmpList = ComponentList([ Component( "PredCR", predCRTreeDir + "/Data_Run2018_noDuplicates_FRWeightFromVukasinWZRemoved.root", "passedEvents", False), ]) predCR = Dataset( "PredCR", predCR_cmpList, isMC=True, isSignal=True, skipWeight=True, )
# ________________________________________________________________________________________________ || #out_path = "DarkPhotonSR/StatInput/2019-07-18_Run2016/" #out_path = "DarkPhotonSR/StatInput/2019-08-19_Run2016/" #out_path = "DarkPhotonSR/StatInput/2019-08-19_Run2017/" #out_path = "DarkPhotonSR/StatInput/2019-08-19_Run2018/" out_path = "DarkPhotonSR/StatInput/2019-08-21_Run2016/" #out_path = "DarkPhotonSR/StatInput/2019-08-21_Run2017/" #out_path = "DarkPhotonSR/StatInput/2019-08-21_Run2018/" # ________________________________________________________________________________________________ || outputDir = "/home/lucien/public_html/Higgs/HToZdZd/Interpolation/" + os.path.basename( os.path.normpath(out_path)) # ________________________________________________________________________________________________ || inputDir = system.getStoragePath() + "/lucien/Higgs/HToZdZd/" + out_path TFileName = "StatInput.root" saveOption = "Both" # ________________________________________________________________________________________________ || signals = [ SignalModel("HToZdZd_MZD" + str(m), m) for m in range(5, 11) + range(15, 61, 5) ] bins = [ Bin("MuMu", 0.02), Bin("MuMu", 0.02), Bin("MuMu", 0.02), Bin("ElMu", 0.02), Bin("ElMu", 0.02), Bin("ElMu", 0.02),
} mZ1PlotRange = [40, 40., 120.] mZ2PlotRange = [60, 0., 120.] #mZ2PlotRange = [30,0.,60.] h4lPlotRange = [170, 60., 400.] #h4lPlotRange = [20,100.,140.] deltaRPlotRange2 = [20, 0., 2.] deltaRPlotRange = [40, 0., 4.] out_path = "DarkPhotonSR/DataMCDistributions/20190403_Run2017/" #out_path = "DarkPhotonSR/DataMCDistributions/2018-11-09_Run2017/" User = os.environ['USER'] lumi = 41.4 nCores = 8 outputDir = system.getStoragePath() + "/rosedj1/Higgs/DarkZ/" + out_path nEvents = -1 disableProgressBar = False componentList = bkgSamples + [ #ppZZd4l_M5, ppZZd4l_M15, ppZZd4l_M30, ] #componentList = bkgSamples + [data2017] + [HZZd_M4,HZZd_M15,HZZd_M30,] justEndSequence = False muon_plots = [ Plot("LeadingLepton_pt", ["TH1D", "LeadingLepton_pt", "", 20, 0., 200.], LambdaFunc('x: max([ x.pTL1[0], x.pTL2[0], x.pTL3[0], x.pTL4[0] ])')), Plot("Muon1_Pt", ["TH1D", "Muon1_pt", "", 20, 0., 200.], LambdaFunc('x: [x.pTL1[0]] if abs(x.idL1[0]) == 13 else []'),
from Core.ComponentList import * from Core.Dataset import Dataset from Utils.System import system dataTreeDir = system.getStoragePath( ) + "/lucien/Higgs/HZZ4l/NTuple/ZPlusX/ZXCR/20190313_Run2017_ZXCR-Z1LSkim_LiteHZZTree/" inUFTier2 = False # ____________________________________________________________________________________________________________________________________________ || Data_Run2017_cmpList = ComponentList([ Component("Data_Run2017", dataTreeDir + "Data_Run2017-17Nov2017_noDuplicates.root", "passedEvents", inUFTier2=inUFTier2), ]) Data_Run2017 = Dataset( "Data_Run2017", Data_Run2017_cmpList, isMC=False, )
from DarkZ.Config.MergeSampleDict import mergeSampleDict import ROOT, os User = os.environ['USER'] #out_path = "DarkPhotonSR/DataMCDistributions/2019-04-02_Run2018/" #out_path = "DarkPhotonSR/DataMCDistributions/2019-05-07_Run2018/" #out_path = "DarkPhotonSR/DataMCDistributions/2019-07-09_Run2018/" #out_path = "DarkPhotonSR/ShapeTemplate/2019-07-29_Run2018/" #out_path = "DarkPhotonSR/ShapeTemplate/2019-08-23_Run2018/" #out_path = "DarkPhotonSR/ShapeTemplate/2019-09-05_Run2018/" #out_path = "DarkPhotonSR/ShapeTemplate/2019-11-21_Run2018/" out_path = "DarkPhotonSR/ShapeTemplate/2019-12-02_Run2018/" lumi = 59.7 nCores = 3 outputDir = system.getStoragePath() + "/" + User + "/Higgs/DarkZ/" + out_path nEvents = -1 disableProgressBar = False #componentList = bkgSamples + [data2018] #+ [HZZd_M4,HZZd_M15,HZZd_M30,] #componentList = bkgSamples + [HZZd_M15,HZZd_M30,ppZZd4l_M15,ppZZd4l_M30,] + [data2018,] componentList = bkgSamples + [ sigSampleDict[15], sigSampleDict[30], data2018, ] justEndSequence = False plots = general_4e_plots + general_2mu2e_plots + general_4mu_plots + general_2e2mu_plots for sig in sigSamples: for p in plots:
from Core.ComponentList import * from Core.Dataset import Dataset from Utils.System import system from Utils.SumWeight import handleSumWeight from Physics.HZdZd import HZdZd_xs_dict from Physics.HZZ import Higgs_prod_xs import os # ____________________________________________________________________________________________________________________________________________ || sigSkimTreeDir = system.getStoragePath() + "/" + os.environ[ "USER"] + "/Higgs/DarkZ-NTuple/20191201/SkimTree_HToZdZd_Run2017Data_m4l70_noZCandRatioCut/" sigSkimTreeDir2 = system.getStoragePath() + "/" + os.environ[ "USER"] + "/Higgs/DarkZ-NTuple/20191204/SkimTree_HToZdZd_Run2017Data_m4l70_noZCandRatioCut/" sigTreeDir = "/cmsuf/data/store/user/t2/users/klo/Higgs/HToZdZd/94X_MCProd_191127/" inUFTier2 = False sumWeightHist = "Ana/sumWeights" kappa = 0.0001 saveSumWeightTxt = False fileNameTemplate = "HToZdZdTo4L_M125_MZd%s_eps2e-2_kap1e-4_TuneCP5_13TeV_madgraph_pythia8.root" datasetName = "HToZdZd_M%s" skimTreePath = "passedEvents" mass_points = [ 4, 5, 6, 7, 8, 9, 10, 15, 20,
from Core.ComponentList import * from Core.Dataset import Dataset from Utils.System import system from Utils.SumWeight import handleSumWeight from Physics.HZdZd import HZdZd_xs_dict from Physics.HZZ import Higgs_prod_xs import os # ____________________________________________________________________________________________________________________________________________ || sigSkimTreeDir = system.getStoragePath()+"/"+os.environ["USER"]+"/Higgs/DarkZ-NTuple/20191201/SkimTree_HToZdZd_Run2018Data_m4l70_noZCandRatioCut/" sigSkimTreeDir2 = system.getStoragePath()+"/"+os.environ["USER"]+"/Higgs/DarkZ-NTuple/20191204/SkimTree_HToZdZd_Run2018Data_m4l70_noZCandRatioCut/" sigTreeDir = "/cmsuf/data/store/user/t2/users/klo/Higgs/HToZdZd/102X_MCProd_191127/" inUFTier2 = False sumWeightHist = "Ana/sumWeights" kappa = 0.0001 saveSumWeightTxt = False fileNameTemplate = "HToZdZdTo4L_M125_MZd%s_eps2e-2_kap1e-4_TuneCP5_13TeV_madgraph_pythia8.root" datasetName = "HToZdZd_M%s" skimTreePath = "passedEvents" mass_points = [4,5,6,7,8,9,10,15,20,25,30,35,40,45,50,55,60,] # ____________________________________________________________________________________________________________________________________________ || sigSampleDict = {} for m in mass_points: inputFilePath = os.path.join(sigSkimTreeDir,fileNameTemplate%m) if m not in [4,5,] else os.path.join(sigSkimTreeDir2,fileNameTemplate%m) tmpDataset = Dataset( datasetName%m, ComponentList( [ Component(datasetName%m,inputFilePath,skimTreePath,inUFTier2=inUFTier2) ] ), isMC = True,
from Core.ComponentList import * from Core.Dataset import Dataset from Utils.System import system from Utils.SumWeight import handleSumWeight bkgSkimTreeDir = system.getStoragePath()+"/"+os.environ["USER"]+"/Higgs/DarkZ-NTuple/20190408/SkimTree_HToZdZd_Run2018Data_m4l70/" bkgTreeDir = "/cmsuf/data/store/user/t2/users/klo/Higgs/HToZdZd/102X_MCProd_191127/" inUFTier2 = False sumWeightHist = "Ana/sumWeights" sumWeightFromT2 = True saveSumWeightTxt = False # ____________________________________________________________________________________________________________________________________________ || # ttZ ttZ_cmpList = ComponentList( [ Component("ttZ",bkgSkimTreeDir+"ttZJets_TuneCP5_13TeV_madgraphMLM_pythia8.root","passedEvents",inUFTier2=inUFTier2), ] ) ttZ = Dataset( "ttZ", ttZ_cmpList, isMC = True, xs = 0.6529, ) handleSumWeight( ttZ, system, bkgTreeDir+"ttZJets_TuneCP5_13TeV_madgraphMLM_pythia8.root", sumWeightHist,
def getIntegralAndError(hist): clearHist(hist) err = ROOT.Double(0.) integral = hist.IntegralAndError(1, hist.GetNbinsX() + 1, err) return integral, err # ________________________________________________________________________________ || #out_path = "ZPlusX/Systematic/2019-05-03_Run2016/" #out_path = "ZPlusX/Systematic/2019-05-03_Run2017/" out_path = "ZPlusX/Systematic/2019-05-03_Run2018/" User = os.environ['USER'] inputPath = system.getStoragePath( ) + "/" + User + "/Higgs/DarkZ/" + out_path + "/ZPlusX/DataMCDistribution.root" histNames = [ "Z2_4e_mass", "Z2_2mu2e_mass", "Z2_4mu_mass", "Z2_2e2mu_mass", ] pyPrint("Input path: " + inputPath) # ________________________________________________________________________________ || f = ROOT.TFile.Open(inputPath) for histName in histNames: pyPrint("-" * 20) pyPrint(histName) h_nominal = f.Get(histName)
), Plot( "nVtx_" + eachCR, ["TH1D", "nVtx_" + eachCR, "", 30, 0.0, 60.0], LambdaFunc('x: x.nVtx[0]'), ), ]) plots = general_plots #for plot in plots: # plot.plotSetting.divideByBinWidth = True predCR.isSignal = False nCores = 5 outputDir = system.getStoragePath() + "/lucien/Higgs/HZZ4l/" + out_path nEvents = -1 disableProgressBar = False componentList = [ Data_Run2017, predCR, WZTo3LNu, qqZZTo4L, ] justEndSequence = False for dataset in componentList: if dataset.isMC: dataset.lumi = 41.4 #dataset.lumi = 35.9 for component in dataset.componentList:
from Core.ComponentList import * from Core.Dataset import Dataset from Utils.System import system from Utils.SumWeight import handleSumWeight bkgSkimTreeDir = system.getStoragePath()+"/lucien/Higgs/DarkZ-NTuple/20190122/SkimTree_DarkPhoton_Run2016Data_m4l70/" #bkgSkimTreeDir = system.getStoragePath()+"/lucien/Higgs/DarkZ-NTuple/20191120/SkimTree_DarkPhoton_Run2016Data_m4l70/" bkgSkimTreeDir_qqZZext1 = system.getStoragePath()+"/lucien/Higgs/DarkZ-NTuple/20190817/SkimTree_DarkPhoton_Run2016Data_m4l70/" bkgTreeDir = "/cmsuf/data/store/user/t2/users/klo/Higgs/HZZ4l/NTuple/Run2/MC80X_M17_4l_Feb21/" dataTreeDir = bkgSkimTreeDir bkgTreeDir_qqZZext1 = "/cmsuf/data/store/user/t2/users/klo/Higgs/HZZ4l/NTuple/Run2/MC80X_M17_4lSkim_Sep13_v2//" zxSkimTreeDir = system.getStoragePath()+"/lucien/Higgs/DarkZ-NTuple/20181116/SkimTree_DarkPhoton_ZX_Run2016Data_m4l70/" inUFTier2 = False sumWeightHist = "Ana/sumWeights" saveSumWeightTxt = False # ____________________________________________________________________________________________________________________________________________ || # Z+X ZPlusX_cmpList = ComponentList( [ Component("ZPlusX", zxSkimTreeDir+"Data_Run2016-03Feb2017_noDuplicates_FRWeight.root", "passedEvents",False) ] ) ZPlusX = Dataset( "ZPlusX", ZPlusX_cmpList, isMC = True, skipWeight = True, )
from Core.ComponentList import * from Core.Dataset import Dataset from Utils.System import system from Utils.SumWeight import handleSumWeight bkgSkimTreeDir = system.getStoragePath( ) + "/lucien/Higgs/DarkZ-NTuple/20190307/SkimTree_DarkPhoton_WrongFC_Run2017Data_m4l70/" inUFTier2 = False bkgTreeDir_2lskim = '/cms/data/store/user/t2/users/klo/Higgs/DarkZ/NTuples/ZPlusX_Early2017_v1/' bkgTreeDir_4lskim = '/cms/data/store/user/t2/users/klo/Higgs/DarkZ/NTuples/BkgMC_Run2017/' sumWeightHist = "Ana/sumWeights" saveSumWeightTxt = False # ____________________________________________________________________________________________________________________________________________ || WFC_Reducible_cmpList = ComponentList([ Component( "WFC_Reducible", bkgSkimTreeDir + "Data_Run2017-17Nov2017-v1_noDuplicates_FRWeightFromVukasin.root", "passedEvents", inUFTier2=inUFTier2), ]) WFC_Reducible = Dataset( "WFC_Reducible", WFC_Reducible_cmpList, isMC=True, skipWeight=True, ) # ____________________________________________________________________________________________________________________________________________ ||
import ROOT,os from Core.BaseObject import BaseObject from Core.mkdir_p import mkdir_p from Utils.System import system ROOT.gROOT.SetBatch(ROOT.kTRUE) # _____________________________________________________________________________ || User = "******" inputFitFilePath = system.getStoragePath()+"/"+User+"/Higgs/DarkZ/DarkPhotonSR/DataMCDistributions/2020-04-06_RunII/ZPlusX/DataMCDistribution.root" inputParaFilePath = system.getStoragePath()+"/"+User+"/Higgs/DarkZ/DarkPhotonSR/DataMCDistributions/2020-04-06_RunII/ZPlusX/DataMCDistribution.root" outputDir = os.path.dirname(inputParaFilePath) outputFileName = "PlotShape.root" binList = [ BaseObject("Mu",rebin=1,histName="mZ2_mu",normHistName="mZ2_mu",), BaseObject("El",rebin=1,histName="mZ2_el",normHistName="mZ2_el",), ] fitFuncName = "landau" drawFit = False # _____________________________________________________________________________ || inputFitFile = ROOT.TFile(inputFitFilePath,"READ") inputParaFile = ROOT.TFile(inputParaFilePath,"READ") mkdir_p(outputDir) outputFile = ROOT.TFile(os.path.join(outputDir,outputFileName),"RECREATE") outputFile.cd() for b in binList: fitHist = inputFitFile.Get(b.histName) fitHist.Rebin(b.rebin) fitHist.Scale(1./fitHist.Integral())
from Core.ComponentList import * from Core.Dataset import Dataset from Utils.System import system from Utils.SumWeight import handleSumWeight bkgSkimTreeDir = system.getStoragePath( ) + "/lucien/Higgs/Zprime-NTuple/20190605/SkimTree_Zprime_Run2017Data_m4l70/" bkgSkimTreeDir2 = bkgSkimTreeDir bkgTreeDir = "/cmsuf/data/store/user/muahmad/rootfiles_2017/" dataTreeDir = bkgSkimTreeDir inUFTier2 = False sumWeightHist = "Ana/sumWeights" saveSumWeightTxt = False # ____________________________________________________________________________________________________________________________________________ || # zpToMuMu sigSampleDict = {} zp_mass_points = [ #1, 5, 10, 15, ] + range(20, 80, 10) zpToMuMuXS_dict = { 5: 0.5555, 10: 0.2173, 15: 0.1141, 20: 0.0650, 25: 0.0382, 30: 0.0226,
from DarkZ.Producer.VariableProducer import VariableProducer from Plotter.Plotter import Plotter from Plotter.PlotEndModule import PlotEndModule from Plotter.Plot import Plot from DarkZ.Config.MergeSampleDict import mergeSampleDict from DarkZ.Config.PlotDefinition import * #out_path = "DarkPhotonSB/DataMCDistributions/2019-04-02_Run2018_m4l105To118/" #out_path = "DarkPhotonSB/DataMCDistributions/2019-04-02_Run2018_m4l130To140/" out_path = "DarkPhotonSB/DataMCDistributions/2019-05-20_Run2018_m4l70-100/" #out_path = "DarkPhotonSB/DataMCDistributions/2019-05-20_Run2018_m4l170-200/" lumi = 59.7 nCores = 2 outputDir = system.getStoragePath()+"/lucien/Higgs/DarkZ/"+out_path nEvents = -1 disableProgressBar = False componentList = bkgSamples + [data2018] #+ [HZZd_M4,HZZd_M15,HZZd_M30,] justEndSequence = False eventSelection = LambdaFunc("x: x.mass4l[0] > 70. and x.mass4l[0] < 100.") #eventSelection = LambdaFunc("x: x.mass4l[0] > 170. and x.mass4l[0] < 200.") plots = general_4e_plots + general_2mu2e_plots + general_4mu_plots + general_2e2mu_plots for p in plots: if "m4l" in p.key: p.rootSetting = p.rootSetting[:3]+[30-1,array.array('d',[60.*1.02**i for i in range(30)]),] if "mZ2" in p.key: p.rootSetting = p.rootSetting[:3]+[23,4.,50.] #if "m4l" in p.key: p.rootSetting = p.rootSetting[:3]+[15,170.,200.] #if "mZ2" in p.key: p.rootSetting = p.rootSetting[:3]+[50,0.,100.]
import ROOT, os from Core.BaseObject import BaseObject from Core.mkdir_p import mkdir_p from Utils.System import system ROOT.gROOT.SetBatch(ROOT.kTRUE) # _____________________________________________________________________________ || inputFitFilePath = system.getStoragePath( ) + "/lucien/Higgs/HToZdZd/DarkPhotonSR/StatInput/2019-08-21_136p1_RunII_RatioCut0p05/ZPlusX/StatInput.root" #inputFitFilePath = system.getStoragePath()+"/lucien/Higgs/HToZdZd/DarkPhotonSR/DataMCDistributions/2020-04-06_RunII/ZPlusX/DataMCDistribution.root" inputParaFilePath = system.getStoragePath( ) + "/lucien/Higgs/HToZdZd/DarkPhotonSR/DataMCDistributions/2020-04-06_RunII/ZPlusX/DataMCDistribution.root" outputDir = os.path.dirname(inputParaFilePath) outputFileName = "PlotShape.root" binList = [ BaseObject( "4mu", rebin=800, histName="comb", normHistName="mZ12_4mu", ), BaseObject( "4e", rebin=800, histName="comb", normHistName="mZ12_4e", ), BaseObject( "2e2mu",
from LJMet.Skimmer.AnalysisSkimmer import AnalysisSkimmer from LJMet.Weighter.DataMCWeighter import DataMCWeighter from LJMet.Producer.CategoryProducer import CategoryProducer from LJMet.Dataset.LJMet_step1_tptp2017 import * from LJMet.Config.MergeSampleDict import mergeSampleDict import os User = os.environ["USER"] #out_path = "Preselection/DataMCDistributions/2019-03-31_Run2017_test/" out_path = "Preselection/DataMCDistributions/2019-05-27_Run2017_test/" lumi = 41.298 nCores = 5 outputDir = system.getStoragePath() + "/" + User + "/LJMet/B2G/" + out_path nEvents = -1 disableProgressBar = False componentList = bkgSamples + dataSamples justEndSequence = False plots = [ #multiplicities: Plot( "Njets", ["TH1D", "Njets", "jet multiplicity", 10, 0, 10], LambdaFunc('x: x.NJets_JetSubCalc[0]'), ), Plot( "AK8Njets", ["TH1D", "AK8Njets", "AK8 jet multiplicity", 10, 0, 10],
from Core.Utils.LambdaFunc import LambdaFunc from Utils.System import system from Zprime.Dataset.Run2017.SkimTree_Bkg_m4l70 import * from Zprime.Dataset.Run2017.SkimTree_Zprime_m4l70 import * from Zprime.Sequence.RecoSequence import * from Zprime.Config.MergeSampleDict import mergeSampleDict from Common.CSVFileProducer import CSVFileProducer,CSVFileSetting User = os.environ['USER'] out_path = "MVA/Input/2020-04-27_Run2017_m4l-mZ1-mZ2-cosTheta1-cosTheta2-cosThetaStar-phi-phi1/" lumi = 41.4 nCores = 1 outputDir = system.getStoragePath()+"/"+User+"/Higgs/Zprime/"+out_path nEvents = -1 disableProgressBar = False #componentList = bkgSamples + sigSampleDict.values() componentList = bkgSamples #componentList = sigSampleDict.values() justEndSequence = False for dataset in componentList: if dataset.isMC: dataset.lumi = lumi for component in dataset.componentList: component.maxEvents = nEvents sequence = signal_sequence
from Core.ComponentList import * from Core.Dataset import Dataset from Utils.System import system from Utils.SumWeight import handleSumWeight predCRTreeDir = system.getStoragePath( ) + "/lucien/Higgs/DarkZ-NTuple/20190218/SkimTree_HToZdZd_ZX_Run2016Data_m4l70_noZCandRatioCut/" inUFTier2 = False # ____________________________________________________________________________________________________________________________________________ || # Z+X predCR_cmpList = ComponentList([ #Component("PredCR",predCRTreeDir+"Data_Run2016-2l_noDuplicates_FRWeight.root","passedEvents",False), Component( "PredCR", predCRTreeDir + "Data_Run2016-2l_noDuplicates_FRWeightFromVukasin.root", "passedEvents", False), ]) predCR = Dataset( "PredCR", predCR_cmpList, isMC=True, isSignal=True, skipWeight=True, )
from Core.Sequence import Sequence from Core.EndSequence import EndSequence from Core.OutputInfo import OutputInfo from Core.Utils.LambdaFunc import LambdaFunc from Utils.System import system from Core.BaseObject import BaseObject from Core.mkdir_p import mkdir_p from HToZdZd.Dataset.RunII.SkimTree_DarkPhoton_m4l70 import * from HToZdZd.Config.MergeSampleDict_RunII import mergeSampleDict import os, ROOT, shutil User = os.environ['USER'] baseDir = system.getStoragePath( ) + "/" + User + "/Higgs/DarkZ/DarkPhotonSR/StatInput/" outputBaseDir = "2019-12-02_hadd_RunII/" outputDir = os.path.join(baseDir, outputBaseDir) nEvents = -1 disableProgressBar = False componentList = bkgSamples + dataSamples + sigSamples verbose = True for s in sample2016.bkgSamples + sigSample2016.sigSamples: s.input = BaseObject( "2016", inputDir=os.path.join(baseDir, "2019-12-02_Run2016/"), postfix="_Run2016", ) for s in sample2017.bkgSamples + sigSample2017.sigSamples: s.input = BaseObject(
from Zprime.StatTools.ParaYieldProducer import ParaYieldProducer from Zprime.Skimmer.MVASkimmer import MVASkimmer from Zprime.Config.MergeSampleDict import mergeSampleDict import os #out_path = "ParaInput/EXO-18-001-Nominal/2019-06-05/" #out_path = "ParaInput/EXO-18-001-Nominal/2019-06-06_MVAInput_mZp10/" #out_path = "ParaInput/EXO-18-001-Nominal/2019-06-06_MVAInput_mZp30/" out_path = "ParaInput/EXO-18-001-Nominal/2019-06-10_MVAInput_mZp40/" User = os.environ['USER'] nCores = 5 lumi = 77.3 outputDir = system.getStoragePath() + "/lucien/Higgs/Zprime/" + out_path nEvents = -1 disableProgressBar = False #componentList = bkgSamples componentList = bkgSamples + [sigSampleDict[40]] #componentList = [sigSampleDict[40]] #componentList = sigSampleDict.values() justEndSequence = False skipGitDetail = True mvaSkim = True for dataset in componentList: if dataset.isMC: dataset.lumi = lumi for component in dataset.componentList: component.maxEvents = nEvents
import ROOT, os from Core.mkdir_p import mkdir_p from Core.BaseObject import BaseObject from Utils.System import system ROOT.gROOT.SetBatch(ROOT.kTRUE) # _____________________________________________________________________________ || baseDir = system.getStoragePath( ) + "/lucien/Higgs/DarkZ/DarkPhotonSR/ShapeTemplate/2019-07-29_Run2018/" inputPath = baseDir + "ZPlusX/DataMCDistribution.root" #outputDir = baseDir+"ZPlusX/" outputDir = system.getStoragePath( ) + "/lucien/Higgs/DarkZ/DarkPhotonSR/ShapeTemplate/2019-11-21_Run2018/ZPlusX/" outFileName = "shape_veto.root" binList = [ #BaseObject("mZ2_4e",rebin=5,histName="mZ2_4e"), #BaseObject("mZ2_low-m4l_4e",rebin=5,histName="mZ2_low-m4l_4e"), #BaseObject("mZ2_mid-m4l_4e",rebin=5,histName="mZ2_mid-m4l_4e"), #BaseObject("mZ2_high-m4l_4e",rebin=5,histName="mZ2_high-m4l_4e"), #BaseObject("mZ2_2mu2e",rebin=5,histName="mZ2_2mu2e"), #BaseObject("mZ2_low-m4l_2mu2e",rebin=5,histName="mZ2_low-m4l_2mu2e"), #BaseObject("mZ2_mid-m4l_2mu2e",rebin=5,histName="mZ2_mid-m4l_2mu2e"), #BaseObject("mZ2_high-m4l_2mu2e",rebin=5,histName="mZ2_high-m4l_2mu2e"), #BaseObject("mZ2_4mu",rebin=10,histName="mZ2_4mu"), #BaseObject("mZ2_low-m4l_4mu",rebin=5,histName="mZ2_low-m4l_4mu"), #BaseObject("mZ2_mid-m4l_4mu",rebin=5,histName="mZ2_mid-m4l_4mu"), #BaseObject("mZ2_high-m4l_4mu",rebin=10,histName="mZ2_high-m4l_4mu"), #BaseObject("mZ2_2e2mu",rebin=10,histName="mZ2_2e2mu"), #BaseObject("mZ2_low-m4l_2e2mu",rebin=5,histName="mZ2_low-m4l_2e2mu"), #BaseObject("mZ2_mid-m4l_2e2mu",rebin=5,histName="mZ2_mid-m4l_2e2mu"),
from Core.ComponentList import * from Core.Dataset import Dataset from Utils.System import system from Utils.SumWeight import handleSumWeight # ____________________________________________________________________________________________________________________________________________ || Data_Run2018_cmpList = ComponentList([ Component( "Data_Run2016", system.getStoragePath() + "/lucien/Higgs/DarkZ-NTuple/20190402/SkimTree_DarkPhoton_WrongFC_Run2018Data_m4l70/Data_Run2018_noDuplicates_FRWeightFromVukasinWZRemoved.root", "passedEvents", inUFTier2=False), ]) Data_Run2018 = Dataset( "WrongFC_Run2018", Data_Run2018_cmpList, isMC=False, )
from Core.ComponentList import * from Core.Dataset import Dataset from Utils.System import system from Utils.SumWeight import handleSumWeight # ____________________________________________________________________________________________________________________________________________ || Data_Run2016_cmpList = ComponentList( [ Component("Data_Run2016", system.getStoragePath()+"/lucien/Higgs/DarkZ-NTuple/20190307/SkimTree_DarkPhoton_WrongFC_Run2017Data_m4l70/Data_Run2017-17Nov2017_noDuplicates.root", "passedEvents",inUFTier2=False), ] ) Data_Run2016 = Dataset( "WrongFC_Run2017", Data_Run2016_cmpList, isMC = False, )