|
|
Go to the documentation of this file.
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;
72 const RPCRecHit *rpcrechit = dynamic_cast<const RPCRecHit *>(hitp);
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());
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);
T const * product() const
iterator end()
Return the off-the-end iterator.
edm::Handle< edm::DetSetVector< RPCDigiSimLink > > _thelinkDigis
void initEvent(const edm::Event &, const edm::EventSetup &)
iterator begin()
Return an iterator to the first DetSet.
edm::EDGetTokenT< edm::PSimHitContainer > RPCsimhitsToken_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
RPCHitAssociator(const edm::ParameterSet &, edm::ConsumesCollector &&ic)
edm::EDGetTokenT< edm::DetSetVector< RPCDigiSimLink > > RPCdigisimlinkToken_
std::pair< uint32_t, EncodedEventId > SimHitIdpr
edm::InputTag RPCsimhitsXFTag
collection_type::const_iterator const_iterator
std::vector< SimHitIdpr > associateRecHit(const TrackingRecHit &hit) const
std::set< RPCDigiSimLink > findRPCDigiSimLink(uint32_t rpcDetId, int strip, int bx) const
edm::InputTag RPCdigisimlinkTag
constexpr uint32_t rawId() const
get the raw id
std::map< unsigned int, edm::PSimHitContainer > _SimHitMap
std::vector< PSimHit > PSimHitContainer
edm::InputTag RPCsimhitsTag
RPCDetId rpcId() const
Return the rpcId.
int firstClusterStrip() const
edm::EDGetTokenT< CrossingFrame< PSimHit > > RPCsimhitsXFToken_
collection_type::const_iterator const_iterator