Fork me on GitHub

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

Last change on this file since 1397 was 1397, checked in by mselvaggi, 6 years ago

added Set RandomSeed? 0 to all data cards

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