Fork me on GitHub

source: svn/trunk/examples/delphes_card_CMS.tcl@ 1267

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

fix tau-tagging configuration

File size: 18.0 KB
Line 
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
34 JetEnergyScale
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.0e1) * (0.20) + \
138 (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.20) + \
139 (abs(eta) <= 1.5) * (pt > 2.0e2) * (0.20) + \
140 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e1) * (0.20) + \
141 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.20) + \
142 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2) * (0.20)}
143}
144
145#################################
146# Energy resolution for electrons
147#################################
148
149module EnergySmearing ElectronEnergySmearing {
150 set InputArray ElectronTrackingEfficiency/electrons
151 set OutputArray electrons
152
153 # set ResolutionFormula {resolution formula as a function of eta and energy}
154
155 # resolution formula for electrons
156 set ResolutionFormula { (abs(eta) <= 2.5) * (energy > 0.1 && energy <= 2.0e1) * (0.0225)*energy + \
157 (abs(eta) <= 2.5) * (energy > 2.0e1) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \
158 (abs(eta) > 2.5 && abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \
159 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)}
160
161}
162
163###############################
164# Momentum resolution for muons
165###############################
166
167module MomentumSmearing MuonMomentumSmearing {
168 set InputArray MuonTrackingEfficiency/muons
169 set OutputArray muons
170
171 # set ResolutionFormula {resolution formula as a function of eta and pt}
172
173 # resolution formula for muons
174 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1 && pt <= 5.0) * (0.02) + \
175 (abs(eta) <= 0.5) * (pt > 5.0 && pt <= 1.0e2) * (0.015) + \
176 (abs(eta) <= 0.5) * (pt > 1.0e2) * (0.03) + \
177 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1 && pt <= 5.0) * (0.03) + \
178 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 5.0 && pt <= 1.0e2) * (0.02) + \
179 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 1.0e2) * (0.04) + \
180 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 5.0) * (0.04) + \
181 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 5.0 && pt <= 1.0e2) * (0.035) + \
182 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2) * (0.05)}
183}
184
185##############
186# Track merger
187##############
188
189module Merger TrackMerger {
190# add InputArray InputArray
191 add InputArray ChargedHadronMomentumSmearing/chargedHadrons
192 add InputArray ElectronEnergySmearing/electrons
193 set OutputArray tracks
194}
195
196#############
197# Calorimeter
198#############
199
200module Calorimeter Calorimeter {
201 set ParticleInputArray ParticlePropagator/stableParticles
202 set TrackInputArray TrackMerger/tracks
203
204 set TowerOutputArray towers
205 set PhotonOutputArray photons
206
207 set EFlowTrackOutputArray eflowTracks
208 set EFlowTowerOutputArray eflowTowers
209
210 set pi [expr {acos(-1)}]
211
212 # lists of the edges of each tower in eta and phi
213 # each list starts with the lower edge of the first tower
214 # the list ends with the higher edged of the last tower
215
216 # 5 degrees towers
217 set PhiBins {}
218 for {set i -36} {$i <= 36} {incr i} {
219 add PhiBins [expr {$i * $pi/36.0}]
220 }
221 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} {
222 add EtaPhiBins $eta $PhiBins
223 }
224
225 # 10 degrees towers
226 set PhiBins {}
227 for {set i -18} {$i <= 18} {incr i} {
228 add PhiBins [expr {$i * $pi/18.0}]
229 }
230 foreach eta {-4.35 -4.175 -4 -3.825 -3.65 -3.475 -3.3 -3.125 -2.95 -2.868 -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 2.868 2.95 3.125 3.3 3.475 3.65 3.825 4 4.175 4.35 4.525} {
231 add EtaPhiBins $eta $PhiBins
232 }
233
234 # 20 degrees towers
235 set PhiBins {}
236 for {set i -9} {$i <= 9} {incr i} {
237 add PhiBins [expr {$i * $pi/9.0}]
238 }
239 foreach eta {-5 -4.7 -4.525 4.7 5} {
240 add EtaPhiBins $eta $PhiBins
241 }
242
243 # default energy fractions {abs(PDG code)} {Fecal Fhcal}
244 add EnergyFraction {0} {0.0 1.0}
245 # energy fractions for e, gamma and pi0
246 add EnergyFraction {11} {1.0 0.0}
247 add EnergyFraction {22} {1.0 0.0}
248 add EnergyFraction {111} {1.0 0.0}
249 # energy fractions for muon, neutrinos and neutralinos
250 add EnergyFraction {12} {0.0 0.0}
251 add EnergyFraction {13} {0.0 0.0}
252 add EnergyFraction {14} {0.0 0.0}
253 add EnergyFraction {16} {0.0 0.0}
254 add EnergyFraction {1000022} {0.0 0.0}
255 add EnergyFraction {1000023} {0.0 0.0}
256 add EnergyFraction {1000025} {0.0 0.0}
257 add EnergyFraction {1000035} {0.0 0.0}
258 add EnergyFraction {1000045} {0.0 0.0}
259 # energy fractions for K0short and Lambda
260 add EnergyFraction {310} {0.3 0.7}
261 add EnergyFraction {3122} {0.3 0.7}
262
263 # set ECalResolutionFormula {resolution formula as a function of eta and energy}
264 set ECalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \
265 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)}
266
267 # set HCalResolutionFormula {resolution formula as a function of eta and energy}
268 set HCalResolutionFormula { (abs(eta) <= 1.5) * sqrt(energy^2*0.055^2 + energy*1.20^2 + 3.50^2) + \
269 (abs(eta) > 1.5 && abs(eta) <= 3) * sqrt(energy^2*0.065^2 + energy*2.00^2 + 3.50^2) + \
270 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.11^2 + energy*3.13^2)}
271}
272
273####################
274# Energy flow merger
275####################
276
277module Merger EFlowMerger {
278# add InputArray InputArray
279 add InputArray Calorimeter/eflowTracks
280 add InputArray Calorimeter/eflowTowers
281 add InputArray MuonMomentumSmearing/muons
282 set OutputArray eflow
283}
284
285###################
286# Photon efficiency
287###################
288
289module Efficiency PhotonEfficiency {
290 set InputArray Calorimeter/photons
291 set OutputArray photons
292
293 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
294
295 # efficiency formula for photons
296 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \
297 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \
298 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + \
299 (abs(eta) > 2.5) * (0.00)}
300}
301
302##################
303# Photon isolation
304##################
305
306module Isolation PhotonIsolation {
307 set CandidateInputArray PhotonEfficiency/photons
308 set IsolationInputArray EFlowMerger/eflow
309
310 set OutputArray photons
311
312 set DeltaRMax 0.5
313
314 set PTMin 0.5
315
316 set PTRatioMax 0.1
317}
318
319#####################
320# Electron efficiency
321#####################
322
323module Efficiency ElectronEfficiency {
324 set InputArray ElectronEnergySmearing/electrons
325 set OutputArray electrons
326
327 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
328
329 # efficiency formula for electrons
330 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \
331 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \
332 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + \
333 (abs(eta) > 2.5) * (0.00)}
334}
335
336####################
337# Electron isolation
338####################
339
340module Isolation ElectronIsolation {
341 set CandidateInputArray ElectronEfficiency/electrons
342 set IsolationInputArray EFlowMerger/eflow
343
344 set OutputArray electrons
345
346 set DeltaRMax 0.5
347
348 set PTMin 0.5
349
350 set PTRatioMax 0.1
351}
352
353#################
354# Muon efficiency
355#################
356
357module Efficiency MuonEfficiency {
358 set InputArray MuonMomentumSmearing/muons
359 set OutputArray muons
360
361 # set EfficiencyFormula {efficiency as a function of eta and pt}
362
363 # efficiency formula for muons
364 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \
365 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \
366 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0) * (0.85) + \
367 (abs(eta) > 2.4) * (0.00)}
368}
369
370################
371# Muon isolation
372################
373
374module Isolation MuonIsolation {
375 set CandidateInputArray MuonEfficiency/muons
376 set IsolationInputArray EFlowMerger/eflow
377
378 set OutputArray muons
379
380 set DeltaRMax 0.5
381
382 set PTMin 0.5
383
384 set PTRatioMax 0.1
385}
386
387###################
388# Missing ET merger
389###################
390
391module Merger MissingET {
392# add InputArray InputArray
393 add InputArray EFlowMerger/eflow
394 set MomentumOutputArray momentum
395}
396
397##################
398# Scalar HT merger
399##################
400
401module Merger ScalarHT {
402# add InputArray InputArray
403 add InputArray UniqueObjectFinder/jets
404 add InputArray UniqueObjectFinder/electrons
405 add InputArray UniqueObjectFinder/photons
406 add InputArray UniqueObjectFinder/muons
407 set EnergyOutputArray energy
408}
409
410#####################
411# MC truth jet finder
412#####################
413
414module FastJetFinder GenJetFinder {
415 set InputArray Delphes/stableParticles
416
417 set OutputArray jets
418
419 # algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
420 set JetAlgorithm 6
421 set ParameterR 0.5
422
423 set JetPTMin 20.0
424}
425
426############
427# Jet finder
428############
429
430module FastJetFinder FastJetFinder {
431# set InputArray Calorimeter/towers
432 set InputArray EFlowMerger/eflow
433
434 set OutputArray jets
435
436 # algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
437 set JetAlgorithm 6
438 set ParameterR 0.5
439
440 set JetPTMin 20.0
441}
442
443##################
444# Jet Energy Scale
445##################
446
447module EnergyScale JetEnergyScale {
448 set InputArray FastJetFinder/jets
449 set OutputArray jets
450
451 # scale formula for jets
452 set ScaleFormula {1.08}
453}
454
455###########
456# b-tagging
457###########
458
459module BTagging BTagging {
460 set PartonInputArray Delphes/partons
461 set JetInputArray JetEnergyScale/jets
462
463 set BitNumber 0
464
465 set DeltaR 0.5
466
467 set PartonPTMin 1.0
468
469 set PartonEtaMax 2.5
470
471 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
472 # PDG code = the highest PDG code of a quark or gluon inside DeltaR cone around jet axis
473 # gluon's PDG code has the lowest priority
474
475 # https://twiki.cern.ch/twiki/bin/view/CMSPublic/PhysicsResultsBTV
476 # default efficiency formula (misidentification rate)
477 add EfficiencyFormula {0} {0.001}
478
479 # efficiency formula for c-jets (misidentification rate)
480 add EfficiencyFormula {4} { (pt <= 15.0) * (0.000) + \
481 (abs(eta) <= 1.2) * (pt > 15.0) * (0.2*tanh(pt*0.03 - 0.4)) + \
482 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.1*tanh(pt*0.03 - 0.4)) + \
483 (abs(eta) > 2.5) * (0.000)}
484
485 # efficiency formula for b-jets
486 add EfficiencyFormula {5} { (pt <= 15.0) * (0.000) + \
487 (abs(eta) <= 1.2) * (pt > 15.0) * (0.5*tanh(pt*0.03 - 0.4)) + \
488 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.4*tanh(pt*0.03 - 0.4)) + \
489 (abs(eta) > 2.5) * (0.000)}
490}
491
492module TauTagging TauTagging {
493 set ParticleInputArray Delphes/allParticles
494 set PartonInputArray Delphes/partons
495 set JetInputArray JetEnergyScale/jets
496
497 set DeltaR 0.5
498
499 set TauPTMin 1.0
500
501 set TauEtaMax 2.5
502
503 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
504
505 # default efficiency formula (misidentification rate)
506 add EfficiencyFormula {0} {0.001}
507 # efficiency formula for tau-jets
508 add EfficiencyFormula {15} {0.4}
509}
510
511#####################################################
512# Find uniquely identified photons/electrons/tau/jets
513#####################################################
514
515module UniqueObjectFinder UniqueObjectFinder {
516# earlier arrays take precedence over later ones
517# add InputArray InputArray OutputArray
518 add InputArray PhotonIsolation/photons photons
519 add InputArray ElectronIsolation/electrons electrons
520 add InputArray MuonIsolation/muons muons
521 add InputArray JetEnergyScale/jets jets
522}
523
524##################
525# ROOT tree writer
526##################
527
528module TreeWriter TreeWriter {
529# add Branch InputArray BranchName BranchClass
530 add Branch Delphes/allParticles Particle GenParticle
531 add Branch TrackMerger/tracks Track Track
532 add Branch Calorimeter/towers Tower Tower
533 add Branch Calorimeter/eflowTracks EFlowTrack Track
534 add Branch Calorimeter/eflowTowers EFlowTower Tower
535 add Branch MuonMomentumSmearing/muons EFlowMuon Muon
536 add Branch GenJetFinder/jets GenJet Jet
537 add Branch UniqueObjectFinder/jets Jet Jet
538 add Branch UniqueObjectFinder/electrons Electron Electron
539 add Branch UniqueObjectFinder/photons Photon Photon
540 add Branch UniqueObjectFinder/muons Muon Muon
541 add Branch MissingET/momentum MissingET MissingET
542 add Branch ScalarHT/energy ScalarHT ScalarHT
543}
544
Note: See TracBrowser for help on using the repository browser.