31 theMuTrackCollectionLabel_ =
67 "(recHits_{notUsedForGLB}) / (recHits_{GLB}) [" +
trackCollection +
"]",
81 TrackSegm->setBinLabel(2,
"DT", 1);
82 TrackSegm->setBinLabel(3,
"CSC", 1);
90 hitStaProvenance->setBinLabel(2,
"CSC");
91 hitStaProvenance->setBinLabel(3,
"RPC");
92 hitStaProvenance->setBinLabel(4,
"DT+CSC");
93 hitStaProvenance->setBinLabel(5,
"DT+RPC");
94 hitStaProvenance->setBinLabel(6,
"CSC+RPC");
95 hitStaProvenance->setBinLabel(7,
"DT+CSC+RPC");
104 hitTkrProvenance->setBinLabel(2,
"PixEndCap");
105 hitTkrProvenance->setBinLabel(3,
"TIB");
106 hitTkrProvenance->setBinLabel(4,
"TID");
107 hitTkrProvenance->setBinLabel(5,
"TOB");
108 hitTkrProvenance->setBinLabel(6,
"TEC");
111 trackHitPercentualVsEta =
113 "(recHits_{Track} / recHits_{associatedSegm}) vs #eta [" +
trackCollection +
"]",
120 dtTrackHitPercentualVsEta =
122 "(recHits_{DTinTrack} / recHits_{associatedSegm}) vs #eta [" +
trackCollection +
"]",
129 cscTrackHitPercentualVsEta =
131 "(recHits_{CSCinTrack} / recHits_{associatedSegm}) vs #eta [" +
trackCollection +
"]",
139 trackHitPercentualVsPhi =
141 "(recHits_{Track} / recHits_{associatedSegm}) vs #phi [" +
trackCollection +
"]",
149 dtTrackHitPercentualVsPhi =
151 "(recHits_{DTinTrack} / recHits_{associatedSegm}) vs #phi [" +
trackCollection +
"]",
159 cscTrackHitPercentualVsPhi =
161 "(recHits_{CSCinTrack} / recHits_{associatedSegm}) vs #phi [" +
trackCollection +
"]",
170 trackHitPercentualVsPt =
172 "(recHits_{Track} / recHits_{associatedSegm}) vs 1/p_{t} [" +
trackCollection +
"]",
180 dtTrackHitPercentualVsPt =
182 "(recHits_{DTinTrack} / recHits_{associatedSegm}) vs 1/p_{t} [" +
trackCollection +
"]",
190 cscTrackHitPercentualVsPt =
192 "(recHits_{CSCinTrack} / recHits_{associatedSegm}) vs 1/p_{t} [" +
trackCollection +
"]",
204 iEvent.getByToken(theMuTrackCollectionLabel_, glbTracks);
206 for (reco::TrackCollection::const_iterator recoTrack = glbTracks->begin(); recoTrack != glbTracks->end();
209 theSegmentsAssociator->associate(
iEvent, iSetup, *recoTrack);
212 cout <<
"[SegmentTrackAnalyzer] # of segments associated to the track: " << (segments).
size() << endl;
220 int hitsFromTrack = 0;
221 int hitsFromSegmDt = 0;
222 int hitsFromSegmCsc = 0;
227 for (MuonTransientTrackingRecHit::MuonRecHitContainer::const_iterator segment = segments.begin();
228 segment != segments.end();
230 DetId id = (*segment)->geographicalId();
235 const DTRecSegment4D* seg4D = dynamic_cast<const DTRecSegment4D*>((*segment)->hit());
236 if ((*seg4D).hasPhi())
238 if ((*seg4D).hasZed())
239 hitsFromSegmDt += (*seg4D).zSegment()->specificRecHits().size();
244 hitsFromSegmCsc += (*segment)->recHits().size();
252 DetId id = (*recHit)->geographicalId();
266 hitTkrProvenance->Fill(1);
268 hitTkrProvenance->Fill(2);
270 hitTkrProvenance->Fill(3);
272 hitTkrProvenance->Fill(4);
274 hitTkrProvenance->Fill(5);
276 hitTkrProvenance->Fill(6);
281 hitsNotUsed->Fill(hitsFromSegmDt + hitsFromSegmCsc + hitsFromRpc + hitsFromTk - hitsFromTrack);
282 hitsNotUsedPercentual->Fill(
double(hitsFromSegmDt + hitsFromSegmCsc + hitsFromRpc + hitsFromTk - hitsFromTrack) /
285 if (hitsFromDt != 0 && hitsFromCsc != 0)
286 TrackSegm->Fill(1, segmFromDt + segmFromCsc);
287 if (hitsFromDt != 0 && hitsFromCsc == 0)
288 TrackSegm->Fill(2, segmFromDt);
289 if (hitsFromDt == 0 && hitsFromCsc != 0)
290 TrackSegm->Fill(3, segmFromCsc);
292 if (hitsFromDt != 0 && hitsFromCsc == 0 && hitsFromRpc == 0)
293 hitStaProvenance->Fill(1);
294 if (hitsFromCsc != 0 && hitsFromDt == 0 && hitsFromRpc == 0)
295 hitStaProvenance->Fill(2);
296 if (hitsFromRpc != 0 && hitsFromDt == 0 && hitsFromCsc == 0)
297 hitStaProvenance->Fill(3);
298 if (hitsFromDt != 0 && hitsFromCsc != 0 && hitsFromRpc == 0)
299 hitStaProvenance->Fill(4);
300 if (hitsFromDt != 0 && hitsFromRpc != 0 && hitsFromCsc == 0)
301 hitStaProvenance->Fill(5);
302 if (hitsFromCsc != 0 && hitsFromRpc != 0 && hitsFromDt == 0)
303 hitStaProvenance->Fill(6);
304 if (hitsFromDt != 0 && hitsFromCsc != 0 && hitsFromRpc != 0)
305 hitStaProvenance->Fill(7);
307 if (hitsFromSegmDt + hitsFromSegmCsc != 0) {
308 trackHitPercentualVsEta->Fill(recoTrack->eta(),
309 double(hitsFromDt + hitsFromCsc) / (hitsFromSegmDt + hitsFromSegmCsc));
310 trackHitPercentualVsPhi->Fill(recoTrack->phi(),
311 double(hitsFromDt + hitsFromCsc) / (hitsFromSegmDt + hitsFromSegmCsc));
312 trackHitPercentualVsPt->Fill(recoTrack->pt(),
313 double(hitsFromDt + hitsFromCsc) / (hitsFromSegmDt + hitsFromSegmCsc));
316 if (hitsFromSegmDt != 0) {
317 dtTrackHitPercentualVsEta->Fill(recoTrack->eta(), double(hitsFromDt) / hitsFromSegmDt);
318 dtTrackHitPercentualVsPhi->Fill(recoTrack->phi(), double(hitsFromDt) / hitsFromSegmDt);
319 dtTrackHitPercentualVsPt->Fill(recoTrack->pt(), double(hitsFromDt) / hitsFromSegmDt);
322 if (hitsFromSegmCsc != 0) {
323 cscTrackHitPercentualVsEta->Fill(recoTrack->eta(), double(hitsFromCsc) / hitsFromSegmCsc);
324 cscTrackHitPercentualVsPhi->Fill(recoTrack->phi(), double(hitsFromCsc) / hitsFromSegmCsc);
325 cscTrackHitPercentualVsPt->Fill(recoTrack->pt(), double(hitsFromCsc) / hitsFromSegmCsc);