Fork me on GitHub

source: svn/trunk/examples/delphes_card_CMS_NoVFC.tcl@ 1366

Last change on this file since 1366 was 1320, checked in by Pavel Demin, 11 years ago

fix efficiency and resolution for high-pT muons

File size: 17.9 KB
RevLine 
[1074]1#######################################
2# Order of execution of various modules
3#######################################
4
5set ExecutionPath {
6 ParticlePropagator
7
8 ChargedHadronTrackingEfficiency
9 ElectronTrackingEfficiency
10 MuonTrackingEfficiency
11
12 ChargedHadronMomentumSmearing
13 ElectronEnergySmearing
14 MuonMomentumSmearing
15
16 TrackMerger
17 Calorimeter
18 EFlowMerger
19
20 PhotonEfficiency
21 PhotonIsolation
22
23 ElectronEfficiency
24 ElectronIsolation
25
26 MuonEfficiency
27 MuonIsolation
28
29 MissingET
30
31 GenJetFinder
32 FastJetFinder
33
[1302]34 JetEnergyScale
[1074]35
36 BTagging
37 TauTagging
38
39 UniqueObjectFinder
40
41 ScalarHT
42
43 TreeWriter
44}
45
46#################################
47# Propagate particles in cylinder
48#################################
49
50module ParticlePropagator ParticlePropagator {
51 set InputArray Delphes/stableParticles
52
53 set OutputArray stableParticles
54 set ChargedHadronOutputArray chargedHadrons
55 set ElectronOutputArray electrons
56 set MuonOutputArray muons
57
58 # radius of the magnetic field coverage, in m
59 set Radius 1.29
60 # half-length of the magnetic field coverage, in m
61 set HalfLength 3.00
62
63 # magnetic field
64 set Bz 3.8
65}
66
67####################################
68# Charged hadron tracking efficiency
69####################################
70
71module Efficiency ChargedHadronTrackingEfficiency {
72 set InputArray ParticlePropagator/chargedHadrons
73 set OutputArray chargedHadrons
74
75 # add EfficiencyFormula {efficiency formula as a function of eta and pt}
76
77 # tracking efficiency formula for charged hadrons
78 set EfficiencyFormula { (pt <= 0.1) * (0.00) + \
79 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + \
80 (abs(eta) <= 1.5) * (pt > 1.0) * (0.95) + \
81 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.60) + \
82 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.85) + \
83 (abs(eta) > 2.5) * (0.00)}
84}
85
86##############################
87# Electron tracking efficiency
88##############################
89
90module Efficiency ElectronTrackingEfficiency {
91 set InputArray ParticlePropagator/electrons
92 set OutputArray electrons
93
94 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
95
96 # tracking efficiency formula for electrons
97 set EfficiencyFormula { (pt <= 0.1) * (0.00) + \
98 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.73) + \
99 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e2) * (0.95) + \
100 (abs(eta) <= 1.5) * (pt > 1.0e2) * (0.99) + \
101 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.50) + \
102 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e2) * (0.83) + \
103 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2) * (0.90) + \
104 (abs(eta) > 2.5) * (0.00)}
105}
106
107##########################
108# Muon tracking efficiency
109##########################
110
111module Efficiency MuonTrackingEfficiency {
112 set InputArray ParticlePropagator/muons
113 set OutputArray muons
114
115 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
116
117 # tracking efficiency formula for muons
118 set EfficiencyFormula { (pt <= 0.1) * (0.00) + \
119 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.75) + \
120 (abs(eta) <= 1.5) * (pt > 1.0) * (0.99) + \
121 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + \
122 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.98) + \
123 (abs(eta) > 2.5) * (0.00)}
124}
125
126########################################
127# Momentum resolution for charged tracks
128########################################
129
130module MomentumSmearing ChargedHadronMomentumSmearing {
131 set InputArray ChargedHadronTrackingEfficiency/chargedHadrons
132 set OutputArray chargedHadrons
133
134 # set ResolutionFormula {resolution formula as a function of eta and pt}
135
136 # resolution formula for charged hadrons
137 set ResolutionFormula { (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.02) + \
138 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e1) * (0.01) + \
139 (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.03) + \
140 (abs(eta) <= 1.5) * (pt > 2.0e2) * (0.05) + \
141 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.03) + \
142 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e1) * (0.02) + \
143 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.04) + \
144 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2) * (0.05)}
145}
146
147#################################
148# Energy resolution for electrons
149#################################
150
151module EnergySmearing ElectronEnergySmearing {
152 set InputArray ElectronTrackingEfficiency/electrons
153 set OutputArray electrons
154
155 # set ResolutionFormula {resolution formula as a function of eta and energy}
156
[1302]157 # resolution formula for electrons
158 set ResolutionFormula { (abs(eta) <= 2.5) * (energy > 0.1 && energy <= 2.0e1) * (energy*0.0225) + \
159 (abs(eta) <= 2.5) * (energy > 2.0e1) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \
160 (abs(eta) > 2.5 && abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2)}
[1074]161
162}
163
164###############################
165# Momentum resolution for muons
166###############################
167
168module MomentumSmearing MuonMomentumSmearing {
169 set InputArray MuonTrackingEfficiency/muons
170 set OutputArray muons
171
172 # set ResolutionFormula {resolution formula as a function of eta and pt}
173
174 # resolution formula for muons
[1302]175 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1 && pt <= 5.0) * (0.02) + \
176 (abs(eta) <= 0.5) * (pt > 5.0 && pt <= 1.0e2) * (0.015) + \
[1320]177 (abs(eta) <= 0.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.03) + \
178 (abs(eta) <= 0.5) * (pt > 2.0e2) * (0.05 + pt*1.e-4) + \
[1302]179 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1 && pt <= 5.0) * (0.03) + \
180 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 5.0 && pt <= 1.0e2) * (0.02) + \
[1320]181 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.04) + \
182 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 2.0e2) * (0.05 + pt*1.e-4) + \
[1302]183 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 5.0) * (0.04) + \
184 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 5.0 && pt <= 1.0e2) * (0.035) + \
[1320]185 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.05) + \
186 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2) * (0.05 + pt*1.e-4)}
[1074]187}
188
189##############
190# Track merger
191##############
192
193module Merger TrackMerger {
194# add InputArray InputArray
195 add InputArray ChargedHadronMomentumSmearing/chargedHadrons
196 add InputArray ElectronEnergySmearing/electrons
[1302]197 add InputArray MuonMomentumSmearing/muons
[1074]198 set OutputArray tracks
199}
200
201#############
202# Calorimeter
203#############
204
205module Calorimeter Calorimeter {
206 set ParticleInputArray ParticlePropagator/stableParticles
207 set TrackInputArray TrackMerger/tracks
208
209 set TowerOutputArray towers
210 set PhotonOutputArray photons
211
212 set EFlowTrackOutputArray eflowTracks
213 set EFlowTowerOutputArray eflowTowers
214
215 set pi [expr {acos(-1)}]
216
217 # lists of the edges of each tower in eta and phi
218 # each list starts with the lower edge of the first tower
219 # the list ends with the higher edged of the last tower
220
221 # 5 degrees towers
222 set PhiBins {}
223 for {set i -36} {$i <= 36} {incr i} {
224 add PhiBins [expr {$i * $pi/36.0}]
225 }
226 foreach eta {-1.566 -1.479 -1.392 -1.305 -1.218 -1.131 -1.044 -0.957 -0.87 -0.783 -0.696 -0.609 -0.522 -0.435 -0.348 -0.261 -0.174 -0.087 0 0.087 0.174 0.261 0.348 0.435 0.522 0.609 0.696 0.783 0.87 0.957 1.044 1.131 1.218 1.305 1.392 1.479 1.566 1.653} {
227 add EtaPhiBins $eta $PhiBins
228 }
229
230 # 10 degrees towers
231 set PhiBins {}
232 for {set i -18} {$i <= 18} {incr i} {
233 add PhiBins [expr {$i * $pi/18.0}]
234 }
235 foreach eta {-3.0 -2.65 -2.5 -2.322 -2.172 -2.043 -1.93 -1.83 -1.74 -1.653 1.74 1.83 1.93 2.043 2.172 2.322 2.5 2.65 3.0} {
236 add EtaPhiBins $eta $PhiBins
237 }
238
239 # default energy fractions {abs(PDG code)} {Fecal Fhcal}
240 add EnergyFraction {0} {0.0 1.0}
241 # energy fractions for e, gamma and pi0
242 add EnergyFraction {11} {1.0 0.0}
243 add EnergyFraction {22} {1.0 0.0}
244 add EnergyFraction {111} {1.0 0.0}
[1076]245 # energy fractions for muon, neutrinos and neutralinos
[1074]246 add EnergyFraction {12} {0.0 0.0}
247 add EnergyFraction {13} {0.0 0.0}
248 add EnergyFraction {14} {0.0 0.0}
249 add EnergyFraction {16} {0.0 0.0}
[1076]250 add EnergyFraction {1000022} {0.0 0.0}
251 add EnergyFraction {1000023} {0.0 0.0}
252 add EnergyFraction {1000025} {0.0 0.0}
253 add EnergyFraction {1000035} {0.0 0.0}
254 add EnergyFraction {1000045} {0.0 0.0}
[1074]255 # energy fractions for K0short and Lambda
256 add EnergyFraction {310} {0.3 0.7}
257 add EnergyFraction {3122} {0.3 0.7}
258
259 # set ECalResolutionFormula {resolution formula as a function of eta and energy}
[1302]260 set ECalResolutionFormula {sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2)}
[1074]261
262 # set HCalResolutionFormula {resolution formula as a function of eta and energy}
263 set HCalResolutionFormula {sqrt(energy^2*0.050^2 + energy*1.50^2)}
264}
265
266####################
267# Energy flow merger
268####################
269
270module Merger EFlowMerger {
271# add InputArray InputArray
272 add InputArray Calorimeter/eflowTracks
273 add InputArray Calorimeter/eflowTowers
274 set OutputArray eflow
275}
276
277###################
278# Photon efficiency
279###################
280
281module Efficiency PhotonEfficiency {
282 set InputArray Calorimeter/photons
283 set OutputArray photons
284
285 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
286
287 # efficiency formula for photons
288 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \
289 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \
290 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + \
291 (abs(eta) > 2.5) * (0.00)}
292}
293
294##################
295# Photon isolation
296##################
297
298module Isolation PhotonIsolation {
299 set CandidateInputArray PhotonEfficiency/photons
300 set IsolationInputArray EFlowMerger/eflow
301
302 set OutputArray photons
303
304 set DeltaRMax 0.5
305
306 set PTMin 0.5
307
308 set PTRatioMax 0.1
309}
310
311#####################
312# Electron efficiency
313#####################
314
315module Efficiency ElectronEfficiency {
316 set InputArray ElectronEnergySmearing/electrons
317 set OutputArray electrons
318
319 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
320
321 # efficiency formula for electrons
322 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \
323 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \
324 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + \
325 (abs(eta) > 2.5) * (0.00)}
326}
327
328####################
329# Electron isolation
330####################
331
332module Isolation ElectronIsolation {
333 set CandidateInputArray ElectronEfficiency/electrons
334 set IsolationInputArray EFlowMerger/eflow
335
336 set OutputArray electrons
337
338 set DeltaRMax 0.5
339
340 set PTMin 0.5
341
342 set PTRatioMax 0.1
343}
344
345#################
346# Muon efficiency
347#################
348
349module Efficiency MuonEfficiency {
350 set InputArray MuonMomentumSmearing/muons
351 set OutputArray muons
352
353 # set EfficiencyFormula {efficiency as a function of eta and pt}
354
355 # efficiency formula for muons
[1320]356 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \
357 (abs(eta) <= 1.5) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + \
358 (abs(eta) <= 1.5) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) + \
359 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + \
360 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) + \
361 (abs(eta) > 2.4) * (0.00)}
[1074]362}
363
364################
365# Muon isolation
366################
367
368module Isolation MuonIsolation {
369 set CandidateInputArray MuonEfficiency/muons
370 set IsolationInputArray EFlowMerger/eflow
371
372 set OutputArray muons
373
374 set DeltaRMax 0.5
375
376 set PTMin 0.5
377
378 set PTRatioMax 0.1
379}
380
381###################
382# Missing ET merger
383###################
384
385module Merger MissingET {
386# add InputArray InputArray
[1302]387 add InputArray Calorimeter/eflowTracks
388 add InputArray Calorimeter/eflowTowers
[1074]389 set MomentumOutputArray momentum
390}
391
392##################
393# Scalar HT merger
394##################
395
396module Merger ScalarHT {
397# add InputArray InputArray
398 add InputArray UniqueObjectFinder/jets
399 add InputArray UniqueObjectFinder/electrons
400 add InputArray UniqueObjectFinder/photons
[1302]401 add InputArray UniqueObjectFinder/muons
[1074]402 set EnergyOutputArray energy
403}
404
405#####################
406# MC truth jet finder
407#####################
408
409module FastJetFinder GenJetFinder {
410 set InputArray Delphes/stableParticles
411
412 set OutputArray jets
413
414 # algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
415 set JetAlgorithm 6
[1302]416 set ParameterR 0.5
[1074]417
418 set JetPTMin 20.0
419}
420
421############
422# Jet finder
423############
424
425module FastJetFinder FastJetFinder {
426# set InputArray Calorimeter/towers
427 set InputArray EFlowMerger/eflow
428
429 set OutputArray jets
430
431 # algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
432 set JetAlgorithm 6
[1302]433 set ParameterR 0.5
[1074]434
435 set JetPTMin 20.0
436}
437
[1302]438##################
439# Jet Energy Scale
440##################
[1074]441
[1302]442module EnergyScale JetEnergyScale {
443 set InputArray FastJetFinder/jets
444 set OutputArray jets
[1074]445
[1302]446 # scale formula for jets
447 set ScaleFormula {1.08}
[1074]448}
449
450###########
451# b-tagging
452###########
453
454module BTagging BTagging {
455 set PartonInputArray Delphes/partons
[1302]456 set JetInputArray JetEnergyScale/jets
[1074]457
[1099]458 set BitNumber 0
459
[1074]460 set DeltaR 0.5
461
462 set PartonPTMin 1.0
463
464 set PartonEtaMax 2.5
465
466 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
467 # PDG code = the highest PDG code of a quark or gluon inside DeltaR cone around jet axis
468 # gluon's PDG code has the lowest priority
469
470 # https://twiki.cern.ch/twiki/bin/view/CMSPublic/PhysicsResultsBTV
471 # default efficiency formula (misidentification rate)
472 add EfficiencyFormula {0} {0.001}
473
474 # efficiency formula for c-jets (misidentification rate)
475 add EfficiencyFormula {4} { (pt <= 15.0) * (0.000) + \
476 (abs(eta) <= 1.2) * (pt > 15.0) * (0.2*tanh(pt*0.03 - 0.4)) + \
477 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.1*tanh(pt*0.03 - 0.4)) + \
478 (abs(eta) > 2.5) * (0.000)}
479
480 # efficiency formula for b-jets
481 add EfficiencyFormula {5} { (pt <= 15.0) * (0.000) + \
482 (abs(eta) <= 1.2) * (pt > 15.0) * (0.5*tanh(pt*0.03 - 0.4)) + \
483 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.4*tanh(pt*0.03 - 0.4)) + \
484 (abs(eta) > 2.5) * (0.000)}
485}
486
487module TauTagging TauTagging {
488 set ParticleInputArray Delphes/allParticles
489 set PartonInputArray Delphes/partons
[1302]490 set JetInputArray JetEnergyScale/jets
[1074]491
492 set DeltaR 0.5
493
494 set TauPTMin 1.0
495
496 set TauEtaMax 2.5
497
498 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
499
500 # default efficiency formula (misidentification rate)
501 add EfficiencyFormula {0} {0.001}
502 # efficiency formula for tau-jets
503 add EfficiencyFormula {15} {0.4}
504}
505
506#####################################################
507# Find uniquely identified photons/electrons/tau/jets
508#####################################################
509
510module UniqueObjectFinder UniqueObjectFinder {
511# earlier arrays take precedence over later ones
512# add InputArray InputArray OutputArray
513 add InputArray PhotonIsolation/photons photons
514 add InputArray ElectronIsolation/electrons electrons
[1302]515 add InputArray MuonIsolation/muons muons
516 add InputArray JetEnergyScale/jets jets
[1074]517}
518
519##################
520# ROOT tree writer
521##################
522
523module TreeWriter TreeWriter {
524# add Branch InputArray BranchName BranchClass
525 add Branch Delphes/allParticles Particle GenParticle
526 add Branch TrackMerger/tracks Track Track
527 add Branch Calorimeter/towers Tower Tower
[1302]528 add Branch Calorimeter/eflowTracks EFlowTrack Track
529 add Branch Calorimeter/eflowTowers EFlowTower Tower
[1074]530 add Branch GenJetFinder/jets GenJet Jet
531 add Branch UniqueObjectFinder/jets Jet Jet
532 add Branch UniqueObjectFinder/electrons Electron Electron
533 add Branch UniqueObjectFinder/photons Photon Photon
[1302]534 add Branch UniqueObjectFinder/muons Muon Muon
[1074]535 add Branch MissingET/momentum MissingET MissingET
536 add Branch ScalarHT/energy ScalarHT ScalarHT
537}
538
Note: See TracBrowser for help on using the repository browser.