Fork me on GitHub

source: git/cards/CMS_PhaseII/CMS_PhaseII_200PU.tcl@ abab212

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

added substructure to CMS UPG cards

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