9 : theDigiSimLinks(nullptr),
10 theWireDigiSimLinks(nullptr),
11 linksTag(conf.getParameter<
edm::
InputTag>(
"CSClinksTag")),
12 wireLinksTag(conf.getParameter<
edm::
InputTag>(
"CSCwireLinksTag")),
23 : theDigiSimLinks(nullptr),
24 theWireDigiSimLinks(nullptr),
25 linksTag(conf.getParameter<
edm::
InputTag>(
"CSClinksTag")),
26 wireLinksTag(conf.getParameter<
edm::
InputTag>(
"CSCwireLinksTag")),
44 LogTrace(
"MuonTruth") <<
"getting CSC Strip DigiSimLink collection - " <<
linksTag;
71 LogTrace(
"MuonTruth") <<
"... size = " << CSCsimhits->size();
81 LogTrace(
"MuonTruth") <<
"... size = " << CSCsimhits->size();
83 for (edm::PSimHitContainer::const_iterator hitItr = CSCsimhits->begin(); hitItr != CSCsimhits->end(); ++hitItr) {
93 float muonCharge = 0.;
94 for (std::map<SimHitIdpr, float>::const_iterator chargeMapItr =
theChargeMap.begin();
98 muonCharge += chargeMapItr->second;
106 std::vector<PSimHit>
result;
107 for (std::map<SimHitIdpr, float>::const_iterator chargeMapItr =
theChargeMap.begin();
111 result.insert(
result.end(), trackHits.begin(), trackHits.end());
118 std::vector<PSimHit>
result;
119 std::vector<PSimHit> allHits =
simHits();
120 std::vector<PSimHit>::const_iterator hitItr = allHits.begin(), lastHit = allHits.end();
122 for (; hitItr != lastHit; ++hitItr) {
123 if (
abs((*hitItr).particleType()) == 13) {
124 result.push_back(*hitItr);
131 std::vector<PSimHit>
result;
135 for (
auto const &
hit :
found->second) {
136 unsigned int hitTrack =
hit.trackId();
139 if (hitTrack == truthId.first && hitEvId == truthId.second) {
161 int nchannels =
recHit.nStrips();
164 for (
int idigi = 0; idigi < nchannels; ++idigi) {
166 int istrip =
recHit.channels(idigi);
167 int channel = laygeom->
channel(istrip);
180 theDetId = rawDetIdCorrespondingToCSCLayer;
191 theDetId = rawDetIdCorrespondingToCSCLayer;
200 int wireDigiInSimulation = wireDigi.
getWireGroup() + 100;
202 addChannel(*layerLinks, wireDigiInSimulation, 1.);
209 for (; linkItr != lastLayerLink; ++linkItr) {
210 int linkChannel = linkItr->channel();
211 if (linkChannel == channel) {
215 SimHitIdpr truthId(linkItr->SimTrackId(), linkItr->eventId());
216 std::map<SimHitIdpr, float>::const_iterator chargeMapItr =
theChargeMap.find(truthId);