Skip to content

Commit 8e426a8

Browse files
committed
Merge pull request #124 from kreczko/fix-pdf-index
changed the range for PDF weights from 1-45 to 1-44
2 parents 495f8bf + 4f98311 commit 8e426a8

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/cross_section_measurement/02_unfold_and_measure.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -326,12 +326,12 @@ def calculate_normalised_xsections( normalisation, category, channel, k_value =
326326
}
327327

328328
if not channel == 'combined':
329-
filename = path_to_JSON + '/xsection_measurement_results/%s/kv%d/%s/normalised_xsection_%s.txt' % ( channel, k_value, category, met_type )
329+
filename = path_to_JSON + '/xsection_measurement_results/%s/kv%d/%s/normalised_xsection_%s.txt' % ( channel, k_value, category, met_type )
330330
else:
331-
filename = path_to_JSON + '/xsection_measurement_results/%s/%s/normalised_xsection_%s.txt' % ( channel, category, met_type )
331+
filename = path_to_JSON + '/xsection_measurement_results/%s/%s/normalised_xsection_%s.txt' % ( channel, category, met_type )
332332

333333
if normalise_to_one:
334-
filename = filename.replace( 'normalised_xsection', 'normalised_to_one_xsection' )
334+
filename = filename.replace( 'normalised_xsection', 'normalised_to_one_xsection' )
335335
write_data_to_JSON( normalised_xsection, filename )
336336

337337
if __name__ == '__main__':
@@ -385,7 +385,7 @@ def calculate_normalised_xsections( normalisation, category, channel, k_value =
385385
file_for_powheg_herwig = File( measurement_config.unfolding_powheg_herwig, 'read' )
386386
file_for_mcatnlo = File( measurement_config.unfolding_mcatnlo, 'read' )
387387
file_for_ptreweight = File ( measurement_config.unfolding_ptreweight, 'read' )
388-
files_for_pdfs = { 'PDFWeights_%d' % index : File ( measurement_config.unfolding_pdfweights[index] ) for index in range( 1, 46 ) }
388+
files_for_pdfs = { 'PDFWeights_%d' % index : File ( measurement_config.unfolding_pdfweights[index] ) for index in range( 1, 45 ) }
389389

390390
file_for_scaledown = File( measurement_config.unfolding_scale_down, 'read' )
391391
file_for_scaleup = File( measurement_config.unfolding_scale_up, 'read' )
@@ -415,7 +415,7 @@ def calculate_normalised_xsections( normalisation, category, channel, k_value =
415415
ttbar_theory_systematics.extend( [ttbar_theory_systematic_prefix + 'powheg_pythia', ttbar_theory_systematic_prefix + 'powheg_herwig'] )
416416
categories.extend( ttbar_theory_systematics )
417417

418-
pdf_uncertainties = ['PDFWeights_%d' % index for index in range( 1, 46 )]
418+
pdf_uncertainties = ['PDFWeights_%d' % index for index in range( 1, 45 )]
419419
rate_changing_systematics = [systematic + '+' for systematic in measurement_config.rate_changing_systematics.keys()]
420420
rate_changing_systematics.extend( [systematic + '-' for systematic in measurement_config.rate_changing_systematics.keys()] )
421421

src/cross_section_measurement/03_calculate_systematics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def replace_measurement_with_deviation_from_central( central_measurement, dictio
183183
ttbar_hadronisation_systematic_list = [ttbar_theory_systematic_prefix + 'powheg_pythia', ttbar_theory_systematic_prefix + 'powheg_herwig']
184184

185185
# 45 PDF uncertainties
186-
pdf_uncertainties = ['PDFWeights_%d' % index for index in range( 1, 46 )]
186+
pdf_uncertainties = ['PDFWeights_%d' % index for index in range( 1, 45 )]
187187

188188
# all MET uncertainties except JES and JER as this is already included
189189
met_uncertainties_list = [met_type + suffix for suffix in met_systematics_suffixes if not 'JetEn' in suffix and not 'JetRes' in suffix]

src/cross_section_measurement/04_make_plots_matplotlib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,11 +544,11 @@ def get_unit_string(fit_variable):
544544
categories.extend( ttbar_generator_systematics )
545545
categories.extend( vjets_generator_systematics )
546546

547-
pdf_uncertainties = ['PDFWeights_%d' % index for index in range( 1, 46 )]
547+
pdf_uncertainties = ['PDFWeights_%d' % index for index in range( 1, 45 )]
548548
pdf_uncertainties_1_to_11 = ['PDFWeights_%d' % index for index in range( 1, 12 )]
549549
pdf_uncertainties_12_to_22 = ['PDFWeights_%d' % index for index in range( 12, 23 )]
550550
pdf_uncertainties_23_to_33 = ['PDFWeights_%d' % index for index in range( 23, 34 )]
551-
pdf_uncertainties_34_to_45 = ['PDFWeights_%d' % index for index in range( 34, 46 )]
551+
pdf_uncertainties_34_to_45 = ['PDFWeights_%d' % index for index in range( 34, 45 )]
552552
# all MET uncertainties except JES as this is already included
553553
met_uncertainties = [met_type + suffix for suffix in met_systematics_suffixes if not 'JetEn' in suffix and not 'JetRes' in suffix]
554554
new_uncertainties = ['QCD_shape']

tools/Calculation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def calculate_lower_and_upper_PDFuncertainty(central_measurement, pdf_uncertaint
120120
positive = []
121121

122122
# split PDF uncertainties into downwards (negative) and upwards (positive) components
123-
for index in range(1, 46):
123+
for index in range(1, 45):
124124
pdf_weight = 'PDFWeights_%d' % index
125125
pdf_uncertainty = pdf_uncertainty_values[pdf_weight]
126126
if index % 2 == 0: # even == negative

0 commit comments

Comments
 (0)