DAS  3.0
Das Analysis System
jercExample Namespace Reference

Functions

def get_corr_inputs (input_dict, corr_obj)
 

Variables

 __this_dir__ = os.path.dirname(__file__)
 
dictionary example_value_dict
 
string jec = "Summer19UL16_V7_MC"
 
string algo = "AK4PFchs"
 
string algo_ak8 = "AK8PFPuppi"
 
string lvl = "L2Relative"
 
string lvl_compound = "L1L2L3Res"
 
string unc = "Total"
 
 fname = os.path.join(__this_dir__, "../POG/JME/2016postVFP_UL/jet_jerc.json.gz")
 
 cset = core.CorrectionSet.from_file(os.path.join(fname))
 
 fname_ak8 = os.path.join(__this_dir__, "../POG/JME/2016postVFP_UL/fatJet_jerc.json.gz")
 
 cset_ak8 = core.CorrectionSet.from_file(os.path.join(fname_ak8))
 
 fname_jersmear = os.path.join(__this_dir__, "../POG/JME/jer_smear.json.gz")
 
 cset_jersmear = core.CorrectionSet.from_file(os.path.join(fname_jersmear))
 
string key = "{}_{}_{}".format(jec, lvl, algo)
 
string key_ak8 = "{}_{}_{}".format(jec, lvl, algo_ak8)
 
 sf = cset[key]
 
 sf_ak8 = cset_ak8[key_ak8]
 
list sf_input_names = [inp.name for inp in sf.inputs]
 
def inputs = get_corr_inputs(example_value_dict, sf)
 
string jer = "Summer20UL16_JRV3_MC"
 
 jersf_value = sf.evaluate(*inputs)
 
 jer_value = sf.evaluate(*inputs)
 
string key_jersmear = "JERSmear"
 
 sf_jersmear = cset_jersmear[key_jersmear]
 
 jersmear_factor = sf_jersmear.evaluate(*inputs)
 

Function Documentation

◆ get_corr_inputs()

def jercExample.get_corr_inputs (   input_dict,
  corr_obj 
)
Helper function for getting values of input variables
given a dictionary and a correction object.
18 def get_corr_inputs(input_dict, corr_obj):
19  """
20  Helper function for getting values of input variables
21  given a dictionary and a correction object.
22  """
23  input_values = [input_dict[inp.name] for inp in corr_obj.inputs]
24  return input_values
25 
26 
27 #
28 # values of input variables
29 #
30 

Variable Documentation

◆ __this_dir__

__this_dir__ = os.path.dirname(__file__)
private

◆ algo

string algo = "AK4PFchs"

◆ algo_ak8

string algo_ak8 = "AK8PFPuppi"

◆ cset

cset = core.CorrectionSet.from_file(os.path.join(fname))

◆ cset_ak8

cset_ak8 = core.CorrectionSet.from_file(os.path.join(fname_ak8))

◆ cset_jersmear

cset_jersmear = core.CorrectionSet.from_file(os.path.join(fname_jersmear))

◆ example_value_dict

dictionary example_value_dict
Initial value:
1 = {
2  # jet transverse momentum
3  "JetPt": 100.0,
4  # jet pseudorapidity
5  "JetEta": 0.0,
6  # jet azimuthal angle
7  "JetPhi": 0.2,
8  # jet area
9  "JetA": 0.5,
10  # median energy density (pileup)
11  "Rho": 15.0,
12  # systematic variation (only for JER SF)
13  "systematic": "nom",
14  # pT of matched gen-level jet (only for JER smearing)
15  "GenPt": 80.0, # or -1 if no match
16  # unique event ID used for deterministic
17  # pseudorandom number generation (only for JER smearing)
18  "EventID": 12345,
19 }

◆ fname

fname = os.path.join(__this_dir__, "../POG/JME/2016postVFP_UL/jet_jerc.json.gz")

◆ fname_ak8

fname_ak8 = os.path.join(__this_dir__, "../POG/JME/2016postVFP_UL/fatJet_jerc.json.gz")

◆ fname_jersmear

fname_jersmear = os.path.join(__this_dir__, "../POG/JME/jer_smear.json.gz")

◆ inputs

◆ jec

string jec = "Summer19UL16_V7_MC"

◆ jer

string jer = "Summer20UL16_JRV3_MC"

JER-related examples #.

◆ jer_value

jer_value = sf.evaluate(*inputs)

◆ jersf_value

jersf_value = sf.evaluate(*inputs)

◆ jersmear_factor

jersmear_factor = sf_jersmear.evaluate(*inputs)

◆ key

string key = "{}_{}_{}".format(jec, lvl, algo)

◆ key_ak8

string key_ak8 = "{}_{}_{}".format(jec, lvl, algo_ak8)

◆ key_jersmear

string key_jersmear = "JERSmear"

◆ lvl

string lvl = "L2Relative"

◆ lvl_compound

string lvl_compound = "L1L2L3Res"

◆ sf

sf = cset[key]

◆ sf_ak8

sf_ak8 = cset_ak8[key_ak8]

◆ sf_input_names

list sf_input_names = [inp.name for inp in sf.inputs]

◆ sf_jersmear

sf_jersmear = cset_jersmear[key_jersmear]

◆ unc

string unc = "Total"
jercExample.get_corr_inputs
def get_corr_inputs(input_dict, corr_obj)
Definition: jercExample.py:18