CMS 3D CMS Logo

particleFlowSuperClusterECAL_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 import os
3 
4 particleFlowSuperClusterECALBox = cms.EDProducer(
5  "PFECALSuperClusterProducer",
6  # verbosity
7  verbose = cms.untracked.bool(False),
8  #clustering type: "Box" or "Mustache"
9  ClusteringType = cms.string("Box"),
10  #energy weighting: "Raw", "CalibratedNoPS", "CalibratedTotal"
11  EnergyWeight = cms.string("Raw"),
12 
13  #this overrides both dphi cuts below if true!
14  useDynamicDPhiWindow = cms.bool(False),
15 
16  #PFClusters collection
17  PFClusters = cms.InputTag("particleFlowClusterECAL"),
18  ESAssociation = cms.InputTag("particleFlowClusterECAL"),
19  BeamSpot = cms.InputTag("offlineBeamSpot"),
20 
21  PFBasicClusterCollectionBarrel = cms.string("particleFlowBasicClusterECALBarrel"),
22  PFSuperClusterCollectionBarrel = cms.string("particleFlowSuperClusterECALBarrel"),
23  PFBasicClusterCollectionEndcap = cms.string("particleFlowBasicClusterECALEndcap"),
24  PFSuperClusterCollectionEndcap = cms.string("particleFlowSuperClusterECALEndcap"),
25  PFBasicClusterCollectionPreshower = cms.string("particleFlowBasicClusterECALPreshower"),
26  PFSuperClusterCollectionEndcapWithPreshower = cms.string("particleFlowSuperClusterECALEndcapWithPreshower"),
27 
28  #use preshower ?
29  use_preshower = cms.bool(True),
30 
31  # are the seed thresholds Et or Energy?
32  seedThresholdIsET = cms.bool(True),
33 
34  # regression setup
35  useRegression = cms.bool(False), #regressions are mustache only
36  regressionConfig = cms.PSet(
37  regressionKeyEB = cms.string('pfscecal_EBCorrection_offline_v2'),
38  uncertaintyKeyEB = cms.string('pfscecal_EBUncertainty_offline_v2'),
39  regressionKeyEE = cms.string('pfscecal_EECorrection_offline_v2'),
40  uncertaintyKeyEE = cms.string('pfscecal_EEUncertainty_offline_v2'),
41  vertexCollection = cms.InputTag("offlinePrimaryVertices"),
42  ecalRecHitsEB = cms.InputTag('ecalRecHit','EcalRecHitsEB'),
43  ecalRecHitsEE = cms.InputTag('ecalRecHit','EcalRecHitsEE'),
44  applySigmaIetaIphiBug = cms.bool(False)
45  ),
46 
47  #threshold for final SuperCluster Et
48  thresh_SCEt = cms.double(4.0),
49 
50  # threshold in ECAL
51  thresh_PFClusterSeedBarrel = cms.double(3.0),
52  thresh_PFClusterBarrel = cms.double(0.5),
53 
54  thresh_PFClusterSeedEndcap = cms.double(5.0),
55  thresh_PFClusterEndcap = cms.double(0.5),
56 
57  # window width in ECAL
58  phiwidth_SuperClusterBarrel = cms.double(0.28),
59  etawidth_SuperClusterBarrel = cms.double(0.04),
60 
61  phiwidth_SuperClusterEndcap = cms.double(0.28),
62  etawidth_SuperClusterEndcap = cms.double(0.04),
63 
64  # turn on merging of the seed cluster to its nearest neighbors
65  # that share a rechit
66  doSatelliteClusterMerge = cms.bool(False),
67  satelliteClusterSeedThreshold = cms.double(50.0),
68  satelliteMajorityFraction = cms.double(0.5),
69  dropUnseedable = cms.bool(False),
70  #thresh_PFClusterMustacheOutBarrel = cms.double(0.),
71  #thresh_PFClusterMustacheOutEndcap = cms.double(0.),
72 
73  #corrections
74  applyCrackCorrections = cms.bool(False)
75 
76 )
77 
78 particleFlowSuperClusterECALMustache = cms.EDProducer(
79  "PFECALSuperClusterProducer",
80  # verbosity
81  verbose = cms.untracked.bool(False),
82  #clustering type: "Box" or "Mustache"
83  ClusteringType = cms.string("Mustache"),
84  #energy weighting: "Raw", "CalibratedNoPS", "CalibratedTotal"
85  EnergyWeight = cms.string("Raw"),
86 
87  #this overrides both dphi cuts below if true!
88  useDynamicDPhiWindow = cms.bool(True),
89 
90  #PFClusters collection
91  PFClusters = cms.InputTag("particleFlowClusterECAL"),
92  ESAssociation = cms.InputTag("particleFlowClusterECAL"),
93  BeamSpot = cms.InputTag("offlineBeamSpot"),
94 
95  PFBasicClusterCollectionBarrel = cms.string("particleFlowBasicClusterECALBarrel"),
96  PFSuperClusterCollectionBarrel = cms.string("particleFlowSuperClusterECALBarrel"),
97  PFBasicClusterCollectionEndcap = cms.string("particleFlowBasicClusterECALEndcap"),
98  PFSuperClusterCollectionEndcap = cms.string("particleFlowSuperClusterECALEndcap"),
99  PFBasicClusterCollectionPreshower = cms.string("particleFlowBasicClusterECALPreshower"),
100  PFSuperClusterCollectionEndcapWithPreshower = cms.string("particleFlowSuperClusterECALEndcapWithPreshower"),
101 
102  # are the seed thresholds Et or Energy?
103  seedThresholdIsET = cms.bool(True),
104  # regression setup
105  useRegression = cms.bool(True),
106  regressionConfig = cms.PSet(
107  regressionKeyEB = cms.string('pfscecal_EBCorrection_offline_v2'),
108  uncertaintyKeyEB = cms.string('pfscecal_EBUncertainty_offline_v2'),
109  regressionKeyEE = cms.string('pfscecal_EECorrection_offline_v2'),
110  uncertaintyKeyEE = cms.string('pfscecal_EEUncertainty_offline_v2'),
111  vertexCollection = cms.InputTag("offlinePrimaryVertices"),
112  ecalRecHitsEB = cms.InputTag('ecalRecHit','EcalRecHitsEB'),
113  ecalRecHitsEE = cms.InputTag('ecalRecHit','EcalRecHitsEE'),
114  applySigmaIetaIphiBug = cms.bool(False)
115  ),
116 
117  #threshold for final SuperCluster Et
118  thresh_SCEt = cms.double(4.0),
119 
120  # threshold in ECAL
121  thresh_PFClusterSeedBarrel = cms.double(1.0),
122  thresh_PFClusterBarrel = cms.double(0.0),
123 
124  thresh_PFClusterSeedEndcap = cms.double(1.0),
125  thresh_PFClusterEndcap = cms.double(0.0),
126 
127  # window width in ECAL ( these don't mean anything for Mustache )
128  phiwidth_SuperClusterBarrel = cms.double(0.6),
129  etawidth_SuperClusterBarrel = cms.double(0.04),
130 
131  phiwidth_SuperClusterEndcap = cms.double(0.6),
132  etawidth_SuperClusterEndcap = cms.double(0.04),
133 
134  # threshold in preshower
135  thresh_PFClusterES = cms.double(0.),
136 
137  # turn on merging of the seed cluster to its nearest neighbors
138  # that share a rechit
139  doSatelliteClusterMerge = cms.bool(False),
140  satelliteClusterSeedThreshold = cms.double(50.0),
141  satelliteMajorityFraction = cms.double(0.5),
142  dropUnseedable = cms.bool(False),
143  #thresh_PFClusterMustacheOutBarrel = cms.double(0.),
144  #thresh_PFClusterMustacheOutEndcap = cms.double(0.),
145 
146  #corrections
147  applyCrackCorrections = cms.bool(False)
148 
149 )
150 
151 #define the default clustering type
152 particleFlowSuperClusterECAL = particleFlowSuperClusterECALMustache.clone()
153 
154 from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
155 pp_on_AA_2018.toModify(particleFlowSuperClusterECAL, useDynamicDPhiWindow = False)
156 pp_on_AA_2018.toModify(particleFlowSuperClusterECAL, phiwidth_SuperClusterBarrel = 0.20)
157 pp_on_AA_2018.toModify(particleFlowSuperClusterECAL, phiwidth_SuperClusterEndcap = 0.20)