61 double barrelSeedThreshold = ps.
getParameter<
double>(
"IslandBarrelSeedThr");
62 double endcapSeedThreshold = ps.
getParameter<
double>(
"IslandEndcapSeedThr");
77 const std::vector<std::string> seedflagnamesEB = ps.
getParameter<std::vector<std::string> >(
"SeedRecHitFlagToBeExcludedEB");
78 const std::vector<int> seedflagsexclEB = StringToEnumValue<EcalRecHit::Flags>(seedflagnamesEB);
80 const std::vector<std::string> seedflagnamesEE = ps.
getParameter<std::vector<std::string> >(
"SeedRecHitFlagToBeExcludedEE");
81 const std::vector<int> seedflagsexclEE = StringToEnumValue<EcalRecHit::Flags>(seedflagnamesEE);
83 const std::vector<std::string> flagnamesEB = ps.
getParameter<std::vector<std::string> >(
"RecHitFlagToBeExcludedEB");
84 const std::vector<int> flagsexclEB = StringToEnumValue<EcalRecHit::Flags>(flagnamesEB);
86 const std::vector<std::string> flagnamesEE = ps.
getParameter<std::vector<std::string> >(
"RecHitFlagToBeExcludedEE");
87 const std::vector<int> flagsexclEE = StringToEnumValue<EcalRecHit::Flags>(flagnamesEE);
115 desc.
add<
std::string>(
"barrelClusterCollection",
"islandBarrelBasicClusters");
116 desc.
add<
std::string>(
"endcapClusterCollection",
"islandEndcapBasicClusters");
117 desc.
add<
double>(
"IslandBarrelSeedThr", 0.5);
118 desc.
add<
double>(
"IslandEndcapSeedThr", 0.18);
121 posCalcParameters.
add<
bool>(
"LogWeighted",
true);
122 posCalcParameters.
add<
double>(
"T0_barl", 7.4);
123 posCalcParameters.
add<
double>(
"T0_endc", 3.1);
124 posCalcParameters.
add<
double>(
"T0_endcPresh", 1.2);
125 posCalcParameters.
add<
double>(
"W0", 4.2);
126 posCalcParameters.
add<
double>(
"X0", 0.89);
129 desc.
add<
std::string>(
"clustershapecollectionEE",
"islandEndcapShape");
130 desc.
add<
std::string>(
"clustershapecollectionEB",
"islandBarrelShape");
131 desc.
add<
std::string>(
"barrelShapeAssociation",
"islandBarrelShapeAssoc");
132 desc.
add<
std::string>(
"endcapShapeAssociation",
"islandEndcapShapeAssoc");
133 desc.
add<std::vector<std::string>>(
"SeedRecHitFlagToBeExcludedEB", {});
134 desc.
add<std::vector<std::string>>(
"SeedRecHitFlagToBeExcludedEE", {});
135 desc.
add<std::vector<std::string>>(
"RecHitFlagToBeExcludedEB", {});
136 desc.
add<std::vector<std::string>>(
"RecHitFlagToBeExcludedEE", {});
137 descriptions.
add(
"IslandClusterProducer", desc);
168 std::unique_ptr<CaloSubdetectorTopology> topology_p;
174 topology_p = std::make_unique<EcalBarrelTopology>(*geoHandle);
179 topology_p = std::make_unique<EcalEndcapTopology>(*geoHandle);
187 clusters =
island_p->
makeClusters(hitCollection_p, geometry_p, topology_p.get(), geometryES_p, ecalPart);
190 std::vector <reco::ClusterShape> ClusVec;
191 for (
int erg=0;erg<
int(clusters.size());++erg){
193 ClusVec.push_back(TestShape);
197 auto clustersshapes_p = std::make_unique<reco::ClusterShapeCollection>();
198 clustersshapes_p->assign(ClusVec.begin(), ClusVec.end());
206 auto clusters_p = std::make_unique<reco::BasicClusterCollection>();
207 clusters_p->assign(clusters.begin(), clusters.end());
216 auto shapeAssocs_p = std::make_unique<reco::BasicClusterShapeAssociationCollection>(bccHandle, clusHandle);
217 for (
unsigned int i = 0;
i < clusHandle->size();
i++){
220 evt.
put(
std::move(shapeAssocs_p),clusterShapeAssociation);
T getParameter(std::string const &) const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
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
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)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ClusterShapeAlgo shapeAlgo_
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
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_
IslandClusterAlgo::VerbosityLevel verbosity
~IslandClusterProducer() override
void produce(edm::Event &, const edm::EventSetup &) override
std::string clustershapecollectionEB_