CMS 3D CMS Logo

particleFlowClusterHCAL_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 particleFlowClusterHCAL = cms.EDProducer('PFMultiDepthClusterProducer',
11  clustersSource = cms.InputTag("particleFlowClusterHBHE"),
12  pfClusterBuilder =cms.PSet(
13  algoName = cms.string("PFMultiDepthClusterizer"),
14  nSigmaEta = cms.double(2.),
15  nSigmaPhi = cms.double(2.),
16  #pf clustering parameters
17  minFractionToKeep = cms.double(1e-7),
18  allCellsPositionCalc = cms.PSet(
19  algoName = cms.string("Basic2DGenericPFlowPositionCalc"),
20  minFractionInCalc = cms.double(1e-9),
21  posCalcNCrystals = cms.int32(-1),
22  logWeightDenominatorByDetector = cms.VPSet(
23  cms.PSet( detector = cms.string("HCAL_BARREL1"),
24  depths = cms.vint32(1, 2, 3, 4),
25  logWeightDenominator = _thresholdsHB,
26  ),
27  cms.PSet( detector = cms.string("HCAL_ENDCAP"),
28  depths = cms.vint32(1, 2, 3, 4, 5, 6, 7),
29  logWeightDenominator = _thresholdsHE,
30  )
31  ),
32  minAllowedNormalization = cms.double(1e-9)
33  )
34  ),
35  positionReCalc = cms.PSet(),
36  energyCorrector = cms.PSet()
37 )
38 
39 # offline 2018 -- uncollapsed
40 from Configuration.Eras.Modifier_run2_HE_2018_cff import run2_HE_2018
41 from Configuration.ProcessModifiers.run2_HECollapse_2018_cff import run2_HECollapse_2018
42 (run2_HE_2018 & ~run2_HECollapse_2018).toModify(particleFlowClusterHCAL,
43  pfClusterBuilder = dict(
44  allCellsPositionCalc = dict(logWeightDenominatorByDetector = {1 : dict(logWeightDenominator = _thresholdsHEphase1) } ),
45  ),
46 )
47 
48 # offline 2021
49 from Configuration.Eras.Modifier_run3_HB_cff import run3_HB
50 run3_HB.toModify(particleFlowClusterHCAL,
51  pfClusterBuilder = dict(
52  allCellsPositionCalc = dict(logWeightDenominatorByDetector = {0 : dict(logWeightDenominator = _thresholdsHBphase1) } ),
53  ),
54 )
55 
56 # offline 2023
57 from Configuration.Eras.Modifier_run3_egamma_2023_cff import run3_egamma_2023
58 run3_egamma_2023.toModify(particleFlowClusterHCAL,
59  pfClusterBuilder = dict(
60  allCellsPositionCalc = dict(logWeightDenominatorByDetector = {0 : dict(logWeightDenominator = _thresholdsHBphase1_2023) } ),
61  ),
62 )
63 
64 # HCALonly WF
65 particleFlowClusterHCALOnly = particleFlowClusterHCAL.clone(
66  clustersSource = "particleFlowClusterHBHEOnly"
67 )