105 bool meet_single_thresh =
false;
110 float energy1 = clus1.
energy();
111 float theta1 = 2 * atan(
exp(-1. *
eta1));
112 float cluspt1 = energy1 *
sin(theta1);
114 saveBarrelSuperClusters.push_back(clus1);
116 meet_single_thresh =
true;
124 float energy1 = clus1.
energy();
125 float theta1 = 2 * atan(
exp(-1. *
eta1));
126 float cluspt1 = energy1 *
sin(theta1);
128 saveEndcapSuperClusters.push_back(clus1);
130 meet_single_thresh =
true;
134 auto SEBDigiCol = std::make_unique<EBDigiCollection>();
135 auto SEEDigiCol = std::make_unique<EEDigiCollection>();
136 int TotClus = saveBarrelSuperClusters.size() + saveEndcapSuperClusters.size();
138 if (TotClus >=
nclus_sel_ || meet_single_thresh) {
139 if (!saveBarrelSuperClusters.empty()) {
155 std::vector<DetId> saveTheseDetIds;
157 for (
int loop = 0;
loop <
int(saveBarrelSuperClusters.size());
loop++) {
162 DetId maxDetId = EcalClusterTools::getMaximum(*bc,
rechits).first;
165 saveTheseDetIds.push_back(detId);
167 for (
int detloop = 0; detloop <
int(saveTheseDetIds.size()); ++detloop) {
171 if (detL == blah->id()) {
173 SEBDigiCol->push_back(detL);
176 for (
int iq = 0; iq < myDigi.
size(); ++iq) {
188 if (!saveEndcapSuperClusters.empty()) {
206 std::set<DetId> saveTheseDetIds;
208 for (
int loop = 0;
loop <
int(saveEndcapSuperClusters.size());
loop++) {
213 DetId maxDetId = EcalClusterTools::getMaximum(*bc,
rechits).first;
216 saveTheseDetIds.insert(detId);
220 std::set<DetId>::const_iterator
finder = saveTheseDetIds.find(blah->id());
221 if (
finder != saveTheseDetIds.end()) {
224 if (detL == blah->id()) {
226 SEEDigiCol->push_back(detL);
228 for (
int iq = 0; iq < myDigi.
size(); ++iq) {
234 if (eecounter >=
int(saveTheseDetIds.size()))