Fork me on GitHub

source: git/cards/CMS_PhaseII/CMS_PhaseII_200PU.tcl@ 2628d2b

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 2628d2b was b0ba2b4, checked in by Michele Selvaggi <michele.selvaggi@…>, 8 years ago

removed eta dependence from e/gamma resolution in central region

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