CMS 3D CMS Logo

particleFlowClusterHBHE_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from RecoParticleFlow.PFClusterProducer.particleFlowCaloResolution_cfi import _timeResolutionHCALMaxSample
3 
4 _thresholdsHB = cms.vdouble(0.8, 0.8, 0.8, 0.8)
5 _thresholdsHE = cms.vdouble(0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8)
6 _thresholdsHBphase1 = cms.vdouble(0.1, 0.2, 0.3, 0.3)
7 _thresholdsHEphase1 = cms.vdouble(0.1, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2)
8 _seedingThresholdsHB = cms.vdouble(1.0, 1.0, 1.0, 1.0)
9 _seedingThresholdsHE = cms.vdouble(1.1, 1.1, 1.1, 1.1, 1.1, 1.1, 1.1)
10 _seedingThresholdsHBphase1 = cms.vdouble(0.125, 0.25, 0.35, 0.35)
11 _seedingThresholdsHEphase1 = cms.vdouble(0.1375, 0.275, 0.275, 0.275, 0.275, 0.275, 0.275)
12 
13 
14 #### PF CLUSTER HCAL ####
15 particleFlowClusterHBHE = cms.EDProducer(
16  "PFClusterProducer",
17  recHitsSource = cms.InputTag("particleFlowRecHitHBHE"),
18  recHitCleaners = cms.VPSet(),
19  seedFinder = cms.PSet(
20  algoName = cms.string("LocalMaximumSeedFinder"),
21  thresholdsByDetector = cms.VPSet(
22  cms.PSet( detector = cms.string("HCAL_BARREL1"),
23  depths = cms.vint32(1, 2, 3, 4),
24  seedingThreshold = _seedingThresholdsHB,
25  seedingThresholdPt = cms.vdouble(0.0, 0.0, 0.0, 0.0)
26  ),
27  cms.PSet( detector = cms.string("HCAL_ENDCAP"),
28  depths = cms.vint32(1, 2, 3, 4, 5, 6, 7),
29  seedingThreshold = _seedingThresholdsHE,
30  seedingThresholdPt = cms.vdouble(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
31  )
32  ),
33  nNeighbours = cms.int32(4)
34  ),
35  initialClusteringStep = cms.PSet(
36  algoName = cms.string("Basic2DGenericTopoClusterizer"),
37  thresholdsByDetector = cms.VPSet(
38  cms.PSet( detector = cms.string("HCAL_BARREL1"),
39  depths = cms.vint32(1, 2, 3, 4),
40  gatheringThreshold = _thresholdsHB,
41  gatheringThresholdPt = cms.vdouble(0.0, 0.0, 0.0, 0.0)
42  ),
43  cms.PSet( detector = cms.string("HCAL_ENDCAP"),
44  depths = cms.vint32(1, 2, 3, 4, 5, 6, 7),
45  gatheringThreshold = _thresholdsHE,
46  gatheringThresholdPt = cms.vdouble(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
47  )
48  ),
49  useCornerCells = cms.bool(True)
50  ),
51 
52  pfClusterBuilder = cms.PSet(
53  algoName = cms.string("Basic2DGenericPFlowClusterizer"),
54  #pf clustering parameters
55  minFractionToKeep = cms.double(1e-7),
56  positionCalc = cms.PSet(
57  algoName = cms.string("Basic2DGenericPFlowPositionCalc"),
58  minFractionInCalc = cms.double(1e-9),
59  posCalcNCrystals = cms.int32(5),
60  logWeightDenominatorByDetector = cms.VPSet(
61  cms.PSet( detector = cms.string("HCAL_BARREL1"),
62  depths = cms.vint32(1, 2, 3, 4),
63  logWeightDenominator = _thresholdsHB,
64  ),
65  cms.PSet( detector = cms.string("HCAL_ENDCAP"),
66  depths = cms.vint32(1, 2, 3, 4, 5, 6, 7),
67  logWeightDenominator = _thresholdsHE,
68  )
69  ),
70  minAllowedNormalization = cms.double(1e-9)
71  ),
72  allCellsPositionCalc =cms.PSet(
73  algoName = cms.string("Basic2DGenericPFlowPositionCalc"),
74  minFractionInCalc = cms.double(1e-9),
75  posCalcNCrystals = cms.int32(-1),
76  logWeightDenominatorByDetector = cms.VPSet(
77  cms.PSet( detector = cms.string("HCAL_BARREL1"),
78  depths = cms.vint32(1, 2, 3, 4),
79  logWeightDenominator = _thresholdsHB,
80  ),
81  cms.PSet( detector = cms.string("HCAL_ENDCAP"),
82  depths = cms.vint32(1, 2, 3, 4, 5, 6, 7),
83  logWeightDenominator = _thresholdsHE,
84  )
85  ),
86  minAllowedNormalization = cms.double(1e-9)
87  ),
88 
89 
90  timeSigmaEB = cms.double(10.),
91  timeSigmaEE = cms.double(10.),
92  maxNSigmaTime = cms.double(10.),
93  minChi2Prob = cms.double(0.),
94  clusterTimeResFromSeed = cms.bool(False),
95  timeResolutionCalcBarrel = _timeResolutionHCALMaxSample,
96  timeResolutionCalcEndcap = _timeResolutionHCALMaxSample,
97  showerSigma = cms.double(10.0),
98  stoppingTolerance = cms.double(1e-8),
99  maxIterations = cms.uint32(50),
100  excludeOtherSeeds = cms.bool(True),
101  minFracTot = cms.double(1e-20), ## numerical stabilization
102  recHitEnergyNorms = cms.VPSet(
103  cms.PSet( detector = cms.string("HCAL_BARREL1"),
104  depths = cms.vint32(1, 2, 3, 4),
105  recHitEnergyNorm = _thresholdsHB,
106  ),
107  cms.PSet( detector = cms.string("HCAL_ENDCAP"),
108  depths = cms.vint32(1, 2, 3, 4, 5, 6, 7),
109  recHitEnergyNorm = _thresholdsHE,
110  )
111  )
112  ),
113  positionReCalc = cms.PSet(),
114  energyCorrector = cms.PSet()
115 )
116 
117 #####
118 
119 # offline 2018 -- uncollapsed
120 from Configuration.Eras.Modifier_run2_HE_2018_cff import run2_HE_2018
121 from Configuration.ProcessModifiers.run2_HECollapse_2018_cff import run2_HECollapse_2018
122 (run2_HE_2018 & ~run2_HECollapse_2018).toModify(particleFlowClusterHBHE,
123  seedFinder = dict(thresholdsByDetector = {1 : dict(seedingThreshold = _seedingThresholdsHEphase1) } ),
124  initialClusteringStep = dict(thresholdsByDetector = {1 : dict(gatheringThreshold = _thresholdsHEphase1) } ),
125  pfClusterBuilder = dict(
126  recHitEnergyNorms = {1 : dict(recHitEnergyNorm = _thresholdsHEphase1) },
127  positionCalc = dict(logWeightDenominatorByDetector = {1 : dict(logWeightDenominator = _thresholdsHEphase1) } ),
128  allCellsPositionCalc = dict(logWeightDenominatorByDetector = {1 : dict(logWeightDenominator = _thresholdsHEphase1) } ),
129  ),
130 )
131 
132 # offline 2019
133 from Configuration.Eras.Modifier_run3_HB_cff import run3_HB
134 run3_HB.toModify(particleFlowClusterHBHE,
135  seedFinder = dict(thresholdsByDetector = {0 : dict(seedingThreshold = _seedingThresholdsHBphase1) } ),
136  initialClusteringStep = dict(thresholdsByDetector = {0 : dict(gatheringThreshold = _thresholdsHBphase1) } ),
137  pfClusterBuilder = dict(
138  recHitEnergyNorms = {0 : dict(recHitEnergyNorm = _thresholdsHBphase1) },
139  positionCalc = dict(logWeightDenominatorByDetector = {0 : dict(logWeightDenominator = _thresholdsHBphase1) } ),
140  allCellsPositionCalc = dict(logWeightDenominatorByDetector = {0 : dict(logWeightDenominator = _thresholdsHBphase1) } ),
141  ),
142 )