57 return std::make_unique<reco::SCProducerCache>(
config);
99 const std::string ClusterType__Mustache(
"Mustache");
103 const std::string EnergyWeight__CalibratedNoPS(
"CalibratedNoPS");
104 const std::string EnergyWeight__CalibratedTotal(
"CalibratedTotal");
109 : superClusterAlgo_(gcache) {
118 if (_typename == ClusterType__BOX) {
120 }
else if (_typename == ClusterType__Mustache) {
122 }
else if (_typename == ClusterType__DeepSC) {
125 throw cms::Exception(
"InvalidClusteringType") <<
"You have not chosen a valid clustering type," 126 <<
" please choose from \"Box\" or \"Mustache\" or \"DeepSC\"!";
130 if (_weightname == EnergyWeight__Raw) {
132 }
else if (_weightname == EnergyWeight__CalibratedNoPS) {
134 }
else if (_weightname == EnergyWeight__CalibratedTotal) {
137 throw cms::Exception(
"InvalidClusteringType") <<
"You have not chosen a valid energy weighting scheme," 138 <<
" please choose from \"Raw\", \"CalibratedNoPS\", or" 139 <<
" \"CalibratedTotal\"!";
145 bool useDynamicDPhi = iConfig.
getParameter<
bool>(
"useDynamicDPhiWindow");
147 double threshPFClusterSeedBarrel = iConfig.
getParameter<
double>(
"thresh_PFClusterSeedBarrel");
148 double threshPFClusterBarrel = iConfig.
getParameter<
double>(
"thresh_PFClusterBarrel");
150 double threshPFClusterSeedEndcap = iConfig.
getParameter<
double>(
"thresh_PFClusterSeedEndcap");
151 double threshPFClusterEndcap = iConfig.
getParameter<
double>(
"thresh_PFClusterEndcap");
153 double phiwidthSuperClusterBarrel = iConfig.
getParameter<
double>(
"phiwidth_SuperClusterBarrel");
154 double etawidthSuperClusterBarrel = iConfig.
getParameter<
double>(
"etawidth_SuperClusterBarrel");
156 double phiwidthSuperClusterEndcap = iConfig.
getParameter<
double>(
"phiwidth_SuperClusterEndcap");
157 double etawidthSuperClusterEndcap = iConfig.
getParameter<
double>(
"etawidth_SuperClusterEndcap");
196 bool applyCrackCorrections_ = iConfig.
getParameter<
bool>(
"applyCrackCorrections");
207 iConfig.
getParameter<
string>(
"PFSuperClusterCollectionEndcapWithPreshower");
235 auto caloClustersEB = std::make_unique<reco::CaloClusterCollection>();
236 auto caloClustersEE = std::make_unique<reco::CaloClusterCollection>();
237 auto caloClustersES = std::make_unique<reco::CaloClusterCollection>();
239 std::map<reco::CaloClusterPtr, unsigned int> pfClusterMapEB;
240 std::map<reco::CaloClusterPtr, unsigned int> pfClusterMapEE;
241 std::map<reco::CaloClusterPtr, unsigned int> pfClusterMapES;
246 if (!pfClusterMapEB.count(*pfclus)) {
248 caloClustersEB->push_back(caloclus);
249 pfClusterMapEB[*pfclus] = caloClustersEB->size() - 1;
252 <<
"Found an EB pfcluster matched to more than one EB supercluster!" <<
std::dec << std::endl;
258 if (!pfClusterMapEE.count(*pfclus)) {
260 caloClustersEE->push_back(caloclus);
261 pfClusterMapEE[*pfclus] = caloClustersEE->size() - 1;
264 <<
"Found an EE pfcluster matched to more than one EE supercluster!" <<
std::dec << std::endl;
269 if (!pfClusterMapES.count(*pfclus)) {
271 caloClustersES->push_back(caloclus);
272 pfClusterMapES[*pfclus] = caloClustersES->size() - 1;
275 <<
"Found an ES pfcluster matched to more than one EE supercluster!" <<
std::dec << std::endl;
281 auto pfClusterAssociationEBEE = std::make_unique<edm::ValueMap<reco::CaloClusterPtr>>();
282 auto pfClusterAssociationES = std::make_unique<edm::ValueMap<reco::CaloClusterPtr>>();
285 std::vector<reco::CaloClusterPtr> clusptrsEB(caloClustersEB->size());
286 std::vector<reco::CaloClusterPtr> clusptrsEE(caloClustersEE->size());
287 std::vector<reco::CaloClusterPtr> clusptrsES(caloClustersES->size());
300 ebsc.setSeed(seedptr);
304 int caloclusidx = pfClusterMapEB[*pfclus];
307 clusptrsEB[caloclusidx] = *pfclus;
313 eesc.setSeed(seedptr);
317 int caloclusidx = pfClusterMapEE[*pfclus];
320 clusptrsEE[caloclusidx] = *pfclus;
327 int caloclusidx = pfClusterMapES[*pfclus];
330 clusptrsES[caloclusidx] = *pfclus;
332 eesc.setPreshowerClusters(psclusters);
337 fillerEBEE.
insert(caloClusHandleEB, clusptrsEB.begin(), clusptrsEB.end());
338 fillerEBEE.
insert(caloClusHandleEE, clusptrsEE.begin(), clusptrsEE.end());
342 fillerES.
insert(caloClusHandleES, clusptrsES.begin(), clusptrsES.end());
354 desc.add<
std::string>(
"PFSuperClusterCollectionEndcap",
"particleFlowSuperClusterECALEndcap");
355 desc.add<
bool>(
"doSatelliteClusterMerge",
false);
356 desc.add<
double>(
"thresh_PFClusterBarrel", 0.0);
357 desc.add<
std::string>(
"PFBasicClusterCollectionBarrel",
"particleFlowBasicClusterECALBarrel");
358 desc.add<
bool>(
"useRegression",
true);
359 desc.add<
double>(
"satelliteMajorityFraction", 0.5);
360 desc.add<
double>(
"thresh_PFClusterEndcap", 0.0);
362 desc.add<
std::string>(
"PFBasicClusterCollectionPreshower",
"particleFlowBasicClusterECALPreshower");
363 desc.addUntracked<
bool>(
"verbose",
false);
364 desc.add<
double>(
"thresh_SCEt", 4.0);
365 desc.add<
double>(
"etawidth_SuperClusterEndcap", 0.04);
366 desc.add<
double>(
"phiwidth_SuperClusterEndcap", 0.6);
367 desc.add<
bool>(
"useDynamicDPhiWindow",
true);
368 desc.add<
std::string>(
"PFSuperClusterCollectionBarrel",
"particleFlowSuperClusterECALBarrel");
370 desc.add<
bool>(
"applyCrackCorrections",
false);
371 desc.add<
double>(
"satelliteClusterSeedThreshold", 50.0);
372 desc.add<
double>(
"etawidth_SuperClusterBarrel", 0.04);
373 desc.add<
std::string>(
"PFBasicClusterCollectionEndcap",
"particleFlowBasicClusterECALEndcap");
375 desc.add<
double>(
"thresh_PFClusterSeedBarrel", 1.0);
378 desc.add<
double>(
"thresh_PFClusterSeedEndcap", 1.0);
379 desc.add<
double>(
"phiwidth_SuperClusterBarrel", 0.6);
380 desc.add<
double>(
"thresh_PFClusterES", 0.0);
381 desc.add<
bool>(
"seedThresholdIsET",
true);
382 desc.add<
bool>(
"isOOTCollection",
false);
386 "particleFlowSuperClusterECALEndcapWithPreshower");
387 desc.add<
bool>(
"dropUnseedable",
false);
391 deepSCParams.add<
std::string>(
"configFileClusterFeatures",
"");
392 deepSCParams.add<
std::string>(
"configFileWindowFeatures",
"");
393 deepSCParams.add<
std::string>(
"configFileHitsFeatures",
"");
394 deepSCParams.add<
uint>(
"nClusterFeatures", 12);
395 deepSCParams.add<
uint>(
"nWindowFeatures", 18);
396 deepSCParams.add<
uint>(
"nHitsFeatures", 4);
397 deepSCParams.add<
uint>(
"maxNClusters", 40);
398 deepSCParams.add<
uint>(
"maxNRechits", 40);
399 deepSCParams.add<
uint>(
"batchSize", 64);
400 deepSCParams.add<
std::string>(
"collectionStrategy",
"Cascade");
407 ClusterType__Mustache >> emptyGroup
or ClusterType__BOX >> emptyGroup
or 408 ClusterType__DeepSC >>
410 desc.addNode(switchNode);
412 descriptions.
add(
"particleFlowSuperClusterECALMustache",
desc);
T getParameter(std::string const &) const
std::unique_ptr< reco::SuperClusterCollection > & getEEOutputSCCollection()
void setMajorityFraction(const double f)
void setSatelliteMerging(const bool doit)
void setThreshPFClusterSeedEndcap(double thresh)
PFECALSuperClusterAlgo::clustering_type _theclusteringtype
void push_back(Ptr< T > const &iPtr)
void insert(const H &h, I begin, I end)
std::string PFBasicClusterCollectionEndcap_
void setCrackCorrections(bool applyCrackCorrections)
satelliteClusterSeedThreshold
std::string PFClusterAssociationEBEE_
void setThreshPFClusterBarrel(double thresh)
void setThreshSuperClusterEt(double thresh)
std::shared_ptr< PFEnergyCalibration > thePFEnergyCalibration_
void setEtawidthSuperClusterBarrel(double etawidth)
void setClusteringType(clustering_type thetype)
T getUntrackedParameter(std::string const &, T const &) const
void setEtawidthSuperClusterEndcap(double etawidth)
void setPhiwidthSuperClusterBarrel(double phiwidth)
void setVerbosityLevel(bool verbose)
void loadAndSortPFClusters(const edm::Event &evt)
void update(const edm::EventSetup &)
void setThreshPFClusterEndcap(double thresh)
void setTokens(const edm::ParameterSet &, edm::ConsumesCollector &&)
void setUseETForSeeding(bool useET)
PFECALSuperClusterAlgo superClusterAlgo_
clustering algorithm
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
satelliteMajorityFraction
std::unique_ptr< reco::SuperClusterCollection > & getEBOutputSCCollection()
static std::unique_ptr< reco::SCProducerCache > initializeGlobalCache(const edm::ParameterSet &config)
void setEnergyWeighting(energy_weight thetype)
#define DEFINE_FWK_MODULE(type)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::string PFSuperClusterCollectionBarrel_
std::string PFBasicClusterCollectionPreshower_
void setThreshPFClusterSeedBarrel(double thresh)
PFECALSuperClusterAlgo::energy_weight _theenergyweight
~PFECALSuperClusterProducer() override
static edm::ParameterSetDescription makePSetDescription()
void produce(edm::Event &, const edm::EventSetup &) override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
void setUseDynamicDPhi(bool useit)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void setDropUnseedable(const bool d)
void updateSCParams(const edm::EventSetup &)
std::string PFClusterAssociationES_
void setPhiwidthSuperClusterEndcap(double phiwidth)
dictionary config
Read in AllInOne config in JSON format.
std::string PFSuperClusterCollectionEndcapWithPreshower_
void setUseRegression(bool useRegression)
std::string PFSuperClusterCollectionEndcap_
std::string PFBasicClusterCollectionBarrel_
void setSatelliteThreshold(const double t)
void setPFClusterCalibration(const std::shared_ptr< PFEnergyCalibration > &)
static void globalEndJob(const reco::SCProducerCache *)
PFECALSuperClusterProducer(const edm::ParameterSet &, const reco::SCProducerCache *gcache)
void setIsOOTCollection(bool isOOTCollection)