10 linksTag(conf.getParameter<
edm::InputTag>(
"CSClinksTag"))
17 linksTag(conf.getParameter<
edm::InputTag>(
"CSClinksTag"))
25 LogTrace(
"CSCHitAssociator") <<
"getting CSC Strip DigiSimLink collection - "<<
linksTag;
26 event.getByLabel(
linksTag, digiSimLinks);
36 std::vector<SimHitIdpr> simtrackids;
39 int nchannels = cscrechit->
nStrips();
46 for(
int idigi = 0; idigi < nchannels; ++idigi) {
48 int istrip = cscrechit->
channels(idigi);
49 int channel = laygeom->
channel(istrip);
52 int ch =
static_cast<int>(link->channel());
54 SimHitIdpr currentId(link->SimTrackId(), link->eventId());
55 if (
find(simtrackids.begin(), simtrackids.end(), currentId) == simtrackids.end())
56 simtrackids.push_back(currentId);
62 <<
"*** WARNING in CSCHitAssociator::associateCSCHitId - CSC layer "<<detId<<
" has no DigiSimLinks !"<<std::endl;
70 std::vector<SimHitIdpr> simtrackids;
78 int nchannels = cscrechit->
nStrips();
85 for(
int idigi = 0; idigi < nchannels; ++idigi) {
87 int istrip = cscrechit->
channels(idigi);
88 int channel = laygeom->
channel(istrip);
91 int ch =
static_cast<int>(link->channel());
93 SimHitIdpr currentId(link->SimTrackId(), link->eventId());
94 if (
find(simtrackids.begin(), simtrackids.end(), currentId) == simtrackids.end())
95 simtrackids.push_back(currentId);
101 <<
"*** WARNING in CSCHitAssociator::associateHitId - CSC layer "<<detId<<
" has no DigiSimLinks !"<<std::endl;
103 }
else LogTrace(
"CSCHitAssociator")<<
"*** WARNING in CSCHitAssociator::associateHitId, null dynamic_cast !";
CSCDetId cscDetId() const
iterator find(det_id_type id)
def setup(process, global_tag, zero_tesla=False)
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 &)
uint32_t rawId() const
get the raw id
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 &)