Skip to content

Commit 74fcf9d

Browse files
committed
Merge pull request BristolTopGroup#276 from EmyrClement/NLOSYstematic
NLO systematic
2 parents bc54a99 + bac5cfb commit 74fcf9d

File tree

5 files changed

+19
-18
lines changed

5 files changed

+19
-18
lines changed

config/cross_section_config.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ def __fill_defaults__( self ):
209209
# 'matchingup', 'matchingdown',
210210
'scaleup', 'scaledown',
211211
'massup', 'massdown',
212-
'hadronisation'
212+
'hadronisation',
213+
'NLOgenerator'
213214
]
214215
self.k_values = {
215216
'electron' : self.k_values_electron,
@@ -251,7 +252,7 @@ def __fill_defaults__( self ):
251252
self.central_general_template = path_to_files + 'central/%s' + middle + '.root'
252253
self.generator_systematic_vjets_templates = {}
253254
for systematic in self.generator_systematics:
254-
if 'mass' in systematic or 'hadronisation' in systematic:
255+
if 'mass' in systematic or 'hadronisation' in systematic or 'NLOgenerator' in systematic:
255256
continue
256257
tmp = path_to_files + 'central/VJets-{0}_{1}pb_PFElectron_PFMuon_PF2PATJets_PFMET.root'
257258
tmp = tmp.format(systematic, self.luminosity)
@@ -401,8 +402,9 @@ def __fill_defaults__( self ):
401402
'Theory': [('TTJets_scaledown', 'TTJets_scaleup'),
402403
('TTJets_massdown', 'TTJets_massup')],
403404
'Hadronisation': [('TTJets_hadronisation', 'TTJets_hadronisation')],
405+
'NLO generator': [('TTJets_NLOgenerator', 'TTJets_NLOgenerator')],
404406
'PDF': [('PDF_total_lower', 'PDF_total_upper')],
405-
'others': [('QCD_shape', 'QCD_shape')]
407+
'QCD shape': [('QCD_shape', 'QCD_shape')]
406408
}
407409
self.typical_systematics = []
408410
for _, values in self.typical_systematics_summary.items():

config/latex_labels.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
'central': 'central',
8888
#'ptreweight_max': '$p_\mathrm{T}(t,\\bar{t})$ reweighting',
8989
'TTJets_hadronisation': 'Hadronisation uncertainty',
90+
'TTJets_NLOgenerator': 'NLO generator',
9091
'PDF_total_lower': 'PDF uncertainty $-1\sigma$',
9192
'PDF_total_upper': 'PDF uncertainty $+1\sigma$',
9293
'QCD_shape': 'QCD shape uncertainty',

experimental/condor/01b/01_fit.description

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ request_memory=500
1515
# use the ENV that is provided
1616
getenv = true
1717

18-
queue 7
18+
queue 14

src/cross_section_measurement/02_unfold_and_measure.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def get_unfolded_normalisation( TTJet_fit_results, category, channel, tau_value,
6464
ttbar_theory_systematic_prefix + 'massdown' : file_for_massdown,
6565
ttbar_theory_systematic_prefix + 'massup' : file_for_massup,
6666
ttbar_theory_systematic_prefix + 'hadronisation' : file_for_powheg_herwig,
67+
ttbar_theory_systematic_prefix + 'NLOgenerator' : file_for_amcatnlo,
6768
}
6869

6970
h_truth, h_measured, h_response, h_fakes = None, None, None, None
@@ -438,25 +439,17 @@ def calculate_normalised_xsections( normalisation, category, channel, normalise_
438439
categories.extend( ttbar_generator_systematics )
439440
### categories.extend( vjets_generator_systematics )
440441

441-
### ttbar theory systematics, including pt reweighting and hadronisation systematic
442-
ttbar_theory_systematics = [] #[ ttbar_theory_systematic_prefix + 'ptreweight' ]
443-
ttbar_theory_systematics.extend( [ttbar_theory_systematic_prefix + 'powheg_pythia', ttbar_theory_systematic_prefix + 'powheg_herwig'] )
444-
categories.extend( ttbar_theory_systematics )
445-
446-
### Add mass systematics
447-
### ttbar_mass_systematics = measurement_config.topMass_systematics
448-
### categories.extend( measurement_config.topMass_systematics )
449-
450-
### Add k Value systematic
451-
### kValue_systematics = measurement_config.kValueSystematic
452-
### categories.extend( measurement_config.kValueSystematic )
442+
# ### ttbar theory systematics, including pt reweighting and hadronisation systematic
443+
# ttbar_theory_systematics = [] #[ ttbar_theory_systematic_prefix + 'ptreweight' ]
444+
# ttbar_theory_systematics.extend( [ttbar_theory_systematic_prefix + 'powheg_pythia', ttbar_theory_systematic_prefix + 'powheg_herwig'] )
445+
# categories.extend( ttbar_theory_systematics )
453446

454447
pdf_uncertainties = ['PDFWeights_%d' % index for index in range( 0, 100 )]
455448
rate_changing_systematics = [systematic for systematic in measurement_config.rate_changing_systematics_names]
456449
# all MET uncertainties except JES as this is already included
457450
met_uncertainties = [suffix for suffix in measurement_config.met_systematics_suffixes if not 'JetEn' in suffix and not 'JetRes' in suffix]
458451
all_measurements = deepcopy( categories )
459-
all_measurements.extend( pdf_uncertainties )
452+
# all_measurements.extend( pdf_uncertainties )
460453
all_measurements.extend( ['QCD_shape'] )
461454
all_measurements.extend( rate_changing_systematics )
462455

src/cross_section_measurement/05_make_tables.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,11 @@ def print_typical_systematics_table(central_values, errors, channel, toFile = Tr
476476
assert(errors.has_key(s))
477477

478478
group_errors = {}
479+
for group in measurement_config.typical_systematics_summary:
480+
group_errors[group] = []
481+
479482
for bin_i, _ in enumerate(bins):
483+
480484
central_value = central_values[measurement][bin_i][0]
481485
uncertainties = {}
482486
# calculate all relative errors
@@ -486,12 +490,13 @@ def print_typical_systematics_table(central_values, errors, channel, toFile = Tr
486490
uncertainties[systematic] = relative_error
487491
# add errors in a group in quadrature
488492
for group, u_list in measurement_config.typical_systematics_summary.items():
493+
489494
group_error_squared = 0
490495
for subgroup in u_list:
491496
# use the biggest of up and down
492497
subgroup_error = max(uncertainties[subgroup[0]], uncertainties[subgroup[1]])
493498
group_error_squared += pow(subgroup_error, 2)
494-
group_errors[group] = math.sqrt(group_error_squared)
499+
group_errors[group].append(math.sqrt(group_error_squared))
495500

496501
summarised_typical_systematics = {}
497502
# calculate the median

0 commit comments

Comments
 (0)