41 LogTrace(
"RPCHitAssociator") <<
"... size = " << RPCsimhits->size();
46 _SimHitMap[hitItr->detUnitId()].push_back(*hitItr);
53 LogTrace(
"RPCHitAssociator") <<
"... size = " << RPCsimhits->size();
56 for (edm::PSimHitContainer::const_iterator hitItr = RPCsimhits->begin(); hitItr != RPCsimhits->end(); ++hitItr) {
57 _SimHitMap[hitItr->detUnitId()].push_back(*hitItr);
69 std::vector<SimHitIdpr>
matched;
80 for (
int i = fstrip;
i < fstrip + cls; ++
i) {
84 LogTrace(
"RPCHitAssociator") <<
"*** WARNING in RPCHitAssociator::associateRecHit, RPCRecHit " << *rpcrechit
85 <<
", strip " <<
i <<
" has no associated RPCDigiSimLink !" << endl;
87 for (std::set<RPCDigiSimLink>::iterator itlink = links.begin(); itlink != links.end(); ++itlink) {
88 SimHitIdpr currentId(itlink->getTrackId(), itlink->getEventId());
89 if (
find(matched.begin(), matched.end(), currentId) == matched.end())
90 matched.push_back(currentId);
95 LogTrace(
"RPCHitAssociator") <<
"*** WARNING in RPCHitAssociator::associateRecHit, null " 102 std::set<RPCDigiSimLink>
links;
109 uint32_t detid = digi_iter->getDetUnitId();
110 int str = digi_iter->getStrip();
111 int bunchx = digi_iter->getBx();
113 if (detid == rpcDetId && str == strip && bunchx == bx) {
114 links.insert(*digi_iter);
int firstClusterStrip() const
RPCHitAssociator(const edm::ParameterSet &, edm::ConsumesCollector &&ic)
edm::InputTag RPCdigisimlinkTag
edm::EDGetTokenT< CrossingFrame< PSimHit > > RPCsimhitsXFToken_
constexpr uint32_t rawId() const
get the raw id
void initEvent(const edm::Event &, const edm::EventSetup &)
edm::Handle< edm::DetSetVector< RPCDigiSimLink > > _thelinkDigis
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::vector< SimHitIdpr > associateRecHit(const TrackingRecHit &hit) const
RPCDetId rpcId() const
Return the rpcId.
std::map< unsigned int, edm::PSimHitContainer > _SimHitMap
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
iterator end()
Return the off-the-end iterator.
edm::InputTag RPCsimhitsTag
T const * product() const
edm::EDGetTokenT< edm::PSimHitContainer > RPCsimhitsToken_
edm::InputTag RPCsimhitsXFTag
std::pair< uint32_t, EncodedEventId > SimHitIdpr
std::set< RPCDigiSimLink > findRPCDigiSimLink(uint32_t rpcDetId, int strip, int bx) const
std::vector< PSimHit > PSimHitContainer
iterator begin()
Return an iterator to the first DetSet.
edm::EDGetTokenT< edm::DetSetVector< RPCDigiSimLink > > RPCdigisimlinkToken_
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator