CMS 3D CMS Logo

particleFlowRecHitHBHE_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 _thresholdsHB = cms.vdouble(0.8, 0.8, 0.8, 0.8)
4 _thresholdsHE = cms.vdouble(0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8)
5 _thresholdsHBphase1 = cms.vdouble(0.1, 0.2, 0.3, 0.3)
6 _thresholdsHEphase1 = cms.vdouble(0.1, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2)
7 #updated HB RecHit threshold for 2023
8 _thresholdsHBphase1_2023 = cms.vdouble(0.4, 0.3, 0.3, 0.3)
9 
10 particleFlowRecHitHBHE = cms.EDProducer("PFRecHitProducer",
11  navigator = cms.PSet(
12  name = cms.string("PFRecHitHCALDenseIdNavigator"),
13  hcalEnums = cms.vint32(1,2)
14  ),
15  producers = cms.VPSet(
16  cms.PSet(
17  name = cms.string("PFHBHERecHitCreator"),
18  src = cms.InputTag("hbhereco",""),
19  qualityTests = cms.VPSet(
20  cms.PSet(
21  name = cms.string("PFRecHitQTestHCALThresholdVsDepth"),
22  usePFThresholdsFromDB = cms.bool(False),
23  cuts = cms.VPSet(
24  cms.PSet(
25  depth=cms.vint32(1, 2, 3, 4),
26  threshold = _thresholdsHB,
27  detectorEnum = cms.int32(1)
28  ),
29  cms.PSet(
30  depth=cms.vint32(1, 2, 3, 4, 5, 6, 7),
31  threshold = _thresholdsHE,
32  detectorEnum = cms.int32(2)
33  )
34  )
35  ),
36  cms.PSet(
37  name = cms.string("PFRecHitQTestHCALChannel"),
38  maxSeverities = cms.vint32(11),
39  cleaningThresholds = cms.vdouble(0.0),
40  flags = cms.vstring('Standard')
41  )
42  )
43  ),
44  )
45 )
46 
47 # offline 2018 -- uncollapsed
48 from Configuration.Eras.Modifier_run2_HE_2018_cff import run2_HE_2018
49 from Configuration.ProcessModifiers.run2_HECollapse_2018_cff import run2_HECollapse_2018
50 (run2_HE_2018 & ~run2_HECollapse_2018).toModify(particleFlowRecHitHBHE,
51  producers = {0 : dict(qualityTests = {0 : dict(cuts = {1 : dict(threshold = _thresholdsHEphase1) } ) } ) },
52 )
53 
54 # offline 2021
55 from Configuration.Eras.Modifier_run3_HB_cff import run3_HB
56 run3_HB.toModify(particleFlowRecHitHBHE,
57  producers = {0 : dict(qualityTests = {0 : dict(cuts = {0 : dict(threshold = _thresholdsHBphase1) } ) } ) },
58 )
59 
60 from Configuration.Eras.Modifier_run3_egamma_2023_cff import run3_egamma_2023
61 run3_egamma_2023.toModify(particleFlowRecHitHBHE,
62  producers = {0 : dict(qualityTests = {0 : dict(cuts = {0 : dict(threshold = _thresholdsHBphase1_2023) } ) } ) },
63 )
64 
65 #--- Use DB conditions for cuts&seeds for Run3 and Phase2
66 from Configuration.Eras.Modifier_hcalPfCutsFromDB_cff import hcalPfCutsFromDB
67 hcalPfCutsFromDB.toModify( particleFlowRecHitHBHE,
68  producers = {0 : dict(qualityTests = {0 : dict(usePFThresholdsFromDB = True) } ) },
69 )
70 
71 # HCALonly WF
72 particleFlowRecHitHBHEOnly = particleFlowRecHitHBHE.clone(
73  producers = { 0: dict(src = "hbheprereco") }
74 )
75 run3_HB.toModify(particleFlowRecHitHBHEOnly,
76  producers = { 0: dict(src = "hbhereco") }
77 )