189 std::map<reco::CaloClusterPtr, unsigned int> pfClusterMapEB;
190 std::map<reco::CaloClusterPtr, unsigned int> pfClusterMapEE;
191 std::map<reco::CaloClusterPtr, unsigned int> pfClusterMapES;
196 if (!pfClusterMapEB.count(*pfclus)) {
198 caloClustersEB->push_back(caloclus);
199 pfClusterMapEB[*pfclus] = caloClustersEB->size() - 1;
203 <<
"Found an EB pfcluster matched to more than one EB supercluster!"
204 << std::dec << std::endl;
210 if (!pfClusterMapEE.count(*pfclus)) {
212 caloClustersEE->push_back(caloclus);
213 pfClusterMapEE[*pfclus] = caloClustersEE->size() - 1;
217 <<
"Found an EE pfcluster matched to more than one EE supercluster!"
218 << std::dec << std::endl;
222 if (!pfClusterMapES.count(*pfclus)) {
224 caloClustersES->push_back(caloclus);
225 pfClusterMapES[*pfclus] = caloClustersES->size() - 1;
229 <<
"Found an ES pfcluster matched to more than one EE supercluster!"
230 << std::dec << std::endl;
240 std::vector<reco::CaloClusterPtr> clusptrsEB(caloClustersEB->size());
241 std::vector<reco::CaloClusterPtr> clusptrsEE(caloClustersEE->size());
242 std::vector<reco::CaloClusterPtr> clusptrsES(caloClustersES->size());
252 ebsc.setSeed(seedptr);
256 int caloclusidx = pfClusterMapEB[*pfclus];
259 clusptrsEB[caloclusidx] = *pfclus;
261 ebsc.setClusters(clusters);
265 eesc.setSeed(seedptr);
269 int caloclusidx = pfClusterMapEE[*pfclus];
272 clusptrsEE[caloclusidx] = *pfclus;
274 eesc.setClusters(clusters);
278 int caloclusidx = pfClusterMapES[*pfclus];
281 clusptrsES[caloclusidx] = *pfclus;
283 eesc.setPreshowerClusters(psclusters);
288 fillerEBEE.insert(caloClusHandleEB, clusptrsEB.begin(), clusptrsEB.end());
289 fillerEBEE.insert(caloClusHandleEE, clusptrsEE.begin(), clusptrsEE.end());
293 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()