Fork me on GitHub

source: svn/trunk/examples/delphes_card_CMS_NoVFC.tcl@ 1156

Last change on this file since 1156 was 1099, checked in by Pavel Demin, 12 years ago

define BTag and TauTag as UInt_t and use them as a set of bits

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