23 produces<GEMPadDigiClusterCollection>();
24 consumes<GEMPadDigiCollection>(
pads_);
63 std::vector<std::pair<GEMDetId, GEMPadDigiCluster> > proto_clusters;
65 for (
const auto&
part: ch->etaPartitions()) {
66 auto pads = det_pads.get(
part->id());
67 std::vector<uint16_t>
cl;
69 for (
auto d = pads.first;
d != pads.second; ++
d) {
71 cl.push_back((*d).pad());
74 if ((*d).bx() == startBX and
75 (*d).pad() == cl.back() + 1
77 cl.push_back((*d).pad());
82 proto_clusters.emplace_back(
part->id(), pad_cluster);
86 cl.push_back((*d).pad());
92 if (pads.first != pads.second){
94 proto_clusters.emplace_back(
part->id(), pad_cluster);
100 for (
unsigned int i=0;
i<loopMax;
i++) {
101 const auto& detid(proto_clusters[
i].
first);
102 const auto& cluster(proto_clusters[
i].
second);
103 out_clusters.insertDigi(detid, cluster);
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
~GEMPadDigiClusterProducer() override
void produce(edm::Event &, const edm::EventSetup &) override
GEMPadDigiClusterProducer(const edm::ParameterSet &ps)
MuonDigiCollection< GEMDetId, GEMPadDigiCluster > GEMPadDigiClusterCollection
U second(std::pair< T, U > const &p)
const GEMGeometry * geometry_
void buildClusters(const GEMPadDigiCollection &pads, GEMPadDigiClusterCollection &out_clusters)
unsigned int maxClusterSize_
T const * product() const
const std::vector< const GEMChamber * > & chambers() const
Return a vector of all GEM chambers.
void beginRun(const edm::Run &, const edm::EventSetup &) override
edm::EDGetTokenT< GEMPadDigiCollection > pad_token_
Name of input digi Collection.
unsigned int maxClusters_