Fork me on GitHub

source: svn/trunk/examples/delphes_card_CMS_PileUp.tcl@ 1296

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

revert to pre 3.0.10 HCAL and charged hadron resolution for CMS

File size: 20.0 KB
Line 
1#######################################
2# Order of execution of various modules
3#######################################
4
5set ExecutionPath {
6
7 PileUpMerger
8 ParticlePropagator
9
10 ChargedHadronTrackingEfficiency
11 ElectronTrackingEfficiency
12 MuonTrackingEfficiency
13
14 ChargedHadronMomentumSmearing
15 ElectronEnergySmearing
16 MuonMomentumSmearing
17
18 TrackMerger
19 Calorimeter
20 TrackPileUpSubtractor
21 EFlowMerger
22
23 GenJetFinder
24
25 Rho
26 FastJetFinder
27 JetPileUpSubtractor
28
29 JetEnergyScale
30
31 PhotonEfficiency
32 PhotonIsolation
33
34 ElectronEfficiency
35 ElectronIsolation
36
37 MuonEfficiency
38 MuonIsolation
39
40 MissingET
41
42 BTagging
43 TauTagging
44
45 UniqueObjectFinder
46
47 ScalarHT
48
49 TreeWriter
50}
51
52###############
53# PileUp Merger
54###############
55
56module PileUpMerger PileUpMerger {
57 set InputArray Delphes/stableParticles
58
59 set OutputArray stableParticles
60
61 # pre-generated minbias input file
62 set PileUpFile MinBias.pileup
63
64 # average expected pile up
65 set MeanPileUp 50
66 # spread in the beam direction in m (assumes gaussian)
67 set ZVertexSpread 0.07
68}
69
70#################################
71# Propagate particles in cylinder
72#################################
73
74module ParticlePropagator ParticlePropagator {
75 set InputArray PileUpMerger/stableParticles
76
77 set OutputArray stableParticles
78 set ChargedHadronOutputArray chargedHadrons
79 set ElectronOutputArray electrons
80 set MuonOutputArray muons
81
82 # radius of the magnetic field coverage, in m
83 set Radius 1.29
84 # half-length of the magnetic field coverage, in m
85 set HalfLength 3.00
86
87 # magnetic field
88 set Bz 3.8
89}
90
91####################################
92# Charged hadron tracking efficiency
93####################################
94
95module Efficiency ChargedHadronTrackingEfficiency {
96 set InputArray ParticlePropagator/chargedHadrons
97 set OutputArray chargedHadrons
98
99 # add EfficiencyFormula {efficiency formula as a function of eta and pt}
100
101 # tracking efficiency formula for charged hadrons
102 set EfficiencyFormula { (pt <= 0.1) * (0.00) + \
103 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + \
104 (abs(eta) <= 1.5) * (pt > 1.0) * (0.95) + \
105 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.60) + \
106 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.85) + \
107 (abs(eta) > 2.5) * (0.00)}
108}
109
110##############################
111# Electron tracking efficiency
112##############################
113
114module Efficiency ElectronTrackingEfficiency {
115 set InputArray ParticlePropagator/electrons
116 set OutputArray electrons
117
118 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
119
120 # tracking efficiency formula for electrons
121 set EfficiencyFormula { (pt <= 0.1) * (0.00) + \
122 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.73) + \
123 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e2) * (0.95) + \
124 (abs(eta) <= 1.5) * (pt > 1.0e2) * (0.99) + \
125 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.50) + \
126 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e2) * (0.83) + \
127 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2) * (0.90) + \
128 (abs(eta) > 2.5) * (0.00)}
129}
130
131##########################
132# Muon tracking efficiency
133##########################
134
135module Efficiency MuonTrackingEfficiency {
136 set InputArray ParticlePropagator/muons
137 set OutputArray muons
138
139 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
140
141 # tracking efficiency formula for muons
142 set EfficiencyFormula { (pt <= 0.1) * (0.00) + \
143 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.75) + \
144 (abs(eta) <= 1.5) * (pt > 1.0) * (0.99) + \
145 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + \
146 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.98) + \
147 (abs(eta) > 2.5) * (0.00)}
148}
149
150########################################
151# Momentum resolution for charged tracks
152########################################
153
154module MomentumSmearing ChargedHadronMomentumSmearing {
155 set InputArray ChargedHadronTrackingEfficiency/chargedHadrons
156 set OutputArray chargedHadrons
157
158 # set ResolutionFormula {resolution formula as a function of eta and pt}
159
160 # resolution formula for charged hadrons
161 set ResolutionFormula { (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.02) + \
162 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e1) * (0.01) + \
163 (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.03) + \
164 (abs(eta) <= 1.5) * (pt > 2.0e2) * (0.05) + \
165 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.03) + \
166 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e1) * (0.02) + \
167 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.04) + \
168 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2) * (0.05)}
169}
170
171#################################
172# Energy resolution for electrons
173#################################
174
175module EnergySmearing ElectronEnergySmearing {
176 set InputArray ElectronTrackingEfficiency/electrons
177 set OutputArray electrons
178
179 # set ResolutionFormula {resolution formula as a function of eta and energy}
180
181 # resolution formula for electrons
182 set ResolutionFormula { (abs(eta) <= 2.5) * (energy > 0.1 && energy <= 2.0e1) * (0.0225)*energy + \
183 (abs(eta) <= 2.5) * (energy > 2.0e1) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \
184 (abs(eta) > 2.5 && abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \
185 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)}
186
187}
188
189###############################
190# Momentum resolution for muons
191###############################
192
193module MomentumSmearing MuonMomentumSmearing {
194 set InputArray MuonTrackingEfficiency/muons
195 set OutputArray muons
196
197 # set ResolutionFormula {resolution formula as a function of eta and pt}
198
199 # resolution formula for muons
200 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1 && pt <= 5.0) * (0.02) + \
201 (abs(eta) <= 0.5) * (pt > 5.0 && pt <= 1.0e2) * (0.015) + \
202 (abs(eta) <= 0.5) * (pt > 1.0e2) * (0.03) + \
203 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1 && pt <= 5.0) * (0.03) + \
204 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 5.0 && pt <= 1.0e2) * (0.02) + \
205 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 1.0e2) * (0.04) + \
206 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 5.0) * (0.04) + \
207 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 5.0 && pt <= 1.0e2) * (0.035) + \
208 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2) * (0.05)}
209}
210
211##############
212# Track merger
213##############
214
215module Merger TrackMerger {
216# add InputArray InputArray
217 add InputArray ChargedHadronMomentumSmearing/chargedHadrons
218 add InputArray ElectronEnergySmearing/electrons
219 set OutputArray tracks
220}
221
222#############
223# Calorimeter
224#############
225
226module Calorimeter Calorimeter {
227 set ParticleInputArray ParticlePropagator/stableParticles
228 set TrackInputArray TrackMerger/tracks
229
230 set TowerOutputArray towers
231 set PhotonOutputArray photons
232
233 set EFlowTrackOutputArray eflowTracks
234 set EFlowTowerOutputArray eflowTowers
235
236 set pi [expr {acos(-1)}]
237
238 # lists of the edges of each tower in eta and phi
239 # each list starts with the lower edge of the first tower
240 # the list ends with the higher edged of the last tower
241
242 # 5 degrees towers
243 set PhiBins {}
244 for {set i -36} {$i <= 36} {incr i} {
245 add PhiBins [expr {$i * $pi/36.0}]
246 }
247 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} {
248 add EtaPhiBins $eta $PhiBins
249 }
250
251 # 10 degrees towers
252 set PhiBins {}
253 for {set i -18} {$i <= 18} {incr i} {
254 add PhiBins [expr {$i * $pi/18.0}]
255 }
256 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} {
257 add EtaPhiBins $eta $PhiBins
258 }
259
260 # 20 degrees towers
261 set PhiBins {}
262 for {set i -9} {$i <= 9} {incr i} {
263 add PhiBins [expr {$i * $pi/9.0}]
264 }
265 foreach eta {-5 -4.7 -4.525 4.7 5} {
266 add EtaPhiBins $eta $PhiBins
267 }
268
269 # default energy fractions {abs(PDG code)} {Fecal Fhcal}
270 add EnergyFraction {0} {0.0 1.0}
271 # energy fractions for e, gamma and pi0
272 add EnergyFraction {11} {1.0 0.0}
273 add EnergyFraction {22} {1.0 0.0}
274 add EnergyFraction {111} {1.0 0.0}
275 # energy fractions for muon, neutrinos and neutralinos
276 add EnergyFraction {12} {0.0 0.0}
277 add EnergyFraction {13} {0.0 0.0}
278 add EnergyFraction {14} {0.0 0.0}
279 add EnergyFraction {16} {0.0 0.0}
280 add EnergyFraction {1000022} {0.0 0.0}
281 add EnergyFraction {1000023} {0.0 0.0}
282 add EnergyFraction {1000025} {0.0 0.0}
283 add EnergyFraction {1000035} {0.0 0.0}
284 add EnergyFraction {1000045} {0.0 0.0}
285 # energy fractions for K0short and Lambda
286 add EnergyFraction {310} {0.3 0.7}
287 add EnergyFraction {3122} {0.3 0.7}
288
289 # set ECalResolutionFormula {resolution formula as a function of eta and energy}
290 set ECalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \
291 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)}
292
293 # set HCalResolutionFormula {resolution formula as a function of eta and energy}
294 set HCalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) + \
295 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.130^2 + energy*2.70^2)}
296}
297
298##########################
299# Track pile-up subtractor
300##########################
301
302module TrackPileUpSubtractor TrackPileUpSubtractor {
303# add InputArray InputArray OutputArray
304 add InputArray Calorimeter/eflowTracks eflowTracks
305 add InputArray ElectronEnergySmearing/electrons electrons
306 add InputArray MuonMomentumSmearing/muons muons
307
308 # assume perfect pile-up subtraction for tracks with |z| > fZVertexResolution
309 # Z vertex resolution in m
310 set ZVertexResolution 0.0001
311}
312
313####################
314# Energy flow merger
315####################
316
317module Merger EFlowMerger {
318# add InputArray InputArray
319 add InputArray TrackPileUpSubtractor/eflowTracks
320 add InputArray Calorimeter/eflowTowers
321 add InputArray MuonMomentumSmearing/muons
322 set OutputArray eflow
323}
324
325#############
326# Rho pile-up
327#############
328
329module FastJetFinder Rho {
330# set InputArray Calorimeter/towers
331 set InputArray EFlowMerger/eflow
332
333 set ComputeRho true
334 set RhoOutputArray rho
335
336 # area algorithm: 0 Do not compute area, 1 Active area explicit ghosts, 2 One ghost passive area, 3 Passive area, 4 Voronoi, 5 Active area
337 set AreaAlgorithm 5
338
339 # jet algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
340 set JetAlgorithm 4
341 set ParameterR 0.6
342 set GhostEtaMax 5.0
343 set RhoEtaMax 5.0
344
345 set JetPTMin 0.0
346}
347
348#####################
349# MC truth jet finder
350#####################
351
352module FastJetFinder GenJetFinder {
353 set InputArray Delphes/stableParticles
354
355 set OutputArray jets
356
357 # algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
358 set JetAlgorithm 6
359 set ParameterR 0.5
360
361 set JetPTMin 20.0
362}
363
364############
365# Jet finder
366############
367
368module FastJetFinder FastJetFinder {
369# set InputArray Calorimeter/towers
370 set InputArray EFlowMerger/eflow
371
372 set OutputArray jets
373
374 # area algorithm: 0 Do not compute area, 1 Active area explicit ghosts, 2 One ghost passive area, 3 Passive area, 4 Voronoi, 5 Active area
375 set AreaAlgorithm 5
376
377 # jet algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
378 set JetAlgorithm 6
379 set ParameterR 0.5
380
381 set JetPTMin 20.0
382}
383
384###########################
385# Jet Pile-Up Subtraction
386###########################
387
388module JetPileUpSubtractor JetPileUpSubtractor {
389 set JetInputArray FastJetFinder/jets
390 set RhoInputArray Rho/rho
391
392 set OutputArray jets
393
394 set JetPTMin 20.0
395}
396
397##################
398# Jet Energy Scale
399##################
400
401module EnergyScale JetEnergyScale {
402 set InputArray JetPileUpSubtractor/jets
403 set OutputArray jets
404
405 # scale formula for jets
406 set ScaleFormula {1.0}
407}
408
409###################
410# Photon efficiency
411###################
412
413module Efficiency PhotonEfficiency {
414 set InputArray Calorimeter/photons
415 set OutputArray photons
416
417 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
418
419 # efficiency formula for photons
420 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \
421 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \
422 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + \
423 (abs(eta) > 2.5) * (0.00)}
424}
425
426##################
427# Photon isolation
428##################
429
430module Isolation PhotonIsolation {
431 set CandidateInputArray PhotonEfficiency/photons
432 set IsolationInputArray EFlowMerger/eflow
433 set RhoInputArray Rho/rho
434
435 set OutputArray photons
436
437 set DeltaRMax 0.5
438
439 set PTMin 0.5
440
441 set PTRatioMax 0.1
442}
443
444#####################
445# Electron efficiency
446#####################
447
448module Efficiency ElectronEfficiency {
449 set InputArray TrackPileUpSubtractor/electrons
450 set OutputArray electrons
451
452 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
453
454 # efficiency formula for electrons
455 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \
456 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \
457 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + \
458 (abs(eta) > 2.5) * (0.00)}
459}
460
461####################
462# Electron isolation
463####################
464
465module Isolation ElectronIsolation {
466 set CandidateInputArray ElectronEfficiency/electrons
467 set IsolationInputArray EFlowMerger/eflow
468 set RhoInputArray Rho/rho
469
470 set OutputArray electrons
471
472 set DeltaRMax 0.5
473
474 set PTMin 0.5
475
476 set PTRatioMax 0.1
477}
478
479#################
480# Muon efficiency
481#################
482
483module Efficiency MuonEfficiency {
484 set InputArray TrackPileUpSubtractor/muons
485 set OutputArray muons
486
487 # set EfficiencyFormula {efficiency as a function of eta and pt}
488
489 # efficiency formula for muons
490 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \
491 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \
492 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0) * (0.85) + \
493 (abs(eta) > 2.4) * (0.00)}
494}
495
496################
497# Muon isolation
498################
499
500module Isolation MuonIsolation {
501 set CandidateInputArray MuonEfficiency/muons
502 set IsolationInputArray EFlowMerger/eflow
503 set RhoInputArray Rho/rho
504
505 set OutputArray muons
506
507 set DeltaRMax 0.5
508
509 set PTMin 0.5
510
511 set PTRatioMax 0.1
512}
513
514###################
515# Missing ET merger
516###################
517
518module Merger MissingET {
519# add InputArray InputArray
520 add InputArray EFlowMerger/eflow
521 set MomentumOutputArray momentum
522}
523
524##################
525# Scalar HT merger
526##################
527
528module Merger ScalarHT {
529# add InputArray InputArray
530 add InputArray UniqueObjectFinder/jets
531 add InputArray UniqueObjectFinder/electrons
532 add InputArray UniqueObjectFinder/photons
533 add InputArray UniqueObjectFinder/muons
534 set EnergyOutputArray energy
535}
536
537###########
538# b-tagging
539###########
540
541module BTagging BTagging {
542 set PartonInputArray Delphes/partons
543 set JetInputArray JetEnergyScale/jets
544
545 set BitNumber 0
546
547 set DeltaR 0.5
548
549 set PartonPTMin 1.0
550
551 set PartonEtaMax 2.5
552
553 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
554 # PDG code = the highest PDG code of a quark or gluon inside DeltaR cone around jet axis
555 # gluon's PDG code has the lowest priority
556
557 # https://twiki.cern.ch/twiki/bin/view/CMSPublic/PhysicsResultsBTV
558 # default efficiency formula (misidentification rate)
559 add EfficiencyFormula {0} {0.001}
560
561 # efficiency formula for c-jets (misidentification rate)
562 add EfficiencyFormula {4} { (pt <= 15.0) * (0.000) + \
563 (abs(eta) <= 1.2) * (pt > 15.0) * (0.2*tanh(pt*0.03 - 0.4)) + \
564 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.1*tanh(pt*0.03 - 0.4)) + \
565 (abs(eta) > 2.5) * (0.000)}
566
567 # efficiency formula for b-jets
568 add EfficiencyFormula {5} { (pt <= 15.0) * (0.000) + \
569 (abs(eta) <= 1.2) * (pt > 15.0) * (0.5*tanh(pt*0.03 - 0.4)) + \
570 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.4*tanh(pt*0.03 - 0.4)) + \
571 (abs(eta) > 2.5) * (0.000)}
572}
573
574module TauTagging TauTagging {
575 set ParticleInputArray Delphes/allParticles
576 set PartonInputArray Delphes/partons
577 set JetInputArray JetEnergyScale/jets
578
579 set DeltaR 0.5
580
581 set TauPTMin 1.0
582
583 set TauEtaMax 2.5
584
585 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
586
587 # default efficiency formula (misidentification rate)
588 add EfficiencyFormula {0} {0.001}
589 # efficiency formula for tau-jets
590 add EfficiencyFormula {15} {0.4}
591}
592
593#####################################################
594# Find uniquely identified photons/electrons/tau/jets
595#####################################################
596
597module UniqueObjectFinder UniqueObjectFinder {
598# earlier arrays take precedence over later ones
599# add InputArray InputArray OutputArray
600 add InputArray PhotonIsolation/photons photons
601 add InputArray ElectronIsolation/electrons electrons
602 add InputArray MuonIsolation/muons muons
603 add InputArray JetEnergyScale/jets jets
604}
605
606##################
607# ROOT tree writer
608##################
609
610module TreeWriter TreeWriter {
611# add Branch InputArray BranchName BranchClass
612 add Branch Delphes/allParticles Particle GenParticle
613 add Branch TrackMerger/tracks Track Track
614 add Branch Calorimeter/towers Tower Tower
615 add Branch Calorimeter/eflowTracks EFlowTrack Track
616 add Branch Calorimeter/eflowTowers EFlowTower Tower
617 add Branch MuonMomentumSmearing/muons EFlowMuon Muon
618 add Branch GenJetFinder/jets GenJet Jet
619 add Branch UniqueObjectFinder/jets Jet Jet
620 add Branch UniqueObjectFinder/electrons Electron Electron
621 add Branch UniqueObjectFinder/photons Photon Photon
622 add Branch UniqueObjectFinder/muons Muon Muon
623 add Branch MissingET/momentum MissingET MissingET
624 add Branch ScalarHT/energy ScalarHT ScalarHT
625 add Branch Rho/rho Rho Rho
626}
627
Note: See TracBrowser for help on using the repository browser.