Fork me on GitHub

source: git/cards/CMS_PhaseII/CMS_PhaseII_200PU.tcl@ 6e91f77

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 6e91f77 was 72e0320, checked in by Michele Selvaggi <michele.selvaggi@…>, 9 years ago

set back correct path for pileup file

  • Property mode set to 100644
File size: 26.6 KB
Line 
1#
2# Phase II - Pile-Up
3#
4# Main authors: Michele Selvaggi (UCL)
5#
6# Released on:
7#
8# Version: v01
9#
10#
11#######################################
12# Order of execution of various modules
13#######################################
14
15set ExecutionPath {
16
17 PileUpMerger
18
19 ParticlePropagator
20
21 ChargedHadronTrackingEfficiency
22 ElectronTrackingEfficiency
23 MuonTrackingEfficiency
24
25 ChargedHadronMomentumSmearing
26 ElectronMomentumSmearing
27 MuonMomentumSmearing
28
29 TrackMerger
30
31 ECal
32 HCal
33
34 ElectronFilter
35 TrackPileUpSubtractor
36
37 TowerMerger
38 NeutralEFlowMerger
39 EFlowMergerAllTracks
40 EFlowMerger
41
42 RunPUPPI
43
44 PhotonIsolation
45 PhotonEfficiency
46
47 ElectronIsolation
48 ElectronEfficiency
49
50 MuonIsolation
51 MuonLooseIdEfficiency
52 MuonTightIdEfficiency
53
54 NeutrinoFilter
55
56 MissingET
57 GenMissingET
58 GenPileUpMissingET
59
60 GenJetFinder
61 FastJetFinder
62
63 ScalarHT
64
65 JetEnergyScale
66
67 JetFlavorAssociation
68
69 BTaggingLoose
70 BTaggingMedium
71 BTaggingTight
72
73 TauTagging
74
75 GenParticleFilter
76
77 TreeWriter
78}
79
80
81
82###############
83# PileUp Merger
84###############
85
86module PileUpMerger PileUpMerger {
87 set InputArray Delphes/stableParticles
88
89 set ParticleOutputArray stableParticles
90 set VertexOutputArray vertices
91
92 # pre-generated minbias input file
93 set PileUpFile ../eos/cms/store/group/upgrade/delphes/PhaseII/MinBias_100k.pileup
94
95 # average expected pile up
96 set MeanPileUp 200
97
98 # maximum spread in the beam direction in m
99 set ZVertexSpread 0.15
100
101 # maximum spread in time in s
102 set TVertexSpread 1.5E-09
103
104 # vertex smearing formula f(z,t) (z,t need to be respectively given in m,s)
105
106 #set VertexDistributionFormula {exp(-(t^2/(2*(0.05/2.99792458E8*exp(-(z^2/(2*(0.05)^2))))^2)))}
107
108
109 set VertexDistributionFormula { (abs(t) <= 1.0e-09) * (abs(z) <= 0.15) * (1.00) +
110 (abs(t) > 1.0e-09) * (abs(z) <= 0.15) * (0.00) +
111 (abs(t) <= 1.0e-09) * (abs(z) > 0.15) * (0.00) +
112 (abs(t) > 1.0e-09) * (abs(z) > 0.15) * (0.00)}
113
114}
115
116
117#################################
118# Propagate particles in cylinder
119#################################
120
121module ParticlePropagator ParticlePropagator {
122 set InputArray PileUpMerger/stableParticles
123
124 set OutputArray stableParticles
125 set ChargedHadronOutputArray chargedHadrons
126 set ElectronOutputArray electrons
127 set MuonOutputArray muons
128
129 # radius of the magnetic field coverage, in m
130 set Radius 1.29
131 # half-length of the magnetic field coverage, in m
132 set HalfLength 3.0
133
134 # magnetic field
135 set Bz 3.8
136}
137
138
139####################################
140# Charged hadron tracking efficiency
141####################################
142
143module Efficiency ChargedHadronTrackingEfficiency {
144 ## particles after propagation
145 set InputArray ParticlePropagator/chargedHadrons
146 set OutputArray chargedHadrons
147 # tracking efficiency formula for charged hadrons
148 set EfficiencyFormula {
149 (pt <= 0.2) * (0.00) + \
150 (abs(eta) <= 1.2) * (pt > 0.2 && pt <= 1.0) * (pt * 0.96) + \
151 (abs(eta) <= 1.2) * (pt > 1.0) * (0.97) + \
152 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 0.2 && pt <= 1.0) * (pt*0.85) + \
153 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 1.0) * (0.87) + \
154 (abs(eta) > 2.5 && abs(eta) <= 4.0) * (pt > 0.2 && pt <= 1.0) * (pt*0.8) + \
155 (abs(eta) > 2.5 && abs(eta) <= 4.0) * (pt > 1.0) * (0.82) + \
156 (abs(eta) > 4.0) * (0.00)
157 }
158}
159
160
161#####################################
162# Electron tracking efficiency - ID
163####################################
164
165module Efficiency ElectronTrackingEfficiency {
166 set InputArray ParticlePropagator/electrons
167 set OutputArray electrons
168 # tracking efficiency formula for electrons
169 set EfficiencyFormula {
170 (pt <= 0.2) * (0.00) + \
171 (abs(eta) <= 1.2) * (pt > 0.2 && pt <= 1.0) * (pt * 0.96) + \
172 (abs(eta) <= 1.2) * (pt > 1.0) * (0.97) + \
173 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 0.2 && pt <= 1.0) * (pt*0.85) + \
174 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 10.0) * (0.82+pt*0.01) + \
175 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 10.0) * (0.90) + \
176 (abs(eta) > 2.5 && abs(eta) <= 4.0) * (pt > 0.2 && pt <= 1.0) * (pt*0.8) + \
177 (abs(eta) > 2.5 && abs(eta) <= 4.0) * (pt > 1.0 && pt <= 10.0) * (0.8+pt*0.01) + \
178 (abs(eta) > 2.5 && abs(eta) <= 4.0) * (pt > 10.0) * (0.85) + \
179 (abs(eta) > 4.0) * (0.00)
180
181 }
182}
183
184##########################
185# Muon tracking efficiency
186##########################
187
188module Efficiency MuonTrackingEfficiency {
189 set InputArray ParticlePropagator/muons
190 set OutputArray muons
191 # tracking efficiency formula for muons
192 set EfficiencyFormula {
193 (pt <= 0.2) * (0.00) + \
194 (abs(eta) <= 1.2) * (pt > 0.2 && pt <= 1.0) * (pt * 1.00) + \
195 (abs(eta) <= 1.2) * (pt > 1.0) * (1.00) + \
196 (abs(eta) > 1.2 && abs(eta) <= 2.8) * (pt > 0.2 && pt <= 1.0) * (pt*1.00) + \
197 (abs(eta) > 1.2 && abs(eta) <= 2.8) * (pt > 1.0) * (1.00) + \
198 (abs(eta) > 2.8 && abs(eta) <= 4.0) * (pt > 0.2 && pt <= 1.0) * (pt*0.95) + \
199 (abs(eta) > 2.8 && abs(eta) <= 4.0) * (pt > 1.0) * (0.95) + \
200 (abs(eta) > 4.0) * (0.00)
201
202 }
203}
204
205
206########################################
207# Momentum resolution for charged tracks
208########################################
209
210module MomentumSmearing ChargedHadronMomentumSmearing {
211 ## hadrons after having applied the tracking efficiency
212 set InputArray ChargedHadronTrackingEfficiency/chargedHadrons
213 set OutputArray chargedHadrons
214 # resolution formula for charged hadrons ,
215
216 # from http://mersi.web.cern.ch/mersi/layouts/.private/Baseline_tilted_200_Pixel_1_1_1/index.html
217 source trackMomentumResolution.tcl
218}
219
220########################################
221# Momentum resolution for electrons
222########################################
223
224module MomentumSmearing ElectronMomentumSmearing {
225 ## hadrons after having applied the tracking efficiency
226 set InputArray ElectronTrackingEfficiency/electrons
227 set OutputArray electrons
228 # resolution formula for electrons
229 # from http://mersi.web.cern.ch/mersi/layouts/.private/Baseline_tilted_200_Pixel_1_1_1/index.html
230 source trackMomentumResolution.tcl
231
232}
233
234
235###############################
236# Momentum resolution for muons
237###############################
238
239module MomentumSmearing MuonMomentumSmearing {
240 set InputArray MuonTrackingEfficiency/muons
241 set OutputArray muons
242 # resolution formula for muons
243
244 # up to |eta| < 2.8 take measurement from tracking + muon chambers
245 # for |eta| > 2.8 and pT < 5.0 take measurement from tracking alone taken from
246 # http://mersi.web.cern.ch/mersi/layouts/.private/Baseline_tilted_200_Pixel_1_1_1/index.html
247 source muonMomentumResolution.tcl
248}
249
250
251
252
253##############
254# Track merger
255##############
256
257module Merger TrackMerger {
258# add InputArray InputArray
259 add InputArray ChargedHadronMomentumSmearing/chargedHadrons
260 add InputArray ElectronMomentumSmearing/electrons
261 add InputArray MuonMomentumSmearing/muons
262 set OutputArray tracks
263}
264
265#############
266# ECAL
267#############
268
269module SimpleCalorimeter ECal {
270 set ParticleInputArray ParticlePropagator/stableParticles
271 set TrackInputArray TrackMerger/tracks
272
273 set TowerOutputArray ecalTowers
274 set EFlowTrackOutputArray eflowTracks
275 set EFlowTowerOutputArray eflowPhotons
276
277 set IsEcal true
278
279 set EnergyMin 0.5
280 set EnergySignificanceMin 1.0
281
282 set SmearTowerCenter true
283
284 set pi [expr {acos(-1)}]
285
286 # lists of the edges of each tower in eta and phi
287 # each list starts with the lower edge of the first tower
288 # the list ends with the higher edged of the last tower
289
290 # assume 0.02 x 0.02 resolution in eta,phi in the barrel |eta| < 1.5
291
292 set PhiBins {}
293 for {set i -180} {$i <= 180} {incr i} {
294 add PhiBins [expr {$i * $pi/180.0}]
295 }
296
297 # 0.02 unit in eta up to eta = 1.5 (barrel)
298 for {set i -85} {$i <= 86} {incr i} {
299 set eta [expr {$i * 0.0174}]
300 add EtaPhiBins $eta $PhiBins
301 }
302
303 # assume 0.02 x 0.02 resolution in eta,phi in the endcaps 1.5 < |eta| < 3.0 (HGCAL- ECAL)
304
305 set PhiBins {}
306 for {set i -180} {$i <= 180} {incr i} {
307 add PhiBins [expr {$i * $pi/180.0}]
308 }
309
310 # 0.02 unit in eta up to eta = 3
311 for {set i 1} {$i <= 84} {incr i} {
312 set eta [expr { -2.958 + $i * 0.0174}]
313 add EtaPhiBins $eta $PhiBins
314 }
315
316 for {set i 1} {$i <= 84} {incr i} {
317 set eta [expr { 1.4964 + $i * 0.0174}]
318 add EtaPhiBins $eta $PhiBins
319 }
320
321 # take present CMS granularity for HF
322
323 # 0.175 x (0.175 - 0.35) resolution in eta,phi in the HF 3.0 < |eta| < 5.0
324 set PhiBins {}
325 for {set i -18} {$i <= 18} {incr i} {
326 add PhiBins [expr {$i * $pi/18.0}]
327 }
328
329 foreach eta {-5 -4.7 -4.525 -4.35 -4.175 -4 -3.825 -3.65 -3.475 -3.3 -3.125 -2.958 3.125 3.3 3.475 3.65 3.825 4 4.175 4.35 4.525 4.7 5} {
330 add EtaPhiBins $eta $PhiBins
331 }
332
333
334 add EnergyFraction {0} {0.0}
335 # energy fractions for e, gamma and pi0
336 add EnergyFraction {11} {1.0}
337 add EnergyFraction {22} {1.0}
338 add EnergyFraction {111} {1.0}
339 # energy fractions for muon, neutrinos and neutralinos
340 add EnergyFraction {12} {0.0}
341 add EnergyFraction {13} {0.0}
342 add EnergyFraction {14} {0.0}
343 add EnergyFraction {16} {0.0}
344 add EnergyFraction {1000022} {0.0}
345 add EnergyFraction {1000023} {0.0}
346 add EnergyFraction {1000025} {0.0}
347 add EnergyFraction {1000035} {0.0}
348 add EnergyFraction {1000045} {0.0}
349 # energy fractions for K0short and Lambda
350 add EnergyFraction {310} {0.3}
351 add EnergyFraction {3122} {0.3}
352
353 # set ResolutionFormula {resolution formula as a function of eta and energy}
354
355 # for the ECAL barrel (|eta| < 1.5), see hep-ex/1306.2016.
356 # for the endcaps (1.5 < |eta| < 3.0), we take HGCAL see LHCC-P-008, Fig. 3.39, p.117
357
358 set ResolutionFormula { (abs(eta) <= 1.50) * sqrt(energy^2*0.005^2 + energy*0.027^2 + 0.15^2) + \
359 (abs(eta) > 1.50 && abs(eta) <= 1.75) * sqrt(energy^2*0.006^2 + energy*0.20^2) + \
360 (abs(eta) > 1.75 && abs(eta) <= 2.15) * sqrt(energy^2*0.007^2 + energy*0.21^2) + \
361 (abs(eta) > 2.15 && abs(eta) <= 3.00) * sqrt(energy^2*0.008^2 + energy*0.24^2) + \
362 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.08^2 + energy*1.98^2)}
363
364}
365
366#############
367# HCAL
368#############
369
370module SimpleCalorimeter HCal {
371 set ParticleInputArray ParticlePropagator/stableParticles
372 set TrackInputArray ECal/eflowTracks
373
374 set TowerOutputArray hcalTowers
375 set EFlowTrackOutputArray eflowTracks
376 set EFlowTowerOutputArray eflowNeutralHadrons
377
378 set IsEcal false
379
380 set EnergyMin 1.0
381 set EnergySignificanceMin 1.0
382
383 set SmearTowerCenter true
384
385 set pi [expr {acos(-1)}]
386
387 # lists of the edges of each tower in eta and phi
388 # each list starts with the lower edge of the first tower
389 # the list ends with the higher edged of the last tower
390
391 # assume 0.087 x 0.087 resolution in eta,phi in the barrel |eta| < 1.5
392
393 set PhiBins {}
394 for {set i -36} {$i <= 36} {incr i} {
395 add PhiBins [expr {$i * $pi/36.0}]
396 }
397 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.65} {
398 add EtaPhiBins $eta $PhiBins
399 }
400
401 # assume 0.02 x 0.02 resolution in eta,phi in the endcaps 1.5 < |eta| < 3.0 (HGCAL- HCAL)
402
403 set PhiBins {}
404 for {set i -180} {$i <= 180} {incr i} {
405 add PhiBins [expr {$i * $pi/180.0}]
406 }
407
408 # 0.02 unit in eta up to eta = 3
409 for {set i 1} {$i <= 84} {incr i} {
410 set eta [expr { -2.958 + $i * 0.0174}]
411 add EtaPhiBins $eta $PhiBins
412 }
413
414 for {set i 1} {$i <= 84} {incr i} {
415 set eta [expr { 1.4964 + $i * 0.0174}]
416 add EtaPhiBins $eta $PhiBins
417 }
418
419 # take present CMS granularity for HF
420
421 # 0.175 x (0.175 - 0.35) resolution in eta,phi in the HF 3.0 < |eta| < 5.0
422 set PhiBins {}
423 for {set i -18} {$i <= 18} {incr i} {
424 add PhiBins [expr {$i * $pi/18.0}]
425 }
426
427 foreach eta {-5 -4.7 -4.525 -4.35 -4.175 -4 -3.825 -3.65 -3.475 -3.3 -3.125 -2.958 3.125 3.3 3.475 3.65 3.825 4 4.175 4.35 4.525 4.7 5} {
428 add EtaPhiBins $eta $PhiBins
429 }
430
431
432 # default energy fractions {abs(PDG code)} {Fecal Fhcal}
433 add EnergyFraction {0} {1.0}
434 # energy fractions for e, gamma and pi0
435 add EnergyFraction {11} {0.0}
436 add EnergyFraction {22} {0.0}
437 add EnergyFraction {111} {0.0}
438 # energy fractions for muon, neutrinos and neutralinos
439 add EnergyFraction {12} {0.0}
440 add EnergyFraction {13} {0.0}
441 add EnergyFraction {14} {0.0}
442 add EnergyFraction {16} {0.0}
443 add EnergyFraction {1000022} {0.0}
444 add EnergyFraction {1000023} {0.0}
445 add EnergyFraction {1000025} {0.0}
446 add EnergyFraction {1000035} {0.0}
447 add EnergyFraction {1000045} {0.0}
448 # energy fractions for K0short and Lambda
449 add EnergyFraction {310} {0.7}
450 add EnergyFraction {3122} {0.7}
451
452# set ResolutionFormula {resolution formula as a function of eta and energy}
453 set ResolutionFormula { (abs(eta) <= 1.5) * sqrt(energy^2*0.05^2 + energy*1.00^2) + \
454 (abs(eta) > 1.5 && abs(eta) <= 3.0) * sqrt(energy^2*0.05^2 + energy*1.00^2) + \
455 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.11^2 + energy*2.80^2)}
456
457}
458
459#################
460# Electron filter
461#################
462
463module PdgCodeFilter ElectronFilter {
464 set InputArray HCal/eflowTracks
465 set OutputArray electrons
466 set Invert true
467 add PdgCode {11}
468 add PdgCode {-11}
469}
470
471##########################
472# Track pile-up subtractor
473##########################
474
475module TrackPileUpSubtractor TrackPileUpSubtractor {
476# add InputArray InputArray OutputArray
477 add InputArray HCal/eflowTracks eflowTracks
478 add InputArray ElectronFilter/electrons electrons
479 add InputArray MuonMomentumSmearing/muons muons
480
481 set VertexInputArray PileUpMerger/vertices
482 # assume perfect pile-up subtraction for tracks with |z| > fZVertexResolution
483 # Z vertex resolution in m
484 set ZVertexResolution 0.0001
485}
486
487
488###################################################
489# Tower Merger (in case not using e-flow algorithm)
490###################################################
491
492module Merger TowerMerger {
493# add InputArray InputArray
494 add InputArray ECal/ecalTowers
495 add InputArray HCal/hcalTowers
496 set OutputArray towers
497}
498
499
500####################
501# Neutral eflow erger
502####################
503
504module Merger NeutralEFlowMerger {
505# add InputArray InputArray
506 add InputArray ECal/eflowPhotons
507 add InputArray HCal/eflowNeutralHadrons
508 set OutputArray eflowTowers
509}
510
511
512####################
513# Energy flow merger
514####################
515
516module Merger EFlowMerger {
517# add InputArray InputArray
518 add InputArray HCal/eflowTracks
519 add InputArray ECal/eflowPhotons
520 add InputArray HCal/eflowNeutralHadrons
521 set OutputArray eflow
522}
523
524##################################
525# Energy flow merger (all tracks)
526##################################
527
528module Merger EFlowMergerAllTracks {
529# add InputArray InputArray
530 add InputArray TrackMerger/tracks
531 add InputArray ECal/eflowPhotons
532 add InputArray HCal/eflowNeutralHadrons
533 set OutputArray eflow
534}
535
536#########################################
537### Run the puppi code (to be tuned) ###
538#########################################
539
540module RunPUPPI RunPUPPI {
541 ## input information
542 set TrackInputArray TrackMerger/tracks
543 set NeutralInputArray NeutralEFlowMerger/eflowTowers
544 set PVInputArray PileUpMerger/vertices
545 set MinPuppiWeight 0.05
546 set UseExp false
547
548 ## define puppi algorithm parameters (more than one for the same eta region is possible)
549 add EtaMinBin 0. 2.5 2.5 3.0 3.0
550 add EtaMaxBin 2.5 3.0 3.0 10.0 10.0
551 add PtMinBin 0. 0.5 0.5 0.5 0.5
552 add ConeSizeBin 0.25 0.25 0.25 0.25 0.25
553 add RMSPtMinBin 0.1 0.5 0.5 0.5 0.5
554 add RMSScaleFactorBin 1.0 1.0 1.0 1.0 1.0
555 add NeutralMinEBin 0.2 1.0 1.0 1.5 1.5
556 add NeutralPtSlope 0.02 0.02 0.02 0.02 0.02
557 add ApplyCHS true true true true true
558 add UseCharged true false false false false
559 add ApplyLowPUCorr true true true true true
560 add MetricId 5 5 1 5 1
561
562 ## output name
563 set OutputArray PuppiParticles
564 set OutputArrayTracks puppiTracks
565 set OutputArrayNeutrals puppiNeutrals
566}
567
568
569
570###################
571# Missing ET merger
572###################
573
574module Merger MissingET {
575# add InputArray InputArray
576# add InputArray RunPUPPI/PuppiParticles
577 add InputArray EFlowMerger/eflow
578 set MomentumOutputArray momentum
579}
580
581###################
582# Ger PileUp Missing ET
583###################
584
585module Merger GenPileUpMissingET {
586# add InputArray InputArray
587# add InputArray RunPUPPI/PuppiParticles
588 add InputArray ParticlePropagator/stableParticles
589 set MomentumOutputArray momentum
590}
591
592##################
593# Scalar HT merger
594##################
595
596module Merger ScalarHT {
597# add InputArray InputArray
598 add InputArray RunPUPPI/PuppiParticles
599 set EnergyOutputArray energy
600}
601
602#################
603# Neutrino Filter
604#################
605
606module PdgCodeFilter NeutrinoFilter {
607
608 set InputArray Delphes/stableParticles
609 set OutputArray filteredParticles
610
611 set PTMin 0.0
612
613 add PdgCode {12}
614 add PdgCode {14}
615 add PdgCode {16}
616 add PdgCode {-12}
617 add PdgCode {-14}
618 add PdgCode {-16}
619
620}
621
622
623#####################
624# MC truth jet finder
625#####################
626
627module FastJetFinder GenJetFinder {
628 set InputArray NeutrinoFilter/filteredParticles
629
630 set OutputArray jets
631
632 # algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
633 set JetAlgorithm 6
634 set ParameterR 0.4
635
636 set JetPTMin 15.0
637}
638
639#########################
640# Gen Missing ET merger
641########################
642
643module Merger GenMissingET {
644
645# add InputArray InputArray
646 add InputArray NeutrinoFilter/filteredParticles
647 set MomentumOutputArray momentum
648}
649
650
651
652############
653# Jet finder
654############
655
656module FastJetFinder FastJetFinder {
657# set InputArray TowerMerger/towers
658 set InputArray RunPUPPI/PuppiParticles
659
660 set OutputArray jets
661
662 # algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
663 set JetAlgorithm 6
664 set ParameterR 0.4
665
666 set JetPTMin 15.0
667}
668
669##################
670# Jet Energy Scale
671##################
672
673module EnergyScale JetEnergyScale {
674 set InputArray FastJetFinder/jets
675 set OutputArray jets
676
677 # scale formula for jets
678 set ScaleFormula {1.00}
679}
680
681
682####################
683# Photon isolation #
684####################
685
686module Isolation PhotonIsolation {
687
688 # particle for which calculate the isolation
689 set CandidateInputArray ECal/eflowPhotons
690
691 # isolation collection
692 set IsolationInputArray EFlowMerger/eflow
693
694 # output array
695 set OutputArray photons
696
697 # isolation cone
698 set DeltaRMax 0.3
699
700 # minimum pT
701 set PTMin 1.0
702
703 # iso ratio to cut
704 set PTRatioMax 9999.
705}
706
707
708
709#####################
710# Photon efficiency #
711#####################
712
713module Efficiency PhotonEfficiency {
714
715 ## input particles
716 set InputArray PhotonIsolation/photons
717 ## output particles
718 set OutputArray photons
719 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
720 # efficiency formula for photons
721 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \
722 (abs(eta) <= 1.5) * (pt > 10.0) * (0.9635) + \
723 (abs(eta) > 1.5 && abs(eta) <= 4.0) * (pt > 10.0) * (0.9624) + \
724 (abs(eta) > 4.0) * (0.00)}
725
726}
727
728
729######################
730# Electron isolation #
731######################
732
733module Isolation ElectronIsolation {
734
735 set CandidateInputArray ElectronFilter/electrons
736
737 # isolation collection
738 set IsolationInputArray EFlowMerger/eflow
739
740 set OutputArray electrons
741
742 set DeltaRMax 0.3
743 set PTMin 1.0
744 set PTRatioMax 9999.
745
746}
747
748
749
750#######################
751# Electron efficiency #
752#######################
753
754module Efficiency ElectronEfficiency {
755
756 set InputArray ElectronIsolation/electrons
757 set OutputArray electrons
758
759 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
760 # efficiency formula for electrons
761 set EfficiencyFormula {
762 (pt <= 4.0) * (0.00) + \
763 (abs(eta) <= 1.45 ) * (pt > 4.0 && pt <= 6.0) * (0.50) + \
764 (abs(eta) <= 1.45 ) * (pt > 6.0 && pt <= 8.0) * (0.70) + \
765 (abs(eta) <= 1.45 ) * (pt > 8.0 && pt <= 10.0) * (0.85) + \
766 (abs(eta) <= 1.45 ) * (pt > 10.0 && pt <= 30.0) * (0.94) + \
767 (abs(eta) <= 1.45 ) * (pt > 30.0 && pt <= 50.0) * (0.97) + \
768 (abs(eta) <= 1.45 ) * (pt > 50.0 && pt <= 70.0) * (0.98) + \
769 (abs(eta) <= 1.45 ) * (pt > 70.0 ) * (1.0) + \
770 (abs(eta) > 1.45 && abs(eta) <= 1.55) * (pt > 4.0 && pt <= 10.0) * (0.35) + \
771 (abs(eta) > 1.45 && abs(eta) <= 1.55) * (pt > 10.0 && pt <= 30.0) * (0.40) + \
772 (abs(eta) > 1.45 && abs(eta) <= 1.55) * (pt > 30.0 && pt <= 70.0) * (0.45) + \
773 (abs(eta) > 1.45 && abs(eta) <= 1.55) * (pt > 70.0 ) * (0.55) + \
774 (abs(eta) >= 1.55 && abs(eta) <= 2.0 ) * (pt > 4.0 && pt <= 10.0) * (0.75) + \
775 (abs(eta) >= 1.55 && abs(eta) <= 2.0 ) * (pt > 10.0 && pt <= 30.0) * (0.85) + \
776 (abs(eta) >= 1.55 && abs(eta) <= 2.0 ) * (pt > 30.0 && pt <= 50.0) * (0.95) + \
777 (abs(eta) >= 1.55 && abs(eta) <= 2.0 ) * (pt > 50.0 && pt <= 70.0) * (0.95) + \
778 (abs(eta) >= 1.55 && abs(eta) <= 2.0 ) * (pt > 70.0 ) * (1.0) + \
779 (abs(eta) >= 2.0 && abs(eta) <= 2.5 ) * (pt > 4.0 && pt <= 10.0) * (0.65) + \
780 (abs(eta) >= 2.0 && abs(eta) <= 2.5 ) * (pt > 10.0 && pt <= 30.0) * (0.75) + \
781 (abs(eta) >= 2.0 && abs(eta) <= 2.5 ) * (pt > 30.0 && pt <= 50.0) * (0.90) + \
782 (abs(eta) >= 2.0 && abs(eta) <= 2.5 ) * (pt > 50.0 && pt <= 70.0) * (0.90) + \
783 (abs(eta) >= 2.0 && abs(eta) <= 2.5 ) * (pt > 70.0 ) * (0.90) + \
784 (abs(eta) > 2.5 && abs(eta) <= 4.0 ) * (pt > 4.0 && pt <= 10.0) * (0.65) + \
785 (abs(eta) > 2.5 && abs(eta) <= 4.0 ) * (pt > 10.0 && pt <= 30.0) * (0.75) + \
786 (abs(eta) > 2.5 && abs(eta) <= 4.0 ) * (pt > 30.0 && pt <= 50.0) * (0.90) + \
787 (abs(eta) > 2.5 && abs(eta) <= 4.0 ) * (pt > 50.0 && pt <= 70.0) * (0.90) + \
788 (abs(eta) > 2.5 && abs(eta) <= 4.0 ) * (pt > 70.0 ) * (0.90) + \
789 (abs(eta) > 4.0) * (0.00)
790
791 }
792}
793
794##################
795# Muon isolation #
796##################
797
798module Isolation MuonIsolation {
799 set CandidateInputArray MuonMomentumSmearing/muons
800
801 # isolation collection
802 set IsolationInputArray EFlowMerger/eflow
803
804 set OutputArray muons
805
806 set DeltaRMax 0.3
807 set PTMin 1.0
808 set PTRatioMax 9999.
809
810}
811
812
813##################
814# Muon Loose Id #
815##################
816
817module Efficiency MuonLooseIdEfficiency {
818 set InputArray MuonIsolation/muons
819 set OutputArray muons
820 # tracking + LooseID efficiency formula for muons
821 source muonLooseId.tcl
822
823}
824
825
826##################
827# Muon Tight Id #
828##################
829
830module Efficiency MuonTightIdEfficiency {
831 set InputArray MuonIsolation/muons
832 set OutputArray muons
833 # tracking + TightID efficiency formula for muons
834 source muonTightId.tcl
835}
836
837
838
839########################
840# Jet Flavor Association
841########################
842
843module JetFlavorAssociation JetFlavorAssociation {
844
845 set PartonInputArray Delphes/partons
846 set ParticleInputArray Delphes/allParticles
847 set ParticleLHEFInputArray Delphes/allParticlesLHEF
848 set JetInputArray JetEnergyScale/jets
849
850 set DeltaR 0.5
851 set PartonPTMin 10.0
852 set PartonEtaMax 4.0
853
854}
855
856
857#############
858# b-tagging #
859#############
860module BTagging BTaggingLoose {
861
862 set JetInputArray JetEnergyScale/jets
863
864 set BitNumber 0
865
866 source btagLoose.tcl
867}
868
869
870#############
871# b-tagging #
872#############
873module BTagging BTaggingMedium {
874
875 set JetInputArray JetEnergyScale/jets
876
877 set BitNumber 1
878
879 source btagMedium.tcl
880}
881
882
883
884#############
885# b-tagging #
886#############
887module BTagging BTaggingTight {
888
889 set JetInputArray JetEnergyScale/jets
890
891 set BitNumber 2
892
893 source btagTight.tcl
894}
895
896
897
898
899
900#############
901# tau-tagging
902#############
903
904
905module TauTagging TauTagging {
906 set ParticleInputArray Delphes/allParticles
907 set PartonInputArray Delphes/partons
908 set JetInputArray JetEnergyScale/jets
909
910 set DeltaR 0.5
911
912 set TauPTMin 20.0
913
914 set TauEtaMax 2.3
915
916 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
917
918 add EfficiencyFormula {0} { (abs(eta) < 2.3) * ((( -0.00621816+0.00130097*pt-2.19642e-5*pt^2+1.49393e-7*pt^3-4.58972e-10*pt^4+5.27983e-13*pt^5 )) * (pt<250) + 0.0032*(pt>250)) + \
919 (abs(eta) > 2.3) * (0.000)
920 }
921 add EfficiencyFormula {15} { (abs(eta) < 2.3) * 0.97*0.77*( (0.32 + 0.01*pt - 0.000054*pt*pt )*(pt<100)+0.78*(pt>100) ) + \
922 (abs(eta) > 2.3) * (0.000)
923 }
924}
925
926
927###############################################################################################################
928# StatusPidFilter: this module removes all generated particles except electrons, muons, taus, and status == 3 #
929###############################################################################################################
930
931module StatusPidFilter GenParticleFilter {
932
933 set InputArray Delphes/allParticles
934 set OutputArray filteredParticles
935 set PTMin 5.0
936
937}
938
939
940##################
941# ROOT tree writer
942##################
943
944module TreeWriter TreeWriter {
945# add Branch InputArray BranchName BranchClass
946 add Branch GenParticleFilter/filteredParticles Particle GenParticle
947 add Branch PileUpMerger/vertices Vertex Vertex
948
949 add Branch GenJetFinder/jets GenJet Jet
950 add Branch GenMissingET/momentum GenMissingET MissingET
951
952# add Branch HCal/eflowTracks EFlowTrack Track
953# add Branch ECal/eflowPhotons EFlowPhoton Tower
954# add Branch HCal/eflowNeutralHadrons EFlowNeutralHadron Tower
955
956 add Branch PhotonEfficiency/photons Photon Photon
957 add Branch ElectronEfficiency/electrons Electron Electron
958 add Branch MuonLooseIdEfficiency/muons MuonLoose Muon
959 add Branch MuonTightIdEfficiency/muons MuonTight Muon
960
961 add Branch JetEnergyScale/jets Jet Jet
962
963 add Branch MissingET/momentum MissingET MissingET
964 add Branch GenPileUpMissingET/momentum GenPileUpMissingET MissingET
965 add Branch ScalarHT/energy ScalarHT ScalarHT
966}
967
Note: See TracBrowser for help on using the repository browser.