Fork me on GitHub

Ticket #765: delphes_card_ILD_v2.tcl

File delphes_card_ILD_v2.tcl, 17.4 KB (added by Michele Selvaggi, 9 years ago)
Line 
1# based on arXiv:1306.6329
2
3#######################################
4# Order of execution of various modules
5#######################################
6
7set ExecutionPath {
8 ParticlePropagator
9
10 ChargedHadronTrackingEfficiency
11 ElectronTrackingEfficiency
12 MuonTrackingEfficiency
13
14 ChargedHadronMomentumSmearing
15 ElectronMomentumSmearing
16 MuonMomentumSmearing
17
18 TrackMerger
19 AngularSmearing
20 ImpactParameterSmearing
21
22 ECal
23 HCal
24
25 TowerMerger
26 EFlowMerger
27
28 PhotonEfficiency
29 PhotonIsolation
30
31 ElectronFilter
32 ElectronEfficiency
33 ElectronIsolation
34
35 MuonEfficiency
36 MuonIsolation
37
38 MissingET
39
40 NeutrinoFilter
41 GenJetFinder
42 FastJetFinder
43
44 JetEnergyScale
45
46 JetFlavorAssociation
47
48 BTagging
49
50 TauTagging
51
52 ScalarHT
53
54 UniqueObjectFinder
55
56 TreeWriter
57}
58
59#################################
60# Propagate particles in cylinder
61#################################
62
63module ParticlePropagator ParticlePropagator {
64 set InputArray Delphes/stableParticles
65
66 set OutputArray stableParticles
67 set ChargedHadronOutputArray chargedHadrons
68 set ElectronOutputArray electrons
69 set MuonOutputArray muons
70
71 # radius of the magnetic field coverage, in m
72 set Radius 1.8
73 # half-length of the magnetic field coverage, in m
74 set HalfLength 2.4
75
76 # magnetic field
77 set Bz 3.5
78}
79
80####################################
81# Charged hadron tracking efficiency
82####################################
83
84module Efficiency ChargedHadronTrackingEfficiency {
85 set InputArray ParticlePropagator/chargedHadrons
86 set OutputArray chargedHadrons
87
88 # add EfficiencyFormula {efficiency formula as a function of eta and pt}
89
90 # tracking efficiency formula for charged hadrons
91 set EfficiencyFormula { (pt <= 0.1) * (0.00) +
92 (abs(eta) <= 2.4) * (pt > 0.1) * (0.99) +
93 (abs(eta) > 2.4) * (0.00)}
94}
95
96##############################
97# Electron tracking efficiency
98##############################
99
100module Efficiency ElectronTrackingEfficiency {
101 set InputArray ParticlePropagator/electrons
102 set OutputArray electrons
103
104 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
105
106 # tracking efficiency formula for electrons
107 set EfficiencyFormula { (pt <= 0.1) * (0.00) +
108 (abs(eta) <= 2.4) * (pt > 0.1) * (0.99) +
109 (abs(eta) > 2.4) * (0.00)}
110}
111
112##########################
113# Muon tracking efficiency
114##########################
115
116module Efficiency MuonTrackingEfficiency {
117 set InputArray ParticlePropagator/muons
118 set OutputArray muons
119
120 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
121
122 # tracking efficiency formula for muons
123 set EfficiencyFormula { (pt <= 0.1) * (0.00) +
124 (abs(eta) <= 2.4) * (pt > 0.1) * (0.99) +
125 (abs(eta) > 2.4) * (0.00)}
126}
127
128########################################
129# Momentum resolution for charged tracks
130########################################
131
132module MomentumSmearing ChargedHadronMomentumSmearing {
133 set InputArray ChargedHadronTrackingEfficiency/chargedHadrons
134 set OutputArray chargedHadrons
135
136 # set ResolutionFormula {resolution formula as a function of eta and pt}
137
138 # resolution formula for charged hadrons
139 set ResolutionFormula { (abs(eta) <= 1.0) * sqrt(0.001^2 + pt^2*1.e-5^2) +
140 (abs(eta) > 1.0 && abs(eta) <= 2.4) * sqrt(0.01^2 + pt^2*1.e-4^2)}
141
142
143}
144
145###################################
146# Momentum resolution for electrons
147###################################
148
149module MomentumSmearing ElectronMomentumSmearing {
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 charged hadrons
156 set ResolutionFormula { (abs(eta) <= 1.0) * sqrt(0.001^2 + pt^2*1.e-5^2) +
157 (abs(eta) > 1.0 && abs(eta) <= 2.4) * sqrt(0.01^2 + pt^2*1.e-4^2)}
158}
159
160###############################
161# Momentum resolution for muons
162###############################
163
164module MomentumSmearing MuonMomentumSmearing {
165 set InputArray MuonTrackingEfficiency/muons
166 set OutputArray muons
167
168 # set ResolutionFormula {resolution formula as a function of eta and pt}
169
170 # resolution formula for charged hadrons
171 set ResolutionFormula { (abs(eta) <= 1.0) * sqrt(0.001^2 + pt^2*1.e-5^2) +
172 (abs(eta) > 1.0 && abs(eta) <= 2.4) * sqrt(0.01^2 + pt^2*1.e-4^2)}
173
174}
175
176##############
177# Track merger
178##############
179
180module Merger TrackMerger {
181# add InputArray InputArray
182 add InputArray ChargedHadronMomentumSmearing/chargedHadrons
183 add InputArray ElectronMomentumSmearing/electrons
184 add InputArray MuonMomentumSmearing/muons
185 set OutputArray tracks
186}
187
188
189########################
190# Track angular smearing
191########################
192
193module AngularSmearing AngularSmearing {
194 set InputArray TrackMerger/tracks
195 set OutputArray tracks
196
197
198 # angular smearing in eta formula as a function of pt and eta
199 set EtaResolutionFormula { 0.001 }
200
201 # angular smearing in phi formula as a function of pt and eta
202 set PhiResolutionFormula { 0.001 }
203
204}
205
206#################################
207# Track impact parameter smearing
208#################################
209
210module ImpactParameterSmearing ImpactParameterSmearing {
211 set InputArray AngularSmearing/tracks
212 set OutputArray tracks
213
214
215 # absolute impact parameter smearing formula (in mm) as a function of pt and eta
216 set ResolutionFormula {0.010/sqrt(pt)}
217}
218
219#############
220# ECAL
221#############
222
223module SimpleCalorimeter ECal {
224 set ParticleInputArray ParticlePropagator/stableParticles
225 set TrackInputArray ImpactParameterSmearing/tracks
226
227 set TowerOutputArray ecalTowers
228 set EFlowTrackOutputArray eflowTracks
229 set EFlowTowerOutputArray eflowPhotons
230
231 set IsEcal true
232
233 set EnergyMin 0.5
234 set EnergySignificanceMin 1.0
235
236 set SmearTowerCenter true
237
238 set pi [expr {acos(-1)}]
239
240 # lists of the edges of each tower in eta and phi
241 # each list starts with the lower edge of the first tower
242 # the list ends with the higher edged of the last tower
243
244 # 0.5 degree towers (5x5 mm^2)
245 set PhiBins {}
246 for {set i -360} {$i <= 360} {incr i} {
247 add PhiBins [expr {$i * $pi/360.0}]
248 }
249
250 # 0.01 unit in eta up to eta = 2.5
251 for {set i -500} {$i <= 500} {incr i} {
252 set eta [expr {$i * 0.005}]
253 add EtaPhiBins $eta $PhiBins
254 }
255
256 # default energy fractions {abs(PDG code)} {fraction of energy deposited in ECAL}
257
258 add EnergyFraction {0} {0.0}
259 # energy fractions for e, gamma and pi0
260 add EnergyFraction {11} {1.0}
261 add EnergyFraction {22} {1.0}
262 add EnergyFraction {111} {1.0}
263 # energy fractions for muon, neutrinos and neutralinos
264 add EnergyFraction {12} {0.0}
265 add EnergyFraction {13} {0.0}
266 add EnergyFraction {14} {0.0}
267 add EnergyFraction {16} {0.0}
268 add EnergyFraction {1000022} {0.0}
269 add EnergyFraction {1000023} {0.0}
270 add EnergyFraction {1000025} {0.0}
271 add EnergyFraction {1000035} {0.0}
272 add EnergyFraction {1000045} {0.0}
273 # energy fractions for K0short and Lambda
274 add EnergyFraction {310} {0.3}
275 add EnergyFraction {3122} {0.3}
276
277 # set ECalResolutionFormula {resolution formula as a function of eta and energy}
278
279 set ResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.01^2 + energy*0.15^2) }
280
281}
282
283#############
284# HCAL
285#############
286
287module SimpleCalorimeter HCal {
288 set ParticleInputArray ParticlePropagator/stableParticles
289 set TrackInputArray ECal/eflowTracks
290
291 set TowerOutputArray hcalTowers
292 set EFlowTrackOutputArray eflowTracks
293 set EFlowTowerOutputArray eflowNeutralHadrons
294
295 set IsEcal false
296
297 set EnergyMin 1.0
298 set EnergySignificanceMin 1.0
299
300 set SmearTowerCenter true
301
302 set pi [expr {acos(-1)}]
303
304 # lists of the edges of each tower in eta and phi
305 # each list starts with the lower edge of the first tower
306 # the list ends with the higher edged of the last tower
307
308
309 # 6 degree towers
310 set PhiBins {}
311 for {set i -60} {$i <= 60} {incr i} {
312 add PhiBins [expr {$i * $pi/60.0}]
313 }
314
315 # 0.5 unit in eta up to eta = 3
316 for {set i -60} {$i <= 60} {incr i} {
317 set eta [expr {$i * 0.05}]
318 add EtaPhiBins $eta $PhiBins
319 }
320
321
322 # default energy fractions {abs(PDG code)} {Fecal Fhcal}
323 add EnergyFraction {0} {1.0}
324 # energy fractions for e, gamma and pi0
325 add EnergyFraction {11} {0.0}
326 add EnergyFraction {22} {0.0}
327 add EnergyFraction {111} {0.0}
328 # energy fractions for muon, neutrinos and neutralinos
329 add EnergyFraction {12} {0.0}
330 add EnergyFraction {13} {0.0}
331 add EnergyFraction {14} {0.0}
332 add EnergyFraction {16} {0.0}
333 add EnergyFraction {1000022} {0.0}
334 add EnergyFraction {1000023} {0.0}
335 add EnergyFraction {1000025} {0.0}
336 add EnergyFraction {1000035} {0.0}
337 add EnergyFraction {1000045} {0.0}
338 # energy fractions for K0short and Lambda
339 add EnergyFraction {310} {0.7}
340 add EnergyFraction {3122} {0.7}
341
342 # set HCalResolutionFormula {resolution formula as a function of eta and energy}
343
344 set ResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.015^2 + energy*0.50^2)}
345
346}
347
348#################
349# Electron filter
350#################
351
352module PdgCodeFilter ElectronFilter {
353 set InputArray HCal/eflowTracks
354 set OutputArray electrons
355 set Invert true
356 add PdgCode {11}
357 add PdgCode {-11}
358}
359
360###################################################
361# Tower Merger (in case not using e-flow algorithm)
362###################################################
363
364module Merger TowerMerger {
365# add InputArray InputArray
366 add InputArray ECal/ecalTowers
367 add InputArray HCal/hcalTowers
368 set OutputArray towers
369}
370
371####################
372# Energy flow merger
373####################
374
375module Merger EFlowMerger {
376# add InputArray InputArray
377 add InputArray HCal/eflowTracks
378 add InputArray ECal/eflowPhotons
379 add InputArray HCal/eflowNeutralHadrons
380 set OutputArray eflow
381}
382
383
384###################
385# Missing ET merger
386###################
387
388module Merger MissingET {
389# add InputArray InputArray
390 add InputArray EFlowMerger/eflow
391 set MomentumOutputArray momentum
392}
393
394
395##################
396# Scalar HT merger
397##################
398
399module Merger ScalarHT {
400# add InputArray InputArray
401 add InputArray EFlowMerger/eflow
402 set EnergyOutputArray energy
403}
404
405#################
406# Neutrino Filter
407#################
408
409module PdgCodeFilter NeutrinoFilter {
410
411 set InputArray Delphes/stableParticles
412 set OutputArray filteredParticles
413
414 set PTMin 0.0
415
416 add PdgCode {12}
417 add PdgCode {14}
418 add PdgCode {16}
419 add PdgCode {-12}
420 add PdgCode {-14}
421 add PdgCode {-16}
422
423}
424
425
426#####################
427# MC truth jet finder
428#####################
429
430module FastJetFinder GenJetFinder {
431 set InputArray NeutrinoFilter/filteredParticles
432
433 set OutputArray jets
434
435 # algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
436 set JetAlgorithm 6
437 set ParameterR 0.5
438
439 set JetPTMin 20.0
440}
441
442############
443# Jet finder
444############
445
446module FastJetFinder FastJetFinder {
447# set InputArray TowerMerger/towers
448 set InputArray EFlowMerger/eflow
449
450 set OutputArray jets
451
452 # algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
453 set JetAlgorithm 6
454 set ParameterR 0.5
455
456 set JetPTMin 20.0
457}
458
459##################
460# Jet Energy Scale
461##################
462
463module EnergyScale JetEnergyScale {
464 set InputArray FastJetFinder/jets
465 set OutputArray jets
466
467 # scale formula for jets
468 set ScaleFormula {1.00}
469}
470
471
472########################
473# Jet Flavor Association
474########################
475
476module JetFlavorAssociation JetFlavorAssociation {
477
478 set PartonInputArray Delphes/partons
479 set ParticleInputArray Delphes/allParticles
480 set ParticleLHEFInputArray Delphes/allParticlesLHEF
481 set JetInputArray JetEnergyScale/jets
482
483 set DeltaR 0.5
484 set PartonPTMin 1.0
485 set PartonEtaMax 2.5
486
487}
488
489###################
490# Photon efficiency
491###################
492
493module Efficiency PhotonEfficiency {
494 set InputArray ECal/eflowPhotons
495 set OutputArray photons
496
497 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
498
499 # efficiency formula for photons
500 set EfficiencyFormula { (pt <= 10.0) * (0.00) +
501 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) +
502 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.95) +
503 (abs(eta) > 2.5) * (0.00)}
504}
505
506##################
507# Photon isolation
508##################
509
510module Isolation PhotonIsolation {
511 set CandidateInputArray PhotonEfficiency/photons
512 set IsolationInputArray EFlowMerger/eflow
513
514 set OutputArray photons
515
516 set DeltaRMax 0.5
517
518 set PTMin 0.5
519
520 set PTRatioMax 0.1
521}
522
523#####################
524# Electron efficiency
525#####################
526
527module Efficiency ElectronEfficiency {
528 set InputArray ElectronFilter/electrons
529 set OutputArray electrons
530
531 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
532
533 # efficiency formula for electrons
534 set EfficiencyFormula { (pt <= 10.0) * (0.00) +
535 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) +
536 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.95) +
537 (abs(eta) > 2.5) * (0.00)}
538}
539
540####################
541# Electron isolation
542####################
543
544module Isolation ElectronIsolation {
545 set CandidateInputArray ElectronEfficiency/electrons
546 set IsolationInputArray EFlowMerger/eflow
547
548 set OutputArray electrons
549
550 set DeltaRMax 0.5
551
552 set PTMin 0.5
553
554 set PTRatioMax 0.1
555}
556
557#################
558# Muon efficiency
559#################
560
561module Efficiency MuonEfficiency {
562 set InputArray MuonMomentumSmearing/muons
563 set OutputArray muons
564
565 # set EfficiencyFormula {efficiency as a function of eta and pt}
566
567 # efficiency formula for muons
568 set EfficiencyFormula { (pt <= 10.0) * (0.00) +
569 (abs(eta) <= 1.5) * (pt > 10.0 && pt <= 1.0e3) * (0.95) +
570 (abs(eta) <= 1.5) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) +
571 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0 && pt <= 1.0e3) * (0.95) +
572 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) +
573 (abs(eta) > 2.4) * (0.00)}
574}
575
576################
577# Muon isolation
578################
579
580module Isolation MuonIsolation {
581 set CandidateInputArray MuonEfficiency/muons
582 set IsolationInputArray EFlowMerger/eflow
583
584 set OutputArray muons
585
586 set DeltaRMax 0.5
587
588 set PTMin 0.5
589
590 set PTRatioMax 0.1
591}
592
593
594###########
595# b-tagging
596###########
597
598module BTagging BTagging {
599 set JetInputArray JetEnergyScale/jets
600
601 set BitNumber 0
602
603 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
604 # PDG code = the highest PDG code of a quark or gluon inside DeltaR cone around jet axis
605 # gluon's PDG code has the lowest priority
606
607 # based on arXiv:1211.4462
608
609 # default efficiency formula (misidentification rate)
610 add EfficiencyFormula {0} {0.01+0.00038*pt}
611
612 # efficiency formula for c-jets (misidentification rate)
613 add EfficiencyFormula {4} {0.25*tanh(0.018*pt)*(1/(1+ 0.0013*pt))}
614
615 # efficiency formula for b-jets
616 add EfficiencyFormula {5} {0.85*tanh(0.0025*pt)*(25.0/(1+0.063*pt))}
617}
618
619#############
620# tau-tagging
621#############
622
623
624module TauTagging TauTagging {
625 set ParticleInputArray Delphes/allParticles
626 set PartonInputArray Delphes/partons
627 set JetInputArray JetEnergyScale/jets
628
629 set DeltaR 0.5
630
631 set TauPTMin 1.0
632
633 set TauEtaMax 4.0
634
635 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
636
637 # default efficiency formula (misidentification rate)
638 add EfficiencyFormula {0} {0.001}
639 # efficiency formula for tau-jets
640 add EfficiencyFormula {15} {0.4}
641}
642
643#####################################################
644# Find uniquely identified photons/electrons/tau/jets
645#####################################################
646
647module UniqueObjectFinder UniqueObjectFinder {
648# earlier arrays take precedence over later ones
649# add InputArray InputArray OutputArray
650 add InputArray PhotonIsolation/photons photons
651 add InputArray ElectronIsolation/electrons electrons
652 add InputArray MuonIsolation/muons muons
653 add InputArray JetEnergyScale/jets jets
654}
655
656
657##################
658# ROOT tree writer
659##################
660
661module TreeWriter TreeWriter {
662# add Branch InputArray BranchName BranchClass
663 add Branch Delphes/allParticles Particle GenParticle
664 add Branch GenJetFinder/jets GenJet Jet
665
666 add Branch AngularSmearing/tracks Track Track
667 add Branch TowerMerger/towers Tower Tower
668
669 add Branch ChargedHadronMomentumSmearing/chargedHadrons ChargedHadron Track
670 add Branch HCal/eflowNeutralHadrons NeutralHadron Tower
671
672 add Branch UniqueObjectFinder/photons Photon Photon
673 add Branch UniqueObjectFinder/electrons Electron Electron
674 add Branch UniqueObjectFinder/muons Muon Muon
675 add Branch UniqueObjectFinder/jets Jet Jet
676
677 add Branch MissingET/momentum MissingET MissingET
678 add Branch ScalarHT/energy ScalarHT ScalarHT
679}
680