From db792ecca0e672464eaa7d6289cc31cb58526e9c Mon Sep 17 00:00:00 2001 From: Pietro Vischia Date: Tue, 2 Jun 2015 15:50:06 +0200 Subject: [PATCH] Align code --- bin/chhiggs/prepareChHiggsDatacards.cc | 133 +++++++++++++++++++++++++ data/chhiggs/all-samples.json | 8 +- data/chhiggs/ttbaronly.json | 40 +++++++- data/top_samples_pre.json | 16 +++ test/chhiggs/doAnal.sh | 125 +++++++++++++++++++---- test/runAnalysis_cfg.py.templ | 7 +- 6 files changed, 303 insertions(+), 26 deletions(-) diff --git a/bin/chhiggs/prepareChHiggsDatacards.cc b/bin/chhiggs/prepareChHiggsDatacards.cc index 9768cbe01..4f44b4548 100644 --- a/bin/chhiggs/prepareChHiggsDatacards.cc +++ b/bin/chhiggs/prepareChHiggsDatacards.cc @@ -1173,6 +1173,139 @@ void convertShapesToDataCards(const map &allShapes) // } } +///void showShape(std::vector& selCh , TString histoName, TString SaveName) +///{ +/// int NLegEntry = 0; +/// std::map map_stack; +/// std::map map_unc; +/// std::map map_data; +/// std::map > map_signals; +/// std::map map_legend; +/// // TLegend* legA = new TLegend(0.6,0.5,0.99,0.85, "NDC"); +/// // TLegend* legA = new TLegend(0.03,0.00,0.97,0.70, "NDC"); +/// TLegend* legA = new TLegend(0.03,0.99,0.97,0.89, "NDC"); +/// +/// //order the proc first +/// sortProc(); +/// +/// //loop on sorted proc +/// for(unsigned int p=0;p::iterator it=procs.find(procName); +/// if(it==procs.end())continue; +/// for(std::map::iterator ch = it->second.channels.begin(); ch!=it->second.channels.end(); ch++){ +/// if(std::find(selCh.begin(), selCh.end(), ch->second.channel)==selCh.end())continue; +/// if(ch->second.shapes.find(histoName.Data())==(ch->second.shapes).end())continue; +/// TH1* h = ch->second.shapes[histoName.Data()].histo(); +/// +/// if(it->first=="total"){ +/// double Uncertainty = ch->second.shapes[histoName.Data()].getScaleUncertainty() / h->Integral(); +/// double Maximum = 0; +/// TGraphErrors* errors = new TGraphErrors(h->GetXaxis()->GetNbins()); +/// errors->SetFillStyle(3427); +/// errors->SetFillColor(kGray+1); +/// errors->SetLineStyle(1); +/// errors->SetLineColor(2); +/// int icutg=0; +/// for(int ibin=1; ibin<=h->GetXaxis()->GetNbins(); ibin++){ +/// if(h->GetBinContent(ibin)>0) +/// errors->SetPoint(icutg,h->GetXaxis()->GetBinCenter(ibin), h->GetBinContent(ibin)); +/// errors->SetPointError(icutg,h->GetXaxis()->GetBinWidth(ibin)/2.0, sqrt(pow(h->GetBinContent(ibin)*Uncertainty,2) + pow(h->GetBinError(ibin),2) ) ); +/// // errors->SetPointError(icutg,h->GetXaxis()->GetBinWidth(ibin)/2.0, 0 ); +/// Maximum = std::max(Maximum , h->GetBinContent(ibin) + errors->GetErrorYhigh(icutg)); +/// icutg++; +/// }errors->Set(icutg); +/// errors->SetMaximum(Maximum); +/// map_unc[ch->first] = errors; +/// continue;//otherwise it will fill the legend +/// }else if(it->second.isBckg){ +/// if(map_stack.find(ch->first)==map_stack.end()){ +/// map_stack[ch->first] = new THStack((ch->first+"stack").c_str(),(ch->first+"stack").c_str()); +/// } +/// map_stack [ch->first]->Add(h,"HIST"); +/// +/// }else if(it->second.isSign){ +/// map_signals [ch->first].push_back(h); +/// +/// }else if(it->first=="data"){ +/// map_data[ch->first] = h; +/// } +/// +/// if(map_legend.find(it->first)==map_legend.end()){ +/// map_legend[it->first]=1; +/// legA->AddEntry(h,it->first.c_str(),it->first=="data"?"P":it->second.isSign?"L":"F"); +/// NLegEntry++; +/// } +/// } +/// } +/// +/// int NBins = map_data.size()/selCh.size(); +/// TCanvas* c1 = new TCanvas("c1","c1",300*NBins,300*selCh.size()); +/// c1->SetTopMargin(0.00); c1->SetRightMargin(0.00); c1->SetBottomMargin(0.00); c1->SetLeftMargin(0.00); +/// TPad* t2 = new TPad("t2","t2", 0.03, 0.90, 1.00, 1.00, -1, 1); t2->Draw(); c1->cd(); +/// t2->SetTopMargin(0.00); t2->SetRightMargin(0.00); t2->SetBottomMargin(0.00); t2->SetLeftMargin(0.00); +/// TPad* t1 = new TPad("t1","t1", 0.03, 0.03, 1.00, 0.90, 4, 1); t1->Draw(); t1->cd(); +/// t1->SetTopMargin(0.00); t1->SetRightMargin(0.00); t1->SetBottomMargin(0.00); t1->SetLeftMargin(0.00); +/// t1->Divide(NBins, selCh.size(), 0, 0); +/// +/// int I=1; +/// for(std::map::iterator p = map_stack.begin(); p!=map_stack.end(); p++){ +/// //init tab +/// TVirtualPad* pad = t1->cd(I); +/// pad->SetTopMargin(0.06); pad->SetRightMargin(0.03); pad->SetBottomMargin(0.07); pad->SetLeftMargin(0.06); +/// pad->SetLogy(true); +/// +/// //print histograms +/// TH1* axis = (TH1*)map_data[p->first]->Clone("axis"); +/// axis->Reset(); +/// axis->GetXaxis()->SetRangeUser(0, axis->GetXaxis()->GetXmax()); +/// axis->SetMinimum(1E-2); +/// double signalHeight=0; for(unsigned int s=0;sfirst].size();s++){signalHeight = std::max(signalHeight, map_signals[p->first][s]->GetMaximum());} +/// axis->SetMaximum(1.5*std::max(signalHeight , std::max( map_unc[p->first]->GetMaximum(), map_data[p->first]->GetMaximum()))); +/// if((I-1)%NBins!=0)axis->GetYaxis()->SetTitle(""); +/// axis->Draw(); +/// p->second->Draw("same"); +/// map_unc [p->first]->Draw("2 same"); +/// map_data[p->first]->Draw("same"); +/// for(unsigned int i=0;ifirst].size();i++){ +/// map_signals[p->first][i]->Draw("HIST same"); +/// } +/// +/// +/// +/// //print tab channel header +/// TPaveText* Label = new TPaveText(0.1,0.81,0.94,0.89, "NDC"); +/// Label->SetFillColor(0); Label->SetFillStyle(0); Label->SetLineColor(0); Label->SetBorderSize(0); Label->SetTextAlign(31); +/// TString LabelText = procs["data"].channels[p->first].channel+" - "+procs["data"].channels[p->first].bin; +/// LabelText.ReplaceAll("mumu","#mu#mu"); LabelText.ReplaceAll("geq2jets","#geq2jets"); LabelText.ReplaceAll("eq0jets","0jet"); LabelText.ReplaceAll("eq1jets","1jet"); +/// Label->AddText(LabelText); Label->Draw(); +/// +/// I++; +/// } +/// //print legend +/// c1->cd(0); +/// legA->SetFillColor(0); legA->SetFillStyle(0); legA->SetLineColor(0); legA->SetBorderSize(0); legA->SetHeader(""); +/// legA->SetNColumns((NLegEntry/2) + 1); +/// legA->Draw("same"); legA->SetTextFont(42); +/// +/// //print canvas header +/// t2->cd(0); +/// // TPaveText* T = new TPaveText(0.1,0.995,0.84,0.95, "NDC"); +/// TPaveText* T = new TPaveText(0.1,0.7,0.9,1.0, "NDC"); +/// T->SetFillColor(0); T->SetFillStyle(0); T->SetLineColor(0); T->SetBorderSize(0); T->SetTextAlign(22); +/// if(systpostfix.Contains('8')){ T->AddText("CMS preliminary, #sqrt{s}=8.0 TeV"); +/// }else{ T->AddText("CMS preliminary, #sqrt{s}=7.0 TeV"); +/// }T->Draw(); +/// +/// //save canvas +/// c1->SaveAs(SaveName+"_Shape.png"); +/// c1->SaveAs(SaveName+"_Shape.pdf"); +/// c1->SaveAs(SaveName+"_Shape.C"); +/// delete c1; +///} + + + // int main(int argc, char* argv[]) { diff --git a/data/chhiggs/all-samples.json b/data/chhiggs/all-samples.json index a7c7f116b..f63d4b479 100644 --- a/data/chhiggs/all-samples.json +++ b/data/chhiggs/all-samples.json @@ -38,7 +38,7 @@ "lcolor":1, "mctruthmode":2, "data":[ - { "dtag":"MC8TeV_TTJets_172v5" , "split":5, "xsec":245.8 , "br":[ 1.0 ] , "dset":"Unknown" }, + { "dtag":"MC8TeV_TTJets_172v5" , "split":5, "xsec":246.73 , "br":[ 1.0 ] , "dset":"Unknown" }, { "dtag":"MC8TeV_TTWJets" , "split":1, "xsec":0.232 , "br":[ 1.0 ] , "dset":"/TTWJets_8TeV-madgraph/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM" }, { "dtag":"MC8TeV_TTZJets" , "split":1, "xsec":0.208 , "br":[ 1.0 ] , "dset":"/TTZJets_8TeV-madgraph_v2/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM" } ] @@ -51,8 +51,8 @@ "data":[ { "dtag":"MC8TeV_SingleTbar_tW" , "split":1, "xsec":11.1 , "br":[ 1.0 ] , "dset":"/Tbar_tW-channel-DR_TuneZ2star_8TeV-powheg-tauola/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM" }, { "dtag":"MC8TeV_SingleT_tW" , "split":1, "xsec":11.1 , "br":[ 1.0 ] , "dset":"/T_tW-channel-DR_TuneZ2star_8TeV-powheg-tauola/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM" }, - { "dtag":"MC8TeV_SingleTbar_t" , "split":1, "xsec":30.7 , "br":[ 1.0 ] , "dset":"/Tbar_t-channel_TuneZ2star_8TeV-powheg-tauola/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM" }, - { "dtag":"MC8TeV_SingleT_t" , "split":1, "xsec":56.4 , "br":[ 1.0 ] , "dset":"/T_t-channel_TuneZ2star_8TeV-powheg-tauola/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM" }, + { "dtag":"MC8TeV_SingleTbar_t" , "split":1, "xsec":29.74 , "br":[ 1.0 ] , "dset":"/Tbar_t-channel_TuneZ2star_8TeV-powheg-tauola/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM" }, + { "dtag":"MC8TeV_SingleT_t" , "split":1, "xsec":54.87 , "br":[ 1.0 ] , "dset":"/T_t-channel_TuneZ2star_8TeV-powheg-tauola/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM" }, { "dtag":"MC8TeV_SingleTbar_s" , "split":1, "xsec":1.76 , "br":[ 1.0 ] , "dset":"/Tbar_s-channel_TuneZ2star_8TeV-powheg-tauola/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM" }, { "dtag":"MC8TeV_SingleT_s" , "split":1, "xsec":3.79 , "br":[ 1.0 ] , "dset":"/T_s-channel_TuneZ2star_8TeV-powheg-tauola/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM" } ] @@ -79,7 +79,7 @@ "lcolor":1, "mctruthmode":1, "data":[ - { "dtag":"MC8TeV_TTJetsFullLeptMGDecays" , "split":15, "xsec":245.8 , "br":[ 0.10608049 ] , "dset":"/TTJets_FullLeptMGDecays_8TeV-madgraph/Summer12_DR53X-PU_S10_START53_V7A-v2/AODSIM" } + { "dtag":"MC8TeV_TTJetsFullLeptMGDecays" , "split":15, "xsec":246.73 , "br":[ 0.10608049 ] , "dset":"/TTJets_FullLeptMGDecays_8TeV-madgraph/Summer12_DR53X-PU_S10_START53_V7A-v2/AODSIM" } ] }, { diff --git a/data/chhiggs/ttbaronly.json b/data/chhiggs/ttbaronly.json index 206839bfa..56e466f53 100644 --- a/data/chhiggs/ttbaronly.json +++ b/data/chhiggs/ttbaronly.json @@ -1,7 +1,45 @@ { "proc":[ { - "tag":"t#bar{t}", + "tag":"other t#bar{t}", + "isdata":false, + "color":"822", + "lcolor":1, + "mctruthmode":2, + "data":[ + { + "dtag":"MC8TeV_TTJets_172v5", + "xsec":245.8, + "split":5 + }, + { + "dtag":"MC8TeV_TTWJets", + "xsec":0.232 + }, + { + "dtag":"MC8TeV_TTZJets", + "xsec":0.208 + } + ] + }, + { + "tag":"t#bar{t}+b#bar{b}", + "issignal":false, + "isdata":false, + "color":"41", + "lcolor":1, + "mctruthmode":3, + "data":[ + { + "dtag":"MC8TeV_TTJetsFullLeptMGDecays", + "xsec":245.8, + "split":5, + "br":[0.10608049] + } + ] + }, + { + "tag":"t#bar{t} dileptons", "issignal":false, "isdata":false, "color":"614", diff --git a/data/top_samples_pre.json b/data/top_samples_pre.json index 01c1e8714..902c4c992 100644 --- a/data/top_samples_pre.json +++ b/data/top_samples_pre.json @@ -101,6 +101,22 @@ } ] }, + { + "tag":"t#bar{t}", + "issignal":false, + "isdata":false, + "color":"41", + "lcolor":1, + "mctruthmode":3, + "data":[ + { + "dtag":"MC8TeV_TTJetsFullLeptMGDecays", + "xsec":245.8, + "split":5, + "br":[0.10608049] + } + ] + }, { "tag":"other t#bar{t}", "isdata":false, diff --git a/test/chhiggs/doAnal.sh b/test/chhiggs/doAnal.sh index 4f032a0ec..aeb6dcf47 100644 --- a/test/chhiggs/doAnal.sh +++ b/test/chhiggs/doAnal.sh @@ -162,18 +162,23 @@ elif [ "${1}" = "fwlite" ]; then fi elif [ "${1}" = "current" ]; then - BASEDIR=/afs/cern.ch/work/v/vischia/private/code/tau_dilepton/chhiggs_5311_5315/ + ######## BASEDIR=/afs/cern.ch/work/v/vischia/private/code/tau_dilepton/chhiggs_5311_5315/ + BASEDIR=/afs/cern.ch/work/v/vischia/private/code/tau_dilepton/chhiggs_mergebins/ +#4 +# BASEDIR=/afs/cern.ch/work/v/vischia/private/code/tau_dilepton/chhiggs_mergebins_5/ ###angular stuff: BASEDIR=/afs/cern.ch/work/v/vischia/private/code/tau_dilepton/chhiggs_5311_5315_angular/ ### BASEDIR=/afs/cern.ch/work/v/vischia/private/code/tau_dilepton/chhiggs_5311_5315_mva/ BASEDIRPDF=/afs/cern.ch/work/v/vischia/private/code/tau_dilepton/chhiggs_5311_5315_pdfweights/ SAVESUMMARYTREE=False # run in 5315 if [ "${2}" = "anal_sus" ]; then - runLocalAnalysisOverSamples.py -e runChHiggsAnalysis -j data/chhiggs/ch-higgs_samples.json -d /afs/cern.ch/work/v/vischia/private/store/5311_ntuples/ -o ${BASEDIR} -c test/runAnalysis_cfg.py.templ -p "@runSystematics=True @useMVA=True @saveSummaryTree=${SAVESUMMARYTREE} @weightsFile='${CMSSW_BASE}/src/UserCode/llvv_fwk/data/weights/'" -s 8nh + runLocalAnalysisOverSamples.py -e runChHiggsAnalysis -j data/chhiggs/ch-higgs_samples.json -d /afs/cern.ch/work/v/vischia/private/store/5311_ntuples/ -o ${BASEDIR} -c test/runAnalysis_cfg.py.templ -p "@runSystematics=True @useMVA=False @saveSummaryTree=${SAVESUMMARYTREE} @weightsFile='${CMSSW_BASE}/src/UserCode/llvv_fwk/data/weights/'" -s 8nh elif [ "${2}" = "anal_sm" ]; then - runLocalAnalysisOverSamples.py -e runChHiggsAnalysis -j data/top_samples_pre.json -d /store/cmst3/user/psilva/5311_ntuples/ -o ${BASEDIR} -c test/runAnalysis_cfg.py.templ -p "@runSystematics=True @saveSummaryTree=${SAVESUMMARYTREE} @useMVA=True @weightsFile='${CMSSW_BASE}/src/UserCode/llvv_fwk/data/weights/'" -s 8nh + runLocalAnalysisOverSamples.py -e runChHiggsAnalysis -j data/top_samples_pre.json -d /store/cmst3/user/psilva/5311_ntuples/ -o ${BASEDIR} -c test/runAnalysis_cfg.py.templ -p "@runSystematics=True @saveSummaryTree=${SAVESUMMARYTREE} @useMVA=False @weightsFile='${CMSSW_BASE}/src/UserCode/llvv_fwk/data/weights/'" -s 8nh elif [ "${2}" = "anal_ttbar" ]; then - runLocalAnalysisOverSamples.py -e runChHiggsAnalysis -j data/chhiggs/ttbaronly.json -d /store/cmst3/user/psilva/5311_ntuples/ -o ${BASEDIR} -c test/runAnalysis_cfg.py.templ -p "@runSystematics=True @saveSummaryTree=${SAVESUMMARYTREE} @weightsFile='${CMSSW_BASE}/src/UserCode/llvv_fwk/data/weights/'" -s 8nh + runLocalAnalysisOverSamples.py -e runChHiggsAnalysis -j data/chhiggs/ttbaronly.json -d /store/cmst3/user/psilva/5311_ntuples/ -o ${BASEDIR} -c test/runAnalysis_cfg.py.templ -p "@runSystematics=True @saveSummaryTree=${SAVESUMMARYTREE} @useMVA=False @weightsFile='${CMSSW_BASE}/src/UserCode/llvv_fwk/data/weights/'" -s 8nh + elif [ "${2}" = "anal_ttbar_syst" ]; then + runLocalAnalysisOverSamples.py -e runChHiggsAnalysis -j data/chhiggs/ttbaronly_syst.json -d /store/cmst3/user/psilva/5311_ntuples/ -o ${BASEDIR} -c test/runAnalysis_cfg.py.templ -p "@runSystematics=False @saveSummaryTree=${SAVESUMMARYTREE} @useMVA=False @weightsFile='${CMSSW_BASE}/src/UserCode/llvv_fwk/data/weights/'" -s 8nh elif [ "${2}" = "dopdfweights_sus" ]; then runLocalAnalysisOverSamples.py -e computePDFvariations -j data/chhiggs/ch-higgs_samples.json -d /afs/cern.ch/work/v/vischia/private/store/5311_ntuples/ -o ${BASEDIRPDF} -c test/runAnalysis_cfg.py.templ -s 1nd; @@ -196,15 +201,19 @@ elif [ "${1}" = "current" ]; then elif [ "${2}" = "plots" ]; then # Plots #JSONFILEFORPLOTS=data/chhiggs/plot-ch-higgs_tanb30_samples.json - JSONFILEFORPLOTS=data/chhiggs/plot-ch-higgs_1pb_samples.json +######## ORIGINAL JSONFILEFORPLOTS JSONFILEFORPLOTS=data/chhiggs/plot-ch-higgs_1pb_samples.json + #JSONFILEFORPLOTS=data/chhiggs/ttbaronly_onlybb.json + JSONFILEFORPLOTS=data/chhiggs/ttbaronly.json #JSONFILE=data/chhiggs/plot-ch-higgs_samples.json - for plotList in evtflow geq2btagsmet geq2btagsnbjets geq2btagsptlep geq2btagssumpt met mll mtsum nbjets njets nvertices nverticesUnweighted pte ptjet1eta ptjet1pt ptjet2eta ptjet2pt ptmin ptmu sumpt dilarccosine geq2btagsdilarccosine geq2btagsdphill geq2btagsdrll geq2btagsBDTD BDTD geq2btagsBDTD_shape BDTD_shape geq2btagsBDTD_finalshape BDTD_finalshape geq2btagsFisher Fisher geq2btagsFisher_shape Fisher_shape geq2btagsFisher_finalshape Fisher_finalshape geq2btagsMLP MLP geq2btagsMLP_shape MLP_shape geq2btagsMLP_finalshape MLP_finalshape + for plotList in finalevtflow2btagsmerged +# for plotList in evtflow geq2btagsmet geq2btagsnbjets geq2btagsptlep geq2btagssumpt met mll mtsum nbjets njets nvertices nverticesUnweighted pte ptjet1eta ptjet1pt ptjet2eta ptjet2pt ptmin ptmu sumpt dilarccosine geq2btagsdilarccosine geq2btagsdphill geq2btagsdrll geq2btagsBDTD BDTD geq2btagsBDTD_shape BDTD_shape geq2btagsBDTD_finalshape BDTD_finalshape geq2btagsFisher Fisher geq2btagsFisher_shape Fisher_shape geq2btagsFisher_finalshape Fisher_finalshape geq2btagsMLP MLP geq2btagsMLP_shape MLP_shape geq2btagsMLP_finalshape MLP_finalshape do for chanList in emu ee mumu do for formatList in pdf png C do - runPlotter --iLumi 19702 --inDir ${BASEDIR} --outDir ${BASEDIR}outputs/plots --json ${JSONFILEFORPLOTS} --outFile ${BASEDIR}outputs/plotter-forPlotting_${chanList}_${plotList}_${formatList}.root --showUnc --plotExt .${formatList} --noPowers --jodorStyle --onlyStartWith ${chanList}_${plotList} & + #runPlotter --iLumi 19702 --inDir ${BASEDIR} --outDir ${BASEDIR}outputs/plots --json ${JSONFILEFORPLOTS} --outFile ${BASEDIR}outputs/plotter-forPlotting_${chanList}_${plotList}_${formatList}.root --showUnc --plotExt .${formatList} --noPowers --jodorStyle --onlyStartWith ${chanList}_${plotList} & + runPlotter --iLumi 19702 --inDir ${BASEDIR} --outDir ${BASEDIR}outputs/plots --json ${JSONFILEFORPLOTS} --outFile ${BASEDIR}outputs/plotter-forPlotting_${chanList}_${plotList}_${formatList}.root --showUnc --plotExt .${formatList} --noPowers --jodorStyle --onlyStartWith ${chanList}_${plotList} & done done done @@ -218,6 +227,16 @@ elif [ "${1}" = "current" ]; then mv ${BASEDIR}outputs/plotsee* ${BASEDIR}outputs/tables/ mv ${BASEDIR}outputs/plotsmumu* ${BASEDIR}outputs/tables/ done + elif [ "${2}" = "tables_ttbar" ]; then + # Tables + mkdir -p ${BASEDIR}outputs/tables/ + for chanList in emu ee mumu + do + runPlotter --iLumi 19702 --inDir ${BASEDIR} --outDir ${BASEDIR}outputs/plots --json data/chhiggs/ttbaronly.json --outFile ${BASEDIR}/outputs/tables/plotter_${chanList}_forTables_ttbar_1pb.root --showUnc --noPlots --noPowers --onlyStartWith ${chanList}_evtflow + mv ${BASEDIR}outputs/plotsemu* ${BASEDIR}outputs/tables/ + mv ${BASEDIR}outputs/plotsee* ${BASEDIR}outputs/tables/ + mv ${BASEDIR}outputs/plotsmumu* ${BASEDIR}outputs/tables/ + done elif [ "${2}" = "display" ]; then PLOTSDIR=~/www/HIG-13-026/plots/ mkdir -p ${PLOTSDIR} @@ -251,8 +270,7 @@ elif [ "${1}" = "current" ]; then runPlotter --iLumi 19702 --inDir ${BASEDIR} --outDir ${BASEDIR}outputs/datacards/ --json data/chhiggs/all-samples.json --outFile ${BASEDIR}plotter_${chanList}_forSystTableInPAS.root --showUnc --noPlots --noPowers --onlyStartWith ${chanList}_evtflow runPlotter --iLumi 19702 --inDir ${BASEDIR} --outDir ${BASEDIR}outputs/datacards/ --json data/chhiggs/all-samples.json --outFile ${BASEDIR}plotter_${chanList}_forSystTable.root --showUnc --noPlots --noPowers --onlyStartWith ${chanList}_finalevtflow2btags - runPlotter --iLumi 19702 --inDir ${BASEDIR} --outDir ${BASEDIR}/outputs/plots --json data/chhiggs/all-samples_higgs1pb.json --outFile ${BASEDIR}plotter_${chanList}_all-samplesForDatacards_finalevtflow_norm.root --noPlot --noPowers --onlyStartWith ${chanList}_finalevtflow2btags - + runPlotter --iLumi 19702 --inDir ${BASEDIR} --outDir ${BASEDIR}/outputs/plots --json data/chhiggs/all-samples_higgs1pb.json --outFile ${BASEDIR}plotter_${chanList}_all-samplesForDatacards_finalevtflow_norm.root --noPlot --noPowers --onlyStartWith ${chanList}_finalevtflow2btags runPlotter --iLumi 19702 --inDir ${BASEDIR} --outDir ${BASEDIR}outputs/datacards/ --json data/chhiggs/all-samples.json --outFile ${BASEDIR}plotter_${chanList}_forSystTableInPAS_optim.root --showUnc --noPlots --noPowers --onlyStartWith all_optim runPlotter --iLumi 19702 --inDir ${BASEDIR} --outDir ${BASEDIR}outputs/datacards/ --json data/chhiggs/all-samples.json --outFile ${BASEDIR}plotter_${chanList}_forSystTable_optim.root --showUnc --noPlots --noPowers --onlyStartWith all_optim @@ -318,11 +336,14 @@ elif [ "${1}" = "current" ]; then done done elif [ "${2}" = "datacardstest" ]; then - mkdir -p ${BASEDIR}outputs/datacards/ + mkdir -p ${BASEDIR}output/datacards/ SUFFIX="_november" - #runPlotter --iLumi 19702 --inDir ${BASEDIR} --outDir ${BASEDIR}outputs/datacards/ --json data/chhiggs/all-samples.json --outFile ${BASEDIR}outputs/plotter_forSystTable${SUFFIX}.root --showUnc --noPlots --noPowers --only evtflow --only optim_systs - #runPlotter --iLumi 19702 --inDir ${BASEDIR} --outDir ${BASEDIR}/outputs/plots --json data/chhiggs/all-samples_higgs1pb.json --outFile ${BASEDIR}outputs/plotter_all-samplesForDatacards${SUFFIX}_finalevtflow_norm.root --noPlot --noPowers --only finalevtflow2btags --only optim_systs - + SHAPEHISTO="finalevtflow2btagsmerged" + #JSONDATACARDS="data/chhiggs/all-samples.json" + JSONDATACARDS="data/chhiggs/all-samples_ttbarsplit.json" + runPlotter --iLumi 19702 --inDir ${BASEDIR} --outDir ${BASEDIR}outputs/datacards/ --json data/chhiggs/all-samples.json --outFile ${BASEDIR}outputs/plotter_forSystTable${SUFFIX}.root --showUnc --noPlots --noPowers --only evtflow --only optim_systs + runPlotter --iLumi 19702 --inDir ${BASEDIR} --outDir ${BASEDIR}/outputs/plots --json data/chhiggs/all-samples_higgs1pb_splitttbar.json --outFile ${BASEDIR}outputs/plotter_all-samplesForDatacards${SUFFIX}_finalevtflow_norm.root --noPlot --noPowers --only ${SHAPEHISTO} --only optim_systs + mv ${BASEDIR}outputs/datacardsByDecayMode${SUFFIX} ${BASEDIR}outputs/datacardsByDecayMode${SUFFIX}_bak mv ${BASEDIR}outputs/datacardsByDecaySyst${SUFFIX} ${BASEDIR}outputs/datacardsByDecaySyst${SUFFIX}_bak mv ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX} ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX}_bak @@ -359,17 +380,83 @@ elif [ "${1}" = "current" ]; then mkdir -p ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX}/500 mkdir -p ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX}/600 mkdir -p ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX}/700 + + for i in 180 200 220 250 300 400 500 600 + do + prepareChHiggsDatacards --in ${BASEDIR}outputs/plotter_all-samplesForDatacards${SUFFIX}_finalevtflow_norm.root --out ${BASEDIR}outputs/datacardsByDecayMode${SUFFIX}/${i}/ --suffix tb --json /afs/cern.ch/work/v/vischia/private/results/HIG-13-026/tempjsonByFinalState_ttbarsplit_lessbkg/${i}_tb.json --noPowers --histo ${SHAPEHISTO} --bin 1 --ch emu,ee,mumu & + prepareChHiggsDatacards --in ${BASEDIR}outputs/plotter_all-samplesForDatacards${SUFFIX}_finalevtflow_norm.root --out ${BASEDIR}outputs/datacardsByDecayMode${SUFFIX}/${i}/ --suffix taunu --json /afs/cern.ch/work/v/vischia/private/results/HIG-13-026/tempjsonByFinalState_ttbarsplit_lessbkg/${i}_taunu.json --noPowers --histo ${SHAPEHISTO} --bin 1 --ch emu,ee,mumu & + + #prepareChHiggsDatacards --in ${BASEDIR}outputs/plotter_forSystTable${SUFFIX}.root --out ${BASEDIR}outputs/datacardsByDecaySyst${SUFFIX}/${i}/ --suffix tb --json /afs/cern.ch/work/v/vischia/private/results/HIG-13-026/tempjsonByFinalState_ttbarsplit/${i}_tb.json --noPowers --histo ${SHAPEHISTO} --bin 1 --ch emu,ee,mumu & + #prepareChHiggsDatacards --in ${BASEDIR}outputs/plotter_forSystTable${SUFFIX}.root --out ${BASEDIR}outputs/datacardsByDecaySyst${SUFFIX}/${i}/ --suffix taunu --json /afs/cern.ch/work/v/vischia/private/results/HIG-13-026/tempjsonByFinalState_ttbarsplit/${i}_taunu.json --noPowers --histo ${SHAPEHISTO} --bin 1 --ch emu,ee,mumu & + + #prepareChHiggsDatacards --in ${BASEDIR}outputs/plotter_forSystTable${SUFFIX}.root --out ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX}/${i}/ --suffix tb --json /afs/cern.ch/work/v/vischia/private/results/HIG-13-026/tempjsonByFinalState_ttbarsplit/${i}_tb.json --noPowers --histo evtflow --bin 1 --ch emu,ee,mumu & + #prepareChHiggsDatacards --in ${BASEDIR}outputs/plotter_forSystTable${SUFFIX}.root --out ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX}/${i}/ --suffix taunu --json /afs/cern.ch/work/v/vischia/private/results/HIG-13-026/tempjsonByFinalState_ttbarsplit/${i}_taunu.json --noPowers --histo evtflow --bin 1 --ch emu,ee,mumu & + done + elif [ "${2}" = "forthefuckingplot" ]; then + BASEDIR=/afs/cern.ch/work/v/vischia/private/code/tau_dilepton/chhiggs_mergebins/ + mkdir -p ${BASEDIR}output/datacards/ + SUFFIX="_november" + SHAPEHISTO="evtflow" + #JSONDATACARDS="data/chhiggs/all-samples.json" + JSONDATACARDS="data/chhiggs/all-samples_ttbarsplit.json" + runPlotter --iLumi 19702 --inDir ${BASEDIR} --outDir ${BASEDIR}outputs/datacards/ --json data/chhiggs/all-samples.json --outFile ${BASEDIR}outputs/plotter_forSystTable${SUFFIX}.root --showUnc --noPlots --noPowers --only evtflow --only optim_systs + runPlotter --iLumi 19702 --inDir ${BASEDIR} --outDir ${BASEDIR}/outputs/plots --json data/chhiggs/all-samples_higgs1pb_splitttbar.json --outFile ${BASEDIR}outputs/plotter_all-samplesForDatacards${SUFFIX}_finalevtflow_norm.root --noPlot --noPowers --only ${SHAPEHISTO} --only optim_systs + mkdir myevtflow + prepareChHiggsDatacards --in /afs/cern.ch/work/v/vischia/private/code/tau_dilepton/chhiggs_mergebins/outputs/plotter_forSystTable_november.root --out myevtflow/ --suffix tb --json /afs/cern.ch/work/v/vischia/private/results/HIG-13-026/tempjsonByFinalState/250_tb.json --noPowers --histo evtflow --bin 1 --ch emu + +& + prepareChHiggsDatacards --in ${BASEDIR}outputs/plotter_${chanList}_forSystTableInPAS_def.root --out ${BASEDIR}outputs/datacardsByDecaySystPAS/${i}/ --suffix taunu --json /a\ +fs/cern.ch/work/v/vischia/private/results/HIG-13-026/tempjsonByFinalState/${i}_taunu.json --noPowers --histo evtflow --bin 1 --ch ${chanList} + + + mv ${BASEDIR}outputs/datacardsByDecayMode${SUFFIX} ${BASEDIR}outputs/datacardsByDecayMode${SUFFIX}_bak + mv ${BASEDIR}outputs/datacardsByDecaySyst${SUFFIX} ${BASEDIR}outputs/datacardsByDecaySyst${SUFFIX}_bak + mv ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX} ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX}_bak + + mkdir -p ${BASEDIR}outputs/datacardsByDecayMode${SUFFIX}/180 + mkdir -p ${BASEDIR}outputs/datacardsByDecayMode${SUFFIX}/200 + mkdir -p ${BASEDIR}outputs/datacardsByDecayMode${SUFFIX}/220 + mkdir -p ${BASEDIR}outputs/datacardsByDecayMode${SUFFIX}/250 + mkdir -p ${BASEDIR}outputs/datacardsByDecayMode${SUFFIX}/300 + mkdir -p ${BASEDIR}outputs/datacardsByDecayMode${SUFFIX}/350 + mkdir -p ${BASEDIR}outputs/datacardsByDecayMode${SUFFIX}/400 + mkdir -p ${BASEDIR}outputs/datacardsByDecayMode${SUFFIX}/500 + mkdir -p ${BASEDIR}outputs/datacardsByDecayMode${SUFFIX}/600 + mkdir -p ${BASEDIR}outputs/datacardsByDecayMode${SUFFIX}/700 + + mkdir -p ${BASEDIR}outputs/datacardsByDecaySyst${SUFFIX}/180 + mkdir -p ${BASEDIR}outputs/datacardsByDecaySyst${SUFFIX}/200 + mkdir -p ${BASEDIR}outputs/datacardsByDecaySyst${SUFFIX}/220 + mkdir -p ${BASEDIR}outputs/datacardsByDecaySyst${SUFFIX}/250 + mkdir -p ${BASEDIR}outputs/datacardsByDecaySyst${SUFFIX}/300 + mkdir -p ${BASEDIR}outputs/datacardsByDecaySyst${SUFFIX}/350 + mkdir -p ${BASEDIR}outputs/datacardsByDecaySyst${SUFFIX}/400 + mkdir -p ${BASEDIR}outputs/datacardsByDecaySyst${SUFFIX}/500 + mkdir -p ${BASEDIR}outputs/datacardsByDecaySyst${SUFFIX}/600 + mkdir -p ${BASEDIR}outputs/datacardsByDecaySyst${SUFFIX}/700 + + mkdir -p ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX}/180 + mkdir -p ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX}/200 + mkdir -p ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX}/220 + mkdir -p ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX}/250 + mkdir -p ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX}/300 + mkdir -p ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX}/350 + mkdir -p ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX}/400 + mkdir -p ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX}/500 + mkdir -p ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX}/600 + mkdir -p ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX}/700 + for i in 180 200 220 250 300 400 500 600 do - prepareChHiggsDatacards --in ${BASEDIR}outputs/plotter_all-samplesForDatacards${SUFFIX}_finalevtflow_norm.root --out ${BASEDIR}outputs/datacardsByDecayMode${SUFFIX}/${i}/ --suffix tb --json /afs/cern.ch/work/v/vischia/private/results/HIG-13-026/tempjsonByFinalState/${i}_tb.json --noPowers --histo finalevtflow2btags --bin 1 --ch emu,ee,mumu & - prepareChHiggsDatacards --in ${BASEDIR}outputs/plotter_all-samplesForDatacards${SUFFIX}_finalevtflow_norm.root --out ${BASEDIR}outputs/datacardsByDecayMode${SUFFIX}/${i}/ --suffix taunu --json /afs/cern.ch/work/v/vischia/private/results/HIG-13-026/tempjsonByFinalState/${i}_taunu.json --noPowers --histo finalevtflow2btags --bin 1 --ch emu,ee,mumu & + prepareChHiggsDatacards --in ${BASEDIR}outputs/plotter_all-samplesForDatacards${SUFFIX}_finalevtflow_norm.root --out ${BASEDIR}outputs/datacardsByDecayMode${SUFFIX}/${i}/ --suffix tb --json /afs/cern.ch/work/v/vischia/private/results/HIG-13-026/tempjsonByFinalState_ttbarsplit_lessbkg/${i}_tb.json --noPowers --histo ${SHAPEHISTO} --bin 1 --ch emu,ee,mumu & + prepareChHiggsDatacards --in ${BASEDIR}outputs/plotter_all-samplesForDatacards${SUFFIX}_finalevtflow_norm.root --out ${BASEDIR}outputs/datacardsByDecayMode${SUFFIX}/${i}/ --suffix taunu --json /afs/cern.ch/work/v/vischia/private/results/HIG-13-026/tempjsonByFinalState_ttbarsplit_lessbkg/${i}_taunu.json --noPowers --histo ${SHAPEHISTO} --bin 1 --ch emu,ee,mumu & - prepareChHiggsDatacards --in ${BASEDIR}outputs/plotter_forSystTable${SUFFIX}.root --out ${BASEDIR}outputs/datacardsByDecaySyst${SUFFIX}/${i}/ --suffix tb --json /afs/cern.ch/work/v/vischia/private/results/HIG-13-026/tempjsonByFinalState/${i}_tb.json --noPowers --histo finalevtflow2btags --bin 1 --ch emu,ee,mumu & - prepareChHiggsDatacards --in ${BASEDIR}outputs/plotter_forSystTable${SUFFIX}.root --out ${BASEDIR}outputs/datacardsByDecaySyst${SUFFIX}/${i}/ --suffix taunu --json /afs/cern.ch/work/v/vischia/private/results/HIG-13-026/tempjsonByFinalState/${i}_taunu.json --noPowers --histo finalevtflow2btags --bin 1 --ch emu,ee,mumu & + #prepareChHiggsDatacards --in ${BASEDIR}outputs/plotter_forSystTable${SUFFIX}.root --out ${BASEDIR}outputs/datacardsByDecaySyst${SUFFIX}/${i}/ --suffix tb --json /afs/cern.ch/work/v/vischia/private/results/HIG-13-026/tempjsonByFinalState_ttbarsplit/${i}_tb.json --noPowers --histo ${SHAPEHISTO} --bin 1 --ch emu,ee,mumu & + #prepareChHiggsDatacards --in ${BASEDIR}outputs/plotter_forSystTable${SUFFIX}.root --out ${BASEDIR}outputs/datacardsByDecaySyst${SUFFIX}/${i}/ --suffix taunu --json /afs/cern.ch/work/v/vischia/private/results/HIG-13-026/tempjsonByFinalState_ttbarsplit/${i}_taunu.json --noPowers --histo ${SHAPEHISTO} --bin 1 --ch emu,ee,mumu & - prepareChHiggsDatacards --in ${BASEDIR}outputs/plotter_forSystTable${SUFFIX}.root --out ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX}/${i}/ --suffix tb --json /afs/cern.ch/work/v/vischia/private/results/HIG-13-026/tempjsonByFinalState/${i}_tb.json --noPowers --histo evtflow --bin 1 --ch emu,ee,mumu & - prepareChHiggsDatacards --in ${BASEDIR}outputs/plotter_forSystTable${SUFFIX}.root --out ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX}/${i}/ --suffix taunu --json /afs/cern.ch/work/v/vischia/private/results/HIG-13-026/tempjsonByFinalState/${i}_taunu.json --noPowers --histo evtflow --bin 1 --ch emu,ee,mumu & + #prepareChHiggsDatacards --in ${BASEDIR}outputs/plotter_forSystTable${SUFFIX}.root --out ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX}/${i}/ --suffix tb --json /afs/cern.ch/work/v/vischia/private/results/HIG-13-026/tempjsonByFinalState_ttbarsplit/${i}_tb.json --noPowers --histo evtflow --bin 1 --ch emu,ee,mumu & + #prepareChHiggsDatacards --in ${BASEDIR}outputs/plotter_forSystTable${SUFFIX}.root --out ${BASEDIR}outputs/datacardsByDecaySystPAS${SUFFIX}/${i}/ --suffix taunu --json /afs/cern.ch/work/v/vischia/private/results/HIG-13-026/tempjsonByFinalState_ttbarsplit/${i}_taunu.json --noPowers --histo evtflow --bin 1 --ch emu,ee,mumu & done elif [ "${2}" = "mhmax" ]; then diff --git a/test/runAnalysis_cfg.py.templ b/test/runAnalysis_cfg.py.templ index 5cf558e47..a4262b4da 100644 --- a/test/runAnalysis_cfg.py.templ +++ b/test/runAnalysis_cfg.py.templ @@ -1,9 +1,12 @@ import FWCore.ParameterSet.Config as cms #from UserCode.llvv_fwk.mvaConfig_cfi import ewkzp2jFullNoQG as mySignalMVA -from UserCode.llvv_fwk.mvaConfig_cfi import ewkzp2jFull as mySignalMVA +#from UserCode.llvv_fwk.mvaConfig_cfi import ewkzp2jFull as mySignalMVA #from UserCode.llvv_fwk.mvaConfig_cfi import ewkzp2jBase as mySignalMVA +from UserCode.llvv_fwk.mvaConfig_cfi import chHiggsBase as mySignalMVA +#from UserCode.llvv_fwk.mvaConfig_cfi import chHiggsTest as mySignalMVA + datapileup_70300_2012abcd=cms.vdouble(8.09479e-06,5.64253e-05,0.000234438,0.000708129,0.0017105,0.00349358,0.00625553,0.0100708,0.0148505,0.020349,0.0262113,0.0320441,0.0374847,0.0422506,0.0461603,0.0491294,0.0511502,0.0522664,0.0525496,0.0520821,0.0509474,0.0492268,0.0469996,0.0443453,0.0413455,0.0380853,0.0346522,0.0311346,0.0276184,0.0241833,0.0208995,0.0178247,0.0150024,0.0124611,0.0102148,0.00826464,0.00660065,0.00520452,0.00405205,0.00311564,0.00236635,0.00177563,0.00131662,0.000964921,0.000699098,0.000500836,0.000354862,0.00024873,0.000172505,0.00011841,8.04614e-05,5.41399e-05,3.60823e-05,2.38255e-05,1.55917e-05,1.01156e-05,6.50871e-06,4.15502e-06,2.63279e-06,1.65666e-06,1.03577e-06,6.43829e-07,3.98156e-07,2.45158e-07,1.50427e-07,9.20683e-08,5.62672e-08,3.43759e-08,2.10198e-08,1.28799e-08,7.91828e-09,4.88962e-09,3.03584e-09,1.89664e-09,1.19296e-09,7.55627e-10,4.81954e-10,3.09438e-10,1.99876e-10,1.2979e-10,8.46506e-11,5.54024e-11,3.63523e-11,2.38919e-11,1.57154e-11,1.0338e-11,6.79661e-12,4.46326e-12,2.9262e-12,1.91457e-12,1.24969e-12,8.13541e-13,5.2808e-13,3.41728e-13,2.20422e-13,1.417e-13,9.07784e-14,5.79506e-14,3.68613e-14,2.33614e-14) datapileup_70300_2012abcd_singleMu=cms.vdouble( 1.74887e-05, 8.41971e-05, 0.000287341, 0.000803268, 0.00187968, 0.00377078, 0.0066576, 0.0105832, 0.0154249, 0.0209121, 0.0266813, 0.0323481, 0.0375723, 0.0421003, 0.0457791, 0.0485477, 0.0504145, 0.0514311, 0.0516703, 0.0512103, 0.0501269, 0.0484915, 0.046373, 0.0438405, 0.0409668, 0.0378292, 0.0345099, 0.0310934, 0.0276634, 0.0242989, 0.0210703, 0.0180364, 0.015242, 0.0127175, 0.0104787, 0.00852824, 0.00685803, 0.00545122, 0.00428495, 0.00333277, 0.00256669, 0.00195893, 0.00148318, 0.00111545, 0.00083458, 0.000622389, 0.000463664, 0.000345947, 0.000259249, 0.000195714, 0.000149271, 0.000115306, 9.03708e-05, 7.19217e-05, 5.81115e-05, 4.76144e-05, 3.94894e-05, 3.30754e-05, 2.79112e-05, 2.36762e-05, 2.01478e-05, 1.71707e-05, 1.4635e-05, 1.24614e-05, 1.05913e-05, 8.97977e-06, 7.59119e-06, 6.39635e-06, 5.37056e-06, 4.49252e-06, 3.74351e-06, 3.10699e-06, 2.56822e-06, 2.1141e-06, 1.73297e-06, 1.4145e-06, 1.14958e-06, 9.30199e-07, 7.49367e-07, 6.01001e-07, 4.79843e-07, 3.81374e-07, 3.01728e-07, 2.37618e-07, 1.86267e-07, 1.45337e-07, 1.12875e-07, 8.72566e-08, 6.71403e-08, 5.1423e-08, 3.9204e-08, 2.97519e-08, 2.24765e-08, 1.69039e-08, 1.26565e-08, 9.43474e-09, 7.00267e-09, 5.17537e-09, 3.80882e-09, 2.79153e-09) @@ -29,5 +32,5 @@ runProcess = cms.PSet( datapileup = datapileup_70300_2012abcd, datapileupSingleLep = datapileup_70300_2012abcd_singleMu, # datapileupSingleLep = datapileup_70300_2012abcd, - debug = cms.bool(True) + debug = cms.bool(False) )