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  ),
45 
46  #threshold for final SuperCluster Et
47  thresh_SCEt = cms.double(4.0),
48 
49  # threshold in ECAL
50  thresh_PFClusterSeedBarrel = cms.double(3.0),
51  thresh_PFClusterBarrel = cms.double(0.5),
52 
53  thresh_PFClusterSeedEndcap = cms.double(5.0),
54  thresh_PFClusterEndcap = cms.double(0.5),
55 
56  # window width in ECAL
57  phiwidth_SuperClusterBarrel = cms.double(0.28),
58  etawidth_SuperClusterBarrel = cms.double(0.04),
59 
60  phiwidth_SuperClusterEndcap = cms.double(0.28),
61  etawidth_SuperClusterEndcap = cms.double(0.04),
62 
63  # turn on merging of the seed cluster to its nearest neighbors
64  # that share a rechit
65  doSatelliteClusterMerge = cms.bool(False),
66  satelliteClusterSeedThreshold = cms.double(50.0),
67  satelliteMajorityFraction = cms.double(0.5),
68  dropUnseedable = cms.bool(False),
69  #thresh_PFClusterMustacheOutBarrel = cms.double(0.),
70  #thresh_PFClusterMustacheOutEndcap = cms.double(0.),
71 
72  #corrections
73  applyCrackCorrections = cms.bool(False)
74 
75 )
76 
77 particleFlowSuperClusterECALMustache = cms.EDProducer(
78  "PFECALSuperClusterProducer",
79  # verbosity
80  verbose = cms.untracked.bool(False),
81  #clustering type: "Box" or "Mustache"
82  ClusteringType = cms.string("Mustache"),
83  #energy weighting: "Raw", "CalibratedNoPS", "CalibratedTotal"
84  EnergyWeight = cms.string("Raw"),
85 
86  #this overrides both dphi cuts below if true!
87  useDynamicDPhiWindow = cms.bool(True),
88 
89  #PFClusters collection
90  PFClusters = cms.InputTag("particleFlowClusterECAL"),
91  ESAssociation = cms.InputTag("particleFlowClusterECAL"),
92  BeamSpot = cms.InputTag("offlineBeamSpot"),
93 
94  PFBasicClusterCollectionBarrel = cms.string("particleFlowBasicClusterECALBarrel"),
95  PFSuperClusterCollectionBarrel = cms.string("particleFlowSuperClusterECALBarrel"),
96  PFBasicClusterCollectionEndcap = cms.string("particleFlowBasicClusterECALEndcap"),
97  PFSuperClusterCollectionEndcap = cms.string("particleFlowSuperClusterECALEndcap"),
98  PFBasicClusterCollectionPreshower = cms.string("particleFlowBasicClusterECALPreshower"),
99  PFSuperClusterCollectionEndcapWithPreshower = cms.string("particleFlowSuperClusterECALEndcapWithPreshower"),
100 
101  # are the seed thresholds Et or Energy?
102  seedThresholdIsET = cms.bool(True),
103  # regression setup
104  useRegression = cms.bool(True),
105  regressionConfig = cms.PSet(
106  regressionKeyEB = cms.string('pfscecal_EBCorrection_offline_v2'),
107  uncertaintyKeyEB = cms.string('pfscecal_EBUncertainty_offline_v2'),
108  regressionKeyEE = cms.string('pfscecal_EECorrection_offline_v2'),
109  uncertaintyKeyEE = cms.string('pfscecal_EEUncertainty_offline_v2'),
110  vertexCollection = cms.InputTag("offlinePrimaryVertices"),
111  ecalRecHitsEB = cms.InputTag('ecalRecHit','EcalRecHitsEB'),
112  ecalRecHitsEE = cms.InputTag('ecalRecHit','EcalRecHitsEE')
113  ),
114 
115  #threshold for final SuperCluster Et
116  thresh_SCEt = cms.double(4.0),
117 
118  # threshold in ECAL
119  thresh_PFClusterSeedBarrel = cms.double(1.0),
120  thresh_PFClusterBarrel = cms.double(0.0),
121 
122  thresh_PFClusterSeedEndcap = cms.double(1.0),
123  thresh_PFClusterEndcap = cms.double(0.0),
124 
125  # window width in ECAL ( these don't mean anything for Mustache )
126  phiwidth_SuperClusterBarrel = cms.double(0.6),
127  etawidth_SuperClusterBarrel = cms.double(0.04),
128 
129  phiwidth_SuperClusterEndcap = cms.double(0.6),
130  etawidth_SuperClusterEndcap = cms.double(0.04),
131 
132  # threshold in preshower
133  thresh_PFClusterES = cms.double(0.),
134 
135  # turn on merging of the seed cluster to its nearest neighbors
136  # that share a rechit
137  doSatelliteClusterMerge = cms.bool(False),
138  satelliteClusterSeedThreshold = cms.double(50.0),
139  satelliteMajorityFraction = cms.double(0.5),
140  dropUnseedable = cms.bool(False),
141  #thresh_PFClusterMustacheOutBarrel = cms.double(0.),
142  #thresh_PFClusterMustacheOutEndcap = cms.double(0.),
143 
144  #corrections
145  applyCrackCorrections = cms.bool(False)
146 
147 )
148 
149 #define the default clustering type
150 particleFlowSuperClusterECAL = particleFlowSuperClusterECALMustache.clone()
151 
152 from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
153 pp_on_AA_2018.toModify(particleFlowSuperClusterECAL, useDynamicDPhiWindow = False)
154 pp_on_AA_2018.toModify(particleFlowSuperClusterECAL, phiwidth_SuperClusterBarrel = 0.20)
155 pp_on_AA_2018.toModify(particleFlowSuperClusterECAL, phiwidth_SuperClusterEndcap = 0.20)