Fork me on GitHub

source: git/cards/CMS_PhaseII/CMS_PhaseII_Substructure_PIX4022_200PU.tcl@ 20ca0cd

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 20ca0cd was 00afcd8, checked in by Michele Selvaggi <michele.selvaggi@…>, 8 years ago

added vs P resolution for PIX4022 config

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