Fork me on GitHub

source: git/examples/delphes_card_CMS.tcl@ f42fdd9

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

"PdgCodeFilter module added. Updated card with NeutrinoFilter before GenJet clustering"

  • Property mode set to 100644
File size: 19.3 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 EFlowTrackOutputArray eflowTracks
215 set EFlowPhotonOutputArray eflowPhotons
216 set EFlowNeutralHadronOutputArray eflowNeutralHadrons
217
218 set pi [expr {acos(-1)}]
219
220 # lists of the edges of each tower in eta and phi
221 # each list starts with the lower edge of the first tower
222 # the list ends with the higher edged of the last tower
223
224 # 5 degrees towers
225 set PhiBins {}
226 for {set i -36} {$i <= 36} {incr i} {
227 add PhiBins [expr {$i * $pi/36.0}]
228 }
229 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} {
230 add EtaPhiBins $eta $PhiBins
231 }
232
233 # 10 degrees towers
234 set PhiBins {}
235 for {set i -18} {$i <= 18} {incr i} {
236 add PhiBins [expr {$i * $pi/18.0}]
237 }
238 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} {
239 add EtaPhiBins $eta $PhiBins
240 }
241
242 # 20 degrees towers
243 set PhiBins {}
244 for {set i -9} {$i <= 9} {incr i} {
245 add PhiBins [expr {$i * $pi/9.0}]
246 }
247 foreach eta {-5 -4.7 -4.525 4.7 5} {
248 add EtaPhiBins $eta $PhiBins
249 }
250
251 # default energy fractions {abs(PDG code)} {Fecal Fhcal}
252 add EnergyFraction {0} {0.0 1.0}
253 # energy fractions for e, gamma and pi0
254 add EnergyFraction {11} {1.0 0.0}
255 add EnergyFraction {22} {1.0 0.0}
256 add EnergyFraction {111} {1.0 0.0}
257 # energy fractions for muon, neutrinos and neutralinos
258 add EnergyFraction {12} {0.0 0.0}
259 add EnergyFraction {13} {0.0 0.0}
260 add EnergyFraction {14} {0.0 0.0}
261 add EnergyFraction {16} {0.0 0.0}
262 add EnergyFraction {1000022} {0.0 0.0}
263 add EnergyFraction {1000023} {0.0 0.0}
264 add EnergyFraction {1000025} {0.0 0.0}
265 add EnergyFraction {1000035} {0.0 0.0}
266 add EnergyFraction {1000045} {0.0 0.0}
267 # energy fractions for K0short and Lambda
268 add EnergyFraction {310} {0.3 0.7}
269 add EnergyFraction {3122} {0.3 0.7}
270
271 # set ECalResolutionFormula {resolution formula as a function of eta and energy}
272 set ECalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \
273 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)}
274
275 # set HCalResolutionFormula {resolution formula as a function of eta and energy}
276 set HCalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) + \
277 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.130^2 + energy*2.70^2)}
278}
279
280####################
281# Energy flow merger
282####################
283
284module Merger EFlowMerger {
285# add InputArray InputArray
286 add InputArray Calorimeter/eflowTracks
287 add InputArray Calorimeter/eflowPhotons
288 add InputArray Calorimeter/eflowNeutralHadrons
289 set OutputArray eflow
290}
291
292###################
293# Photon efficiency
294###################
295
296module Efficiency PhotonEfficiency {
297 set InputArray Calorimeter/eflowPhotons
298 set OutputArray photons
299
300 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
301
302 # efficiency formula for photons
303 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \
304 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \
305 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + \
306 (abs(eta) > 2.5) * (0.00)}
307}
308
309##################
310# Photon isolation
311##################
312
313module Isolation PhotonIsolation {
314 set CandidateInputArray PhotonEfficiency/photons
315 set IsolationInputArray EFlowMerger/eflow
316
317 set OutputArray photons
318
319 set DeltaRMax 0.5
320
321 set PTMin 0.5
322
323 set PTRatioMax 0.1
324}
325
326#####################
327# Electron efficiency
328#####################
329
330module Efficiency ElectronEfficiency {
331 set InputArray ElectronEnergySmearing/electrons
332 set OutputArray electrons
333
334 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
335
336 # efficiency formula for electrons
337 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \
338 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \
339 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + \
340 (abs(eta) > 2.5) * (0.00)}
341}
342
343####################
344# Electron isolation
345####################
346
347module Isolation ElectronIsolation {
348 set CandidateInputArray ElectronEfficiency/electrons
349 set IsolationInputArray EFlowMerger/eflow
350
351 set OutputArray electrons
352
353 set DeltaRMax 0.5
354
355 set PTMin 0.5
356
357 set PTRatioMax 0.1
358}
359
360#################
361# Muon efficiency
362#################
363
364module Efficiency MuonEfficiency {
365 set InputArray MuonMomentumSmearing/muons
366 set OutputArray muons
367
368 # set EfficiencyFormula {efficiency as a function of eta and pt}
369
370 # efficiency formula for muons
371 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \
372 (abs(eta) <= 1.5) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + \
373 (abs(eta) <= 1.5) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) + \
374 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + \
375 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) + \
376 (abs(eta) > 2.4) * (0.00)}
377}
378
379################
380# Muon isolation
381################
382
383module Isolation MuonIsolation {
384 set CandidateInputArray MuonEfficiency/muons
385 set IsolationInputArray EFlowMerger/eflow
386
387 set OutputArray muons
388
389 set DeltaRMax 0.5
390
391 set PTMin 0.5
392
393 set PTRatioMax 0.1
394}
395
396###################
397# Missing ET merger
398###################
399
400module Merger MissingET {
401# add InputArray InputArray
402 add InputArray EFlowMerger/eflow
403 set MomentumOutputArray momentum
404}
405
406##################
407# Scalar HT merger
408##################
409
410module Merger ScalarHT {
411# add InputArray InputArray
412 add InputArray UniqueObjectFinder/jets
413 add InputArray UniqueObjectFinder/electrons
414 add InputArray UniqueObjectFinder/photons
415 add InputArray UniqueObjectFinder/muons
416 set EnergyOutputArray energy
417}
418
419
420#####################
421# Neutrino Filter
422#####################
423
424module PdgCodeFilter NeutrinoFilter {
425
426 set InputArray Delphes/stableParticles
427 set OutputArray filteredParticles
428
429 set PTMin 0.0
430
431 add PdgCode {12}
432 add PdgCode {14}
433 add PdgCode {16}
434 add PdgCode {-12}
435 add PdgCode {-14}
436 add PdgCode {-16}
437
438}
439
440
441#####################
442# MC truth jet finder
443#####################
444
445module FastJetFinder GenJetFinder {
446 set InputArray NeutrinoFilter/filteredParticles
447
448 set OutputArray jets
449
450 # algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
451 set JetAlgorithm 6
452 set ParameterR 0.5
453
454 set JetPTMin 20.0
455}
456
457
458
459
460############
461# Jet finder
462############
463
464module FastJetFinder FastJetFinder {
465# set InputArray Calorimeter/towers
466 set InputArray EFlowMerger/eflow
467
468 set OutputArray jets
469
470 # algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
471 set JetAlgorithm 6
472 set ParameterR 0.5
473
474 set JetPTMin 20.0
475}
476
477##################
478# Jet Energy Scale
479##################
480
481module EnergyScale JetEnergyScale {
482 set InputArray FastJetFinder/jets
483 set OutputArray jets
484
485 # scale formula for jets
486 set ScaleFormula {1.00}
487}
488
489###########
490# b-tagging
491###########
492
493module BTagging BTagging {
494 set PartonInputArray Delphes/partons
495 set JetInputArray JetEnergyScale/jets
496
497 set BitNumber 0
498
499 set DeltaR 0.5
500
501 set PartonPTMin 1.0
502
503 set PartonEtaMax 2.5
504
505 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
506 # PDG code = the highest PDG code of a quark or gluon inside DeltaR cone around jet axis
507 # gluon's PDG code has the lowest priority
508
509 # https://twiki.cern.ch/twiki/bin/view/CMSPublic/PhysicsResultsBTV
510 # default efficiency formula (misidentification rate)
511 add EfficiencyFormula {0} {0.001}
512
513 # efficiency formula for c-jets (misidentification rate)
514 add EfficiencyFormula {4} { (pt <= 15.0) * (0.000) + \
515 (abs(eta) <= 1.2) * (pt > 15.0) * (0.2*tanh(pt*0.03 - 0.4)) + \
516 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.1*tanh(pt*0.03 - 0.4)) + \
517 (abs(eta) > 2.5) * (0.000)}
518
519 # efficiency formula for b-jets
520 add EfficiencyFormula {5} { (pt <= 15.0) * (0.000) + \
521 (abs(eta) <= 1.2) * (pt > 15.0) * (0.5*tanh(pt*0.03 - 0.4)) + \
522 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.4*tanh(pt*0.03 - 0.4)) + \
523 (abs(eta) > 2.5) * (0.000)}
524}
525
526module TauTagging TauTagging {
527 set ParticleInputArray Delphes/allParticles
528 set PartonInputArray Delphes/partons
529 set JetInputArray JetEnergyScale/jets
530
531 set DeltaR 0.5
532
533 set TauPTMin 1.0
534
535 set TauEtaMax 2.5
536
537 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
538
539 # default efficiency formula (misidentification rate)
540 add EfficiencyFormula {0} {0.001}
541 # efficiency formula for tau-jets
542 add EfficiencyFormula {15} {0.4}
543}
544
545#####################################################
546# Find uniquely identified photons/electrons/tau/jets
547#####################################################
548
549module UniqueObjectFinder UniqueObjectFinder {
550# earlier arrays take precedence over later ones
551# add InputArray InputArray OutputArray
552 add InputArray PhotonIsolation/photons photons
553 add InputArray ElectronIsolation/electrons electrons
554 add InputArray MuonIsolation/muons muons
555 add InputArray JetEnergyScale/jets jets
556}
557
558##################
559# ROOT tree writer
560##################
561
562# tracks, towers and eflow objects are not stored by default in the output.
563# if needed (for jet constituent or other studies), uncomment the relevant
564# "add Branch ..." lines.
565
566module TreeWriter TreeWriter {
567# add Branch InputArray BranchName BranchClass
568 add Branch Delphes/allParticles Particle GenParticle
569
570 add Branch TrackMerger/tracks Track Track
571 add Branch Calorimeter/towers Tower Tower
572
573 add Branch Calorimeter/eflowTracks EFlowTrack Track
574 add Branch Calorimeter/eflowPhotons EFlowPhoton Tower
575 add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower
576
577 add Branch GenJetFinder/jets GenJet Jet
578 add Branch UniqueObjectFinder/jets Jet Jet
579 add Branch UniqueObjectFinder/electrons Electron Electron
580 add Branch UniqueObjectFinder/photons Photon Photon
581 add Branch UniqueObjectFinder/muons Muon Muon
582 add Branch MissingET/momentum MissingET MissingET
583 add Branch ScalarHT/energy ScalarHT ScalarHT
584}
585
Note: See TracBrowser for help on using the repository browser.