DAS  3.0
Das Analysis System
metPhiCorrectionExample Namespace Reference

Variables

 rng = np.random.default_rng()
 
list correction_labels = ["metphicorr_pfmet_mc", "metphicorr_puppimet_mc", "metphicorr_pfmet_data", "metphicorr_puppimet_data"]
 
list eras = ["2018_UL", "2017_UL", "2016postVFP_UL", "2016preVFP_UL"]
 
list run_ranges = [[315252, 325274], [297020, 306463], [278769, 284045], [272007, 278771]]
 
string infile = "met.json.gz"
 
 is_data = None
 
 ceval = correctionlib.CorrectionSet.from_file("../POG/JME/{}/{}".format(era,infile))
 
tuple pts = (rng.pareto(1.5,size=1000000))*100
 
 phis = rng.uniform(low=-3.14,high=3.14,size=1000000)
 
 npvs = rng.integers(low=0,high=200,size=1000000)
 
 runs = None
 
 corrected_pts = ceval["pt_{}".format(correction_label)].evaluate(pts,phis,npvs,runs)
 
 corrected_phis = ceval["phi_{}".format(correction_label)].evaluate(pts,phis,npvs,runs)
 
 fig
 
 axs
 
 sharey
 
 True
 
 tight_layout
 
 xlabel
 
 bins
 
 range
 
 ylabel
 

Detailed Description

In this test script, the different MET Phi Corrections are applied to uniform MET pt,phi distributions to check whether the corrections have an effect.
The number of primary vertices are also drawn from a uniform distribution. The run numbers come from a uniform distribution as well but the run ranges (for data)
are fitting the different eras to not cause crashes.
In the end two plots are created. The first one shows the effect of the corrections on the uniform MET phi distribution and the second one shows the same effect
but as a function of the primary vertices.
This is only a technical test, the resulting plots should not be taken too seriously.

Variable Documentation

◆ axs

axs

◆ bins

bins

◆ ceval

ceval = correctionlib.CorrectionSet.from_file("../POG/JME/{}/{}".format(era,infile))

◆ corrected_phis

corrected_phis = ceval["phi_{}".format(correction_label)].evaluate(pts,phis,npvs,runs)

◆ corrected_pts

corrected_pts = ceval["pt_{}".format(correction_label)].evaluate(pts,phis,npvs,runs)

◆ correction_labels

list correction_labels = ["metphicorr_pfmet_mc", "metphicorr_puppimet_mc", "metphicorr_pfmet_data", "metphicorr_puppimet_data"]

◆ eras

list eras = ["2018_UL", "2017_UL", "2016postVFP_UL", "2016preVFP_UL"]

◆ fig

fig

◆ infile

string infile = "met.json.gz"

◆ is_data

bool is_data = None

◆ npvs

npvs = rng.integers(low=0,high=200,size=1000000)

◆ phis

phis = rng.uniform(low=-3.14,high=3.14,size=1000000)

◆ pts

pts = (rng.pareto(1.5,size=1000000))*100

◆ range

range

◆ rng

rng = np.random.default_rng()

◆ run_ranges

list run_ranges = [[315252, 325274], [297020, 306463], [278769, 284045], [272007, 278771]]

◆ runs

runs = None

◆ sharey

sharey

◆ tight_layout

tight_layout

◆ True

True

◆ xlabel

xlabel

◆ ylabel

ylabel