46 typedef std::map<GEMDetId, std::vector<std::vector<std::pair<GEMDetId, GEMPadDigiClusters> > > >
135 geom_token_ = esConsumes<GEMGeometry, MuonGeometryRecord, edm::Transition::BeginRun>();
137 produces<GEMPadDigiClusterCollection>();
138 consumes<GEMPadDigiCollection>(
pads_);
146 desc.add<
unsigned int>(
"maxClustersOHGE11", 4);
147 desc.add<
unsigned int>(
"maxClustersOHGE21", 5);
148 desc.add<
unsigned int>(
"nOHGE11", 2);
149 desc.add<
unsigned int>(
"nOHGE21", 4);
150 desc.add<
unsigned int>(
"maxClusterSize", 8);
151 desc.add<
bool>(
"sendOverflowClusters",
false);
153 descriptions.
add(
"simMuonGEMPadDigiClustersDef",
desc);
186 proto_clusters.clear();
197 auto pads = det_pads.get(
part->id());
198 std::vector<uint16_t>
cl;
201 for (
auto d = pads.first;
d != pads.second; ++
d) {
206 unsigned nPart =
d->nPartitions();
209 cl.push_back((*d).pad());
211 if ((*d).bx() == startBX and
212 (*d).pad() ==
cl.back() + 1
214 cl.push_back((*d).pad());
222 all_pad_clusters.emplace_back(pad_cluster);
226 cl.push_back((*d).pad());
233 if (pads.first != pads.second) {
235 unsigned nPart = (pads.first)->nPartitions();
242 all_pad_clusters.emplace_back(pad_cluster);
244 proto_clusters.emplace(
part->id(), all_pad_clusters);
254 sorted_clusters.clear();
259 const unsigned nPartOH = ch->nEtaPartitions() / nOH;
261 std::vector<std::vector<std::pair<GEMDetId, GEMPadDigiClusters> > > temp_clustersCH;
263 for (
unsigned int iOH = 0; iOH < nOH; iOH++) {
265 std::vector<std::pair<GEMDetId, GEMPadDigiClusters> > temp_clustersOH;
268 for (
unsigned iPart = 1; iPart <= nPartOH; iPart++) {
270 const GEMDetId& partId = ch->etaPartition(iPart + iOH * nPartOH)->id();
271 if (proto_clusters.find(partId) != proto_clusters.end()) {
272 temp_clustersOH.emplace_back(partId, proto_clusters.at(partId));
276 temp_clustersCH.emplace_back(temp_clustersOH);
279 sorted_clusters.emplace(ch->id(), temp_clustersCH);
290 for (
const auto& optohybrid : sorted_clusters.at(ch->id())) {
295 for (
const auto& etapart : optohybrid) {
296 const auto& detid(etapart.first);
297 const auto&
clusters(etapart.second);
305 out_clusters.insertDigi(detid, clus);