@@ -454,6 +454,13 @@ def write_fit_results( channel, category, fit_results ):
454454 Higgs_file = File ( measurement_config .higgs_category_templates ['central' ] )
455455
456456 TTJet_file = File ( measurement_config .ttbar_category_templates ['central' ] )
457+ # Using 8 TeV VJets systematic samples for 7 TeV so need to scale:
458+ # vjets ratio = sigma(7TeV)*lumi(7TeV)/(sigma(8TeV)*lumi(8TeV))
459+ vjets_ratio = ( 31314 * 5050 ) / ( 36257.2 * 19584 )
460+ scale_factors = {}
461+ if measurement_config .centre_of_mass_energy == 7 :
462+ scale_factors ['V+Jets' ] = vjets_ratio
463+
457464 # matching/scale up/down systematics for V+Jets
458465 for systematic in generator_systematics :
459466 if run_just_central : # no systematics for closure test
@@ -472,6 +479,7 @@ def write_fit_results( channel, category, fit_results ):
472479 variable = variable ,
473480 met_type = met_type ,
474481 b_tag_bin = b_tag_bin ,
482+ scale_factors = scale_factors ,
475483 )
476484
477485 fit_results_muon , initial_values_muon , templates_muon = get_fitted_normalisation_from_ROOT ( 'muon' ,
@@ -485,14 +493,17 @@ def write_fit_results( channel, category, fit_results ):
485493 variable = variable ,
486494 met_type = met_type ,
487495 b_tag_bin = b_tag_bin ,
496+ scale_factors = scale_factors ,
488497 )
489498
490499 write_fit_results_and_initial_values ( 'electron' , vjets_theory_systematic_prefix + systematic , fit_results_electron , initial_values_electron , templates_electron )
491500 write_fit_results_and_initial_values ( 'muon' , vjets_theory_systematic_prefix + systematic , fit_results_muon , initial_values_muon , templates_muon )
492501 write_fit_results ( 'combined' , vjets_theory_systematic_prefix + systematic , combine_complex_results ( fit_results_electron , fit_results_muon ) )
493502 VJets_file .Close ()
494503
504+ # reset template back to central
495505 VJets_file = File ( measurement_config .VJets_category_templates ['central' ] )
506+ del scale_factors
496507
497508 # central measurement and the rest of the systematics
498509 last_systematic = ''
@@ -704,4 +715,4 @@ def write_fit_results( channel, category, fit_results ):
704715 write_fit_results_and_initial_values ( 'electron' , systematic + variation , fit_results_electron , initial_values_electron , templates_electron )
705716 write_fit_results_and_initial_values ( 'muon' , systematic + variation , fit_results_muon , initial_values_muon , templates_muon )
706717 write_fit_results ( 'combined' , systematic + variation , combine_complex_results ( fit_results_electron , fit_results_muon ) )
707-
718+
0 commit comments