Fork me on GitHub

Ticket #1141: zhh4.tcl

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