File indexing completed on 2024-06-22 02:24:05
0001 import FWCore.ParameterSet.Config as cms
0002 from RecoParticleFlow.PFClusterProducer.particleFlowCaloResolution_cfi import _timeResolutionHCALMaxSample
0003
0004 _thresholdsHB = cms.vdouble(0.8, 0.8, 0.8, 0.8)
0005 _thresholdsHE = cms.vdouble(0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8)
0006 _thresholdsHBphase1 = cms.vdouble(0.1, 0.2, 0.3, 0.3)
0007 _thresholdsHEphase1 = cms.vdouble(0.1, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2)
0008 _seedingThresholdsHB = cms.vdouble(1.0, 1.0, 1.0, 1.0)
0009 _seedingThresholdsHE = cms.vdouble(1.1, 1.1, 1.1, 1.1, 1.1, 1.1, 1.1)
0010 _seedingThresholdsHBphase1 = cms.vdouble(0.125, 0.25, 0.35, 0.35)
0011 _seedingThresholdsHEphase1 = cms.vdouble(0.1375, 0.275, 0.275, 0.275, 0.275, 0.275, 0.275)
0012
0013 _thresholdsHBphase1_2023 = cms.vdouble(0.4, 0.3, 0.3, 0.3)
0014
0015 _seedingThresholdsHBphase1_2023 = cms.vdouble(0.6, 0.5, 0.5, 0.5)
0016
0017
0018
0019 particleFlowClusterHBHE = cms.EDProducer(
0020 "PFClusterProducer",
0021 recHitsSource = cms.InputTag("particleFlowRecHitHBHE"),
0022 usePFThresholdsFromDB = cms.bool(False),
0023 recHitCleaners = cms.VPSet(),
0024 seedCleaners = cms.VPSet(),
0025 seedFinder = cms.PSet(
0026 algoName = cms.string("LocalMaximumSeedFinder"),
0027 thresholdsByDetector = cms.VPSet(
0028 cms.PSet( detector = cms.string("HCAL_BARREL1"),
0029 depths = cms.vint32(1, 2, 3, 4),
0030 seedingThreshold = _seedingThresholdsHB,
0031 seedingThresholdPt = cms.vdouble(0.0, 0.0, 0.0, 0.0)
0032 ),
0033 cms.PSet( detector = cms.string("HCAL_ENDCAP"),
0034 depths = cms.vint32(1, 2, 3, 4, 5, 6, 7),
0035 seedingThreshold = _seedingThresholdsHE,
0036 seedingThresholdPt = cms.vdouble(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
0037 )
0038 ),
0039 nNeighbours = cms.int32(4),
0040 ),
0041 initialClusteringStep = cms.PSet(
0042 algoName = cms.string("Basic2DGenericTopoClusterizer"),
0043 thresholdsByDetector = cms.VPSet(
0044 cms.PSet( detector = cms.string("HCAL_BARREL1"),
0045 depths = cms.vint32(1, 2, 3, 4),
0046 gatheringThreshold = _thresholdsHB,
0047 gatheringThresholdPt = cms.vdouble(0.0, 0.0, 0.0, 0.0)
0048 ),
0049 cms.PSet( detector = cms.string("HCAL_ENDCAP"),
0050 depths = cms.vint32(1, 2, 3, 4, 5, 6, 7),
0051 gatheringThreshold = _thresholdsHE,
0052 gatheringThresholdPt = cms.vdouble(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
0053 )
0054 ),
0055 useCornerCells = cms.bool(True)
0056 ),
0057
0058 pfClusterBuilder = cms.PSet(
0059 algoName = cms.string("Basic2DGenericPFlowClusterizer"),
0060
0061 minFractionToKeep = cms.double(1e-7),
0062 positionCalc = cms.PSet(
0063 algoName = cms.string("Basic2DGenericPFlowPositionCalc"),
0064 minFractionInCalc = cms.double(1e-9),
0065 posCalcNCrystals = cms.int32(5),
0066 logWeightDenominatorByDetector = cms.VPSet(
0067 cms.PSet( detector = cms.string("HCAL_BARREL1"),
0068 depths = cms.vint32(1, 2, 3, 4),
0069 logWeightDenominator = _thresholdsHB,
0070 ),
0071 cms.PSet( detector = cms.string("HCAL_ENDCAP"),
0072 depths = cms.vint32(1, 2, 3, 4, 5, 6, 7),
0073 logWeightDenominator = _thresholdsHE,
0074 )
0075 ),
0076 minAllowedNormalization = cms.double(1e-9)
0077 ),
0078 allCellsPositionCalc =cms.PSet(
0079 algoName = cms.string("Basic2DGenericPFlowPositionCalc"),
0080 minFractionInCalc = cms.double(1e-9),
0081 posCalcNCrystals = cms.int32(-1),
0082 logWeightDenominatorByDetector = cms.VPSet(
0083 cms.PSet( detector = cms.string("HCAL_BARREL1"),
0084 depths = cms.vint32(1, 2, 3, 4),
0085 logWeightDenominator = _thresholdsHB,
0086 ),
0087 cms.PSet( detector = cms.string("HCAL_ENDCAP"),
0088 depths = cms.vint32(1, 2, 3, 4, 5, 6, 7),
0089 logWeightDenominator = _thresholdsHE,
0090 )
0091 ),
0092 minAllowedNormalization = cms.double(1e-9)
0093 ),
0094
0095
0096 timeSigmaEB = cms.double(10.),
0097 timeSigmaEE = cms.double(10.),
0098 maxNSigmaTime = cms.double(10.),
0099 minChi2Prob = cms.double(0.),
0100 clusterTimeResFromSeed = cms.bool(False),
0101 timeResolutionCalcBarrel = _timeResolutionHCALMaxSample,
0102 timeResolutionCalcEndcap = _timeResolutionHCALMaxSample,
0103 showerSigma = cms.double(10.0),
0104 stoppingTolerance = cms.double(1e-8),
0105 maxIterations = cms.uint32(50),
0106 excludeOtherSeeds = cms.bool(True),
0107 minFracTot = cms.double(1e-20),
0108 recHitEnergyNorms = cms.VPSet(
0109 cms.PSet( detector = cms.string("HCAL_BARREL1"),
0110 depths = cms.vint32(1, 2, 3, 4),
0111 recHitEnergyNorm = _thresholdsHB,
0112 ),
0113 cms.PSet( detector = cms.string("HCAL_ENDCAP"),
0114 depths = cms.vint32(1, 2, 3, 4, 5, 6, 7),
0115 recHitEnergyNorm = _thresholdsHE,
0116 )
0117 )
0118 ),
0119 positionReCalc = cms.PSet(),
0120 energyCorrector = cms.PSet()
0121 )
0122
0123
0124
0125
0126 from Configuration.Eras.Modifier_run2_HE_2018_cff import run2_HE_2018
0127 from Configuration.ProcessModifiers.run2_HECollapse_2018_cff import run2_HECollapse_2018
0128 (run2_HE_2018 & ~run2_HECollapse_2018).toModify(particleFlowClusterHBHE,
0129 seedFinder = dict(thresholdsByDetector = {1 : dict(seedingThreshold = _seedingThresholdsHEphase1) } ),
0130 initialClusteringStep = dict(thresholdsByDetector = {1 : dict(gatheringThreshold = _thresholdsHEphase1) } ),
0131 pfClusterBuilder = dict(
0132 recHitEnergyNorms = {1 : dict(recHitEnergyNorm = _thresholdsHEphase1) },
0133 positionCalc = dict(logWeightDenominatorByDetector = {1 : dict(logWeightDenominator = _thresholdsHEphase1) } ),
0134 allCellsPositionCalc = dict(logWeightDenominatorByDetector = {1 : dict(logWeightDenominator = _thresholdsHEphase1) } ),
0135 ),
0136 )
0137
0138
0139 from Configuration.Eras.Modifier_run3_HB_cff import run3_HB
0140 run3_HB.toModify(particleFlowClusterHBHE,
0141 seedFinder = dict(thresholdsByDetector = {0 : dict(seedingThreshold = _seedingThresholdsHBphase1) } ),
0142 initialClusteringStep = dict(thresholdsByDetector = {0 : dict(gatheringThreshold = _thresholdsHBphase1) } ),
0143 pfClusterBuilder = dict(
0144 recHitEnergyNorms = {0 : dict(recHitEnergyNorm = _thresholdsHBphase1) },
0145 positionCalc = dict(logWeightDenominatorByDetector = {0 : dict(logWeightDenominator = _thresholdsHBphase1) } ),
0146 allCellsPositionCalc = dict(logWeightDenominatorByDetector = {0 : dict(logWeightDenominator = _thresholdsHBphase1) } ),
0147 ),
0148 )
0149
0150
0151 from Configuration.Eras.Modifier_run3_egamma_2023_cff import run3_egamma_2023
0152 run3_egamma_2023.toModify(particleFlowClusterHBHE,
0153 seedFinder = dict(thresholdsByDetector = {0 : dict(seedingThreshold = _seedingThresholdsHBphase1_2023) } ),
0154 initialClusteringStep = dict(thresholdsByDetector = {0 : dict(gatheringThreshold = _thresholdsHBphase1_2023) } ),
0155 pfClusterBuilder = dict(
0156 recHitEnergyNorms = {0 : dict(recHitEnergyNorm = _thresholdsHBphase1_2023) },
0157 positionCalc = dict(logWeightDenominatorByDetector = {0 : dict(logWeightDenominator = _thresholdsHBphase1_2023) } ),
0158 allCellsPositionCalc = dict(logWeightDenominatorByDetector = {0 : dict(logWeightDenominator = _thresholdsHBphase1_2023) } ),
0159 ),
0160 )
0161
0162
0163
0164 particleFlowClusterHBHEOnly = particleFlowClusterHBHE.clone(
0165 recHitsSource = "particleFlowRecHitHBHEOnly"
0166 )
0167
0168
0169 from Configuration.Eras.Modifier_hcalPfCutsFromDB_cff import hcalPfCutsFromDB
0170 hcalPfCutsFromDB.toModify( particleFlowClusterHBHE,
0171 usePFThresholdsFromDB = True)