Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-25 02:29:59

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