CMS 3D CMS Logo

defaults_cfi.py
Go to the documentation of this file.
1 #response config
2 
3 ptbins = [
4  15, 21, 28, 37, 49, 64, 84, 114, 153, 196, 272, 330, 395, 468, 548, 686, 846, 1032, 1248, 1588, 2000, 2500, 3103, 3832, 4713, 5777, 7000
5  #10,24,32,43,56,74,97,133,174,245,300,362,430,507,592,686,846,1032,1248,1588,2000,2500,3000,4000,6000
6 ]
7 etabins = [0.0, 0.5, 1.3, 2.1, 2.5, 3.0, 5.0]
8 
9 def response_distribution_name(iptbin, ietabin):
10  #convert 0.5 -> "05"
11  eta_string = "{0:.1f}".format(etabins[ietabin+1]).replace(".", "")
12  return "reso_dist_{0:.0f}_{1:.0f}_eta{2}".format(ptbins[iptbin], ptbins[iptbin+1], eta_string)
13 
15  eta_string = "{0:.1f}".format(etabins[ietabin+1]).replace(".", "")
16  return "genjet_pt_eta{0}".format(eta_string)
17 
18 jetResponseDir = 'ParticleFlow/JetResponse/'
19 genjetDir = 'ParticleFlow/GenJets/'
20 
21 #offset config
22 
23 etaBinsOffset = [-5.191, -4.889, -4.716, -4.538, -4.363, -4.191, -4.013, -3.839, -3.664, -3.489, -3.314, -3.139, -2.964, -2.853, -2.65,
24  -2.5, -2.322, -2.172, -2.043, -1.93, -1.83, -1.74, -1.653, -1.566, -1.479, -1.392, -1.305, -1.218, -1.131, -1.044, -0.957,
25  -0.879, -0.783, -0.696, -0.609, -0.522, -0.435, -0.348, -0.261, -0.174, -0.087, 0,
26  0.087, 0.174, 0.261, 0.348, 0.435, 0.522, 0.609, 0.696, 0.783, 0.879, 0.957, 1.044, 1.131, 1.218, 1.305, 1.392, 1.479,
27  1.566, 1.653, 1.74, 1.83, 1.93, 2.043, 2.172, 2.322, 2.5, 2.65, 2.853, 2.964, 3.139, 3.314, 3.489, 3.664, 3.839, 4.013,
28  4.191, 4.363, 4.538, 4.716, 4.889, 5.191]
29 
30 muLowOffset = 0
31 muHighOffset = 100
32 
33 npvLowOffset = 0
34 npvHighOffset = 100
35 
36 eBinsOffset = 1000
37 eLowOffset = 0
38 eHighOffset = 1000
39 
40 '''
41 Defined in PFCandidate.cc
42 ParticleTypes (use absolute value)
43 211 h, // charged hadron
44 11 e, // electron
45 13 mu, // muon
46 22 gamma, // photon
47 130 h0, // neutral hadron
48 1 h_HF, // HF tower identified as a hadron
49 2 egamma_HF // HF tower identified as an EM particle
50 '''
51 
52 #map cmssw reco::PFCandidate::pdgId() particle type to our type
53 candidateDict = {211:"chm", 11:"lep", 13:"lep", 22:"ne", 130:"nh", 1:"hfh", 2:"hfe"}
54 #our particle types (note chu = unmatched charged hadrons)
55 candidateType = ["chm", "chu", "nh", "ne", "hfh", "hfe", "lep"]
56 
57 # map reco::PFCandidate::pdgId() to particle type for PFCand
58 pdgIDDict = {211: "chargedHadron", 11:"electron", 13:"muon", 22:"photon", 130:"neutralHadron", 1:"HF_hadron", 2: "HF_EM_particle"}
59 
60 offsetPlotBaseName = 'p_offset_eta'
61 offsetDir = 'ParticleFlow/Offset/'
62 offsetR = 0.4
63 
64 offsetVariableType = ["npv", "mu"]
65 
66 def offset_name( var, ivar, itype ) :
67  return "{0}_{1}{2}_{3}".format( offsetPlotBaseName, var, ivar, itype )
defaults_cfi.offset_name
def offset_name(var, ivar, itype)
Definition: defaults_cfi.py:66
defaults_cfi.genjet_distribution_name
def genjet_distribution_name(ietabin)
Definition: defaults_cfi.py:14
defaults_cfi.response_distribution_name
def response_distribution_name(iptbin, ietabin)
Definition: defaults_cfi.py:9
format
python.rootplot.root2matplotlib.replace
def replace(string, replacements)
Definition: root2matplotlib.py:444