Fork me on GitHub

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

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

updated BS position with double gaussian

  • Property mode set to 100644
File size: 27.5 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 ElectronEnergySmearing
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 LeptonFilterNoLep
43 LeptonFilterLep
44 RunPUPPIBase
45 RunPUPPI
46
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) * (1+0.64*abs(eta)^2)*(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) * (1+0.64*abs(eta)^2)*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# Track pile-up subtractor
480##########################
481
482module TrackPileUpSubtractor TrackPileUpSubtractor {
483# add InputArray InputArray OutputArray
484 add InputArray HCal/eflowTracks eflowTracks
485 add InputArray ElectronFilter/electrons electrons
486 add InputArray MuonMomentumSmearing/muons muons
487
488 set VertexInputArray PileUpMerger/vertices
489 # assume perfect pile-up subtraction for tracks with |z| > fZVertexResolution
490 # Z vertex resolution in m
491 set ZVertexResolution 0.0001
492}
493
494
495###################################################
496# Tower Merger (in case not using e-flow algorithm)
497###################################################
498
499module Merger TowerMerger {
500# add InputArray InputArray
501 add InputArray ECal/ecalTowers
502 add InputArray HCal/hcalTowers
503 set OutputArray towers
504}
505
506
507####################
508# Neutral eflow erger
509####################
510
511module Merger NeutralEFlowMerger {
512# add InputArray InputArray
513 add InputArray ECal/eflowPhotons
514 add InputArray HCal/eflowNeutralHadrons
515 set OutputArray eflowTowers
516}
517
518
519####################
520# Energy flow merger
521####################
522
523module Merger EFlowMerger {
524# add InputArray InputArray
525 add InputArray HCal/eflowTracks
526 add InputArray ECal/eflowPhotons
527 add InputArray HCal/eflowNeutralHadrons
528 set OutputArray eflow
529}
530
531##################################
532# Energy flow merger (all tracks)
533##################################
534
535module Merger EFlowMergerAllTracks {
536# add InputArray InputArray
537 add InputArray TrackMerger/tracks
538 add InputArray ECal/eflowPhotons
539 add InputArray HCal/eflowNeutralHadrons
540 set OutputArray eflow
541}
542
543#########################################
544### Run the puppi code (to be tuned) ###
545#########################################
546
547module PdgCodeFilter LeptonFilterNoLep {
548 set InputArray HCal/eflowTracks
549 set OutputArray eflowTracksNoLeptons
550 set Invert false
551 add PdgCode {13}
552 add PdgCode {-13}
553 add PdgCode {11}
554 add PdgCode {-11}
555}
556
557module PdgCodeFilter LeptonFilterLep {
558 set InputArray HCal/eflowTracks
559 set OutputArray eflowTracksLeptons
560 set Invert true
561 add PdgCode {11}
562 add PdgCode {-11}
563 add PdgCode {13}
564 add PdgCode {-13}
565}
566
567module RunPUPPI RunPUPPIBase {
568 ## input information
569 set TrackInputArray LeptonFilterNoLep/eflowTracksNoLeptons
570 set NeutralInputArray NeutralEFlowMerger/eflowTowers
571 set PVInputArray PileUpMerger/vertices
572 set MinPuppiWeight 0.05
573 set UseExp false
574 set UseNoLep false
575
576 ## define puppi algorithm parameters (more than one for the same eta region is possible)
577 add EtaMinBin 0.0 1.5 4.0
578 add EtaMaxBin 1.5 4.0 10.0
579 add PtMinBin 0.0 0.0 0.0
580 add ConeSizeBin 0.2 0.2 0.2
581 add RMSPtMinBin 0.1 0.5 0.5
582 add RMSScaleFactorBin 1.0 1.0 1.0
583 add NeutralMinEBin 0.2 0.2 0.5
584 add NeutralPtSlope 0.006 0.013 0.067
585 add ApplyCHS true true true
586 add UseCharged true true false
587 add ApplyLowPUCorr true true true
588 add MetricId 5 5 5
589 add CombId 0 0 0
590
591 ## output name
592 set OutputArray PuppiParticles
593 set OutputArrayTracks puppiTracks
594 set OutputArrayNeutrals puppiNeutrals
595}
596
597module Merger RunPUPPI {
598 add InputArray RunPUPPIBase/PuppiParticles
599 add InputArray LeptonFilterLep/eflowTracksLeptons
600 set OutputArray PuppiParticles
601}
602
603###################
604# Missing ET merger
605###################
606
607module Merger MissingET {
608# add InputArray InputArray
609# add InputArray RunPUPPI/PuppiParticles
610 add InputArray EFlowMerger/eflow
611 set MomentumOutputArray momentum
612}
613
614module Merger PuppiMissingET {
615 #add InputArray InputArray
616 add InputArray RunPUPPI/PuppiParticles
617 #add InputArray EFlowMerger/eflow
618 set MomentumOutputArray momentum
619}
620
621###################
622# Ger PileUp Missing ET
623###################
624
625module Merger GenPileUpMissingET {
626# add InputArray InputArray
627# add InputArray RunPUPPI/PuppiParticles
628 add InputArray ParticlePropagator/stableParticles
629 set MomentumOutputArray momentum
630}
631
632##################
633# Scalar HT merger
634##################
635
636module Merger ScalarHT {
637# add InputArray InputArray
638 add InputArray RunPUPPI/PuppiParticles
639 set EnergyOutputArray energy
640}
641
642#################
643# Neutrino Filter
644#################
645
646module PdgCodeFilter NeutrinoFilter {
647
648 set InputArray Delphes/stableParticles
649 set OutputArray filteredParticles
650
651 set PTMin 0.0
652
653 add PdgCode {12}
654 add PdgCode {14}
655 add PdgCode {16}
656 add PdgCode {-12}
657 add PdgCode {-14}
658 add PdgCode {-16}
659
660}
661
662
663#####################
664# MC truth jet finder
665#####################
666
667module FastJetFinder GenJetFinder {
668 set InputArray NeutrinoFilter/filteredParticles
669
670 set OutputArray jets
671
672 # algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
673 set JetAlgorithm 6
674 set ParameterR 0.4
675
676 set JetPTMin 15.0
677}
678
679#########################
680# Gen Missing ET merger
681########################
682
683module Merger GenMissingET {
684
685# add InputArray InputArray
686 add InputArray NeutrinoFilter/filteredParticles
687 set MomentumOutputArray momentum
688}
689
690
691
692############
693# Jet finder
694############
695
696module FastJetFinder FastJetFinder {
697# set InputArray TowerMerger/towers
698 set InputArray RunPUPPI/PuppiParticles
699
700 set OutputArray jets
701
702 # algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
703 set JetAlgorithm 6
704 set ParameterR 0.4
705
706 set JetPTMin 15.0
707}
708
709##################
710# Jet Energy Scale
711##################
712
713module EnergyScale JetEnergyScale {
714 set InputArray FastJetFinder/jets
715 set OutputArray jets
716
717 # scale formula for jets
718 set ScaleFormula {1.00}
719}
720
721
722####################
723# Photon isolation #
724####################
725
726module Isolation PhotonIsolation {
727
728 # particle for which calculate the isolation
729 set CandidateInputArray ECal/eflowPhotons
730
731 # isolation collection
732 set IsolationInputArray EFlowMerger/eflow
733
734 # output array
735 set OutputArray photons
736
737 # isolation cone
738 set DeltaRMax 0.3
739
740 # minimum pT
741 set PTMin 1.0
742
743 # iso ratio to cut
744 set PTRatioMax 9999.
745}
746
747
748
749#####################
750# Photon efficiency #
751#####################
752
753module Efficiency PhotonEfficiency {
754
755 ## input particles
756 set InputArray PhotonIsolation/photons
757 ## output particles
758 set OutputArray photons
759 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
760 # efficiency formula for photons
761 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \
762 (abs(eta) <= 1.5) * (pt > 10.0) * (0.9635) + \
763 (abs(eta) > 1.5 && abs(eta) <= 4.0) * (pt > 10.0) * (0.9624) + \
764 (abs(eta) > 4.0) * (0.00)}
765
766}
767
768
769######################
770# Electron isolation #
771######################
772
773module Isolation ElectronIsolation {
774
775 set CandidateInputArray ElectronFilter/electrons
776
777 # isolation collection
778 set IsolationInputArray EFlowMerger/eflow
779
780 set OutputArray electrons
781
782 set DeltaRMax 0.3
783 set PTMin 1.0
784 set PTRatioMax 9999.
785
786}
787
788
789
790#######################
791# Electron efficiency #
792#######################
793
794module Efficiency ElectronEfficiency {
795
796 set InputArray ElectronIsolation/electrons
797 set OutputArray electrons
798
799 # set EfficiencyFormula {efficiency formula as a function of eta and pt}
800 # efficiency formula for electrons
801 set EfficiencyFormula {
802 (pt <= 4.0) * (0.00) + \
803 (abs(eta) <= 1.45 ) * (pt > 4.0 && pt <= 6.0) * (0.50) + \
804 (abs(eta) <= 1.45 ) * (pt > 6.0 && pt <= 8.0) * (0.70) + \
805 (abs(eta) <= 1.45 ) * (pt > 8.0 && pt <= 10.0) * (0.85) + \
806 (abs(eta) <= 1.45 ) * (pt > 10.0 && pt <= 30.0) * (0.94) + \
807 (abs(eta) <= 1.45 ) * (pt > 30.0 && pt <= 50.0) * (0.97) + \
808 (abs(eta) <= 1.45 ) * (pt > 50.0 && pt <= 70.0) * (0.98) + \
809 (abs(eta) <= 1.45 ) * (pt > 70.0 ) * (1.0) + \
810 (abs(eta) > 1.45 && abs(eta) <= 1.55) * (pt > 4.0 && pt <= 10.0) * (0.35) + \
811 (abs(eta) > 1.45 && abs(eta) <= 1.55) * (pt > 10.0 && pt <= 30.0) * (0.40) + \
812 (abs(eta) > 1.45 && abs(eta) <= 1.55) * (pt > 30.0 && pt <= 70.0) * (0.45) + \
813 (abs(eta) > 1.45 && abs(eta) <= 1.55) * (pt > 70.0 ) * (0.55) + \
814 (abs(eta) >= 1.55 && abs(eta) <= 2.0 ) * (pt > 4.0 && pt <= 10.0) * (0.75) + \
815 (abs(eta) >= 1.55 && abs(eta) <= 2.0 ) * (pt > 10.0 && pt <= 30.0) * (0.85) + \
816 (abs(eta) >= 1.55 && abs(eta) <= 2.0 ) * (pt > 30.0 && pt <= 50.0) * (0.95) + \
817 (abs(eta) >= 1.55 && abs(eta) <= 2.0 ) * (pt > 50.0 && pt <= 70.0) * (0.95) + \
818 (abs(eta) >= 1.55 && abs(eta) <= 2.0 ) * (pt > 70.0 ) * (1.0) + \
819 (abs(eta) >= 2.0 && abs(eta) <= 2.5 ) * (pt > 4.0 && pt <= 10.0) * (0.65) + \
820 (abs(eta) >= 2.0 && abs(eta) <= 2.5 ) * (pt > 10.0 && pt <= 30.0) * (0.75) + \
821 (abs(eta) >= 2.0 && abs(eta) <= 2.5 ) * (pt > 30.0 && pt <= 50.0) * (0.90) + \
822 (abs(eta) >= 2.0 && abs(eta) <= 2.5 ) * (pt > 50.0 && pt <= 70.0) * (0.90) + \
823 (abs(eta) >= 2.0 && abs(eta) <= 2.5 ) * (pt > 70.0 ) * (0.90) + \
824 (abs(eta) > 2.5 && abs(eta) <= 4.0 ) * (pt > 4.0 && pt <= 10.0) * (0.65) + \
825 (abs(eta) > 2.5 && abs(eta) <= 4.0 ) * (pt > 10.0 && pt <= 30.0) * (0.75) + \
826 (abs(eta) > 2.5 && abs(eta) <= 4.0 ) * (pt > 30.0 && pt <= 50.0) * (0.90) + \
827 (abs(eta) > 2.5 && abs(eta) <= 4.0 ) * (pt > 50.0 && pt <= 70.0) * (0.90) + \
828 (abs(eta) > 2.5 && abs(eta) <= 4.0 ) * (pt > 70.0 ) * (0.90) + \
829 (abs(eta) > 4.0) * (0.00)
830
831 }
832}
833
834##################
835# Muon isolation #
836##################
837
838module Isolation MuonIsolation {
839 set CandidateInputArray MuonMomentumSmearing/muons
840
841 # isolation collection
842 set IsolationInputArray EFlowMerger/eflow
843
844 set OutputArray muons
845
846 set DeltaRMax 0.3
847 set PTMin 1.0
848 set PTRatioMax 9999.
849
850}
851
852
853##################
854# Muon Loose Id #
855##################
856
857module Efficiency MuonLooseIdEfficiency {
858 set InputArray MuonIsolation/muons
859 set OutputArray muons
860 # tracking + LooseID efficiency formula for muons
861 source muonLooseId.tcl
862
863}
864
865
866##################
867# Muon Tight Id #
868##################
869
870module Efficiency MuonTightIdEfficiency {
871 set InputArray MuonIsolation/muons
872 set OutputArray muons
873 # tracking + TightID efficiency formula for muons
874 source muonTightId.tcl
875}
876
877
878
879########################
880# Jet Flavor Association
881########################
882
883module JetFlavorAssociation JetFlavorAssociation {
884
885 set PartonInputArray Delphes/partons
886 set ParticleInputArray Delphes/allParticles
887 set ParticleLHEFInputArray Delphes/allParticlesLHEF
888 set JetInputArray JetEnergyScale/jets
889
890 set DeltaR 0.5
891 set PartonPTMin 10.0
892 set PartonEtaMax 4.0
893
894}
895
896
897#############
898# b-tagging #
899#############
900module BTagging BTaggingLoose {
901
902 set JetInputArray JetEnergyScale/jets
903
904 set BitNumber 0
905
906 source btagLoose.tcl
907}
908
909
910#############
911# b-tagging #
912#############
913module BTagging BTaggingMedium {
914
915 set JetInputArray JetEnergyScale/jets
916
917 set BitNumber 1
918
919 source btagMedium.tcl
920}
921
922
923
924#############
925# b-tagging #
926#############
927module BTagging BTaggingTight {
928
929 set JetInputArray JetEnergyScale/jets
930
931 set BitNumber 2
932
933 source btagTight.tcl
934}
935
936
937
938
939
940#############
941# tau-tagging
942#############
943
944
945module TauTagging TauTagging {
946 set ParticleInputArray Delphes/allParticles
947 set PartonInputArray Delphes/partons
948 set JetInputArray JetEnergyScale/jets
949
950 set DeltaR 0.5
951
952 set TauPTMin 20.0
953
954 set TauEtaMax 2.3
955
956 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
957
958 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)) + \
959 (abs(eta) > 2.3) * (0.000)
960 }
961 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) ) + \
962 (abs(eta) > 2.3) * (0.000)
963 }
964}
965
966
967###############################################################################################################
968# StatusPidFilter: this module removes all generated particles except electrons, muons, taus, and status == 3 #
969###############################################################################################################
970
971module StatusPidFilter GenParticleFilter {
972
973 set InputArray Delphes/allParticles
974 set OutputArray filteredParticles
975 set PTMin 5.0
976
977}
978
979
980##################
981# ROOT tree writer
982##################
983
984module TreeWriter TreeWriter {
985# add Branch InputArray BranchName BranchClass
986 add Branch GenParticleFilter/filteredParticles Particle GenParticle
987 add Branch PileUpMerger/vertices Vertex Vertex
988
989 add Branch GenJetFinder/jets GenJet Jet
990 add Branch GenMissingET/momentum GenMissingET MissingET
991
992# add Branch HCal/eflowTracks EFlowTrack Track
993# add Branch ECal/eflowPhotons EFlowPhoton Tower
994# add Branch HCal/eflowNeutralHadrons EFlowNeutralHadron Tower
995
996 add Branch PhotonEfficiency/photons Photon Photon
997 add Branch ElectronEfficiency/electrons Electron Electron
998 add Branch MuonLooseIdEfficiency/muons MuonLoose Muon
999 add Branch MuonTightIdEfficiency/muons MuonTight Muon
1000
1001 add Branch JetEnergyScale/jets Jet Jet
1002
1003 add Branch MissingET/momentum MissingET MissingET
1004 add Branch PuppiMissingET/momentum PuppiMissingET MissingET
1005 add Branch GenPileUpMissingET/momentum GenPileUpMissingET MissingET
1006 add Branch ScalarHT/energy ScalarHT ScalarHT
1007}
1008
Note: See TracBrowser for help on using the repository browser.