Fork me on GitHub

source: git/cards/CMS_PhaseII/CMS_PhaseII_Substructure_PIX4022_0PU.tcl@ 308ab1a

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