10 useGEMs_(conf.getParameter<
bool>(
"useGEMs")),
42 LogTrace(
"GEMHitAssociator") <<
"... size = " << GEMsimhits->size();
47 _SimHitMap[hitItr->detUnitId()].push_back(*hitItr);
54 LogTrace(
"GEMHitAssociator") <<
"... size = " << GEMsimhits->size();
57 for (edm::PSimHitContainer::const_iterator hitItr = GEMsimhits->begin(); hitItr != GEMsimhits->end(); ++hitItr) {
58 _SimHitMap[hitItr->detUnitId()].push_back(*hitItr);
71 std::vector<SimHitIdpr>
matched;
83 for (
int i = fstrip;
i < (fstrip + cls); ++
i) {
85 int ch =
static_cast<int>(itlink->channel());
89 SimHitIdpr currentId(itlink->SimTrackId(), itlink->eventId());
90 if (
find(matched.begin(), matched.end(), currentId) == matched.end())
91 matched.push_back(currentId);
97 <<
"*** WARNING in GEMHitAssociator: GEM layer " << gemDetId <<
" has no DigiSimLinks !" << std::endl;
100 edm::LogWarning(
"GEMHitAssociator") <<
"*** WARNING in GEMHitAssociator::associateRecHit, null "
edm::EDGetTokenT< edm::PSimHitContainer > GEMsimhitsToken_
iterator find(det_id_type id)
edm::InputTag GEMsimhitsXFTag
edm::EDGetTokenT< CrossingFrame< PSimHit > > GEMsimhitsXFToken_
std::map< unsigned int, edm::PSimHitContainer > _SimHitMap
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
edm::InputTag GEMsimhitsTag
GEMHitAssociator(const edm::ParameterSet &, edm::ConsumesCollector &&ic)
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > GEMdigisimlinkToken_
std::pair< uint32_t, EncodedEventId > SimHitIdpr
void initEvent(const edm::Event &, const edm::EventSetup &)
edm::InputTag GEMdigisimlinkTag
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
iterator end()
Return the off-the-end iterator.
T const * product() const
std::vector< SimHitIdpr > associateRecHit(const GEMRecHit *gemrechit) const
int firstClusterStrip() const
const DigiSimLinks * theDigiSimLinks
std::vector< PSimHit > PSimHitContainer
GEMDetId gemId() const
Return the gemId.
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator