Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ff mssm embed met fixes #386

Merged
merged 3 commits into from
Feb 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py
Original file line number Diff line number Diff line change
Expand Up @@ -4348,6 +4348,7 @@ def NormSignals(outfile,add_name):
for mass in masses:
if isinstance(sm_samples[samp], (list,)): xs = ana.info[sm_samples[samp][0].replace('*',mass)]['xs']
else: xs = ana.info[sm_samples[samp].replace('*',mass)]['xs']
if xs == 1.: continue
sf = 1.0/xs
if not outfile.GetDirectory(nodename).GetListOfKeys().Contains(samp_name+mass+add_name): continue
sm_hist = outfile.Get(nodename+'/'+samp_name+mass+add_name)
Expand All @@ -4364,6 +4365,7 @@ def NormSignals(outfile,add_name):
if masses is not None:
for mass in masses:
xs = ana.info[mssm_samples[samp].replace('*',mass)]['xs']
if xs == 1.: continue
sf = 1.0/xs
if sf == 1.0: continue
mssm_hist = outfile.Get(nodename+'/'+samp+mass+add_name)
Expand All @@ -4383,6 +4385,7 @@ def NormSignals(outfile,add_name):
if masses is not None:
for mass in masses:
xs = ana.info[Hhh_samples[samp].replace('*',mass)]['xs']
if xs == 1.: continue
sf = 1.0/xs
mssm_hist = outfile.Get(nodename+'/'+samp+mass+add_name)
mssm_hist.Scale(sf)
Expand Down
5 changes: 2 additions & 3 deletions Analysis/HiggsTauTauRun2/scripts/config_mssm_2016.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"file_prefix" : "root://gfe02.grid.hep.ph.ic.ac.uk:1097/store/user/guttley/Sep18_MC_102X_2016/",
"max_events": -1,
"timings": true,
"channels": ["mt","et","tt"],
"channels": ["tt","mt","et"],
//"channels": ["tt"],
"sequences": {
"all": ["default"]
Expand Down Expand Up @@ -60,10 +60,9 @@
"do_pdf_wts": false,
"do_qcd_scale_wts": false,
"output_folder" : "/vols/cms/dw515/Offline/output/MSSM/mssm_2016_0802/",
//"output_folder" : "output/",
"svfit_from_grid" : true,
"read_all_svfit_files" : true,
"svfit_folder" : "/vols/cms/dw515/Offline/output/MSSM/mssm_2016_0802_svfit/",
"svfit_folder" : "/vols/cms/dw515/Offline/output/MSSM/mssm_2016_0802_svfit_signals/",
"svfit_from_grid" : true,
"read_all_svfit_files" : true,
//"svfit_folder" : "./output/",
Expand Down
8 changes: 4 additions & 4 deletions Analysis/HiggsTauTauRun2/scripts/htt_mssm_2016.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,14 @@ def getParaJobSubmit(N):
#for mass in M_GluGluBBH_NLO:
# signal_mc += ['SUSYGluGluToBBHToTauTau_M-'+mass+'-NLO']

M_GluGluH = ['80','90','100','110','120','130','140','160','180','200','250','300','350','400','450','500','600','700','800','900','1000','1200','1400','1500','1600','1800','2000','2300','2600','2900','3200']
for mass in M_GluGluH:
signal_mc += ['SUSYGluGluToHToTauTau_M-'+mass]
#M_GluGluH = ['80','90','100','110','120','130','140','160','180','200','250','300','350','400','450','500','600','700','800','900','1000','1200','1400','1500','1600','1800','2000','2300','2600','2900','3200']
#for mass in M_GluGluH:
# signal_mc += ['SUSYGluGluToHToTauTau_M-'+mass]

masses_ph = [60, 80, 100, 120, 125, 130, 140, 160, 180, 200, 250, 300, 350, 400, 450, 500, 600, 700, 800, 900, 1000, 1200, 1400, 1600, 1800, 2000, 2300, 2600, 2900, 3200, 3500]
# note not all samples exists currently for every mass
for mass in masses_ph:
#signal_mc += ['SUSYGluGluToHToTauTau_M-%s_powheg' % mass]
signal_mc += ['SUSYGluGluToHToTauTau_M-%s_powheg' % mass]
signal_mc += ['SUSYGluGluToBBHToTauTau_M-%s_powheg' % mass]

if options.proc_data or options.proc_all or options.calc_lumi or options.proc_embed:
Expand Down
7 changes: 2 additions & 5 deletions Analysis/HiggsTauTauRun2/scripts/makeMSSMpTWeights.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
dir_2016 = '/vols/cms/dw515/Offline/output/MSSM/ggh_reweighting_2016/'
dir_2018 = '/vols/cms/dw515/Offline/output/MSSM/ggh_reweighting_2018/'


masses_pythia_2016 = [80, 90, 100, 110, 120, 130, 140, 160, 180, 200, 250, 300, 350, 400, 450, 500, 600, 700, 800, 900, 1000, 1200, 1400, 1500, 1600, 1800, 2000, 2300, 2600, 2900, 3200]

masses_ph = [60, 80, 100, 120, 125, 130, 140, 160, 180, 200, 250, 300, 350, 400, 450, 500, 600, 700, 800, 900, 1000, 1200, 1400, 1600, 1800, 2000, 2300, 2600, 2900, 3200, 3500]

masses_ph_alt = [350, 400, 450, 500, 600, 700, 800, 900]
Expand Down Expand Up @@ -141,9 +138,9 @@ def FixBins(h,h0):
fout.cd()
h1.Write()

for m in masses_pythia_2016:
for m in set(masses_ph):

file_name_2016 = '%(dir_2016)s/SUSYGluGluToHToTauTau_M-%(m)i_tt_2016.root' % vars()
file_name_2016 = '%(dir_2016)s/SUSYGluGluToHToTauTau_M-%(m)i_powheg_tt_2016.root' % vars()
hist_name_2016 = 'ref_m%(m)i_2016' % vars()
h2 = GetPythiaHist(file_name_2016, hist_name_2016)
fout.cd()
Expand Down
1 change: 1 addition & 0 deletions Analysis/HiggsTauTauRun2/scripts/resubmit_jobs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ source /vols/grid/cms/setup.sh' $job
(( COUNT++ ))
if [[ $1 != "" ]]; then
qsub -e /dev/null -o /dev/null -V -q hep.q -l h_rt=0:$1:0 -l h_vmem=24G -cwd $job
#qsub -e /dev/null -o /dev/null -V -q hep.q -l h_rt=0:$1:0 -l h_vmem=24G -pe hep.pe 2 -cwd $job
#qsub -e /dev/null -o /dev/null -V -q hep.q -l h_rt=0:$1:0 -cwd $job
fi
fi;
Expand Down
8 changes: 0 additions & 8 deletions Analysis/HiggsTauTauRun2/src/HTTCategories.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1397,17 +1397,14 @@ namespace ic {
lOFile = new TFile(mva_output_name_.c_str(), "RECREATE");
lOFile->cd();
mvatree_ = new TTree("ntuple", "ntuple");

mvatree_->Branch("genM", &gen_m_);
mvatree_->Branch("genpT", &gen_pt_);

mvatree_->Branch("gen_nu_p_1", &gen_nu_p_1_);
mvatree_->Branch("gen_nu_p_2", &gen_nu_p_2_);
mvatree_->Branch("gen_nu_phi_1", &gen_nu_phi_1_);
mvatree_->Branch("gen_nu_phi_2", &gen_nu_phi_2_);
mvatree_->Branch("gen_nu_eta_1", &gen_nu_eta_1_);
mvatree_->Branch("gen_nu_eta_2", &gen_nu_eta_2_);

mvatree_->Branch("pt_2", &pt_2_.var_double);
mvatree_->Branch("pt_1", &pt_1_.var_double);
mvatree_->Branch("iso_1", &iso_1_.var_float, "iso_1/F");
Expand Down Expand Up @@ -1449,18 +1446,15 @@ namespace ic {
mvatree_->Branch("tauFlag_1", &tauFlag_1_);
mvatree_->Branch("tauFlag_2", &tauFlag_2_);
mvatree_->Branch("gen_phitt", &gen_phitt_);

mvatree_->Branch("y_1_1", &y_1_1_);
mvatree_->Branch("y_1_2", &y_1_2_);
mvatree_->Branch("y_2_2", &y_2_2_);
mvatree_->Branch("y_3_2", &y_3_2_);
mvatree_->Branch("y_4_2", &y_4_2_);

mvatree_->Branch("metcov00", &metCov00_, "metCov00/F");
mvatree_->Branch("metcov01", &metCov01_, "metCov01/F");
mvatree_->Branch("metcov10", &metCov10_, "metCov10/F");
mvatree_->Branch("metcov11", &metCov11_, "metCov11/F");

mvatree_->Branch("pi_px_1", &pi_px_1_);
mvatree_->Branch("pi_py_1", &pi_py_1_);
mvatree_->Branch("pi_pz_1", &pi_pz_1_);
Expand All @@ -1485,7 +1479,6 @@ namespace ic {
mvatree_->Branch("pi3_py_2", &pi3_py_2_);
mvatree_->Branch("pi3_pz_2", &pi3_pz_2_);
mvatree_->Branch("pi3_E_2", &pi3_E_2_);

mvatree_->Branch("pi0_px_1", &pi0_px_1_);
mvatree_->Branch("pi0_py_1", &pi0_py_1_);
mvatree_->Branch("pi0_pz_1", &pi0_pz_1_);
Expand Down Expand Up @@ -1558,7 +1551,6 @@ namespace ic {
mvatree_->Branch("ipcov20_2", &ipcov20_2_);
mvatree_->Branch("ipcov21_2", &ipcov21_2_);
mvatree_->Branch("ipcov22_2", &ipcov22_2_);

mvatree_->Branch("svcov00_1", &svcov00_1_);
mvatree_->Branch("svcov01_1", &svcov01_1_);
mvatree_->Branch("svcov02_1", &svcov02_1_);
Expand Down
2 changes: 1 addition & 1 deletion Analysis/HiggsTauTauRun2/src/HTTSequence.cc
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ if (output_name.find("WJetsToLNu-LO") != output_name.npos || output_name.find("W
}
if(output_name.find("SUSYGluGluToHToTauTau_M") != output_name.npos){
httWeights.set_do_mssm_higgspt(true);
if(era_type == era::data_2016) httWeights.set_mssm_higgspt_file("input/mssm_higgspt/higgs_pt_2016_v0.root");
if(era_type == era::data_2016) httWeights.set_mssm_higgspt_file("input/mssm_higgspt/higgs_pt_2016_v1.root");
else httWeights.set_mssm_higgspt_file("input/mssm_higgspt/higgs_pt_v1.root");
std::string mass_str = output_name;
mass_str.erase(0, mass_str.find("_M-")+3);
Expand Down
6 changes: 4 additions & 2 deletions test/crab_higgstautau_2017_miniAOD_mssm.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def submit(config):
# file_location = '/SUSYGluGluToBBHToTauTau_M-{}_TuneCP5_13TeV-amcatnlo-pythia8/RunIIFall17MiniAODv2-PU2017_12Apr2018_94X_mc2017_realistic_v14-v1/MINIAODSIM'.format(mass)
# tasks.append((task_name,file_location))

ggh_masses_missing = [130, 600]
ggh_masses_missing = []

tasks.append(('SUSYGluGluToHToTauTau_M-1000_powheg','/SUSYGluGluToHToTauTau_M1000_Tanb11_TuneCP5_13TeV-powheg-pythia8/RunIIFall17MiniAODv2-PU2017_12Apr2018_94X_mc2017_realistic_v14-v4/MINIAODSIM'))
tasks.append(('SUSYGluGluToHToTauTau_M-100_powheg','/SUSYGluGluToHToTauTau_M100_Tanb1_TuneCP5_13TeV-powheg-pythia8/RunIIFall17MiniAODv2-PU2017_12Apr2018_94X_mc2017_realistic_v14-v4/MINIAODSIM'))
Expand Down Expand Up @@ -101,9 +101,11 @@ def submit(config):
tasks.append(('SUSYGluGluToHToTauTau_M-800_powheg','/SUSYGluGluToHToTauTau_M800_Tanb9_TuneCP5_13TeV-powheg-pythia8/RunIIFall17MiniAODv2-PU2017_12Apr2018_94X_mc2017_realistic_v14-v4/MINIAODSIM'))
tasks.append(('SUSYGluGluToHToTauTau_M-80_powheg','/SUSYGluGluToHToTauTau_M80_Tanb1_TuneCP5_13TeV-powheg-pythia8/RunIIFall17MiniAODv2-PU2017_12Apr2018_94X_mc2017_realistic_v14-v4/MINIAODSIM'))
tasks.append(('SUSYGluGluToHToTauTau_M-900_powheg','/SUSYGluGluToHToTauTau_M900_Tanb10_TuneCP5_13TeV-powheg-pythia8/RunIIFall17MiniAODv2-PU2017_12Apr2018_94X_mc2017_realistic_v14-v4/MINIAODSIM'))
tasks.append(('SUSYGluGluToHToTauTau_M-130_powheg','/SUSYGluGluToHToTauTau_M130_Tanb1_TuneCP5_13TeV-powheg-pythia8/RunIIFall17MiniAODv2-PU2017_12Apr2018_94X_mc2017_realistic_v14-v4/MINIAODSIM'))
tasks.append(('SUSYGluGluToHToTauTau_M-600_powheg','/SUSYGluGluToHToTauTau_M600_Tanb6_TuneCP5_13TeV-powheg-pythia8/RunIIFall17MiniAODv2-PU2017_12Apr2018_94X_mc2017_realistic_v14-v4/MINIAODSIM'))

bbh_masses_ph = [60, 80, 100, 120, 125, 130, 140, 160, 180, 200, 250, 300, 350, 400, 450, 500, 600, 700, 800, 900, 1000, 1200, 1400, 1600, 1800, 2000, 2300, 2600, 2900, 3200, 3500]
bbh_masses_missing = [3500]
bbh_masses_missing = []


for mass in bbh_masses_ph:
Expand Down
27 changes: 13 additions & 14 deletions test/crab_higgstautau_2018_miniAOD_mssm.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,16 @@ def submit(config):
# tasks.append((task_name,file_location))

ggh_masses_missing = []
#tasks.append(('SUSYGluGluToHToTauTau_M-1000_powheg','/SUSYGluGluToHToTauTau_M1000_Tanb11_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v4/MINIAODSIM'))
#tasks.append(('SUSYGluGluToHToTauTau_M-100_powheg','/SUSYGluGluToHToTauTau_M100_Tanb1_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v4/MINIAODSIM'))
#tasks.append(('SUSYGluGluToHToTauTau_M-1200_powheg','/SUSYGluGluToHToTauTau_M1200_Tanb15_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v3/MINIAODSIM'))
#tasks.append(('SUSYGluGluToHToTauTau_M-120_powheg','/SUSYGluGluToHToTauTau_M120_Tanb1_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v4/MINIAODSIM'))
#tasks.append(('SUSYGluGluToHToTauTau_M-125_powheg','/SUSYGluGluToHToTauTau_M125_Tanb1_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v4/MINIAODSIM'))
#tasks.append(('SUSYGluGluToHToTauTau_M-130_powheg','/SUSYGluGluToHToTauTau_M130_Tanb1_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v4/MINIAODSIM'))
#tasks.append(('SUSYGluGluToHToTauTau_M-1400_powheg','/SUSYGluGluToHToTauTau_M1400_Tanb21_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v3/MINIAODSIM'))
#tasks.append(('SUSYGluGluToHToTauTau_M-140_powheg','/SUSYGluGluToHToTauTau_M140_Tanb1_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v4/MINIAODSIM'))
#tasks.append(('SUSYGluGluToHToTauTau_M-1600_powheg','/SUSYGluGluToHToTauTau_M1600_Tanb31_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v3/MINIAODSIM'))
#tasks.append(('SUSYGluGluToHToTauTau_M-160_powheg','/SUSYGluGluToHToTauTau_M160_Tanb1_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v3/MINIAODSIM'))
tasks.append(('SUSYGluGluToHToTauTau_M-1000_powheg','/SUSYGluGluToHToTauTau_M1000_Tanb11_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v4/MINIAODSIM'))
tasks.append(('SUSYGluGluToHToTauTau_M-100_powheg','/SUSYGluGluToHToTauTau_M100_Tanb1_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v4/MINIAODSIM'))
tasks.append(('SUSYGluGluToHToTauTau_M-1200_powheg','/SUSYGluGluToHToTauTau_M1200_Tanb15_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v3/MINIAODSIM'))
tasks.append(('SUSYGluGluToHToTauTau_M-120_powheg','/SUSYGluGluToHToTauTau_M120_Tanb1_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v4/MINIAODSIM'))
tasks.append(('SUSYGluGluToHToTauTau_M-125_powheg','/SUSYGluGluToHToTauTau_M125_Tanb1_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v4/MINIAODSIM'))
tasks.append(('SUSYGluGluToHToTauTau_M-130_powheg','/SUSYGluGluToHToTauTau_M130_Tanb1_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v4/MINIAODSIM'))
tasks.append(('SUSYGluGluToHToTauTau_M-1400_powheg','/SUSYGluGluToHToTauTau_M1400_Tanb21_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v3/MINIAODSIM'))
tasks.append(('SUSYGluGluToHToTauTau_M-140_powheg','/SUSYGluGluToHToTauTau_M140_Tanb1_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v4/MINIAODSIM'))
tasks.append(('SUSYGluGluToHToTauTau_M-1600_powheg','/SUSYGluGluToHToTauTau_M1600_Tanb31_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v3/MINIAODSIM'))
tasks.append(('SUSYGluGluToHToTauTau_M-160_powheg','/SUSYGluGluToHToTauTau_M160_Tanb1_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v3/MINIAODSIM'))
tasks.append(('SUSYGluGluToHToTauTau_M-1800_powheg','/SUSYGluGluToHToTauTau_M1800_Tanb44_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v4/MINIAODSIM'))
tasks.append(('SUSYGluGluToHToTauTau_M-180_powheg','/SUSYGluGluToHToTauTau_M180_Tanb1_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v4/MINIAODSIM'))
tasks.append(('SUSYGluGluToHToTauTau_M-2000_powheg','/SUSYGluGluToHToTauTau_M2000_Tanb60_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v3/MINIAODSIM'))
Expand All @@ -106,11 +106,10 @@ def submit(config):


bbh_masses_ph = [60, 80, 100, 120, 125, 130, 140, 160, 180, 200, 250, 300, 350, 400, 450, 500, 600, 700, 800, 900, 1000, 1200, 1400, 1600, 1800, 2000, 2300, 2600, 2900, 3200, 3500]
bbh_masses_missing = [100, 200, 300, 350, 700, 1000, 1400]
bbh_masses_ph=[]

bbh_masses_missing = []
# 1000 and 1400 were still in production when they were processed so check the status of these
masses_v3 = [140, 180, 250, 450, 500]
masses_v4 = [2000]
masses_v4 = [2000, 100, 200, 300, 350, 700, 1400]

for mass in bbh_masses_ph:
if mass in bbh_masses_missing: continue
Expand Down
Loading