64 geom_token_ = esConsumes<GEMGeometry, MuonGeometryRecord, edm::Transition::BeginRun>();
66 produces<GEMPadDigiCollection>();
67 consumes<GEMDigiCollection>(
digis_);
76 descriptions.
add(
"simMuonGEMPadDigisDef",
desc);
85 GEMPadDigi::NumberPartitions::GE21SplitStrip);
115 std::set<std::tuple<int, int, unsigned> > proto_pads;
119 auto digis = det_digis.get(
p->id());
120 for (
auto d = digis.first;
d != digis.second; ++
d) {
121 unsigned pad_num =
static_cast<unsigned>(
p->padOfStrip(
d->strip()));
123 auto nPart = GEMPadDigi::NumberPartitions::GE11;
126 }
else if (
p->isGE21()) {
127 nPart = GEMPadDigi::NumberPartitions::GE21;
132 edm::LogWarning(
"GEMPadDigiProducer") <<
"Invalid " << pad_num <<
" from " << *
d <<
" in " <<
p->id();
134 proto_pads.emplace(pad_num,
d->bx(),
nPart);
138 for (
const auto&
d : proto_pads) {
139 GEMPadDigi pad_digi(std::get<0>(
d), std::get<1>(
d),
p->subsystem(), std::get<2>(
d));
141 out_pads.insertDigi(
p->id(), pad_digi);
155 if (
p->id().roll() % 2 == 0)
159 std::set<std::pair<int, int> > proto_pads;
163 auto digis = det_digis.get(
p->id());
166 for (
auto d = digis.first;
d != digis.second; ++
d) {
167 proto_pads.emplace(
d->strip(),
d->bx());
171 p->id().region(),
p->id().ring(),
p->id().station(),
p->id().layer(),
p->id().chamber(),
p->id().roll() + 1);
172 auto digis2 = det_digis.get(gemId2);
175 for (
auto d = digis2.first;
d != digis2.second; ++
d) {
176 proto_pads.emplace(
d->strip(),
d->bx());
180 for (
const auto&
d : proto_pads) {
181 GEMPadDigi pad_digi(
d.first,
d.second,
p->subsystem(), GEMPadDigi::NumberPartitions::GE21SplitStrip);
183 out_pads.insertDigi(
p->id(), pad_digi);
200 edm::LogError(
"GEMPadDigiProducer") <<
"ME0 geometry appears corrupted";
207 edm::LogError(
"GEMPadDigiProducer") <<
"GE1/1 geometry appears corrupted";
215 edm::LogError(
"GEMPadDigiProducer") <<
"GE2/1 geometry (8 partition) appears corrupted";
220 GEMPadDigi::NumberPartitions::GE21SplitStrip) {
221 edm::LogError(
"GEMPadDigiProducer") <<
"GE2/1 geometry (16 partition) appears corrupted";
void produce(edm::Event &, const edm::EventSetup &) override
T getParameter(std::string const &) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void buildPads16GE21(const GEMDigiCollection &digis, GEMPadDigiCollection &out_pads) const
T const * product() const
const GEMGeometry * geometry_
int nEtaPartitions() const
Retunr numbers of eta partitions.
GEMPadDigiProducer(const edm::ParameterSet &ps)
Log< level::Error, false > LogError
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
#define DEFINE_FWK_MODULE(type)
TString nPart(Int_t part, TString string, TString delimit=";", Bool_t removerest=true)
MuonDigiCollection< GEMDetId, GEMPadDigi > GEMPadDigiCollection
void add(std::string const &label, ParameterSetDescription const &psetDescription)
ME0 Data Record : block->header().getID() = 6.
~GEMPadDigiProducer() override
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geom_token_
Log< level::Warning, false > LogWarning
void checkValid(const GEMPadDigi &pad, const GEMDetId &id) const
edm::EDGetTokenT< GEMDigiCollection > digi_token_
Name of input digi Collection.
void checkGeometry() const
const GEMChamber * chamber(GEMDetId id) const
void beginRun(const edm::Run &, const edm::EventSetup &) override
void buildPads(const GEMDigiCollection &digis, GEMPadDigiCollection &out_pads) const
const std::vector< const GEMEtaPartition * > & etaPartitions() const
Return a vector of all GEM eta partitions.