Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 from __future__ import absolute_import
0002 import FWCore.ParameterSet.Config as cms
0003 
0004 from .particleFlowCaloResolution_cfi import _timeResolutionECALBarrel, _timeResolutionECALEndcap
0005 
0006 #### PF CLUSTER ECAL ####
0007 
0008 #cleaning
0009 _spikeAndDoubleSpikeCleaner_ECAL = cms.PSet(
0010     algoName = cms.string("SpikeAndDoubleSpikeCleaner"),    
0011     cleaningByDetector = cms.VPSet(
0012     cms.PSet( detector = cms.string("ECAL_BARREL"),
0013               #single spike
0014               singleSpikeThresh = cms.double(4.0),
0015               minS4S1_a = cms.double(0.04), #constant term
0016               minS4S1_b = cms.double(-0.024), #log pt scaling
0017               #double spike
0018               doubleSpikeThresh = cms.double(10.0),
0019               doubleSpikeS6S2 = cms.double(0.04),
0020               energyThresholdModifier = cms.double(2.0), ## aka "tighterE"
0021               fractionThresholdModifier = cms.double(3.0) ## aka "tighterF"
0022               ),
0023     cms.PSet( detector = cms.string("ECAL_ENDCAP"),
0024               #single spike
0025               singleSpikeThresh = cms.double(15.0),
0026               minS4S1_a = cms.double(0.02), #constant term
0027               minS4S1_b = cms.double(-0.0125), #log pt scaling
0028               #double spike
0029               doubleSpikeThresh = cms.double(1e9),
0030               doubleSpikeS6S2 = cms.double(-1.0),
0031               energyThresholdModifier = cms.double(2.0), ## aka "tighterE"
0032               fractionThresholdModifier = cms.double(3.0) ## aka "tighterF"
0033               )
0034     )
0035 )
0036 
0037 #flag cleaning to mark hits not to be used for seeding
0038 _seedsFlagsCleaner_ECAL = cms.PSet(
0039     algoName = cms.string("FlagsCleanerECAL"),    
0040     #RecHitFlagsToBeExcluded= cms.vstring('kNeighboursRecovered')
0041     RecHitFlagsToBeExcluded= cms.vstring() 
0042 )
0043 
0044 # crystal-dependent seeding thresholds
0045 _seedCleaner_ECAL = cms.PSet(
0046      algoName = cms.string("ECALPFSeedCleaner"),
0047 )
0048 
0049 
0050 #seeding
0051 _localMaxSeeds_ECAL = cms.PSet(
0052     algoName = cms.string("LocalMaximumSeedFinder"),
0053     thresholdsByDetector = cms.VPSet(
0054     cms.PSet( detector = cms.string("ECAL_ENDCAP"),
0055               seedingThreshold = cms.double(0.60),
0056               seedingThresholdPt = cms.double(0.15)
0057               ),
0058     cms.PSet( detector = cms.string("ECAL_BARREL"),
0059               seedingThreshold = cms.double(0.23),
0060               seedingThresholdPt = cms.double(0.0)
0061               )
0062     ),
0063     nNeighbours = cms.int32(8)
0064 )
0065 
0066 # topo clusterizer
0067 _topoClusterizer_ECAL = cms.PSet(
0068     algoName = cms.string("Basic2DGenericTopoClusterizer"),
0069     thresholdsByDetector = cms.VPSet(
0070     cms.PSet( detector = cms.string("ECAL_BARREL"),
0071               gatheringThreshold = cms.double(0.08),
0072               gatheringThresholdPt = cms.double(0.0)
0073               ),
0074     cms.PSet( detector = cms.string("ECAL_ENDCAP"),
0075               gatheringThreshold = cms.double(0.3),
0076               gatheringThresholdPt = cms.double(0.0)
0077               )
0078     ),
0079     useCornerCells = cms.bool(True)
0080 )
0081 
0082 #position calculations
0083 _positionCalcECAL_all_nodepth = cms.PSet(
0084     algoName = cms.string("Basic2DGenericPFlowPositionCalc"),
0085     ##
0086     minFractionInCalc = cms.double(1e-9),
0087     posCalcNCrystals = cms.int32(-1),
0088     logWeightDenominator = cms.double(0.08), # same as gathering threshold
0089     minAllowedNormalization = cms.double(1e-9),
0090     timeResolutionCalcBarrel = _timeResolutionECALBarrel,
0091     timeResolutionCalcEndcap = _timeResolutionECALEndcap,
0092 )
0093 _positionCalcECAL_3x3_nodepth = _positionCalcECAL_all_nodepth.clone(
0094     posCalcNCrystals = 9
0095 )
0096 _positionCalcECAL_all_withdepth = cms.PSet(
0097     algoName = cms.string("ECAL2DPositionCalcWithDepthCorr"),
0098     ##
0099     minFractionInCalc = cms.double(0.0),
0100     minAllowedNormalization = cms.double(0.0),
0101     T0_EB = cms.double(7.4),
0102     T0_EE = cms.double(3.1),
0103     T0_ES = cms.double(1.2),
0104     W0 = cms.double(4.2),
0105     X0 = cms.double(0.89)
0106 )
0107 
0108 # pf clustering
0109 _pfClusterizer_ECAL = cms.PSet(
0110     algoName = cms.string("Basic2DGenericPFlowClusterizer"),
0111     #pf clustering parameters
0112     minFractionToKeep = cms.double(1e-7),
0113     positionCalc = _positionCalcECAL_3x3_nodepth,
0114     allCellsPositionCalc = _positionCalcECAL_all_nodepth,
0115     positionCalcForConvergence = _positionCalcECAL_all_withdepth,
0116     showerSigma = cms.double(1.5),
0117     stoppingTolerance = cms.double(1e-8),
0118     maxIterations = cms.uint32(50),
0119     excludeOtherSeeds = cms.bool(True),
0120     minFracTot = cms.double(1e-20), ## numerical stabilization
0121     recHitEnergyNorms = cms.VPSet(
0122     cms.PSet( detector = cms.string("ECAL_BARREL"),
0123               recHitEnergyNorm = cms.double(0.08)
0124               ),
0125     cms.PSet( detector = cms.string("ECAL_ENDCAP"),
0126               recHitEnergyNorm = cms.double(0.3)
0127               )
0128     )
0129 )
0130 
0131 particleFlowClusterECALUncorrected = cms.EDProducer(
0132     "PFClusterProducer",
0133     recHitsSource = cms.InputTag("particleFlowRecHitECAL"),
0134     recHitCleaners = cms.VPSet(),
0135     #seedCleaners = cms.VPSet(_seedsFlagsCleaner_ECAL,_seedCleaner_ECAL),
0136     seedCleaners = cms.VPSet(_seedsFlagsCleaner_ECAL),
0137     seedFinder = _localMaxSeeds_ECAL,
0138     initialClusteringStep = _topoClusterizer_ECAL,
0139     pfClusterBuilder = _pfClusterizer_ECAL,
0140     positionReCalc = _positionCalcECAL_all_withdepth,
0141     energyCorrector = cms.PSet()
0142     )