9 : linksTag_(conf.getParameter<
edm::
InputTag>(
"CSClinksTag")),
10 linksToken_(iC.consumes(linksTag_)),
27 std::vector<SimHitIdpr> simtrackids;
30 int nchannels = cscrechit->
nStrips();
36 for (
int idigi = 0; idigi < nchannels; ++idigi) {
38 int istrip = cscrechit->
channels(idigi);
39 int channel = laygeom->
channel(istrip);
42 int ch =
static_cast<int>(link->channel());
44 SimHitIdpr currentId(link->SimTrackId(), link->eventId());
45 if (
find(simtrackids.begin(), simtrackids.end(), currentId) == simtrackids.end())
46 simtrackids.push_back(currentId);
52 LogTrace(
"CSCHitAssociator") <<
"*** WARNING in CSCHitAssociator::associateCSCHitId - CSC layer " <<
detId 53 <<
" has no DigiSimLinks !" << std::endl;
59 std::vector<SimHitIdpr> simtrackids;
66 int nchannels = cscrechit->
nStrips();
72 for (
int idigi = 0; idigi < nchannels; ++idigi) {
74 int istrip = cscrechit->
channels(idigi);
75 int channel = laygeom->
channel(istrip);
78 int ch =
static_cast<int>(link->channel());
80 SimHitIdpr currentId(link->SimTrackId(), link->eventId());
81 if (
find(simtrackids.begin(), simtrackids.end(), currentId) == simtrackids.end())
82 simtrackids.push_back(currentId);
88 LogTrace(
"CSCHitAssociator") <<
"*** WARNING in CSCHitAssociator::associateHitId - CSC layer " <<
detId 89 <<
" has no DigiSimLinks !" << std::endl;
92 LogTrace(
"CSCHitAssociator") <<
"*** WARNING in CSCHitAssociator::associateHitId, null dynamic_cast " const edm::ESGetToken< CSCGeometry, MuonGeometryRecord > geomToken_
unsigned int nStrips() const
iterator find(det_id_type id)
std::vector< SimHitIdpr > associateHitId(const TrackingRecHit &) const
const edm::EDGetTokenT< DigiSimLinks > linksToken_
const edm::InputTag linksTag_
CSCDetId cscDetId() const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
int channel(int strip) const
std::vector< SimHitIdpr > associateCSCHitId(const CSCRecHit2D *) const
iterator end()
Return the off-the-end iterator.
std::pair< uint32_t, EncodedEventId > SimHitIdpr
DetId geographicalId() const
constexpr uint32_t rawId() const
get the raw id
CSCHitAssociator(const edm::Event &, const edm::EventSetup &, const Config &)
const DigiSimLinks * theDigiSimLinks
Config(const edm::ParameterSet &, edm::ConsumesCollector iC)
const CSCGeometry * cscgeom
int channels(unsigned int i) const
Extracting strip channel numbers comprising the rechit - low.
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to given DetId.
void initEvent(const edm::Event &, const edm::EventSetup &)