PublicAnalysisDatabase: delphes_card_cms_b2g_14_004.tcl

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