Fork me on GitHub

source: git/examples/delphes_card_CMS_PileUp.tcl@ 41da326

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 41da326 was 71648c2, checked in by pavel <pavel@…>, 12 years ago

add Rho branch

  • Property mode set to 100644
File size: 20.2 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 ConstituentFilter
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 set ResolutionFormula { (abs(eta) <= 2.5) * (energy > 0.1 && energy <= 2.5e1) * (energy*0.015) + \
182 (abs(eta) <= 2.5) * (energy > 2.5e1) * sqrt(energy^2*0.005^2 + energy*0.05^2 + 0.25^2) + \
183 (abs(eta) > 2.5 && abs(eta) <= 3.0) * sqrt(energy^2*0.005^2 + energy*0.05^2 + 0.25^2) + \
184 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)}
185
186}
187
188###############################
189# Momentum resolution for muons
190###############################
191
192module MomentumSmearing MuonMomentumSmearing {
193 set InputArray MuonTrackingEfficiency/muons
194 set OutputArray muons
195
196 # set ResolutionFormula {resolution formula as a function of eta and pt}
197
198 # resolution formula for muons
199 set ResolutionFormula { (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.03) + \
200 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e1) * (0.02) + \
201 (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.03) + \
202 (abs(eta) <= 1.5) * (pt > 2.0e2) * (0.05) + \
203 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.04) + \
204 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e1) * (0.03) + \
205 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.04) + \
206 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2) * (0.05)}
207}
208
209##############
210# Track merger
211##############
212
213module Merger TrackMerger {
214# add InputArray InputArray
215 add InputArray ChargedHadronMomentumSmearing/chargedHadrons
216 add InputArray ElectronEnergySmearing/electrons
217 set OutputArray tracks
218}
219
220#############
221# Calorimeter
222#############
223
224module Calorimeter Calorimeter {
225 set ParticleInputArray ParticlePropagator/stableParticles
226 set TrackInputArray TrackMerger/tracks
227
228 set TowerOutputArray towers
229 set PhotonOutputArray photons
230
231 set EFlowTrackOutputArray eflowTracks
232 set EFlowTowerOutputArray eflowTowers
233
234 set pi [expr {acos(-1)}]
235
236 # lists of the edges of each tower in eta and phi
237 # each list starts with the lower edge of the first tower
238 # the list ends with the higher edged of the last tower
239
240 # 5 degrees towers
241 set PhiBins {}
242 for {set i -36} {$i <= 36} {incr i} {
243 add PhiBins [expr {$i * $pi/36.0}]
244 }
245 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} {
246 add EtaPhiBins $eta $PhiBins
247 }
248
249 # 10 degrees towers
250 set PhiBins {}
251 for {set i -18} {$i <= 18} {incr i} {
252 add PhiBins [expr {$i * $pi/18.0}]
253 }
254 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} {
255 add EtaPhiBins $eta $PhiBins
256 }
257
258 # 20 degrees towers
259 set PhiBins {}
260 for {set i -9} {$i <= 9} {incr i} {
261 add PhiBins [expr {$i * $pi/9.0}]
262 }
263 foreach eta {-5 -4.7 -4.525 4.7 5} {
264 add EtaPhiBins $eta $PhiBins
265 }
266
267 # default energy fractions {abs(PDG code)} {Fecal Fhcal}
268 add EnergyFraction {0} {0.0 1.0}
269 # energy fractions for e, gamma and pi0
270 add EnergyFraction {11} {1.0 0.0}
271 add EnergyFraction {22} {1.0 0.0}
272 add EnergyFraction {111} {1.0 0.0}
273 # energy fractions for muon, neutrinos and neutralinos
274 add EnergyFraction {12} {0.0 0.0}
275 add EnergyFraction {13} {0.0 0.0}
276 add EnergyFraction {14} {0.0 0.0}
277 add EnergyFraction {16} {0.0 0.0}
278 add EnergyFraction {1000022} {0.0 0.0}
279 add EnergyFraction {1000023} {0.0 0.0}
280 add EnergyFraction {1000025} {0.0 0.0}
281 add EnergyFraction {1000035} {0.0 0.0}
282 add EnergyFraction {1000045} {0.0 0.0}
283 # energy fractions for K0short and Lambda
284 add EnergyFraction {310} {0.3 0.7}
285 add EnergyFraction {3122} {0.3 0.7}
286
287 # set ECalResolutionFormula {resolution formula as a function of eta and energy}
288 set ECalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.005^2 + energy*0.05^2 + 0.25^2) + \
289 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)}
290
291 # set HCalResolutionFormula {resolution formula as a function of eta and energy}
292 set HCalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) + \
293 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.130^2 + energy*2.70^2)}
294}
295
296##########################
297# Track pile-up subtractor
298##########################
299
300module TrackPileUpSubtractor TrackPileUpSubtractor {
301# add InputArray InputArray OutputArray
302 add InputArray Calorimeter/eflowTracks eflowTracks
303 add InputArray ElectronEnergySmearing/electrons electrons
304 add InputArray MuonMomentumSmearing/muons muons
305
306 # assume perfect pile-up subtraction for tracks with |z| > fZVertexResolution
307 # Z vertex resolution in m
308 set ZVertexResolution 0.0001
309}
310
311####################
312# Energy flow merger
313####################
314
315module Merger EFlowMerger {
316# add InputArray InputArray
317 add InputArray TrackPileUpSubtractor/eflowTracks
318 add InputArray Calorimeter/eflowTowers
319 add InputArray MuonMomentumSmearing/muons
320 set OutputArray eflow
321}
322
323#############
324# Rho pile-up
325#############
326
327module FastJetFinder Rho {
328# set InputArray Calorimeter/towers
329 set InputArray EFlowMerger/eflow
330
331 set ComputeRho true
332 set RhoOutputArray rho
333
334 # 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
335 set AreaAlgorithm 5
336
337 # jet algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
338 set JetAlgorithm 4
339 set ParameterR 0.6
340 set GhostEtaMax 5.0
341 set RhoEtaMax 5.0
342
343 set JetPTMin 0.0
344}
345
346#####################
347# MC truth jet finder
348#####################
349
350module FastJetFinder GenJetFinder {
351 set InputArray Delphes/stableParticles
352
353 set OutputArray jets
354
355 # algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
356 set JetAlgorithm 6
357 set ParameterR 0.5
358
359 set JetPTMin 20.0
360}
361
362############
363# Jet finder
364############
365
366module FastJetFinder FastJetFinder {
367# set InputArray Calorimeter/towers
368 set InputArray EFlowMerger/eflow
369
370 set OutputArray jets
371
372 # 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
373 set AreaAlgorithm 5
374
375 # jet algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
376 set JetAlgorithm 6
377 set ParameterR 0.5
378
379 set JetPTMin 20.0
380}
381
382####################
383# Constituent filter
384####################
385
386module ConstituentFilter ConstituentFilter {
387
388# add JetInputArray InputArray
389 add JetInputArray GenJetFinder/jets
390 add JetInputArray FastJetFinder/jets
391
392# add ConstituentInputArray InputArray OutputArray
393 add ConstituentInputArray Delphes/stableParticles stableParticles
394 add ConstituentInputArray TrackPileUpSubtractor/eflowTracks eflowTracks
395 add ConstituentInputArray Calorimeter/eflowTowers eflowTowers
396 add ConstituentInputArray MuonMomentumSmearing/muons muons
397}
398
399###########################
400# Jet Pile-Up Subtraction
401###########################
402
403module JetPileUpSubtractor JetPileUpSubtractor {
404 set JetInputArray FastJetFinder/jets
405 set RhoInputArray Rho/rho
406
407 set OutputArray jets
408
409 set JetPTMin 20.0
410}
411
412###################
413# Photon efficiency
414###################
415
416module Efficiency PhotonEfficiency {
417 set InputArray Calorimeter/photons
418 set OutputArray photons
419
420 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
421
422 # efficiency formula for photons
423 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \
424 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \
425 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + \
426 (abs(eta) > 2.5) * (0.00)}
427}
428
429##################
430# Photon isolation
431##################
432
433module Isolation PhotonIsolation {
434 set CandidateInputArray PhotonEfficiency/photons
435 set IsolationInputArray EFlowMerger/eflow
436 set RhoInputArray Rho/rho
437
438 set OutputArray photons
439
440 set DeltaRMax 0.5
441
442 set PTMin 0.5
443
444 set PTRatioMax 0.1
445}
446
447#####################
448# Electron efficiency
449#####################
450
451module Efficiency ElectronEfficiency {
452 set InputArray TrackPileUpSubtractor/electrons
453 set OutputArray electrons
454
455 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
456
457 # efficiency formula for electrons
458 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \
459 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \
460 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + \
461 (abs(eta) > 2.5) * (0.00)}
462}
463
464####################
465# Electron isolation
466####################
467
468module Isolation ElectronIsolation {
469 set CandidateInputArray ElectronEfficiency/electrons
470 set IsolationInputArray EFlowMerger/eflow
471 set RhoInputArray Rho/rho
472
473 set OutputArray electrons
474
475 set DeltaRMax 0.5
476
477 set PTMin 0.5
478
479 set PTRatioMax 0.1
480}
481
482#################
483# Muon efficiency
484#################
485
486module Efficiency MuonEfficiency {
487 set InputArray TrackPileUpSubtractor/muons
488 set OutputArray muons
489
490 # set EfficiencyFormula {efficiency as a function of eta and pt}
491
492 # efficiency formula for muons
493 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \
494 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \
495 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0) * (0.85) + \
496 (abs(eta) > 2.4) * (0.00)}
497}
498
499################
500# Muon isolation
501################
502
503module Isolation MuonIsolation {
504 set CandidateInputArray MuonEfficiency/muons
505 set IsolationInputArray EFlowMerger/eflow
506 set RhoInputArray Rho/rho
507
508 set OutputArray muons
509
510 set DeltaRMax 0.5
511
512 set PTMin 0.5
513
514 set PTRatioMax 0.1
515}
516
517###################
518# Missing ET merger
519###################
520
521module Merger MissingET {
522# add InputArray InputArray
523 add InputArray EFlowMerger/eflow
524 set MomentumOutputArray momentum
525}
526
527##################
528# Scalar HT merger
529##################
530
531module Merger ScalarHT {
532# add InputArray InputArray
533 add InputArray UniqueObjectFinder/jets
534 add InputArray UniqueObjectFinder/electrons
535 add InputArray UniqueObjectFinder/photons
536 add InputArray MuonIsolation/muons
537 set EnergyOutputArray energy
538}
539
540
541###########
542# b-tagging
543###########
544
545module BTagging BTagging {
546 set PartonInputArray Delphes/partons
547 set JetInputArray FastJetFinder/jets
548
549 set BitNumber 0
550
551 set DeltaR 0.5
552
553 set PartonPTMin 1.0
554
555 set PartonEtaMax 2.5
556
557 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
558 # PDG code = the highest PDG code of a quark or gluon inside DeltaR cone around jet axis
559 # gluon's PDG code has the lowest priority
560
561 # https://twiki.cern.ch/twiki/bin/view/CMSPublic/PhysicsResultsBTV
562 # default efficiency formula (misidentification rate)
563 add EfficiencyFormula {0} {0.001}
564
565 # efficiency formula for c-jets (misidentification rate)
566 add EfficiencyFormula {4} { (pt <= 15.0) * (0.000) + \
567 (abs(eta) <= 1.2) * (pt > 15.0) * (0.2*tanh(pt*0.03 - 0.4)) + \
568 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.1*tanh(pt*0.03 - 0.4)) + \
569 (abs(eta) > 2.5) * (0.000)}
570
571 # efficiency formula for b-jets
572 add EfficiencyFormula {5} { (pt <= 15.0) * (0.000) + \
573 (abs(eta) <= 1.2) * (pt > 15.0) * (0.5*tanh(pt*0.03 - 0.4)) + \
574 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.4*tanh(pt*0.03 - 0.4)) + \
575 (abs(eta) > 2.5) * (0.000)}
576}
577
578module TauTagging TauTagging {
579 set ParticleInputArray Delphes/allParticles
580 set PartonInputArray Delphes/partons
581 set JetInputArray FastJetFinder/jets
582
583 set DeltaR 0.5
584
585 set TauPTMin 1.0
586
587 set TauEtaMax 2.5
588
589 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
590
591 # default efficiency formula (misidentification rate)
592 add EfficiencyFormula {0} {0.001}
593 # efficiency formula for tau-jets
594 add EfficiencyFormula {15} {0.4}
595}
596
597#####################################################
598# Find uniquely identified photons/electrons/tau/jets
599#####################################################
600
601module UniqueObjectFinder UniqueObjectFinder {
602# earlier arrays take precedence over later ones
603# add InputArray InputArray OutputArray
604 add InputArray PhotonIsolation/photons photons
605 add InputArray ElectronIsolation/electrons electrons
606 add InputArray JetPileUpSubtractor/jets jets
607}
608
609##################
610# ROOT tree writer
611##################
612
613module TreeWriter TreeWriter {
614# add Branch InputArray BranchName BranchClass
615 add Branch Delphes/allParticles Particle GenParticle
616 add Branch TrackMerger/tracks Track Track
617 add Branch Calorimeter/towers Tower Tower
618 add Branch ConstituentFilter/eflowTracks EFlowTrack Track
619 add Branch ConstituentFilter/eflowTowers EFlowTower Tower
620 add Branch ConstituentFilter/muons EFlowMuon Muon
621 add Branch GenJetFinder/jets GenJet Jet
622 add Branch UniqueObjectFinder/jets Jet Jet
623 add Branch UniqueObjectFinder/electrons Electron Electron
624 add Branch UniqueObjectFinder/photons Photon Photon
625 add Branch MuonIsolation/muons Muon Muon
626 add Branch MissingET/momentum MissingET MissingET
627 add Branch ScalarHT/energy ScalarHT ScalarHT
628 add Branch Rho/rho Rho Rho
629}
630
Note: See TracBrowser for help on using the repository browser.