MA5SandBox: delphesMA5tune_card_CMS_SUSY.tcl

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