Fork me on GitHub

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

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

add muons to TrackMerger

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