CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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  usePFThresholdsFromDB = cms.bool(False),
13  pfClusterBuilder =cms.PSet(
14  algoName = cms.string("PFMultiDepthClusterizer"),
15  nSigmaEta = cms.double(2.),
16  nSigmaPhi = cms.double(2.),
17  #pf clustering parameters
18  minFractionToKeep = cms.double(1e-7),
19  allCellsPositionCalc = cms.PSet(
20  algoName = cms.string("Basic2DGenericPFlowPositionCalc"),
21  minFractionInCalc = cms.double(1e-9),
22  posCalcNCrystals = cms.int32(-1),
23  logWeightDenominatorByDetector = cms.VPSet(
24  cms.PSet( detector = cms.string("HCAL_BARREL1"),
25  depths = cms.vint32(1, 2, 3, 4),
26  logWeightDenominator = _thresholdsHB,
27  ),
28  cms.PSet( detector = cms.string("HCAL_ENDCAP"),
29  depths = cms.vint32(1, 2, 3, 4, 5, 6, 7),
30  logWeightDenominator = _thresholdsHE,
31  )
32  ),
33  minAllowedNormalization = cms.double(1e-9)
34  )
35  ),
36  positionReCalc = cms.PSet(),
37  energyCorrector = cms.PSet()
38 )
39 
40 # offline 2018 -- uncollapsed
41 from Configuration.Eras.Modifier_run2_HE_2018_cff import run2_HE_2018
42 from Configuration.ProcessModifiers.run2_HECollapse_2018_cff import run2_HECollapse_2018
43 (run2_HE_2018 & ~run2_HECollapse_2018).toModify(particleFlowClusterHCAL,
44  pfClusterBuilder = dict(
45  allCellsPositionCalc = dict(logWeightDenominatorByDetector = {1 : dict(logWeightDenominator = _thresholdsHEphase1) } ),
46  ),
47 )
48 
49 # offline 2021
50 from Configuration.Eras.Modifier_run3_HB_cff import run3_HB
51 run3_HB.toModify(particleFlowClusterHCAL,
52  pfClusterBuilder = dict(
53  allCellsPositionCalc = dict(logWeightDenominatorByDetector = {0 : dict(logWeightDenominator = _thresholdsHBphase1) } ),
54  ),
55 )
56 
57 # offline 2023
58 from Configuration.Eras.Modifier_run3_egamma_2023_cff import run3_egamma_2023
59 run3_egamma_2023.toModify(particleFlowClusterHCAL,
60  pfClusterBuilder = dict(
61  allCellsPositionCalc = dict(logWeightDenominatorByDetector = {0 : dict(logWeightDenominator = _thresholdsHBphase1_2023) } ),
62  ),
63 )
64 
65 # HCALonly WF
66 particleFlowClusterHCALOnly = particleFlowClusterHCAL.clone(
67  clustersSource = "particleFlowClusterHBHEOnly"
68 )
69 
70 #--- Use DB conditions for cuts&seeds for Run3 and Phase2
71 from Configuration.Eras.Modifier_hcalPfCutsFromDB_cff import hcalPfCutsFromDB
72 hcalPfCutsFromDB.toModify( particleFlowClusterHCAL,
73  usePFThresholdsFromDB = True)