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