62 std::map<std::string, double> providedParameters;
63 providedParameters.insert(std::make_pair(
"LogWeighted", ps.
getParameter<
bool>(
"posCalc_logweight")));
64 providedParameters.insert(std::make_pair(
"T0_barl", ps.
getParameter<
double>(
"posCalc_t0")));
65 providedParameters.insert(std::make_pair(
"W0", ps.
getParameter<
double>(
"posCalc_w0")));
66 providedParameters.insert(std::make_pair(
"X0", ps.
getParameter<
double>(
"posCalc_x0")));
102 int uncleanSize = pUncleanSC->size();
103 int cleanSize = pCleanSC->size();
105 LogTrace(
"EcalCleaning") <<
"Size of Clean Collection: " << cleanSize <<
", uncleanSize: " << uncleanSize
109 std::vector<int> isUncleanOnly;
110 std::vector<int> basicClusterOwner;
111 std::vector<int> isSeed;
112 for (
int isc = 0; isc < uncleanSize; ++isc) {
114 const std::vector<std::pair<DetId, float> >& uhits = unscRef->hitsAndFractions();
115 int uhitsSize = uhits.size();
116 bool foundTheSame =
false;
117 for (
int jsc = 0; jsc < cleanSize; ++jsc) {
119 const std::vector<std::pair<DetId, float> >& chits = cscRef->hitsAndFractions();
120 int chitsSize = chits.size();
122 if (unscRef->seed()->seed() == cscRef->seed()->seed() && chitsSize == uhitsSize) {
126 for (
int i = 0;
i < chitsSize; ++
i) {
128 foundTheSame =
false;
136 isUncleanOnly.push_back(0);
141 if (not foundTheSame) {
143 isUncleanOnly.push_back(1);
147 basicClusters.push_back(**bciter);
148 basicClusterOwner.push_back(isc);
152 int bcSize = basicClusters.size();
154 LogDebug(
"EcalCleaning") <<
"Found cleaned SC: " << cleanSize <<
" uncleaned SC: " << uncleanSize <<
" from which "
155 << scRefs->
size() <<
" will become refs to the cleaned collection";
160 auto basicClusters_p = std::make_unique<reco::BasicClusterCollection>();
161 basicClusters_p->assign(basicClusters.begin(), basicClusters.end());
164 edm::LogWarning(
"MissingInput") <<
"could not get a handle on the BasicClusterCollection!" << std::endl;
168 LogDebug(
"EcalCleaning") <<
"Got the BasicClusters from the event again";
172 for (
int isc = 0; isc < uncleanSize; ++isc) {
173 if (isUncleanOnly[isc] == 1) {
178 for (
int jbc = 0; jbc < bcSize; ++jbc) {
179 if (basicClusterOwner[jbc] == isc) {
182 if (energy < currentClu->
energy()) {
183 energy = currentClu->energy();
194 std::unique_ptr<reco::SuperClusterRefVector> scRefs_p(scRefs);
199 auto superClusters_p = std::make_unique<reco::SuperClusterCollection>();
202 LogDebug(
"EcalCleaning") <<
"Hybrid Clusters (Basic/Super) added to the Event! :-)";