Fork me on GitHub

source: git/examples/delphes_card_CMS.tcl@ 2b01e13

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 2b01e13 was 35b9204, checked in by Michele <michele.selvaggi@…>, 10 years ago

Updated Jet Energy scale values for delphes_card_ATLAS.tcl and delphes_card_CMS.tcl cards.
Added Example4.C in the examples directory as an example on how to compute JES.

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