89 if (verbosityString ==
"DEBUG")
91 else if (verbosityString ==
"WARNING")
93 else if (verbosityString ==
"INFO")
110 double barrelSeedThreshold = ps.
getParameter<
double>(
"IslandBarrelSeedThr");
111 double endcapSeedThreshold = ps.
getParameter<
double>(
"IslandEndcapSeedThr");
125 const std::vector<std::string> seedflagnamesEB =
126 ps.
getParameter<std::vector<std::string>>(
"SeedRecHitFlagToBeExcludedEB");
127 const std::vector<int> seedflagsexclEB = StringToEnumValue<EcalRecHit::Flags>(seedflagnamesEB);
129 const std::vector<std::string> seedflagnamesEE =
130 ps.
getParameter<std::vector<std::string>>(
"SeedRecHitFlagToBeExcludedEE");
131 const std::vector<int> seedflagsexclEE = StringToEnumValue<EcalRecHit::Flags>(seedflagnamesEE);
133 const std::vector<std::string> flagnamesEB = ps.
getParameter<std::vector<std::string>>(
"RecHitFlagToBeExcludedEB");
134 const std::vector<int> flagsexclEB = StringToEnumValue<EcalRecHit::Flags>(flagnamesEB);
136 const std::vector<std::string> flagnamesEE = ps.
getParameter<std::vector<std::string>>(
"RecHitFlagToBeExcludedEE");
137 const std::vector<int> flagsexclEE = StringToEnumValue<EcalRecHit::Flags>(flagnamesEE);
167 desc.
add<
std::string>(
"barrelClusterCollection",
"islandBarrelBasicClusters");
168 desc.
add<
std::string>(
"endcapClusterCollection",
"islandEndcapBasicClusters");
169 desc.
add<
double>(
"IslandBarrelSeedThr", 0.5);
170 desc.
add<
double>(
"IslandEndcapSeedThr", 0.18);
173 posCalcParameters.
add<
bool>(
"LogWeighted",
true);
174 posCalcParameters.
add<
double>(
"T0_barl", 7.4);
175 posCalcParameters.
add<
double>(
"T0_endc", 3.1);
176 posCalcParameters.
add<
double>(
"T0_endcPresh", 1.2);
177 posCalcParameters.
add<
double>(
"W0", 4.2);
178 posCalcParameters.
add<
double>(
"X0", 0.89);
181 desc.
add<
std::string>(
"clustershapecollectionEE",
"islandEndcapShape");
182 desc.
add<
std::string>(
"clustershapecollectionEB",
"islandBarrelShape");
183 desc.
add<
std::string>(
"barrelShapeAssociation",
"islandBarrelShapeAssoc");
184 desc.
add<
std::string>(
"endcapShapeAssociation",
"islandEndcapShapeAssoc");
185 desc.
add<std::vector<std::string>>(
"SeedRecHitFlagToBeExcludedEB", {});
186 desc.
add<std::vector<std::string>>(
"SeedRecHitFlagToBeExcludedEE", {});
187 desc.
add<std::vector<std::string>>(
"RecHitFlagToBeExcludedEB", {});
188 desc.
add<std::vector<std::string>>(
"RecHitFlagToBeExcludedEE", {});
189 descriptions.
add(
"IslandClusterProducer", desc);
220 std::unique_ptr<CaloSubdetectorTopology> topology_p;
225 topology_p = std::make_unique<EcalBarrelTopology>(*geoHandle);
228 topology_p = std::make_unique<EcalEndcapTopology>(*geoHandle);
236 clusters =
island_p->
makeClusters(hitCollection_p, geometry_p, topology_p.get(), geometryES_p, ecalPart);
239 std::vector<reco::ClusterShape> ClusVec;
240 for (
int erg = 0; erg < int(clusters.size()); ++erg) {
242 ClusVec.push_back(TestShape);
246 auto clustersshapes_p = std::make_unique<reco::ClusterShapeCollection>();
247 clustersshapes_p->assign(ClusVec.begin(), ClusVec.end());
255 auto clusters_p = std::make_unique<reco::BasicClusterCollection>();
256 clusters_p->assign(clusters.begin(), clusters.end());
264 auto shapeAssocs_p = std::make_unique<reco::BasicClusterShapeAssociationCollection>(bccHandle, clusHandle);
265 for (
unsigned int i = 0;
i < clusHandle->size();
i++) {
269 evt.
put(
std::move(shapeAssocs_p), clusterShapeAssociation);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
IslandClusterProducer(const edm::ParameterSet &ps)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
PositionCalc posCalculator_
std::string endcapClusterCollection_
std::string clustershapecollectionEE_
reco::ClusterShape Calculate(const reco::BasicCluster &passedCluster, const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry, const CaloSubdetectorTopology *topology)
edm::EDGetTokenT< EcalRecHitCollection > barrelRecHits_
edm::EDGetTokenT< EcalRecHitCollection > endcapRecHits_
std::string barrelClusterShapeAssociation_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool counterExceeded() const
ClusterShapeAlgo shapeAlgo_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
IslandClusterAlgo * island_p
std::vector< reco::BasicCluster > makeClusters(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry, const CaloSubdetectorTopology *topology_p, const CaloSubdetectorGeometry *geometryES_p, EcalPart ecalPart, bool regional=false, const std::vector< RectangularEtaPhiRegion > ®ions=std::vector< RectangularEtaPhiRegion >())
T const * product() const
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::string endcapClusterShapeAssociation_
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
const EcalRecHitCollection * getCollection(edm::Event &evt, const edm::EDGetTokenT< EcalRecHitCollection > &token)
void clusterizeECALPart(edm::Event &evt, const edm::EventSetup &es, const edm::EDGetTokenT< EcalRecHitCollection > &token, const std::string &clusterCollection, const std::string &clusterShapeAssociation, const IslandClusterAlgo::EcalPart &ecalPart)
std::string barrelClusterCollection_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_
void outputValidationInfo(reco::CaloClusterPtrVector &clusterPtrVector)
IslandClusterAlgo::VerbosityLevel verbosity
~IslandClusterProducer() override
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
void produce(edm::Event &, const edm::EventSetup &) override
std::string clustershapecollectionEB_