|
|
Go to the documentation of this file.
9 : theDigiSimLinks(nullptr), linksTag(conf.getParameter<
edm::
InputTag>(
"CSClinksTag")) {
14 : theDigiSimLinks(nullptr), linksTag(conf.getParameter<
edm::
InputTag>(
"CSClinksTag")) {
20 LogTrace(
"CSCHitAssociator") <<
"getting CSC Strip DigiSimLink collection - " <<
linksTag;
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;
66 const CSCRecHit2D *cscrechit = dynamic_cast<const CSCRecHit2D *>(hitp);
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 "
ESHandle< TrackerGeometry > geometry
std::vector< SimHitIdpr > associateCSCHitId(const CSCRecHit2D *) const
iterator end()
Return the off-the-end iterator.
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::pair< uint32_t, EncodedEventId > SimHitIdpr
DetId geographicalId() const
CSCDetId cscDetId() const
const DigiSimLinks * theDigiSimLinks
const CSCGeometry * cscgeom
void initEvent(const edm::Event &, const edm::EventSetup &)
collection_type::const_iterator const_iterator
iterator find(det_id_type id)
std::vector< SimHitIdpr > associateHitId(const TrackingRecHit &) const
int channels(unsigned int i) const
Extracting strip channel numbers comprising the rechit - low.
constexpr uint32_t rawId() const
get the raw id
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to given DetId.
int channel(int strip) const
unsigned int nStrips() const
CSCHitAssociator(const edm::Event &, const edm::EventSetup &, const edm::ParameterSet &)
collection_type::const_iterator const_iterator