Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Dildick committed Aug 1, 2017
1 parent 92e76de commit ecef4bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
11 changes: 5 additions & 6 deletions SimMuon/GEMDigitizer/src/GEMPadDigiProducer.cc
Expand Up @@ -52,24 +52,23 @@ void GEMPadDigiProducer::produce(edm::Event& e, const edm::EventSetup& eventSetu

void GEMPadDigiProducer::buildPads(const GEMDigiCollection &det_digis, GEMPadDigiCollection &out_pads) const
{
const auto& etaPartitions = geometry_->etaPartitions();
for(const auto& p: etaPartitions)
for(const auto& p: geometry_->etaPartitions())
{
// set of <pad, bx> pairs, sorted first by pad then by bx
std::set<std::pair<int, int> > proto_pads;
// walk over digis in this partition,

// walk over digis in this partition,
// and stuff them into a set of unique pads (equivalent of OR operation)
auto digis = det_digis.get(p->id());
for (auto d = digis.first; d != digis.second; ++d)
{
int pad_num = 1 + static_cast<int>( p->padOfStrip(d->strip()) );
proto_pads.emplace(pad_num, d->bx());
}

// in the future, do some dead-time handling
// emulateDeadTime(proto_pads)

// fill the output collections
for (const auto& d: proto_pads)
{
Expand Down
3 changes: 1 addition & 2 deletions SimMuon/GEMDigitizer/src/ME0PadDigiProducer.cc
Expand Up @@ -51,8 +51,7 @@ void ME0PadDigiProducer::produce(edm::Event& e, const edm::EventSetup& eventSetu

void ME0PadDigiProducer::buildPads(const ME0DigiCollection &det_digis, ME0PadDigiCollection &out_pads) const
{
const auto& etaPartitions = geometry_->etaPartitions();
for(const auto& p: etaPartitions)
for(const auto& p: geometry_->etaPartitions())
{
// set of <pad, bx> pairs, sorted first by pad then by bx
std::set<std::pair<int, int> > proto_pads;
Expand Down

0 comments on commit ecef4bd

Please sign in to comment.