CMS 3D CMS Logo

particleFlowClusterECALUncorrected_cfi.py
Go to the documentation of this file.
1 from __future__ import absolute_import
2 import FWCore.ParameterSet.Config as cms
3 
4 from .particleFlowCaloResolution_cfi import _timeResolutionECALBarrel, _timeResolutionECALEndcap
5 
6 #### PF CLUSTER ECAL ####
7 
8 #cleaning
9 _spikeAndDoubleSpikeCleaner_ECAL = cms.PSet(
10  algoName = cms.string("SpikeAndDoubleSpikeCleaner"),
11  cleaningByDetector = cms.VPSet(
12  cms.PSet( detector = cms.string("ECAL_BARREL"),
13  #single spike
14  singleSpikeThresh = cms.double(4.0),
15  minS4S1_a = cms.double(0.04), #constant term
16  minS4S1_b = cms.double(-0.024), #log pt scaling
17  #double spike
18  doubleSpikeThresh = cms.double(10.0),
19  doubleSpikeS6S2 = cms.double(0.04),
20  energyThresholdModifier = cms.double(2.0), ## aka "tighterE"
21  fractionThresholdModifier = cms.double(3.0) ## aka "tighterF"
22  ),
23  cms.PSet( detector = cms.string("ECAL_ENDCAP"),
24  #single spike
25  singleSpikeThresh = cms.double(15.0),
26  minS4S1_a = cms.double(0.02), #constant term
27  minS4S1_b = cms.double(-0.0125), #log pt scaling
28  #double spike
29  doubleSpikeThresh = cms.double(1e9),
30  doubleSpikeS6S2 = cms.double(-1.0),
31  energyThresholdModifier = cms.double(2.0), ## aka "tighterE"
32  fractionThresholdModifier = cms.double(3.0) ## aka "tighterF"
33  )
34  )
35 )
36 
37 #flag cleaning to mark hits not to be used for seeding
38 _seedsFlagsCleaner_ECAL = cms.PSet(
39  algoName = cms.string("FlagsCleanerECAL"),
40  #RecHitFlagsToBeExcluded= cms.vstring('kNeighboursRecovered')
41  RecHitFlagsToBeExcluded= cms.vstring()
42 )
43 
44 # crystal-dependent seeding thresholds
45 _seedCleaner_ECAL = cms.PSet(
46  algoName = cms.string("ECALPFSeedCleaner"),
47 )
48 
49 
50 #seeding
51 _localMaxSeeds_ECAL = cms.PSet(
52  algoName = cms.string("LocalMaximumSeedFinder"),
53  thresholdsByDetector = cms.VPSet(
54  cms.PSet( detector = cms.string("ECAL_ENDCAP"),
55  seedingThreshold = cms.double(0.60),
56  seedingThresholdPt = cms.double(0.15)
57  ),
58  cms.PSet( detector = cms.string("ECAL_BARREL"),
59  seedingThreshold = cms.double(0.23),
60  seedingThresholdPt = cms.double(0.0)
61  )
62  ),
63  nNeighbours = cms.int32(8)
64 )
65 
66 # topo clusterizer
67 _topoClusterizer_ECAL = cms.PSet(
68  algoName = cms.string("Basic2DGenericTopoClusterizer"),
69  thresholdsByDetector = cms.VPSet(
70  cms.PSet( detector = cms.string("ECAL_BARREL"),
71  gatheringThreshold = cms.double(0.08),
72  gatheringThresholdPt = cms.double(0.0)
73  ),
74  cms.PSet( detector = cms.string("ECAL_ENDCAP"),
75  gatheringThreshold = cms.double(0.3),
76  gatheringThresholdPt = cms.double(0.0)
77  )
78  ),
79  useCornerCells = cms.bool(True)
80 )
81 
82 #position calculations
83 _positionCalcECAL_all_nodepth = cms.PSet(
84  algoName = cms.string("Basic2DGenericPFlowPositionCalc"),
85 
86  minFractionInCalc = cms.double(1e-9),
87  posCalcNCrystals = cms.int32(-1),
88  logWeightDenominator = cms.double(0.08), # same as gathering threshold
89  minAllowedNormalization = cms.double(1e-9),
90  timeResolutionCalcBarrel = _timeResolutionECALBarrel,
91  timeResolutionCalcEndcap = _timeResolutionECALEndcap,
92 )
93 _positionCalcECAL_3x3_nodepth = _positionCalcECAL_all_nodepth.clone(
94  posCalcNCrystals = cms.int32(9)
95 )
96 _positionCalcECAL_all_withdepth = cms.PSet(
97  algoName = cms.string("ECAL2DPositionCalcWithDepthCorr"),
98 
99  minFractionInCalc = cms.double(0.0),
100  minAllowedNormalization = cms.double(0.0),
101  T0_EB = cms.double(7.4),
102  T0_EE = cms.double(3.1),
103  T0_ES = cms.double(1.2),
104  W0 = cms.double(4.2),
105  X0 = cms.double(0.89)
106 )
107 
108 # pf clustering
109 _pfClusterizer_ECAL = cms.PSet(
110  algoName = cms.string("Basic2DGenericPFlowClusterizer"),
111  #pf clustering parameters
112  minFractionToKeep = cms.double(1e-7),
113  positionCalc = _positionCalcECAL_3x3_nodepth,
114  allCellsPositionCalc = _positionCalcECAL_all_nodepth,
115  positionCalcForConvergence = _positionCalcECAL_all_withdepth,
116  showerSigma = cms.double(1.5),
117  stoppingTolerance = cms.double(1e-8),
118  maxIterations = cms.uint32(50),
119  excludeOtherSeeds = cms.bool(True),
120  minFracTot = cms.double(1e-20), ## numerical stabilization
121  recHitEnergyNorms = cms.VPSet(
122  cms.PSet( detector = cms.string("ECAL_BARREL"),
123  recHitEnergyNorm = cms.double(0.08)
124  ),
125  cms.PSet( detector = cms.string("ECAL_ENDCAP"),
126  recHitEnergyNorm = cms.double(0.3)
127  )
128  )
129 )
130 
131 particleFlowClusterECALUncorrected = cms.EDProducer(
132  "PFClusterProducer",
133  recHitsSource = cms.InputTag("particleFlowRecHitECAL"),
134  recHitCleaners = cms.VPSet(),
135  #seedCleaners = cms.VPSet(_seedsFlagsCleaner_ECAL,_seedCleaner_ECAL),
136  seedCleaners = cms.VPSet(_seedsFlagsCleaner_ECAL),
137  seedFinder = _localMaxSeeds_ECAL,
138  initialClusteringStep = _topoClusterizer_ECAL,
139  pfClusterBuilder = _pfClusterizer_ECAL,
140  positionReCalc = _positionCalcECAL_all_withdepth,
141  energyCorrector = cms.PSet()
142  )