Fork me on GitHub

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

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

fix tau-tagging configuration

File size: 18.0 KB
RevLine 
[612]1#######################################
2# Order of execution of various modules
3#######################################
4
5set ExecutionPath {
[695]6 ParticlePropagator
[905]7
8 ChargedHadronTrackingEfficiency
9 ElectronTrackingEfficiency
10 MuonTrackingEfficiency
11
12 ChargedHadronMomentumSmearing
[829]13 ElectronEnergySmearing
[905]14 MuonMomentumSmearing
15
16 TrackMerger
[695]17 Calorimeter
[924]18 EFlowMerger
[905]19
[750]20 PhotonEfficiency
[746]21 PhotonIsolation
[1032]22
[750]23 ElectronEfficiency
[746]24 ElectronIsolation
[1032]25
[757]26 MuonEfficiency
27 MuonIsolation
[1032]28
[761]29 MissingET
[1032]30
[1074]31 GenJetFinder
[695]32 FastJetFinder
[1074]33
[1254]34 JetEnergyScale
[1074]35
[695]36 BTagging
[871]37 TauTagging
[1032]38
[812]39 UniqueObjectFinder
[1032]40
[894]41 ScalarHT
[1032]42
[695]43 TreeWriter
[612]44}
45
[652]46#################################
47# Propagate particles in cylinder
48#################################
[612]49
[632]50module ParticlePropagator ParticlePropagator {
[905]51 set InputArray Delphes/stableParticles
[750]52
[905]53 set OutputArray stableParticles
54 set ChargedHadronOutputArray chargedHadrons
55 set ElectronOutputArray electrons
56 set MuonOutputArray muons
[612]57
[619]58 # radius of the magnetic field coverage, in m
[612]59 set Radius 1.29
[619]60 # half-length of the magnetic field coverage, in m
61 set HalfLength 3.00
[632]62
[652]63 # magnetic field
[612]64 set Bz 3.8
65}
66
[905]67####################################
68# Charged hadron tracking efficiency
69####################################
[612]70
[905]71module Efficiency ChargedHadronTrackingEfficiency {
72 set InputArray ParticlePropagator/chargedHadrons
73 set OutputArray chargedHadrons
[612]74
[905]75 # add EfficiencyFormula {efficiency formula as a function of eta and pt}
[703]76
[905]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}
[703]85
[905]86##############################
87# Electron tracking efficiency
88##############################
[703]89
[905]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}
[1032]95
[905]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)}
[750]105}
[703]106
[1032]107##########################
[905]108# Muon tracking efficiency
[1032]109##########################
[703]110
[905]111module Efficiency MuonTrackingEfficiency {
112 set InputArray ParticlePropagator/muons
113 set OutputArray muons
[750]114
[905]115 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
[1032]116
[905]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}
[703]125
[905]126########################################
127# Momentum resolution for charged tracks
128########################################
[703]129
[905]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
[1254]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)}
[703]143}
144
[905]145#################################
146# Energy resolution for electrons
147#################################
[829]148
149module EnergySmearing ElectronEnergySmearing {
[905]150 set InputArray ElectronTrackingEfficiency/electrons
[829]151 set OutputArray electrons
152
[905]153 # set ResolutionFormula {resolution formula as a function of eta and energy}
[829]154
[1254]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) + \
[905]159 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)}
[829]160
161}
162
[905]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
[1254]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)}
[905]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
[703]196#############
197# Calorimeter
198#############
199
[695]200module Calorimeter Calorimeter {
[905]201 set ParticleInputArray ParticlePropagator/stableParticles
202 set TrackInputArray TrackMerger/tracks
[612]203
[703]204 set TowerOutputArray towers
205 set PhotonOutputArray photons
[619]206
[938]207 set EFlowTrackOutputArray eflowTracks
208 set EFlowTowerOutputArray eflowTowers
209
[695]210 set pi [expr {acos(-1)}]
[1032]211
[883]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
[695]216 # 5 degrees towers
[883]217 set PhiBins {}
[1032]218 for {set i -36} {$i <= 36} {incr i} {
[883]219 add PhiBins [expr {$i * $pi/36.0}]
[695]220 }
[1032]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} {
[883]222 add EtaPhiBins $eta $PhiBins
[695]223 }
[619]224
[695]225 # 10 degrees towers
[883]226 set PhiBins {}
[1032]227 for {set i -18} {$i <= 18} {incr i} {
[883]228 add PhiBins [expr {$i * $pi/18.0}]
[695]229 }
[1032]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} {
[883]231 add EtaPhiBins $eta $PhiBins
[695]232 }
[1032]233
[695]234 # 20 degrees towers
[883]235 set PhiBins {}
[1032]236 for {set i -9} {$i <= 9} {incr i} {
[883]237 add PhiBins [expr {$i * $pi/9.0}]
[1032]238 }
239 foreach eta {-5 -4.7 -4.525 4.7 5} {
[883]240 add EtaPhiBins $eta $PhiBins
[695]241 }
[619]242
[703]243 # default energy fractions {abs(PDG code)} {Fecal Fhcal}
244 add EnergyFraction {0} {0.0 1.0}
[695]245 # energy fractions for e, gamma and pi0
[703]246 add EnergyFraction {11} {1.0 0.0}
247 add EnergyFraction {22} {1.0 0.0}
248 add EnergyFraction {111} {1.0 0.0}
[1076]249 # energy fractions for muon, neutrinos and neutralinos
[703]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}
[1076]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}
[695]259 # energy fractions for K0short and Lambda
[703]260 add EnergyFraction {310} {0.3 0.7}
261 add EnergyFraction {3122} {0.3 0.7}
[1032]262
[766]263 # set ECalResolutionFormula {resolution formula as a function of eta and energy}
[1254]264 set ECalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \
[881]265 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)}
[632]266
[766]267 # set HCalResolutionFormula {resolution formula as a function of eta and energy}
[1254]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)}
[612]271}
272
[924]273####################
274# Energy flow merger
275####################
276
277module Merger EFlowMerger {
278# add InputArray InputArray
[938]279 add InputArray Calorimeter/eflowTracks
280 add InputArray Calorimeter/eflowTowers
281 add InputArray MuonMomentumSmearing/muons
[924]282 set OutputArray eflow
283}
284
[750]285###################
286# Photon efficiency
287###################
288
289module Efficiency PhotonEfficiency {
290 set InputArray Calorimeter/photons
291 set OutputArray photons
292
[905]293 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
[750]294
[905]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)}
[750]300}
301
[746]302##################
[750]303# Photon isolation
[746]304##################
305
306module Isolation PhotonIsolation {
[750]307 set CandidateInputArray PhotonEfficiency/photons
[924]308 set IsolationInputArray EFlowMerger/eflow
[1032]309
[746]310 set OutputArray photons
311
[875]312 set DeltaRMax 0.5
[746]313
314 set PTMin 0.5
315
[753]316 set PTRatioMax 0.1
[746]317}
318
[750]319#####################
320# Electron efficiency
321#####################
322
323module Efficiency ElectronEfficiency {
[829]324 set InputArray ElectronEnergySmearing/electrons
[750]325 set OutputArray electrons
326
[905]327 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
[750]328
[829]329 # efficiency formula for electrons
[905]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)}
[750]334}
335
[746]336####################
[750]337# Electron isolation
[746]338####################
339
340module Isolation ElectronIsolation {
[750]341 set CandidateInputArray ElectronEfficiency/electrons
[924]342 set IsolationInputArray EFlowMerger/eflow
[1032]343
[746]344 set OutputArray electrons
345
[875]346 set DeltaRMax 0.5
[746]347
348 set PTMin 0.5
349
[894]350 set PTRatioMax 0.1
[746]351}
352
[755]353#################
354# Muon efficiency
355#################
356
357module Efficiency MuonEfficiency {
[905]358 set InputArray MuonMomentumSmearing/muons
[755]359 set OutputArray muons
360
[905]361 # set EfficiencyFormula {efficiency as a function of eta and pt}
[755]362
363 # efficiency formula for muons
[905]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)}
[755]368}
369
370################
371# Muon isolation
372################
373
374module Isolation MuonIsolation {
375 set CandidateInputArray MuonEfficiency/muons
[924]376 set IsolationInputArray EFlowMerger/eflow
[1032]377
[755]378 set OutputArray muons
379
[875]380 set DeltaRMax 0.5
[755]381
382 set PTMin 0.5
383
[894]384 set PTRatioMax 0.1
[755]385}
386
[760]387###################
388# Missing ET merger
389###################
390
391module Merger MissingET {
[894]392# add InputArray InputArray
[924]393 add InputArray EFlowMerger/eflow
[760]394 set MomentumOutputArray momentum
395}
396
[894]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
[1254]406 add InputArray UniqueObjectFinder/muons
[894]407 set EnergyOutputArray energy
408}
409
[1074]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
[1254]421 set ParameterR 0.5
[1074]422
423 set JetPTMin 20.0
424}
425
[612]426############
427# Jet finder
428############
429
[632]430module FastJetFinder FastJetFinder {
[890]431# set InputArray Calorimeter/towers
[924]432 set InputArray EFlowMerger/eflow
[1032]433
[703]434 set OutputArray jets
[612]435
436 # algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
437 set JetAlgorithm 6
[1254]438 set ParameterR 0.5
[632]439
[881]440 set JetPTMin 20.0
[612]441}
442
[1254]443##################
444# Jet Energy Scale
445##################
[1074]446
[1254]447module EnergyScale JetEnergyScale {
448 set InputArray FastJetFinder/jets
449 set OutputArray jets
[1074]450
[1254]451 # scale formula for jets
452 set ScaleFormula {1.08}
[1074]453}
454
[651]455###########
456# b-tagging
457###########
458
459module BTagging BTagging {
[703]460 set PartonInputArray Delphes/partons
[1254]461 set JetInputArray JetEnergyScale/jets
[651]462
[1099]463 set BitNumber 0
464
[651]465 set DeltaR 0.5
[670]466
[657]467 set PartonPTMin 1.0
[651]468
[657]469 set PartonEtaMax 2.5
470
[768]471 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
[651]472 # PDG code = the highest PDG code of a quark or gluon inside DeltaR cone around jet axis
[652]473 # gluon's PDG code has the lowest priority
[703]474
[881]475 # https://twiki.cern.ch/twiki/bin/view/CMSPublic/PhysicsResultsBTV
[869]476 # default efficiency formula (misidentification rate)
[703]477 add EfficiencyFormula {0} {0.001}
[881]478
[869]479 # efficiency formula for c-jets (misidentification rate)
[881]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)) + \
[1032]483 (abs(eta) > 2.5) * (0.000)}
484
[703]485 # efficiency formula for b-jets
[881]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)}
[651]490}
491
[869]492module TauTagging TauTagging {
[905]493 set ParticleInputArray Delphes/allParticles
[869]494 set PartonInputArray Delphes/partons
[1255]495 set JetInputArray JetEnergyScale/jets
[719]496
[869]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}
[719]509}
510
[812]511#####################################################
512# Find uniquely identified photons/electrons/tau/jets
513#####################################################
514
515module UniqueObjectFinder UniqueObjectFinder {
[814]516# earlier arrays take precedence over later ones
[812]517# add InputArray InputArray OutputArray
518 add InputArray PhotonIsolation/photons photons
519 add InputArray ElectronIsolation/electrons electrons
[1254]520 add InputArray MuonIsolation/muons muons
521 add InputArray JetEnergyScale/jets jets
[812]522}
523
[612]524##################
525# ROOT tree writer
526##################
527
[632]528module TreeWriter TreeWriter {
[703]529# add Branch InputArray BranchName BranchClass
[905]530 add Branch Delphes/allParticles Particle GenParticle
[951]531 add Branch TrackMerger/tracks Track Track
532 add Branch Calorimeter/towers Tower Tower
[1254]533 add Branch Calorimeter/eflowTracks EFlowTrack Track
534 add Branch Calorimeter/eflowTowers EFlowTower Tower
535 add Branch MuonMomentumSmearing/muons EFlowMuon Muon
[1074]536 add Branch GenJetFinder/jets GenJet Jet
[954]537 add Branch UniqueObjectFinder/jets Jet Jet
538 add Branch UniqueObjectFinder/electrons Electron Electron
[812]539 add Branch UniqueObjectFinder/photons Photon Photon
[1254]540 add Branch UniqueObjectFinder/muons Muon Muon
[760]541 add Branch MissingET/momentum MissingET MissingET
[894]542 add Branch ScalarHT/energy ScalarHT ScalarHT
[612]543}
[926]544
Note: See TracBrowser for help on using the repository browser.