23 produces<ME0PadDigiClusterCollection>();
24 consumes<ME0PadDigiCollection>(
pads_);
63 std::vector<std::pair<ME0DetId, ME0PadDigiCluster> > 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
virtual void produce(edm::Event &, const edm::EventSetup &) override
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
U second(std::pair< T, U > const &p)
virtual void beginRun(const edm::Run &, const edm::EventSetup &) override
virtual ~ME0PadDigiClusterProducer()
unsigned int maxClusterSize_
unsigned int maxClusters_
void buildClusters(const ME0PadDigiCollection &pads, ME0PadDigiClusterCollection &out_clusters)
T const * product() const
ME0PadDigiClusterProducer(const edm::ParameterSet &ps)
const std::vector< const ME0Layer * > & layers() const
Return a vector of all ME0 layers.
edm::EDGetTokenT< ME0PadDigiCollection > pad_token_
Name of input digi Collection.
MuonDigiCollection< ME0DetId, ME0PadDigiCluster > ME0PadDigiClusterCollection
const ME0Geometry * geometry_