62 double barrelSeedThreshold = ps.
getParameter<
double>(
"BarrelSeedThr");
63 double barrelSingleThreshold = ps.
getParameter<
double>(
"BarrelSingleThr");
64 double barrelSecondThreshold = ps.
getParameter<
double>(
"BarrelSecondThr");
65 double barrelSupThreshold = ps.
getParameter<
double>(
"BarrelSupThr");
66 double endcapSeedThreshold = ps.
getParameter<
double>(
"EndcapSeedThr");
67 double endcapSingleThreshold = ps.
getParameter<
double>(
"EndcapSingleThr");
68 double endcapSecondThreshold = ps.
getParameter<
double>(
"EndcapSecondThr");
69 double endcapSupThreshold = ps.
getParameter<
double>(
"EndcapSupThr");
94 island_p =
new CosmicClusterAlgo(barrelSeedThreshold, barrelSingleThreshold, barrelSecondThreshold, barrelSupThreshold, endcapSeedThreshold, endcapSingleThreshold, endcapSecondThreshold, endcapSupThreshold, posCalculator_,
verbosity);
139 std::unique_ptr<CaloSubdetectorTopology> topology_p;
145 topology_p = std::make_unique<EcalBarrelTopology>(*geoHandle);
150 topology_p = std::make_unique<EcalEndcapTopology>(*geoHandle);
158 clusters =
island_p->
makeClusters(hitCollection_p, uhitCollection_p, geometry_p, topology_p.get(), geometryES_p, ecalPart);
161 std::vector <reco::ClusterShape> ClusVec;
163 for (
int erg=0;erg<
int(clusters.size());++erg){
165 ClusVec.push_back(TestShape);
169 auto clustersshapes_p = std::make_unique<reco::ClusterShapeCollection>();
170 clustersshapes_p->assign(ClusVec.begin(), ClusVec.end());
178 auto clusters_p = std::make_unique<reco::BasicClusterCollection>();
179 clusters_p->assign(clusters.begin(), clusters.end());
189 auto shapeAssocs_p = std::make_unique<reco::BasicClusterShapeAssociationCollection>(bccHandle, clusHandle);
191 for (
unsigned int i = 0;
i < clusHandle->size();
i++){
194 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.
std::string clustershapecollectionEB_
std::vector< reco::BasicCluster > makeClusters(const EcalRecHitCollection *hits, const EcalUncalibratedRecHitCollection *uncalibhits, const CaloSubdetectorGeometry *geometry, const CaloSubdetectorTopology *topology_p, const CaloSubdetectorGeometry *geometryES_p, EcalPart ecalPart, bool regional=false, const std::vector< RectangularEtaPhiRegion > ®ions=std::vector< RectangularEtaPhiRegion >())
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void clusterizeECALPart(edm::Event &evt, const edm::EventSetup &es, const edm::EDGetTokenT< EcalRecHitCollection > &hitsToken, const edm::EDGetTokenT< EcalUncalibratedRecHitCollection > &uhitsToken, const std::string &clusterCollection, const std::string &clusterShapeAssociation, const CosmicClusterAlgo::EcalPart &ecalPart)
std::string endcapClusterCollection_
ClusterShapeAlgo shapeAlgo_
std::string barrelClusterCollection_
CosmicClusterAlgo * island_p
PositionCalc posCalculator_
void produce(edm::Event &, const edm::EventSetup &) override
reco::ClusterShape Calculate(const reco::BasicCluster &passedCluster, const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry, const CaloSubdetectorTopology *topology)
CosmicClusterProducer(const edm::ParameterSet &ps)
edm::EDGetTokenT< EcalRecHitCollection > eeHitsToken_
CosmicClusterAlgo::VerbosityLevel verbosity
std::string endcapClusterShapeAssociation_
edm::EDGetTokenT< EcalRecHitCollection > ebHitsToken_
T const * product() const
std::string clustershapecollectionEE_
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
edm::EDGetTokenT< EcalUncalibratedRecHitCollection > eeUHitsToken_
edm::EDGetTokenT< EcalUncalibratedRecHitCollection > ebUHitsToken_
~CosmicClusterProducer() override
std::string barrelClusterShapeAssociation_