Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:26:26

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 
0014 #### PF CLUSTER HCAL ####
0015 particleFlowClusterHBHE = cms.EDProducer(
0016     "PFClusterProducer",
0017     recHitsSource = cms.InputTag("particleFlowRecHitHBHE"),
0018     recHitCleaners = cms.VPSet(),
0019     seedCleaners = cms.VPSet(),
0020     seedFinder = cms.PSet(
0021         algoName = cms.string("LocalMaximumSeedFinder"),
0022         thresholdsByDetector = cms.VPSet(
0023               cms.PSet( detector = cms.string("HCAL_BARREL1"),
0024                         depths = cms.vint32(1, 2, 3, 4),
0025                         seedingThreshold = _seedingThresholdsHB,
0026                         seedingThresholdPt = cms.vdouble(0.0, 0.0, 0.0, 0.0)
0027                         ),
0028               cms.PSet( detector = cms.string("HCAL_ENDCAP"),
0029                         depths = cms.vint32(1, 2, 3, 4, 5, 6, 7),
0030                         seedingThreshold = _seedingThresholdsHE,
0031                         seedingThresholdPt = cms.vdouble(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
0032                         )
0033               ),
0034         nNeighbours = cms.int32(4)
0035     ),
0036     initialClusteringStep = cms.PSet(
0037         algoName = cms.string("Basic2DGenericTopoClusterizer"),    
0038         thresholdsByDetector = cms.VPSet(
0039         cms.PSet( detector = cms.string("HCAL_BARREL1"),
0040                   depths = cms.vint32(1, 2, 3, 4),
0041                   gatheringThreshold = _thresholdsHB,
0042                   gatheringThresholdPt = cms.vdouble(0.0, 0.0, 0.0, 0.0)
0043                   ),
0044         cms.PSet( detector = cms.string("HCAL_ENDCAP"),
0045                   depths = cms.vint32(1, 2, 3, 4, 5, 6, 7),
0046                   gatheringThreshold = _thresholdsHE,
0047                   gatheringThresholdPt = cms.vdouble(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
0048                   )
0049         ),
0050         useCornerCells = cms.bool(True)
0051     ),
0052     
0053     pfClusterBuilder = cms.PSet(
0054            algoName = cms.string("Basic2DGenericPFlowClusterizer"),
0055            #pf clustering parameters
0056            minFractionToKeep = cms.double(1e-7),
0057            positionCalc = cms.PSet(
0058                  algoName = cms.string("Basic2DGenericPFlowPositionCalc"),
0059                  minFractionInCalc = cms.double(1e-9),    
0060                  posCalcNCrystals = cms.int32(5),
0061                  logWeightDenominatorByDetector = cms.VPSet(
0062                        cms.PSet( detector = cms.string("HCAL_BARREL1"),
0063                                  depths = cms.vint32(1, 2, 3, 4),
0064                                  logWeightDenominator = _thresholdsHB,
0065                                  ),
0066                        cms.PSet( detector = cms.string("HCAL_ENDCAP"),
0067                                  depths = cms.vint32(1, 2, 3, 4, 5, 6, 7),
0068                                  logWeightDenominator = _thresholdsHE,
0069                                  )
0070                        ),
0071                  minAllowedNormalization = cms.double(1e-9)
0072            ),
0073            allCellsPositionCalc =cms.PSet(
0074                  algoName = cms.string("Basic2DGenericPFlowPositionCalc"),
0075                  minFractionInCalc = cms.double(1e-9),    
0076                  posCalcNCrystals = cms.int32(-1),
0077                  logWeightDenominatorByDetector = cms.VPSet(
0078                        cms.PSet( detector = cms.string("HCAL_BARREL1"),
0079                                  depths = cms.vint32(1, 2, 3, 4),
0080                                  logWeightDenominator = _thresholdsHB,
0081                                  ),
0082                        cms.PSet( detector = cms.string("HCAL_ENDCAP"),
0083                                  depths = cms.vint32(1, 2, 3, 4, 5, 6, 7),
0084                                  logWeightDenominator = _thresholdsHE,
0085                                  )
0086                        ),
0087                  minAllowedNormalization = cms.double(1e-9)
0088            ),
0089            
0090 
0091            timeSigmaEB = cms.double(10.),
0092            timeSigmaEE = cms.double(10.),
0093            maxNSigmaTime = cms.double(10.),
0094            minChi2Prob = cms.double(0.),
0095            clusterTimeResFromSeed = cms.bool(False),
0096            timeResolutionCalcBarrel = _timeResolutionHCALMaxSample,
0097            timeResolutionCalcEndcap = _timeResolutionHCALMaxSample,
0098            showerSigma = cms.double(10.0),
0099            stoppingTolerance = cms.double(1e-8),
0100            maxIterations = cms.uint32(50),
0101            excludeOtherSeeds = cms.bool(True),
0102            minFracTot = cms.double(1e-20), ## numerical stabilization
0103            recHitEnergyNorms = cms.VPSet(
0104             cms.PSet( detector = cms.string("HCAL_BARREL1"),
0105                       depths = cms.vint32(1, 2, 3, 4),
0106                       recHitEnergyNorm = _thresholdsHB,
0107                       ),
0108             cms.PSet( detector = cms.string("HCAL_ENDCAP"),
0109                       depths = cms.vint32(1, 2, 3, 4, 5, 6, 7),
0110                       recHitEnergyNorm = _thresholdsHE,
0111                       )
0112             )
0113     ),
0114     positionReCalc = cms.PSet(),
0115     energyCorrector = cms.PSet()
0116 )
0117 
0118 #####
0119 
0120 # offline 2018 -- uncollapsed
0121 from Configuration.Eras.Modifier_run2_HE_2018_cff import run2_HE_2018
0122 from Configuration.ProcessModifiers.run2_HECollapse_2018_cff import run2_HECollapse_2018
0123 (run2_HE_2018 & ~run2_HECollapse_2018).toModify(particleFlowClusterHBHE,
0124     seedFinder = dict(thresholdsByDetector = {1 : dict(seedingThreshold = _seedingThresholdsHEphase1) } ),
0125     initialClusteringStep = dict(thresholdsByDetector = {1 : dict(gatheringThreshold = _thresholdsHEphase1) } ),
0126     pfClusterBuilder = dict(
0127         recHitEnergyNorms = {1 : dict(recHitEnergyNorm = _thresholdsHEphase1) },
0128         positionCalc = dict(logWeightDenominatorByDetector = {1 : dict(logWeightDenominator = _thresholdsHEphase1) } ),
0129         allCellsPositionCalc = dict(logWeightDenominatorByDetector = {1 : dict(logWeightDenominator = _thresholdsHEphase1) } ),
0130     ),
0131 )
0132 
0133 # offline 2019
0134 from Configuration.Eras.Modifier_run3_HB_cff import run3_HB
0135 run3_HB.toModify(particleFlowClusterHBHE,
0136     seedFinder = dict(thresholdsByDetector = {0 : dict(seedingThreshold = _seedingThresholdsHBphase1) } ),
0137     initialClusteringStep = dict(thresholdsByDetector = {0 : dict(gatheringThreshold = _thresholdsHBphase1) } ),
0138     pfClusterBuilder = dict(
0139         recHitEnergyNorms = {0 : dict(recHitEnergyNorm = _thresholdsHBphase1) },
0140         positionCalc = dict(logWeightDenominatorByDetector = {0 : dict(logWeightDenominator = _thresholdsHBphase1) } ),
0141         allCellsPositionCalc = dict(logWeightDenominatorByDetector = {0 : dict(logWeightDenominator = _thresholdsHBphase1) } ),
0142     ),
0143 )
0144 
0145 # HCALonly WF
0146 particleFlowClusterHBHEOnly = particleFlowClusterHBHE.clone(
0147     recHitsSource = "particleFlowRecHitHBHEOnly"
0148 )