20 LogTrace(
"CSCHitAssociator") <<
"getting CSC Strip DigiSimLink collection - " <<
linksTag;
21 event.getByLabel(
linksTag, digiSimLinks);
31 std::vector<SimHitIdpr> simtrackids;
34 int nchannels = cscrechit->
nStrips();
40 for (
int idigi = 0; idigi < nchannels; ++idigi) {
42 int istrip = cscrechit->
channels(idigi);
43 int channel = laygeom->
channel(istrip);
46 int ch =
static_cast<int>(
link->channel());
49 if (
find(simtrackids.begin(), simtrackids.end(), currentId) == simtrackids.end())
50 simtrackids.push_back(currentId);
56 LogTrace(
"CSCHitAssociator") <<
"*** WARNING in CSCHitAssociator::associateCSCHitId - CSC layer " << detId
57 <<
" has no DigiSimLinks !" << std::endl;
63 std::vector<SimHitIdpr> simtrackids;
70 int nchannels = cscrechit->
nStrips();
76 for (
int idigi = 0; idigi < nchannels; ++idigi) {
78 int istrip = cscrechit->
channels(idigi);
79 int channel = laygeom->
channel(istrip);
82 int ch =
static_cast<int>(
link->channel());
85 if (
find(simtrackids.begin(), simtrackids.end(), currentId) == simtrackids.end())
86 simtrackids.push_back(currentId);
92 LogTrace(
"CSCHitAssociator") <<
"*** WARNING in CSCHitAssociator::associateHitId - CSC layer " << detId
93 <<
" has no DigiSimLinks !" << std::endl;
96 LogTrace(
"CSCHitAssociator") <<
"*** WARNING in CSCHitAssociator::associateHitId, null dynamic_cast "
CSCDetId cscDetId() const
iterator find(det_id_type id)
constexpr uint32_t rawId() const
get the raw id
std::vector< SimHitIdpr > associateCSCHitId(const CSCRecHit2D *) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
CSCHitAssociator(const edm::Event &, const edm::EventSetup &, const edm::ParameterSet &)
int channels(unsigned int i) const
Extracting strip channel numbers comprising the rechit - low.
std::vector< SimHitIdpr > associateHitId(const TrackingRecHit &) const
unsigned int nStrips() const
iterator end()
Return the off-the-end iterator.
int channel(int strip) const
std::pair< uint32_t, EncodedEventId > SimHitIdpr
T const * product() const
const DigiSimLinks * theDigiSimLinks
ESHandle< TrackerGeometry > geometry
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to given DetId.
const CSCGeometry * cscgeom
DetId geographicalId() const
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator
void initEvent(const edm::Event &, const edm::EventSetup &)