62 geoToken_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
63 sevLvToken_ = esConsumes<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd>();
70 const std::vector<std::string> flagnames = ps.
getParameter<std::vector<std::string> >(
"RecHitFlagToBeExcluded");
72 const std::vector<int> flagsexcl = StringToEnumValue<EcalRecHit::Flags>(flagnames);
74 const std::vector<std::string> severitynames =
75 ps.
getParameter<std::vector<std::string> >(
"RecHitSeverityToBeExcluded");
77 const std::vector<int> severitiesexcl = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynames);
115 edm::LogError(
"MissingProduct") <<
"could not get a handle on the EcalRecHitCollection!";
124 std::unique_ptr<const CaloSubdetectorTopology> topology;
129 topology = std::make_unique<EcalBarrelTopology>(*geoHandle);
134 hit_collection, geometry_p, basicClusters, sevLv.
product(),
false, std::vector<RectangularEtaPhiRegion>());
136 LogTrace(
"EcalClusters") <<
"Finished clustering - BasicClusterCollection returned to producer...";
139 auto basicclusters_p = std::make_unique<reco::BasicClusterCollection>();
140 basicclusters_p->assign(basicClusters.begin(), basicClusters.end());
145 LogTrace(
"EcalClusters") <<
"Basic Clusters now put into event.";
151 edm::LogError(
"Missing Product") <<
"could not get a handle on the BasicClusterCollection!";
157 LogTrace(
"EcalClusters") <<
"Got the BasicClusterCollection" << std::endl;
167 auto superclusters_p = std::make_unique<reco::SuperClusterCollection>();
171 LogTrace(
"EcalClusters") <<
"Hybrid Clusters (Basic/Super) added to the Event! :-)";
HybridClusterProducer(const edm::ParameterSet &ps)
T getParameter(std::string const &) const
std::string superclusterCollection_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void push_back(Ptr< T > const &iPtr)
T const * product() const
edm::EDGetTokenT< EcalRecHitCollection > hitsToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > sevLvToken_
Log< level::Error, false > LogError
std::string basicclusterCollection_
void produce(edm::Event &, const edm::EventSetup &) override
T const * product() const
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
reco::SuperClusterCollection makeSuperClusters(const reco::CaloClusterPtrVector &)
#define DEFINE_FWK_MODULE(type)
void setDynamicPhiRoad(const edm::ParameterSet &bremRecoveryPset)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
PositionCalc posCalculator_
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
HybridClusterAlgo * hybrid_p
void makeClusters(const EcalRecHitCollection *, const CaloSubdetectorGeometry *geometry, reco::BasicClusterCollection &basicClusters, const EcalSeverityLevelAlgo *sevLv, bool regional=false, const std::vector< RectangularEtaPhiRegion > ®ions=std::vector< RectangularEtaPhiRegion >())
~HybridClusterProducer() override
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geoToken_