CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RecoTauCommonJetSelections_cfi.py
Go to the documentation of this file.
2 import copy
3 
4 '''
5 
6 Common training defintions
7 
8 Author: Evan K. Friis (UC Davis)
9 
10 '''
11 
12 # Base jets of tau production
13 jet_collection = cms.InputTag('ak4PFJets')
14 
15 # Kinematic selections
16 kinematic_selection = cms.string('pt > 5.0 & abs(eta) < 2.5')
17 
18 # Lead object jet selection
19 lead_object_jet_selection = cms.string("getPFConstituent(0).pt() > 1.0")
20 
21 # Basic kinematic plots
22 kin_plots = cms.VPSet(
23  cms.PSet(
24  min = cms.untracked.double(0),
25  max = cms.untracked.double(100),
26  nbins = cms.untracked.int32(25),
27  name = cms.untracked.string("pt"),
28  description = cms.untracked.string("Pt"),
29  plotquantity = cms.untracked.string("pt()"),
30  lazyParsing = cms.untracked.bool(True)
31  ),
32  cms.PSet(
33  min = cms.untracked.double(-2.5),
34  max = cms.untracked.double(2.5),
35  nbins = cms.untracked.int32(25),
36  name = cms.untracked.string("eta"),
37  description = cms.untracked.string("Eta"),
38  plotquantity = cms.untracked.string("eta()"),
39  lazyParsing = cms.untracked.bool(True)
40  ),
41  cms.PSet(
42  min = cms.untracked.double(-3.14),
43  max = cms.untracked.double(3.14),
44  nbins = cms.untracked.int32(25),
45  name = cms.untracked.string("phi"),
46  description = cms.untracked.string("Phi"),
47  plotquantity = cms.untracked.string("phi()"),
48  lazyParsing = cms.untracked.bool(True)
49  ),
50  cms.PSet(
51  min = cms.untracked.double(0.0),
52  max = cms.untracked.double(10.0),
53  nbins = cms.untracked.int32(50),
54  name = cms.untracked.string("mass"),
55  description = cms.untracked.string("mass"),
56  plotquantity = cms.untracked.string("mass()"),
57  lazyParsing = cms.untracked.bool(True)
58  ),
59 )
60 
61 # Jet plots
62 jet_histograms = cms.VPSet(
63  cms.PSet(
64  min = cms.untracked.double(0.0),
65  max = cms.untracked.double(20.0),
66  nbins = cms.untracked.int32(100),
67  name = cms.untracked.string("collimation"),
68  description = cms.untracked.string("Pt * Width"),
69  plotquantity = cms.untracked.string("pt()*sqrt(etaetaMoment())"),
70  lazyParsing = cms.untracked.bool(True)
71  ),
72  cms.PSet(
73  min = cms.untracked.double(0.0),
74  max = cms.untracked.double(50.0),
75  nbins = cms.untracked.int32(100),
76  name = cms.untracked.string("leadobject"),
77  description = cms.untracked.string("Pt of lead jet object"),
78  plotquantity = cms.untracked.string("getPFConstituent(0).pt()"),
79  lazyParsing = cms.untracked.bool(True)
80  ),
81 )
82 jet_histograms.extend(kin_plots)
83 
84 tau_histograms = cms.VPSet(
85  cms.PSet(
86  min = cms.untracked.double(-3.5),
87  max = cms.untracked.double(20.5),
88  nbins = cms.untracked.int32(24),
89  name = cms.untracked.string("decaymode"),
90  description = cms.untracked.string("DecayMode"),
91  plotquantity = cms.untracked.string("decayMode"),
92  lazyParsing = cms.untracked.bool(True)
93  )
94 )
95 
96 tau_histograms.extend(kin_plots)
97 # Make plots of underlying jet pt and matched pt as well.
98 for kinematic_var in kin_plots:
99  jetPtVersion = copy.deepcopy(kinematic_var)
100  jetPtVersion.name = kinematic_var.name.value() + "OfJet"
101  jetPtVersion.description = kinematic_var.description.value() + "Of Jet"
102  #jetPtVersion.plotquantity = "jetRef()." + kinematic_var.plotquantity.value()
103  jetPtVersion.plotquantity = "jetRef()." + kinematic_var.plotquantity.value()
104  tau_histograms.append(jetPtVersion)
105 
106  matchedVersion = copy.deepcopy(kinematic_var)
107  matchedVersion.name = kinematic_var.name.value() + "OfMatched"
108  matchedVersion.description = kinematic_var.description.value() + "Of Matched"
109  matchedVersion.plotquantity = "alternatLorentzVect()." +\
110  kinematic_var.plotquantity.value()
111  tau_histograms.append(matchedVersion)
112 
113 # Add some resolution plots
114 tau_histograms.append(
115  cms.PSet(
116  min = cms.untracked.double(-20.5),
117  max = cms.untracked.double(20.5),
118  nbins = cms.untracked.int32(41),
119  name = cms.untracked.string("decaymodeRes"),
120  description = cms.untracked.string("DecayModeRes"),
121  plotquantity = cms.untracked.string(
122  "decayMode() - bremsRecoveryEOverPLead()"),
123  lazyParsing = cms.untracked.bool(True)
124  )
125 )
126 
127 tau_histograms.append(
128  cms.PSet(
129  min = cms.untracked.double(-25),
130  max = cms.untracked.double(25),
131  nbins = cms.untracked.int32(100),
132  name = cms.untracked.string("ptRes"),
133  description = cms.untracked.string("PtRes"),
134  plotquantity = cms.untracked.string("pt()-alternatLorentzVect().pt()"),
135  lazyParsing = cms.untracked.bool(True)
136  )
137 )
138 
139 tau_histograms.append(
140  cms.PSet(
141  min = cms.untracked.double(-0.2),
142  max = cms.untracked.double(-0.2),
143  nbins = cms.untracked.int32(100),
144  name = cms.untracked.string("etaRes"),
145  description = cms.untracked.string("EtaRes"),
146  plotquantity = cms.untracked.string("eta()-alternatLorentzVect().eta()"),
147  lazyParsing = cms.untracked.bool(True)
148  )
149 )
150 
151 tau_histograms.append(
152  cms.PSet(
153  min = cms.untracked.double(-0.5),
154  max = cms.untracked.double(0.5),
155  nbins = cms.untracked.int32(100),
156  name = cms.untracked.string("phiRes"),
157  description = cms.untracked.string("phiRes"),
158  plotquantity = cms.untracked.string(
159  "deltaPhi(phi(), alternatLorentzVect().phi())"),
160  lazyParsing = cms.untracked.bool(True)
161  )
162 )
163 
164 tau_histograms.append(
165  cms.PSet(
166  min = cms.untracked.double(-5),
167  max = cms.untracked.double(5.0),
168  nbins = cms.untracked.int32(100),
169  name = cms.untracked.string("massRes"),
170  description = cms.untracked.string("massRes"),
171  plotquantity = cms.untracked.string("mass() - alternatLorentzVect().mass()"),
172  lazyParsing = cms.untracked.bool(True)
173  )
174 )