EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
delphes_EICmatrixv2_3T.tcl
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file delphes_EICmatrixv2_3T.tcl
1 ######################################################################################################################
2 # EIC detector model
3 # based on parameters from EIC detector matrix from EIC yellow report https://physdiv.jlab.org/DetectorMatrix/ (also in https://arxiv.org/abs/2103.05419).
4 # as well as on assumptions on calorimeter granularity, and efficiency.
5 # email: miguel.arratia@ucr.edu, ssekula@smu.edu
6 #######################################################################################################################
7 
8 
9 #######################################
10 # Load any external configurations
11 #######################################
12 
13 #source customizations.tcl
14 
15 
16 #######################################
17 # Order of execution of various modules
18 #######################################
19 
20 set ExecutionPath {
21  ParticlePropagator
22 
23  ChargedHadronTrackingEfficiency
24  ElectronTrackingEfficiency
25 
26 
27  ChargedHadronSmearing
28  ElectronSmearing
29 
30  TrackMerger
31 
32  ECal
33  HCal
34 
35  Calorimeter
36  EFlowMerger
37  EFlowFilter
38 
39  PhotonEfficiency
40  PhotonIsolation
41 
42  ElectronFilter
43  ElectronEfficiency
44  ElectronIsolation
45 
46  ChargedHadronFilter
47  MissingET
48 
49  NeutrinoFilter
50  GenJetFinder
51  GenMissingET
52 
53  FastJetFinder
54 
55  JetEnergyScale
56 
57  JetFlavorAssociation
58  GenJetFlavorAssociation
59 
60  UniqueObjectFinder
61 
62  ScalarHT
63 
64  TrackCountingBTagging
65 
66  PIDSystems
67 
68  TreeWriter
69 }
70 
71 #################################
72 # Propagate particles in cylinder
73 #################################
74 
75 module ParticlePropagator ParticlePropagator {
76  set InputArray Delphes/stableParticles
77  set OutputArray stableParticles
78  set ChargedHadronOutputArray chargedHadrons
79  set ElectronOutputArray electrons
80 
81  # radius of the magnetic field coverage, in m
82  set Radius 1.5
83  # half-length of the magnetic field coverage, in m
84  set HalfLength 1.20
85  # magnetic field
86  set Bz 3.0
87 }
88 
89 
90 ####################################
91 # Common Tracking Efficiency Model
92 ####################################
93 #Dummy efficiency (100%). Leaving structure to show how tracking dependent on pt and eta can be incorporated)
94 #
95 
96 #Minimum pT for B = 3 T:
97 #150 MeV/c for -3.0 < eta < -2.5
98 #220 MeV/c for -2.5 < eta < -2.0
99 #160 MeV/c for -2.0 < eta < -1.5
100 #300 MeV/c for -1.5 < eta < -1.0
101 #(For B = 3T: minimum pT = 400 MeV/c with 90% acceptance (similar for pi and K))
102 
103 set CommonTrackingEfficiency {
104 
105  (abs(eta) <= 1.0) * (pt > 0.400) * (1.0) +
106  (abs(eta) > 1.0 && abs(eta) <= 1.5) * (pt > 0.300) * (1.0) +
107  (abs(eta) > 1.5 && abs(eta) <= 2.0) * (pt > 0.160) * (1.0) +
108  (abs(eta) > 2.0 && abs(eta) <= 2.5) * (pt > 0.220) * (1.0) +
109  (abs(eta) > 2.5 && abs(eta) <= 3.5) * (pt > 0.150) * (1.0) +
110  (abs(eta) > 3.5) * (0.00)+
111  0.0
112 }
113 
114 set CommonTrackingResolution {
115  (abs(eta) <= 1.0) * sqrt((5e-3)^2 + (pt*cosh(eta))^2*(2e-4)^2) +
116  (abs(eta) > 1.0 && abs(eta) <= 2.5) * sqrt((1e-2)^2 + (pt*cosh(eta))^2*(2e-4)^2) +
117  (abs(eta) > 2.5 && abs(eta) <= 3.5) * sqrt((2e-2)^2 + (pt*cosh(eta))^2*(1e-3)^2) +
118  (abs(eta) > 3.5) * (0.00)
119 }
120 
121 
122 ####################################
123 # Charged hadron tracking efficiency
124 ####################################
125 
126 module Efficiency ChargedHadronTrackingEfficiency {
127  set InputArray ParticlePropagator/chargedHadrons
128  set OutputArray chargedHadrons
129  set EfficiencyFormula $CommonTrackingEfficiency
130 }
131 
132 ##############################
133 # Electron tracking efficiency
134 ##############################
135 
136 module Efficiency ElectronTrackingEfficiency {
137  set InputArray ParticlePropagator/electrons
138  set OutputArray electrons
139  set EfficiencyFormula $CommonTrackingEfficiency
140 
141 }
142 
143 
144 
145 ########################################
146 # Smearing for charged hadrons
147 ########################################
148 
149 module TrackSmearing ChargedHadronSmearing {
150  set InputArray ChargedHadronTrackingEfficiency/chargedHadrons
151  set BeamSpotInputArray BeamSpotFilter/beamSpotParticle
152  set OutputArray chargedHadrons
153 # set ApplyToPileUp true
154  # magnetic field
155  set Bz 3.0
156  set PResolutionFormula $CommonTrackingResolution
157  set CtgThetaResolutionFormula { 0.0 }
158  set PhiResolutionFormula { 0.0 }
159 
160 # Updated Berkeley all-silicon tracker for 3.0T field. Provided by Rey Cruz-Torres on 6/29/2021
161  set D0ResolutionFormula "
162  (abs(eta)<=0.5) * (sqrt( (0.0045)^2 + (0.028/(pt*cosh(eta)))^2 ) ) +
163  (abs(eta)<=1.0 && abs(eta)>0.5) * (sqrt( (0.0044)^2 + (0.036/(pt*cosh(eta)))^2 ) ) +
164  (abs(eta)<=1.5 && abs(eta)>1.0) * (sqrt( (0.0061)^2 + (0.062/(pt*cosh(eta)))^2 ) ) +
165  (abs(eta)<=2.0 && abs(eta)>1.5) * (sqrt( (0.0086)^2 + (0.108/(pt*cosh(eta)))^2 ) ) +
166  (abs(eta)<=2.5 && abs(eta)>2.0) * (sqrt( (0.0092)^2 + (0.222/(pt*cosh(eta)))^2 ) ) +
167  (abs(eta)<=3.0 && abs(eta)>2.5) * (sqrt( (0.0093)^2 + (0.423/(pt*cosh(eta)))^2 ) ) +
168  (abs(eta)<=3.5 && abs(eta)>3.0) * (sqrt( (0.0310)^2 + (0.831/(pt*cosh(eta)))^2 ) ) +
169  (abs(eta)<=4.0 && abs(eta)>3.5) * (sqrt( (0.0810)^2 + (1.434/(pt*cosh(eta)))^2 ) )
170  "
171 
172 
173  set DZResolutionFormula "
174  (abs(eta)<=0.5) * (sqrt( (0.0033)^2 + (0.027/(pt*cosh(eta)))^2 ) ) +
175  (abs(eta)<=1.0 && abs(eta)>0.5) * (sqrt( (0.0044)^2 + (0.043/(pt*cosh(eta)))^2 ) ) +
176  (abs(eta)<=1.5 && abs(eta)>1.0) * (sqrt( (0.0071)^2 + (0.099/(pt*cosh(eta)))^2 ) ) +
177  (abs(eta)<=2.0 && abs(eta)>1.5) * (sqrt( (0.0130)^2 + (0.290/(pt*cosh(eta)))^2 ) ) +
178  (abs(eta)<=2.5 && abs(eta)>2.0) * (sqrt( (0.0300)^2 + (0.923/(pt*cosh(eta)))^2 ) ) +
179  (abs(eta)<=3.0 && abs(eta)>2.5) * (sqrt( (0.0330)^2 + (2.581/(pt*cosh(eta)))^2 ) ) +
180  (abs(eta)<=3.5 && abs(eta)>3.0) * (sqrt( (0.1890)^2 + (8.349/(pt*cosh(eta)))^2 ) ) +
181  (abs(eta)<=4.0 && abs(eta)>3.5) * (sqrt( (0.0011)^2 + (21.430/(pt*cosh(eta)))^2 ) )
182  "
183 
184 
185 }
186 
187 ###################################
188 # Smearing for electrons
189 ###################################
190 
191 
192 module TrackSmearing ElectronSmearing {
193  set InputArray ElectronTrackingEfficiency/electrons
194  set BeamSpotInputArray BeamSpotFilter/beamSpotParticle
195  set OutputArray electrons
196 # set ApplyToPileUp true
197  # magnetic field
198  set Bz 3.0
199  set PResolutionFormula $CommonTrackingResolution
200  set CtgThetaResolutionFormula { 0.0 }
201  set PhiResolutionFormula { 0.0 }
202 
203 # Updated Berkeley all-silicon tracker for 3.0T field. Provided by Rey Cruz-Torres on 6/29/2021
204  set D0ResolutionFormula "
205  (abs(eta)<=0.5) * (sqrt( (0.0045)^2 + (0.028/(pt*cosh(eta)))^2 ) ) +
206  (abs(eta)<=1.0 && abs(eta)>0.5) * (sqrt( (0.0044)^2 + (0.036/(pt*cosh(eta)))^2 ) ) +
207  (abs(eta)<=1.5 && abs(eta)>1.0) * (sqrt( (0.0061)^2 + (0.062/(pt*cosh(eta)))^2 ) ) +
208  (abs(eta)<=2.0 && abs(eta)>1.5) * (sqrt( (0.0086)^2 + (0.108/(pt*cosh(eta)))^2 ) ) +
209  (abs(eta)<=2.5 && abs(eta)>2.0) * (sqrt( (0.0092)^2 + (0.222/(pt*cosh(eta)))^2 ) ) +
210  (abs(eta)<=3.0 && abs(eta)>2.5) * (sqrt( (0.0093)^2 + (0.423/(pt*cosh(eta)))^2 ) ) +
211  (abs(eta)<=3.5 && abs(eta)>3.0) * (sqrt( (0.0310)^2 + (0.831/(pt*cosh(eta)))^2 ) ) +
212  (abs(eta)<=4.0 && abs(eta)>3.5) * (sqrt( (0.0810)^2 + (1.434/(pt*cosh(eta)))^2 ) )
213  "
214 
215 
216  set DZResolutionFormula "
217  (abs(eta)<=0.5) * (sqrt( (0.0033)^2 + (0.027/(pt*cosh(eta)))^2 ) ) +
218  (abs(eta)<=1.0 && abs(eta)>0.5) * (sqrt( (0.0044)^2 + (0.043/(pt*cosh(eta)))^2 ) ) +
219  (abs(eta)<=1.5 && abs(eta)>1.0) * (sqrt( (0.0071)^2 + (0.099/(pt*cosh(eta)))^2 ) ) +
220  (abs(eta)<=2.0 && abs(eta)>1.5) * (sqrt( (0.0130)^2 + (0.290/(pt*cosh(eta)))^2 ) ) +
221  (abs(eta)<=2.5 && abs(eta)>2.0) * (sqrt( (0.0300)^2 + (0.923/(pt*cosh(eta)))^2 ) ) +
222  (abs(eta)<=3.0 && abs(eta)>2.5) * (sqrt( (0.0330)^2 + (2.581/(pt*cosh(eta)))^2 ) ) +
223  (abs(eta)<=3.5 && abs(eta)>3.0) * (sqrt( (0.1890)^2 + (8.349/(pt*cosh(eta)))^2 ) ) +
224  (abs(eta)<=4.0 && abs(eta)>3.5) * (sqrt( (0.0011)^2 + (21.430/(pt*cosh(eta)))^2 ) )
225  "
226 
227 
228 }
229 
230 ##############
231 # Track merger
232 ##############
233 
234 module Merger TrackMerger {
235 # add InputArray InputArray
236  add InputArray ChargedHadronSmearing/chargedHadrons
237  add InputArray ElectronSmearing/electrons
238  set OutputArray tracks
239 }
240 
241 
242 #############
243 # ECAL
244 #############
245 
246 module SimpleCalorimeter ECal {
247  set ParticleInputArray ParticlePropagator/stableParticles
248  set TrackInputArray TrackMerger/tracks
249 
250  set TowerOutputArray ecalTowers
251  set EFlowTrackOutputArray eflowTracks
252  set EFlowTowerOutputArray eflowPhotons
253 
254  set IsEcal true
255  set EnergyMin 0.050
256  #does not seem possible to set minimum dependent on eta as spec in the YR.
257 
258 
259  set EnergySignificanceMin 1.0
260 
261  set SmearTowerCenter true
262 
263  set pi [expr {acos(-1)}]
264 
265  # lists of the edges of each tower in eta and phi
266  # each list starts with the lower edge of the first tower
267  # the list ends with the higher edged of the last tower
268 
269  # Granularity is not discussed in EIC detector handbook.
270  ##BARREL
271  #assume 0.1 x 0.1 (real cell size will be smaller, so this is to represent some cluster)
272 
273  set PhiBins {}
274  for {set i -30} {$i <=30} {incr i} {
275  add PhiBins [expr {$i * $pi/30.0}]
276  }
277  for {set i -10} {$i <=10} {incr i} {
278  set eta [expr {$i * 0.1}]
279  add EtaPhiBins $eta $PhiBins
280  }
281 
282  ## Coverage is -3.5, -1.0 , and +1.0 to 3.5.
283  ## assume 0.1 x 0.1 (real cell size will be smaller, so this is to represent some cluster)
284  set PhiBins {}
285  for {set i -30} {$i <=30} {incr i} {
286  add PhiBins [expr {$i * $pi/30.0}]
287  }
288 
289  for {set i 1} {$i <=26} {incr i} {
290  set eta [expr {-3.6 + $i*0.1}]
291  add EtaPhiBins $eta $PhiBins
292  }
293  for {set i 1} {$i <=26} {incr i} {
294  set eta [expr {0.9 + $i*0.1 }]
295  add EtaPhiBins $eta $PhiBins
296  }
297 
298 
299  add EnergyFraction {0} {0.0}
300  # energy fractions for e, gamma and pi0
301  add EnergyFraction {11} {1.0}
302  add EnergyFraction {22} {1.0}
303  add EnergyFraction {111} {1.0}
304  # energy fractions for muon, neutrinos and neutralinos
305  add EnergyFraction {12} {0.0}
306  add EnergyFraction {13} {0.0}
307  add EnergyFraction {14} {0.0}
308  add EnergyFraction {16} {0.0}
309  add EnergyFraction {1000022} {0.0}
310  add EnergyFraction {1000023} {0.0}
311  add EnergyFraction {1000025} {0.0}
312  add EnergyFraction {1000035} {0.0}
313  add EnergyFraction {1000045} {0.0}
314  # energy fractions for K0short and Lambda
315  # add EnergyFraction {310} {0.3}
316  # add EnergyFraction {3122} {0.3}
317 
318  set ResolutionFormula { (eta <= -2.0 && eta>-3.5) * sqrt(energy^2*0.01^2 + energy*0.025^2 + 0.01^2)+ \
319  (eta <= -1.0 && eta>-2.0 ) * sqrt(energy^2*0.02^2 + energy*0.08^2 + 0.02^2 )+ \
320  (eta <= 1.0 && eta> -1.0 ) * sqrt(energy^2*0.03^2 + energy*0.14^2 + 0.02^2 )+ \
321  (eta <= 3.5 && eta>1.0 ) * sqrt(energy^2*0.02^2 + energy*0.12^2 + 0.02^2)}
322 
323 }
324 
325 
326 #############
327 # HCAL
328 #############
329 
330 module SimpleCalorimeter HCal {
331  set ParticleInputArray ParticlePropagator/stableParticles
332  set TrackInputArray ECal/eflowTracks
333 
334  set TowerOutputArray hcalTowers
335  set EFlowTrackOutputArray eflowTracks
336  set EFlowTowerOutputArray eflowNeutralHadrons
337 
338  set IsEcal false
339 
340  ##Assumes noise 100 MeV per tower.
341  set EnergyMin 0.5
342  set EnergySignificanceMin 1.0
343 
344  set SmearTowerCenter true
345 
346  set pi [expr {acos(-1)}]
347 
348  set PhiBins {}
349  for {set i -30} {$i <=30} {incr i} {
350  add PhiBins [expr {$i * $pi/30.0}]
351  }
352  for {set i -10} {$i <=10} {incr i} {
353  set eta [expr {$i * 0.1}]
354  add EtaPhiBins $eta $PhiBins
355  }
356 
357  for {set i -30} {$i <=30} {incr i} {
358  add PhiBins [expr {$i * $pi/30.0}]
359  }
360 
361  for {set i 1} {$i <=26} {incr i} {
362  set eta [expr {-3.6 + $i*0.1 }]
363  add EtaPhiBins $eta $PhiBins
364  }
365  for {set i 1} {$i <=26} {incr i} {
366  set eta [expr {0.9 + $i*0.1 }]
367  add EtaPhiBins $eta $PhiBins
368  }
369 
370 
371  add EnergyFraction {0} {1.0}
372  # energy fractions for e, gamma and pi0
373  add EnergyFraction {11} {0.0}
374  add EnergyFraction {22} {0.0}
375  add EnergyFraction {111} {0.0}
376  # energy fractions for muon, neutrinos and neutralinos
377  add EnergyFraction {12} {0.0}
378  add EnergyFraction {13} {0.0}
379  add EnergyFraction {14} {0.0}
380  add EnergyFraction {16} {0.0}
381  add EnergyFraction {1000022} {0.0}
382  add EnergyFraction {1000023} {0.0}
383  add EnergyFraction {1000025} {0.0}
384  add EnergyFraction {1000035} {0.0}
385  add EnergyFraction {1000045} {0.0}
386  # energy fractions for K0short and Lambda
387  #add EnergyFraction {310} {0.7}
388  #add EnergyFraction {3122} {0.7}
389 
390  # set HCalResolutionFormula {resolution formula as a function of eta and energy}
391  set ResolutionFormula { (eta <= -1.0 && eta>-3.5) * sqrt(energy^2*0.10^2 + energy*0.50^2)+
392  (eta <= 1.0 && eta>-1.0 ) * sqrt(energy^2*0.10^2 + energy*1.00^2)+
393  (eta <= 3.5 && eta>1.0 ) * sqrt(energy^2*0.10^2 + energy*0.50^2)
394  }
395 
396 }
397 
398 
399 #################
400 # Electron filter
401 #################
402 
403 module PdgCodeFilter ElectronFilter {
404  set InputArray HCal/eflowTracks
405  set OutputArray electrons
406  set Invert true
407  add PdgCode {11}
408  add PdgCode {-11}
409 }
410 
411 ######################
412 # ChargedHadronFilter
413 ######################
414 
415 module PdgCodeFilter ChargedHadronFilter {
416  set InputArray HCal/eflowTracks
417  set OutputArray chargedHadrons
418 
419  add PdgCode {11}
420  add PdgCode {-11}
421  add PdgCode {13}
422  add PdgCode {-13}
423 }
424 
425 
426 ###################################################
427 # Tower Merger (in case not using e-flow algorithm)
428 ###################################################
429 
430 module Merger Calorimeter {
431 # add InputArray InputArray
432  add InputArray ECal/ecalTowers
433  add InputArray HCal/hcalTowers
434  set OutputArray towers
435 }
436 
437 
438 
439 ####################
440 # Energy flow merger
441 ####################
442 
443 module Merger EFlowMerger {
444 # add InputArray InputArray
445  add InputArray HCal/eflowTracks
446  add InputArray ECal/eflowPhotons
447  add InputArray HCal/eflowNeutralHadrons
448  set OutputArray eflow
449 }
450 
451 ######################
452 # EFlowFilter
453 ######################
454 
455 module PdgCodeFilter EFlowFilter {
456  set InputArray EFlowMerger/eflow
457  set OutputArray eflow
458 
459  add PdgCode {11}
460  add PdgCode {-11}
461  add PdgCode {13}
462  add PdgCode {-13}
463 }
464 
465 
466 ###################
467 # Photon efficiency
468 ###################
469 
470 module Efficiency PhotonEfficiency {
471  set InputArray ECal/eflowPhotons
472  set OutputArray photons
473 
474  # set EfficiencyFormula {efficiency formula as a function of eta and pt}
475 
476  # efficiency formula for photons
477  set EfficiencyFormula { 1}
478 }
479 
480 ##################
481 # Photon isolation
482 ##################
483 
484 module Isolation PhotonIsolation {
485  set CandidateInputArray PhotonEfficiency/photons
486  set IsolationInputArray EFlowFilter/eflow
487 
488  set OutputArray photons
489 
490  set DeltaRMax 0.5
491 
492  set PTMin 0.5
493 
494  set PTRatioMax 0.12
495 }
496 
497 
498 #####################
499 # Electron efficiency
500 #####################
501 
502 module Efficiency ElectronEfficiency {
503  set InputArray ElectronFilter/electrons
504  set OutputArray electrons
505 
506  # set EfficiencyFormula {efficiency formula as a function of eta and pt}
507 
508  # efficiency formula for electrons
509  set EfficiencyFormula {1}
510 }
511 
512 ####################
513 # Electron isolation
514 ####################
515 
516 module Isolation ElectronIsolation {
517  set CandidateInputArray ElectronEfficiency/electrons
518  set IsolationInputArray EFlowFilter/eflow
519 
520  set OutputArray electrons
521 
522  set DeltaRMax 0.5
523 
524  set PTMin 0.5
525 
526  set PTRatioMax 0.12
527 }
528 
529 ###################
530 # Missing ET merger
531 ###################
532 
533 module Merger MissingET {
534 # add InputArray InputArray
535  add InputArray EFlowMerger/eflow
536  set MomentumOutputArray momentum
537 }
538 
539 ##################
540 # Scalar HT merger
541 ##################
542 
543 module Merger ScalarHT {
544 # add InputArray InputArray
545  add InputArray UniqueObjectFinder/jets
546  add InputArray UniqueObjectFinder/electrons
547  add InputArray UniqueObjectFinder/photons
548 
549  set EnergyOutputArray energy
550 }
551 
552 
553 #####################
554 # Neutrino Filter
555 #####################
556 
557 module PdgCodeFilter NeutrinoFilter {
558 
559  set InputArray Delphes/stableParticles
560  set OutputArray filteredParticles
561 
562  set PTMin 0.0
563 
564  add PdgCode {12}
565  add PdgCode {14}
566  add PdgCode {16}
567  add PdgCode {-12}
568  add PdgCode {-14}
569  add PdgCode {-16}
570 
571 }
572 
573 
574 #####################
575 # MC truth jet finder
576 #####################
577 
578 module FastJetFinder GenJetFinder {
579  set InputArray NeutrinoFilter/filteredParticles
580 
581  set OutputArray jets
582 
583  # algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
584  set JetAlgorithm 6
585  set ParameterR 1.0
586 
587  set JetPTMin 3.0
588 }
589 
590 #########################
591 # Gen Missing ET merger
592 ########################
593 
594 module Merger GenMissingET {
595 # add InputArray InputArray
596  add InputArray NeutrinoFilter/filteredParticles
597  set MomentumOutputArray momentum
598 }
599 
600 
601 
602 ############
603 # Jet finder
604 ############
605 
606 module FastJetFinder FastJetFinder {
607 # set InputArray Calorimeter/towers
608  set InputArray EFlowMerger/eflow
609 
610  set OutputArray jets
611 
612  # algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
613  set JetAlgorithm 6
614  set ParameterR 1.0
615 
616  set ComputeNsubjettiness 1
617  set Beta 1.0
618  set AxisMode 4
619 
620  set ComputeTrimming 1
621  set RTrim 0.4
622  set PtFracTrim 0.20
623  #set PtFracTrim 0.05
624 
625  set ComputePruning 1
626  set ZcutPrun 0.1
627  set RcutPrun 0.5
628  set RPrun 0.8
629 
630  set ComputeSoftDrop 1
631  set BetaSoftDrop 0.0
632  set SymmetryCutSoftDrop 0.1
633  set R0SoftDrop 0.8
634 
635  set JetPTMin 3.0}
636 
637 
638 
639 
640 
641 ##################
642 # Jet Energy Scale
643 ##################
644 
645 module EnergyScale JetEnergyScale {
646  set InputArray FastJetFinder/jets
647  set OutputArray jets
648 
649  # scale formula for jets (do not apply it)
650  set ScaleFormula {1.0}
651 }
652 
653 ########################
654 # Jet Flavor Association
655 ########################
656 
657 module JetFlavorAssociation JetFlavorAssociation {
658 
659  set PartonInputArray Delphes/partons
660  set ParticleInputArray Delphes/allParticles
661  set ParticleLHEFInputArray Delphes/allParticlesLHEF
662  set JetInputArray JetEnergyScale/jets
663 
664  set DeltaR 0.5
665  set PartonPTMin 4.0
666  set PartonEtaMax 4.0
667 
668 }
669 
670 module JetFlavorAssociation GenJetFlavorAssociation {
671 
672  set PartonInputArray Delphes/partons
673  set ParticleInputArray Delphes/allParticles
674  set ParticleLHEFInputArray Delphes/allParticlesLHEF
675  set JetInputArray GenJetFinder/jets
676 
677  set DeltaR 0.5
678  set PartonPTMin 1.0
679  set PartonEtaMax 4.0
680 
681 }
682 
683 
684 
685 #####################################################
686 # Find uniquely identified photons/electrons/tau/jets
687 #####################################################
688 
689 module UniqueObjectFinder UniqueObjectFinder {
690 # earlier arrays take precedence over later ones
691 # add InputArray InputArray OutputArray
692  add InputArray PhotonIsolation/photons photons
693  add InputArray ElectronIsolation/electrons electrons
694  add InputArray JetEnergyScale/jets jets
695 }
696 
697 ############################
698 # b-tagging (track counting)
699 ############################
700 
701 module TrackCountingBTagging TrackCountingBTagging {
702  set JetInputArray JetEnergyScale/jets
703  set TrackInputArray HCal/eflowTracks
704  set BitNumber 0
705  # maximum distance between jet and track
706  set DeltaR 0.5
707  # minimum pt of tracks
708  set TrackPtMin 1.0
709  # maximum transverse impact parameter (in mm)
710  set TrackIPMax 3
711  # minimum ip significance for the track to be counted
712  set SigMin 2.0
713  set Use3D true
714  # alternate setting for 2D IP (default)
715  # set SigMin 1.3
716  # set Use3D false
717  # minimum number of tracks (high efficiency n=2, high purity n=3)
718  #set Ntracks 3
719 
720 }
721 
722 ##################
723 # PID Efficiency Maps
724 ##################
725 
726 # These maps are built from the table in section 8.6 of the EIC Yellow Report.
727 # When the table says that two species are separated by "3 sigma" we assume the
728 # following:
729 #
730 # 1. Each specie is Gaussian distributed in a variable x each with the same Gaussian width, s.
731 # 2. The separation is defined by S. For 3 sigma, S=3.
732 # 3. The separation takes into account the two widths of the individual Gaussians, S = sqrt(s^2 + s^2).
733 # Thus, s = S/sqrt(2) for each of the presumed Gaussians for each specie.
734 # 4. To compute the identification efficiency, the probability that specie A is idenfied as A, one
735 # uses the integral of the Gaussian within width s, e.g. p = 1 - ROOT::Math::gaussian_pdf(s) in ROOT.
736 # 5. TO instead compute the misidentfication probability, the probability that B -> A, one instead uses
737 # the one-sided cumulative distribution function, e.g. p = 1 - ROOT::Math::normal_cdf(s) in ROOT.
738 # EXAMPLE:
739 #
740 # Electrons need to be separable from pions at the level of 3 sigma for 1.0 <= eta <= 3.5. Thus S = 3.
741 # That means s = 3/sqrt(2) = 2.121. Thus p(e->e) = 1 - ROOT::Math::gaussian_pdf(2.121) = 0.958.
742 # Conversely, p(pi -> e) = 1 - ROOT::Math::normal_cdf(2.121) = 0.017. Once can also compute from this
743 # p(e->pi) = 1 - ROOT::Math::normal_cdf(2.121) (assuming a 2-species model for PID) and p(pi->pi) = 0.958 (integral of gaussian within s)
744 #
745 
746 module IdentificationMap PIDSystems {
747  set InputArray HCal/eflowTracks
748  set OutputArray tracks
749 
750 
751  # Electron/Pion identification, treated as a 2-species problem
752  add EfficiencyFormula {-11} {-11} { (abs(eta) > 3.5 || pt * cosh(eta) < 0.050) * (0.00) +
753  (abs(eta) <= 3.5 && pt * cosh(eta) >= 0.050) * (
754  (-3.5 <= eta && eta < 1.0) * (1.00) +
755  (1.0 <= eta && eta <= 3.5) * (0.95795179)) }
756 
757  add EfficiencyFormula {211} {-11} { (abs(eta) > 3.5 || pt * cosh(eta) < 0.050) * (0.00) +
758  (abs(eta) <= 3.5 && pt * cosh(eta) >= 0.050) * (
759  (-3.5 <= eta && eta < 1.0) * (1e-4) +
760  (1.0 <= eta && eta <= 3.5) * (0.016947427)) }
761 
762  add EfficiencyFormula {-11} {211} { (abs(eta) > 3.5 || pt * cosh(eta) < 0.050) * (1.00) +
763  (abs(eta) <= 3.5 && pt * cosh(eta) >= 0.050) * (
764  (-3.5 <= eta && eta < 1.0) * (0.00) +
765  (1.0 <= eta && eta <= 3.5) * (0.016947427)) }
766 
767  add EfficiencyFormula {211} {211} { (abs(eta) > 3.5 || pt * cosh(eta) < 0.050) * (1.00) +
768  (abs(eta) <= 3.5 && pt * cosh(eta) >= 0.050) * (
769  (-3.5 <= eta && eta < 1.0) * (0.99990000) +
770  (1.0 <= eta && eta <= 3.5) * (0.95795179)) }
771 
772  # pi/K/proton identification, assuming 3 sigma separation between all species! (all pair-wise separations are 3 sigma)
773  # Kaons must have p > 0.135 GeV/c
774  # Pions must have p > 0.100 GeV/c
775 
776  add EfficiencyFormula {321} {321} { (abs(eta) > 3.5 || pt * cosh(eta) < 0.135) * (0.00) +
777  (abs(eta) <= 3.5 && pt * cosh(eta) >= 0.135) * (
778  (eta < -1.0 && pt * cosh(eta) <= 7) * (0.95795179) +
779  (-1.0 <= eta && eta < 0.5 && pt * cosh(eta) <= 10) * (0.95795179) +
780  (0.5 <= eta && eta < 1.0 && pt * cosh(eta) <= 15) * (0.95795179) +
781  (1.0 <= eta && eta < 1.5 && pt * cosh(eta) <= 30) * (0.95795179) +
782  (1.5 <= eta && eta < 2.5 && pt * cosh(eta) <= 50) * (0.95795179) +
783  (2.5 <= eta && eta <= 3.5 && pt * cosh(eta) <= 45) * (0.95795179)) }
784 
785  add EfficiencyFormula {321} {-211} { (abs(eta) > 3.5 || pt * cosh(eta) < 0.135) * (1.00) +
786  (abs(eta) <= 3.5 && pt * cosh(eta) >= 0.135) * (
787  (eta < -1.0 && pt * cosh(eta) <= 7) * (0.016947427) +
788  (-1.0 <= eta && eta < 0.5 && pt * cosh(eta) <= 10) * (0.016947427) +
789  (0.5 <= eta && eta < 1.0 && pt * cosh(eta) <= 15) * (0.016947427) +
790  (1.0 <= eta && eta < 1.5 && pt * cosh(eta) <= 30) * (0.016947427) +
791  (1.5 <= eta && eta < 2.5 && pt * cosh(eta) <= 50) * (0.016947427) +
792  (2.5 <= eta && eta <= 3.5 && pt * cosh(eta) <= 45) * (0.016947427)) }
793 
794  add EfficiencyFormula {321} {2212} { (abs(eta) > 3.5 || pt * cosh(eta) < 0.135) * (1.00) +
795  (abs(eta) <= 3.5 && pt * cosh(eta) >= 0.135) * (
796  (eta < -1.0 && pt * cosh(eta) <= 7) * (0.016947427) +
797  (-1.0 <= eta && eta < 0.5 && pt * cosh(eta) <= 10) * (0.016947427) +
798  (0.5 <= eta && eta < 1.0 && pt * cosh(eta) <= 15) * (0.016947427) +
799  (1.0 <= eta && eta < 1.5 && pt * cosh(eta) <= 30) * (0.016947427) +
800  (1.5 <= eta && eta < 2.5 && pt * cosh(eta) <= 50) * (0.016947427) +
801  (2.5 <= eta && eta <= 3.5 && pt * cosh(eta) <= 45) * (0.016947427)) }
802 
803 
804  add EfficiencyFormula {-211} {321} { (abs(eta) > 3.5 || pt * cosh(eta) < 0.100) * (0.00) +
805  (abs(eta) <= 3.5 && pt * cosh(eta) >= 0.100) * (
806  (eta < -1.0 && pt * cosh(eta) <= 7) * (0.016947427) +
807  (-1.0 <= eta && eta < 0.5 && pt * cosh(eta) <= 10) * (0.016947427) +
808  (0.5 <= eta && eta < 1.0 && pt * cosh(eta) <= 15) * (0.016947427) +
809  (1.0 <= eta && eta < 1.5 && pt * cosh(eta) <= 30) * (0.016947427) +
810  (1.5 <= eta && eta < 2.5 && pt * cosh(eta) <= 50) * (0.016947427) +
811  (2.5 <= eta && eta <= 3.5 && pt * cosh(eta) <= 45) * (0.016947427)) }
812 
813  add EfficiencyFormula {-211} {2212} { (abs(eta) > 3.5 || pt * cosh(eta) < 0.100) * (0.00) +
814  (abs(eta) <= 3.5 && pt * cosh(eta) >= 0.100) * (
815  (eta < -1.0 && pt * cosh(eta) <= 7) * (0.016947427) +
816  (-1.0 <= eta && eta < 0.5 && pt * cosh(eta) <= 10) * (0.016947427) +
817  (0.5 <= eta && eta < 1.0 && pt * cosh(eta) <= 15) * (0.016947427) +
818  (1.0 <= eta && eta < 1.5 && pt * cosh(eta) <= 30) * (0.016947427) +
819  (1.5 <= eta && eta < 2.5 && pt * cosh(eta) <= 50) * (0.016947427) +
820  (2.5 <= eta && eta <= 3.5 && pt * cosh(eta) <= 45) * (0.016947427)) }
821 
822  add EfficiencyFormula {211} {211} { (abs(eta) > 3.5 || pt * cosh(eta) < 0.100) * (1.00) +
823  (abs(eta) <= 3.5 && pt * cosh(eta) >= 0.100) * (
824  (eta < -1.0 && pt * cosh(eta) <= 7) * (0.95795179) +
825  (-1.0 <= eta && eta < 0.5 && pt * cosh(eta) <= 10) * (0.95795179) +
826  (0.5 <= eta && eta < 1.0 && pt * cosh(eta) <= 15) * (0.95795179) +
827  (1.0 <= eta && eta < 1.5 && pt * cosh(eta) <= 30) * (0.95795179) +
828  (1.5 <= eta && eta < 2.5 && pt * cosh(eta) <= 50) * (0.95795179) +
829  (2.5 <= eta && eta <= 3.5 && pt * cosh(eta) <= 45) * (0.95795179)) }
830 
831 
832  add EfficiencyFormula {2212} {2212} { (abs(eta) > 3.5 || pt * cosh(eta) < 0.100) * (1.00) +
833  (abs(eta) <= 3.5 && pt * cosh(eta) >= 0.100) * (
834  (eta < -1.0 && pt * cosh(eta) <= 7) * (0.95795179) +
835  (-1.0 <= eta && eta < 0.5 && pt * cosh(eta) <= 10) * (0.95795179) +
836  (0.5 <= eta && eta < 1.0 && pt * cosh(eta) <= 15) * (0.95795179) +
837  (1.0 <= eta && eta < 1.5 && pt * cosh(eta) <= 30) * (0.95795179) +
838  (1.5 <= eta && eta < 2.5 && pt * cosh(eta) <= 50) * (0.95795179) +
839  (2.5 <= eta && eta <= 3.5 && pt * cosh(eta) <= 45) * (0.95795179)) }
840 
841 
842  add EfficiencyFormula {2212} {321} { (abs(eta) > 3.5 || pt * cosh(eta) < 0.100) * (0.00) +
843  (abs(eta) <= 3.5 && pt * cosh(eta) >= 0.100) * (
844  (eta < -1.0 && pt * cosh(eta) <= 7) * (0.016947427) +
845  (-1.0 <= eta && eta < 0.5 && pt * cosh(eta) <= 10) * (0.016947427) +
846  (0.5 <= eta && eta < 1.0 && pt * cosh(eta) <= 15) * (0.016947427) +
847  (1.0 <= eta && eta < 1.5 && pt * cosh(eta) <= 30) * (0.016947427) +
848  (1.5 <= eta && eta < 2.5 && pt * cosh(eta) <= 50) * (0.016947427) +
849  (2.5 <= eta && eta <= 3.5 && pt * cosh(eta) <= 45) * (0.016947427)) }
850 
851 
852  add EfficiencyFormula {2212} {-211} { (abs(eta) > 3.5 || pt * cosh(eta) < 0.100) * (0.00) +
853  (abs(eta) <= 3.5 && pt * cosh(eta) >= 0.100) * (
854  (eta < -1.0 && pt * cosh(eta) <= 7) * (0.016947427) +
855  (-1.0 <= eta && eta < 0.5 && pt * cosh(eta) <= 10) * (0.016947427) +
856  (0.5 <= eta && eta < 1.0 && pt * cosh(eta) <= 15) * (0.016947427) +
857  (1.0 <= eta && eta < 1.5 && pt * cosh(eta) <= 30) * (0.016947427) +
858  (1.5 <= eta && eta < 2.5 && pt * cosh(eta) <= 50) * (0.016947427) +
859  (2.5 <= eta && eta <= 3.5 && pt * cosh(eta) <= 45) * (0.016947427)) }
860 
861  # Everything else with no PID system coverage is 100% identified as pion
862  add EfficiencyFormula {0} {0} { 0.00 }
863 
864 }
865 
866 ##################
867 # ROOT tree writer
868 ##################
869 
870 # tracks, towers and eflow objects are not stored by default in the output.
871 # if needed (for jet constituent or other studies), uncomment the relevant
872 # "add Branch ..." lines.
873 
874 module TreeWriter TreeWriter {
875 # add Branch InputArray BranchName BranchClass
876  add Branch Delphes/allParticles Particle GenParticle
877 
878  add Branch TrackMerger/tracks Track Track
879  add Branch Calorimeter/towers Tower Tower
880 
881  add Branch HCal/eflowTracks EFlowTrack Track
882  add Branch ECal/eflowPhotons EFlowPhoton Tower
883  add Branch HCal/eflowNeutralHadrons EFlowNeutralHadron Tower
884 
885  add Branch PIDSystems/tracks PIDSystemsTrack Track
886 
887  add Branch GenJetFinder/jets GenJet Jet
888  add Branch GenMissingET/momentum GenMissingET MissingET
889 
890  add Branch UniqueObjectFinder/jets Jet Jet
891  add Branch UniqueObjectFinder/electrons Electron Electron
892  add Branch UniqueObjectFinder/photons Photon Photon
893 
894  add Branch MissingET/momentum MissingET MissingET
895  add Branch ScalarHT/energy ScalarHT ScalarHT
896 }