11 useGEMs_(conf.getParameter<bool>(
"useGEMs")),
28 useGEMs_(conf.getParameter<bool>(
"useGEMs")),
46 std::unique_ptr<MixCollection<PSimHit> >
48 LogTrace(
"GEMHitAssociator") <<
"... size = "<<GEMsimhits->size();
53 hitItr != GEMsimhits->end(); ++hitItr)
55 _SimHitMap[hitItr->detUnitId()].push_back(*hitItr);
62 LogTrace(
"GEMHitAssociator") <<
"... size = "<<GEMsimhits->size();
65 for(edm::PSimHitContainer::const_iterator hitItr = GEMsimhits->begin();
66 hitItr != GEMsimhits->end(); ++hitItr)
68 _SimHitMap[hitItr->detUnitId()].push_back(*hitItr);
84 std::vector<SimHitIdpr>
matched;
98 for(
int i = fstrip;
i < (fstrip+cls); ++
i) {
102 int ch =
static_cast<int>(itlink->channel());
103 if(ch !=
i)
continue;
105 SimHitIdpr currentId(itlink->SimTrackId(), itlink->eventId());
106 if(
find(matched.begin(),matched.end(),currentId ) == matched.end())
107 matched.push_back(currentId);
114 <<
"*** WARNING in GEMHitAssociator: GEM layer "<<gemDetId<<
" has no DigiSimLinks !"<<std::endl;
116 }
else edm::LogWarning(
"GEMHitAssociator")<<
"*** WARNING in GEMHitAssociator::associateRecHit, null dynamic_cast !";
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