8 GEMdigisimlinkTag(conf.getParameter<edm::
InputTag>(
"GEMdigisimlinkTag")),
10 crossingframe(conf.getParameter<bool>(
"crossingframe")),
11 useGEMs_(conf.getParameter<bool>(
"useGEMs")),
12 GEMsimhitsTag(conf.getParameter<edm::
InputTag>(
"GEMsimhitsTag")),
13 GEMsimhitsXFTag(conf.getParameter<edm::
InputTag>(
"GEMsimhitsXFTag"))
25 GEMdigisimlinkTag(conf.getParameter<edm::
InputTag>(
"GEMdigisimlinkTag")),
27 crossingframe(conf.getParameter<bool>(
"crossingframe")),
28 useGEMs_(conf.getParameter<bool>(
"useGEMs")),
29 GEMsimhitsTag(conf.getParameter<edm::
InputTag>(
"GEMsimhitsTag")),
30 GEMsimhitsXFTag(conf.getParameter<edm::
InputTag>(
"GEMsimhitsXFTag"))
46 std::auto_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;
104 for(
int i = fstrip;
i < (fstrip+cls); ++
i) {
108 int ch =
static_cast<int>(itlink->channel());
109 if(ch !=
i)
continue;
111 SimHitIdpr currentId(itlink->SimTrackId(), itlink->eventId());
112 if(
find(matched.begin(),matched.end(),currentId ) == matched.end())
113 matched.push_back(currentId);
120 <<
"*** WARNING in GEMHitAssociator: GEM layer "<<gemDetId<<
" has no DigiSimLinks !"<<std::endl;
122 }
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
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
std::vector< SimHitIdpr > associateRecHit(const TrackingRecHit &hit) const