Skip to content

Commit

Permalink
fix random plotting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
edjtscott committed Feb 28, 2019
1 parent 4a5d4db commit 1c474b9
Show file tree
Hide file tree
Showing 14 changed files with 55 additions and 43 deletions.
4 changes: 2 additions & 2 deletions Background/edRunBackgroundScripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

#justPrint=True
#unblind = True
fTestOnly = True
#bkgPlotsOnly = True
#fTestOnly = True
bkgPlotsOnly = True

print 'About to run background scripts'
print 'fTestOnly = %s, bkgPlotsOnly = %s'%(str(fTestOnly), str(bkgPlotsOnly))
Expand Down
4 changes: 2 additions & 2 deletions Plots/FinalResults/combineHarvesterOptions13TeV_Template.dat

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions Signal/edRunSignalScripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
sigPlotsOnly = False

#justPrint=True
##isSubmitted = True
phoSystOnly = True
#isSubmitted = True
#phoSystOnly = True
#useDCB = True
#sigFitOnly = True
#packageOnly = True
#sigPlotsOnly = True
sigPlotsOnly = True

print 'About to run signal scripts'
print 'isSubmitted = %s, phoSystOnly = %s, sigFitOnly = %s, sigPlotsOnly = %s'%(str(isSubmitted), str(phoSystOnly), str(sigFitOnly), str(sigPlotsOnly))
Expand Down Expand Up @@ -53,6 +53,9 @@
print 'with processes: %s'%procs
print 'and categories: %s'%cats

#FIXME temp for packaging...
procs = 'GG2H_1J_PTH_0_60,GG2H_GE2J_PTH_0_60,QQ2HLNU_PTV_150_250_0J,WH2HQQ_VBFTOPO_JET3,WH2HQQ_VH2JET,ZH2HQQ_VH2JET,GG2H_1J_PTH_60_120,VBF_VBFTOPO_JET3,QQ2HLL_PTV_150_250_0J,QQ2HLL_PTV_150_250_GE1J,GG2H_1J_PTH_GT200,testTHW,QQ2HLNU_PTV_150_250_GE1J,testTHQ,TTH,VBF_PTJET1_GT200,QQ2HLL_PTV_GT250,GG2H_0J,GG2H_GE2J_PTH_60_120,GG2H_GE2J_PTH_GT200,WH2HQQ_REST,WH2HQQ_VBFTOPO_JET3VETO,GGZH,VBF_REST,ZH2HQQ_REST,ZH2HQQ_VBFTOPO_JET3,GG2H_VBFTOPO_JET3,GG2H_VBFTOPO_JET3VETO,VBF_VBFTOPO_JET3VETO,VBF_VH2JET,WH2HQQ_PTJET1_GT200,ZH2HQQ_PTJET1_GT200,ZH2HQQ_VBFTOPO_JET3VETO,QQ2HLNU_PTV_0_150,QQ2HLL_PTV_0_150,GG2H_1J_PTH_120_200,GG2H_GE2J_PTH_120_200,QQ2HLNU_PTV_GT250 -f RECO_0J_Tag0,RECO_0J_Tag1,RECO_0J_Tag2,RECO_1J_PTH_0_60_Tag0,RECO_1J_PTH_0_60_Tag1,RECO_1J_PTH_60_120_Tag0,RECO_1J_PTH_60_120_Tag1,RECO_1J_PTH_120_200_Tag0,RECO_1J_PTH_120_200_Tag1,RECO_1J_PTH_GT200,RECO_GE2J_PTH_0_60_Tag0,RECO_GE2J_PTH_0_60_Tag1,RECO_GE2J_PTH_60_120_Tag0,RECO_GE2J_PTH_60_120_Tag1,RECO_GE2J_PTH_120_200_Tag0,RECO_GE2J_PTH_120_200_Tag1,RECO_GE2J_PTH_GT200_Tag0,RECO_GE2J_PTH_GT200_Tag1,RECO_VBFTOPO_JET3VETO_Tag0,RECO_VBFTOPO_JET3VETO_Tag1,RECO_VBFTOPO_JET3_Tag0,RECO_VBFTOPO_JET3_Tag1,RECO_VBFTOPO_REST,RECO_VBFTOPO_BSM,testBBH'

