54 if (pads->begin() == pads->end())
57 for (
auto pad_range_it = pads->begin(); pad_range_it != pads->end(); ++pad_range_it) {
58 const auto&
id = (*pad_range_it).first;
62 cout <<
"--------------" << endl;
66 std::map<std::pair<int, int>,
70 auto digis_in_det = digis->get(
id);
71 cout <<
"strip digis in detid: ";
72 for (
auto d = digis_in_det.first;
d != digis_in_det.second; ++
d) {
73 int pad_num = 1 +
static_cast<int>(roll->padOfStrip(
d->strip()));
74 digi_map[{pad_num,
d->bx()}].push_back(
d->strip());
75 cout <<
" (" <<
d->strip() <<
"," <<
d->bx() <<
") -> " << pad_num;
80 auto pads_range = (*pad_range_it).second;
81 for (
auto p = pads_range.first;
p != pads_range.second; ++
p) {
82 int first_strip = roll->firstStripInPad(
p->pad());
83 int last_strip = roll->lastStripInPad(
p->pad());
85 if (
p->pad() < 1 ||
p->pad() > roll->npads()) {
86 cout <<
" XXXXXXXXXXXXX Problem! " <<
id <<
" has pad digi with too large pad# = " <<
p->pad() << endl;
89 auto&
strips = digi_map[{
p->pad(),
p->bx()}];
90 std::vector<int> pads_strips;
92 strips.begin(),
strips.end(), inserter(pads_strips, pads_strips.end()), [first_strip, last_strip](
int s) {
93 return s < first_strip || s > last_strip;
95 cout <<
id <<
" paddigi(pad,bx) " << *
p <<
" has " << pads_strips.size() <<
" strip digis strips in range [" 96 << first_strip <<
"," << last_strip <<
"]: ";
97 copy(pads_strips.begin(), pads_strips.end(), ostream_iterator<int>(
cout,
" "));
void analyze(const edm::Event &, const edm::EventSetup &) override
const GEMEtaPartition * etaPartition(GEMDetId id) const
Return a GEMEtaPartition given its id.
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< GEMPadDigiCollection > gemPadToken_
#define DEFINE_FWK_MODULE(type)
GEMPadDigiReader(const edm::ParameterSet &pset)
edm::EDGetTokenT< GEMDigiCollection > gemDigiToken_
~GEMPadDigiReader() override
ESHandle< TrackerGeometry > geometry
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers.hcal.doNoise = False simEcalUnsuppressedDigis.doNoise = False mix.digitizers.ecal.doNoise = False simEcalUnsuppressedDigis.doESNoise = False simSiPixelDigis.AddNoise = False mix.digitizers.pixel.AddNoise = False simSiStripDigis.Noise = False mix.digitizers.strip.AddNoise = False