32 LogTrace(
"RPCHitAssociator") <<
"... size = " << RPCsimhits->size();
37 _SimHitMap[hitItr->detUnitId()].push_back(*hitItr);
43 LogTrace(
"RPCHitAssociator") <<
"... size = " << RPCsimhits.size();
46 for (edm::PSimHitContainer::const_iterator hitItr = RPCsimhits.begin(); hitItr != RPCsimhits.end(); ++hitItr) {
47 _SimHitMap[hitItr->detUnitId()].push_back(*hitItr);
57 std::vector<SimHitIdpr>
matched;
68 for (
int i = fstrip;
i < fstrip + cls; ++
i) {
72 LogTrace(
"RPCHitAssociator") <<
"*** WARNING in RPCHitAssociator::associateRecHit, RPCRecHit " << *rpcrechit
73 <<
", strip " <<
i <<
" has no associated RPCDigiSimLink !" << endl;
75 for (std::set<RPCDigiSimLink>::iterator itlink =
links.begin(); itlink !=
links.end(); ++itlink) {
76 SimHitIdpr currentId(itlink->getTrackId(), itlink->getEventId());
83 LogTrace(
"RPCHitAssociator") <<
"*** WARNING in RPCHitAssociator::associateRecHit, null " 90 std::set<RPCDigiSimLink>
links;
97 uint32_t detid = digi_iter->getDetUnitId();
98 int str = digi_iter->getStrip();
99 int bunchx = digi_iter->getBx();
101 if (detid == rpcDetId &&
str ==
strip && bunchx ==
bx) {
102 links.insert(*digi_iter);
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::InputTag RPCsimhitsXFTag
Config(const edm::ParameterSet &, edm::ConsumesCollector ic)
std::set< RPCDigiSimLink > findRPCDigiSimLink(uint32_t rpcDetId, int strip, int bx) const
RPCHitAssociator(const edm::Event &e, const Config &conf)
edm::EDGetTokenT< CrossingFrame< PSimHit > > RPCsimhitsXFToken_
edm::Handle< edm::DetSetVector< RPCDigiSimLink > > _thelinkDigis
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
edm::InputTag RPCsimhitsTag
void initEvent(const edm::Event &)
RPCDetId rpcId() const
Return the rpcId.
std::vector< SimHitIdpr > associateRecHit(const TrackingRecHit &hit) const
std::map< unsigned int, edm::PSimHitContainer > _SimHitMap
iterator end()
Return the off-the-end iterator.
constexpr uint32_t rawId() const
get the raw id
std::pair< uint32_t, EncodedEventId > SimHitIdpr
edm::EDGetTokenT< edm::PSimHitContainer > RPCsimhitsToken_
int firstClusterStrip() const
edm::EDGetTokenT< edm::DetSetVector< RPCDigiSimLink > > RPCdigisimlinkToken_
edm::InputTag RPCdigisimlinkTag
std::vector< PSimHit > PSimHitContainer
iterator begin()
Return an iterator to the first DetSet.
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator