19 produces<GEMCSCPadDigiCollection>();
20 produces<GEMCSCPadDigiCollection>(
"Coincidence");
53 e.
put(pCoPads,
"Coincidence");
61 for(
auto p: etaPartitions)
64 std::set<std::pair<int, int> > proto_pads;
68 auto digis = det_digis.get(
p->id());
69 for (
auto d = digis.first; d != digis.second; ++d)
71 int pad_num = 1 +
static_cast<int>(
p->padOfStrip(d->strip()) );
72 auto pad = std::make_pair(pad_num, d->bx());
73 proto_pads.insert(pad);
80 for (
auto & d: proto_pads)
83 out_pads.insertDigi(
p->id(), pad_digi);
88 for (
auto det_range = out_pads.begin(); det_range != out_pads.end(); ++det_range)
90 const GEMDetId&
id = (*det_range).first;
93 if (
id.layer() != 1)
continue;
98 auto co_pads_range = out_pads.get(co_id);
100 if (co_pads_range.first == co_pads_range.second)
continue;
103 const auto& pads_range = (*det_range).second;
104 for (
auto p = pads_range.first;
p != pads_range.second; ++
p)
106 for (
auto co_p = co_pads_range.first; co_p != co_pads_range.second; ++co_p)
113 out_co_pads.insertDigi(
id, co_pad_digi);
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
GEMCSCPadDigiProducer(const edm::ParameterSet &ps)
MuonDigiCollection< GEMDetId, GEMCSCPadDigi > GEMCSCPadDigiCollection
Abs< T >::type abs(const T &t)
virtual ~GEMCSCPadDigiProducer()
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void buildPads(const GEMDigiCollection &digis, GEMCSCPadDigiCollection &out_pads, GEMCSCPadDigiCollection &out_co_pads)
virtual void beginRun(const edm::Run &, const edm::EventSetup &) override
const GEMGeometry * geometry_
edm::InputTag input_
Name of input digi Collection.
T const * product() const
virtual void produce(edm::Event &e, const edm::EventSetup &c) override
const std::vector< GEMEtaPartition * > & etaPartitions() const
Return a vector of all GEM chambers.