188 std::map<reco::CaloClusterPtr, unsigned int> pfClusterMapEB;
189 std::map<reco::CaloClusterPtr, unsigned int> pfClusterMapEE;
190 std::map<reco::CaloClusterPtr, unsigned int> pfClusterMapES;
195 if (!pfClusterMapEB.count(*pfclus)) {
197 caloClustersEB->push_back(caloclus);
198 pfClusterMapEB[*pfclus] = caloClustersEB->size() - 1;
202 <<
"Found an EB pfcluster matched to more than one EB supercluster!"
203 << std::dec << std::endl;
209 if (!pfClusterMapEE.count(*pfclus)) {
211 caloClustersEE->push_back(caloclus);
212 pfClusterMapEE[*pfclus] = caloClustersEE->size() - 1;
216 <<
"Found an EE pfcluster matched to more than one EE supercluster!"
217 << std::dec << std::endl;
221 if (!pfClusterMapES.count(*pfclus)) {
223 caloClustersES->push_back(caloclus);
224 pfClusterMapES[*pfclus] = caloClustersES->size() - 1;
228 <<
"Found an ES pfcluster matched to more than one EE supercluster!"
229 << std::dec << std::endl;
239 std::vector<reco::CaloClusterPtr> clusptrsEB(caloClustersEB->size());
240 std::vector<reco::CaloClusterPtr> clusptrsEE(caloClustersEE->size());
241 std::vector<reco::CaloClusterPtr> clusptrsES(caloClustersES->size());
251 ebsc.setSeed(seedptr);
255 int caloclusidx = pfClusterMapEB[*pfclus];
258 clusptrsEB[caloclusidx] = *pfclus;
260 ebsc.setClusters(clusters);
264 eesc.setSeed(seedptr);
268 int caloclusidx = pfClusterMapEE[*pfclus];
271 clusptrsEE[caloclusidx] = *pfclus;
273 eesc.setClusters(clusters);
277 int caloclusidx = pfClusterMapES[*pfclus];
280 clusptrsES[caloclusidx] = *pfclus;
282 eesc.setPreshowerClusters(psclusters);
287 fillerEBEE.insert(caloClusHandleEB, clusptrsEB.begin(), clusptrsEB.end());
288 fillerEBEE.insert(caloClusHandleEE, clusptrsEE.begin(), clusptrsEE.end());
292 fillerES.insert(caloClusHandleES, clusptrsES.begin(), clusptrsES.end());
void push_back(Ptr< T > const &iPtr)
std::string PFBasicClusterCollectionEndcap_
std::string PFClusterAssociationEBEE_
void loadAndSortPFClusters(const edm::Event &evt)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
PFECALSuperClusterAlgo superClusterAlgo_
clustering algorithm
std::auto_ptr< reco::SuperClusterCollection > & getEEOutputSCCollection()
std::vector< CaloCluster > CaloClusterCollection
collection of CaloCluster objects
std::string PFSuperClusterCollectionBarrel_
std::string PFBasicClusterCollectionPreshower_
std::string PFClusterAssociationES_
std::string PFSuperClusterCollectionEndcapWithPreshower_
std::string PFBasicClusterCollectionBarrel_
std::auto_ptr< reco::SuperClusterCollection > & getEBOutputSCCollection()