#misc config
lumi = '35.9'
if '2017' in ext: lumi = '41.5'
Expand Down
34 changes: 17 additions & 17 deletions Signal/src/Normalization_13TeV.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,23 @@ int Normalization_13TeV::Init(int sqrtS){
XSectionMap_ZH2HQQ[mH] = valXSZH2HQQ;

//Stage 1
XSectionMap_GG2H_0J[mH] = 0.6236*valXSggH;
XSectionMap_GG2H_1J_PTH_0_60[mH] = 0.1508*valXSggH;
XSectionMap_GG2H_1J_PTH_60_120[mH] = 0.1008*valXSggH;
XSectionMap_GG2H_1J_PTH_120_200[mH] = 0.0173*valXSggH;
XSectionMap_GG2H_1J_PTH_GT200[mH] = 0.0027*valXSggH;
XSectionMap_GG2H_GE2J_PTH_0_60[mH] = 0.0233*valXSggH;
XSectionMap_GG2H_GE2J_PTH_60_120[mH] = 0.0406*valXSggH;
XSectionMap_GG2H_GE2J_PTH_120_200[mH] = 0.0170*valXSggH;
XSectionMap_GG2H_GE2J_PTH_GT200[mH] = 0.0097*valXSggH;
XSectionMap_GG2H_VBFTOPO_JET3VETO[mH] = 0.0063*valXSggH;
XSectionMap_GG2H_VBFTOPO_JET3[mH] = 0.0079*valXSggH;

XSectionMap_VBF_PTJET1_GT200[mH] = 0.0508*valXSqqH;
XSectionMap_VBF_VH2JET[mH] = 0.0172*valXSqqH;
XSectionMap_VBF_VBFTOPO_JET3VETO[mH] = 0.2624*valXSqqH;
XSectionMap_VBF_VBFTOPO_JET3[mH] = 0.1017*valXSqqH;
XSectionMap_VBF_REST[mH] = 0.5680*valXSqqH;
XSectionMap_GG2H_0J[mH] = 0.91 * 0.6236 * valXSggH; // frac(central) * frac(of central) * totXS
XSectionMap_GG2H_1J_PTH_0_60[mH] = 0.91 * 0.1508 * valXSggH;
XSectionMap_GG2H_1J_PTH_60_120[mH] = 0.91 * 0.1008 * valXSggH;
XSectionMap_GG2H_1J_PTH_120_200[mH] = 0.91 * 0.0173 * valXSggH;
XSectionMap_GG2H_1J_PTH_GT200[mH] = 0.91 * 0.0027 * valXSggH;
XSectionMap_GG2H_GE2J_PTH_0_60[mH] = 0.91 * 0.0233 * valXSggH;
XSectionMap_GG2H_GE2J_PTH_60_120[mH] = 0.91 * 0.0406 * valXSggH;
XSectionMap_GG2H_GE2J_PTH_120_200[mH] = 0.91 * 0.0170 * valXSggH;
XSectionMap_GG2H_GE2J_PTH_GT200[mH] = 0.91 * 0.0097 * valXSggH;
XSectionMap_GG2H_VBFTOPO_JET3VETO[mH] = 0.91 * 0.0063 * valXSggH;
XSectionMap_GG2H_VBFTOPO_JET3[mH] = 0.91 * 0.0079 * valXSggH;

XSectionMap_VBF_PTJET1_GT200[mH] = 0.93 * 0.0508 * valXSqqH;
XSectionMap_VBF_VH2JET[mH] = 0.93 * 0.0172 * valXSqqH;
XSectionMap_VBF_VBFTOPO_JET3VETO[mH] = 0.93 * 0.2624 * valXSqqH;
XSectionMap_VBF_VBFTOPO_JET3[mH] = 0.93 * 0.1017 * valXSqqH;
XSectionMap_VBF_REST[mH] = 0.93 * 0.5680 * valXSqqH;

XSectionMap_QQ2HLNU_PTV_0_150[mH] = 0.9467*valXSQQ2HLNU;
XSectionMap_QQ2HLNU_PTV_150_250_0J[mH] = 0.0203*valXSQQ2HLNU;
Expand Down
8 changes: 8 additions & 0 deletions Signal/src/Packager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ void Packager::packageOutput(bool split, string process , string tag){
expectedObjectsNotFound.push_back(Form("sig_%s_mass_m%d_%s",proc->c_str(),mh,catname.c_str()));
continue;
}
std::cout << "ED DEBUG printing tempData" << std::endl;
tempData->Print();
//std::cout << "ED DEBUG allDataThisMass" << std::endl;
//allDataThisMass->Print();
std::cout << "ED DEBUG proc " << *proc << std::endl;
std::cout << "ED DEBUG cat " << cat << std::endl;
std::cout << "ED DEBUG procs_.begin() " << *procs_.begin() << std::endl;
//allDataThisMass->Print();
if (!split_){
if ( cat==0 && proc==procs_.begin()) allDataThisMass = (RooDataSet*)tempData->Clone(Form("sig_mass_m%d_AllCats",mh));
else allDataThisMass->append(*tempData);
Expand Down
2 changes: 1 addition & 1 deletion Signal/test/PackageOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,4 @@ int main (int argc, char *argv[]){
outFile->Close();
return 0;
}

5 changes: 2 additions & 3 deletions Signal/test/makeParametricSignalModelPlots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,7 @@ void Plot(RooRealVar *mass, RooDataSet *data, RooAbsPdf *pdf, pair<double,double
negBinsArrow->Draw("same <>");

}
string sim="";
//string sim="Simulation Preliminary";
string sim="Simulation Preliminary";
//string sim="Simulation"; //for the paper
CMS_lumi( canv, 0,0,sim);
canv->Print(Form("%s.pdf",savename.c_str()));
Expand All @@ -593,7 +592,7 @@ int main(int argc, char *argv[]){
system("mkdir -p plots/SignalPlots/");
setTDRStyle();
writeExtraText = true; // if extra text
//extraText = ""; // default extra text is "Preliminary"
extraText = ""; // default extra text is "Preliminary"
lumi_13TeV = "2.7 fb^{-1}"; // default is "19.7 fb^{-1}"
lumi_8TeV = "19.1 fb^{-1}"; // default is "19.7 fb^{-1}"
lumi_7TeV = "4.9 fb^{-1}"; // default is "5.1 fb^{-1}"
Expand Down
6 changes: 3 additions & 3 deletions edRunCombineScripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
yieldsOnly = False

#justPrint = True
datacardOnly = True
doUEPS = True
#datacardOnly = True
#doUEPS = True
#combineOnly = True
#combinePlotsOnly = True
#effAccOnly = True
#yieldsOnly = True
yieldsOnly = True

print 'About to run combine scripts'
print 'datacardOnly = %s, combineOnly = %s, combinePlotsOnly = %s, effAccOnly = %s, yieldsOnly = %s'%(str(datacardOnly), str(combineOnly), str(combinePlotsOnly), str(effAccOnly), str(yieldsOnly) )
Expand Down
11 changes: 4 additions & 7 deletions getFractions.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
r.gROOT.SetBatch(True)

#setup files
ext = 'fullNewTest2016'
#ext = 'fullNewTest2017'
#ext = 'preappFinal2016'
ext = 'preappFinal2016'
#ext = 'preappFinal2016_powheg'
print 'ext = %s'%ext
baseFilePath = '/vols/cms/es811/FinalFits/ws_%s/'%ext
fileNames = []
Expand All @@ -37,12 +36,10 @@
if 'M125' not in fileName: continue
procs[ fileName.split('pythia8_')[1].split('.root')[0] ] = 0.
procsNoTag[ fileName.split('pythia8_')[1].split('.root')[0] ] = 0.
#cats = 'RECO_0J_Tag0,RECO_0J_Tag1,RECO_0J_Tag2,'
cats = 'RECO_0J_Tag0,RECO_0J_Tag1,'
cats = 'RECO_0J_Tag0,RECO_0J_Tag1,RECO_0J_Tag2,'
cats += 'RECO_1J_PTH_0_60_Tag0,RECO_1J_PTH_0_60_Tag1,RECO_1J_PTH_60_120_Tag0,RECO_1J_PTH_60_120_Tag1,RECO_1J_PTH_120_200_Tag0,RECO_1J_PTH_120_200_Tag1,RECO_1J_PTH_GT200,'
cats += 'RECO_GE2J_PTH_0_60_Tag0,RECO_GE2J_PTH_0_60_Tag1,RECO_GE2J_PTH_60_120_Tag0,RECO_GE2J_PTH_60_120_Tag1,RECO_GE2J_PTH_120_200_Tag0,RECO_GE2J_PTH_120_200_Tag1,RECO_GE2J_PTH_GT200_Tag0,RECO_GE2J_PTH_GT200_Tag1,'
#cats += 'RECO_VBFTOPO_JET3VETO_Tag0,RECO_VBFTOPO_JET3VETO_Tag1,RECO_VBFTOPO_JET3_Tag0,RECO_VBFTOPO_JET3_Tag1,RECO_VBFTOPO_REST,RECO_VBFTOPO_BSM'
cats += 'RECO_VBFTOPO_JET3VETO_Tag0,RECO_VBFTOPO_JET3VETO_Tag1,RECO_VBFTOPO_JET3_Tag0,RECO_VBFTOPO_JET3_Tag1,RECO_VBFTOPO_REST'
cats += 'RECO_VBFTOPO_JET3VETO_Tag0,RECO_VBFTOPO_JET3VETO_Tag1,RECO_VBFTOPO_JET3_Tag0,RECO_VBFTOPO_JET3_Tag1,RECO_VBFTOPO_REST,RECO_VBFTOPO_BSM'
cats = cats.split(',')
stage0procs = {}
stage0procs['GG2H'] = 0.
Expand Down
3 changes: 2 additions & 1 deletion justCopyFiles.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
EXT="preappFinal2016"
#EXT="preappFinal2016"
EXT="approvalFinal2016"
OUTDIR="outdir_${EXT}"

if [ ! -d "Signal/$OUTDIR" ]; then
Expand Down
4 changes: 2 additions & 2 deletions runFinalFitsScripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ if [ $COMBINEPLOTSONLY == 0 ]; then
#mv higgsCombine_bonlyForLoading_$EXT.MultiDimFit.mH125.root STXSExpPerProcessMuFinerProfileMH_BonlyForLoading_$EXT.root

echo "./combineHarvester.py -d combineHarvesterOptions13TeV_$EXT.dat -q $DEFAULTQUEUE --batch $BATCH --verbose"
./combineHarvester.py -d combineHarvesterOptions13TeV_${EXT}${FAKE}.dat -q $DEFAULTQUEUE --batch $BATCH --verbose #--S0
#./combineHarvester.py -d combineHarvesterOptions13TeV_${EXT}${FAKE}.dat -q $DEFAULTQUEUE --batch $BATCH --verbose --dryRun
#./combineHarvester.py -d combineHarvesterOptions13TeV_${EXT}${FAKE}.dat -q $DEFAULTQUEUE --batch $BATCH --verbose #--S0
./combineHarvester.py -d combineHarvesterOptions13TeV_${EXT}${FAKE}.dat -q $DEFAULTQUEUE --batch $BATCH --verbose --dryRun

JOBS=999
RUN=999
Expand Down
6 changes: 4 additions & 2 deletions stage1helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ def getProcAbbrev(self, theProc):
elif 'GG2H' in theProc: return 'ggh'
elif 'VBF' in theProc: return 'vbf'
elif 'BBH' in theProc: return 'bbh'
elif 'GGZH' in theProc: return 'ggzh'
elif 'THQ' in theProc: return 'th'
elif 'THW' in theProc: return 'th'
else:
Expand All @@ -148,14 +149,15 @@ def getProcStage0(self, theProc):
elif 'GG2H' in theProc: return 'GG2H'
elif 'VBF' in theProc: return 'VBF'
elif 'BBH' in theProc: return 'BBH'
elif 'GGZH' in theProc: return 'GGZH'
elif 'THQ' in theProc: return 'THQ'
elif 'THW' in theProc: return 'THW'
else:
print 'Oh dear, didn not get a Stage 0 name for proc %s'%theProc
raise Exception

def getStage0list(self):
return ['GG2H', 'VBF', 'TTH', 'testTHQ', 'testTHW', 'testBBH', 'QQ2HLNU', 'WH2HQQ', 'QQ2HLL', 'ZH2HQQ']
return ['GG2H', 'VBF', 'TTH', 'testTHQ', 'testTHW', 'testBBH', 'GGZH', 'QQ2HLNU', 'WH2HQQ', 'QQ2HLL', 'ZH2HQQ']

def getStage0dict(self):
return {'GG2H':'ggH', 'VBF':'VBF', 'TTH':'ttH', 'testTHQ':'tHq', 'testTHW':'tHW', 'testBBH':'bbH', 'QQ2HLNU':'WH lep', 'WH2HQQ':'WH had', 'QQ2HLL':'ZH lep', 'ZH2HQQ':'ZH had'}
return {'GG2H':'ggH', 'VBF':'VBF', 'TTH':'ttH', 'testTHQ':'tHq', 'testTHW':'tHW', 'testBBH':'bbH', 'GGZH':'ggZH', 'QQ2HLNU':'WH lep', 'WH2HQQ':'WH had', 'QQ2HLL':'ZH lep', 'ZH2HQQ':'ZH had'}
1 change: 1 addition & 0 deletions stxsPlotsFromWSs.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def prettyProc( proc ):
nameMap['testBBH'] = 'bbh'
nameMap['testTHQ'] = 'th'
nameMap['testTHW'] = 'th'
nameMap['GGZH'] = 'ggzh'

sumwProcCatMap = {}
sumwProcMap = {}
Expand Down
1 change: 1 addition & 0 deletions tdrStyle/CMS_lumi.C
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ CMS_lumi( TPad* pad, int iPeriod, int iPosX , TString extraExtraText)
//CMS_logo->Draw("X");
pad_logo->Modified();
pad->cd();
delete pad_logo;
}
else
{
Expand Down

0 comments on commit 1c474b9

Please sign in to comment.