Fork me on GitHub

source: git/cards/CMS_PhaseII/CMS_PhaseII_200PU.tcl@ 4a0d9d5

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 4a0d9d5 was 740d430, checked in by Michele Selvaggi <michele.selvaggi@…>, 8 years ago

fixed photon isolation with puppi

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