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();
237 if ((*seg4D).hasPhi())
239 if ((*seg4D).hasZed())
240 hitsFromSegmDt += (*seg4D).zSegment()->specificRecHits().size();
245 hitsFromSegmCsc += (*segment)->recHits().size();
250 cout <<
"[SegmentTrackAnalyzer] # of segments from DT and CSC: " << segmFromDt <<
", " << segmFromCsc << endl;
251 cout <<
"[SegmentTrackAnalyzer] # of HITS from segments from DT: " << hitsFromSegmDt << endl;
252 cout <<
"[SegmentTrackAnalyzer] # of HITS from segments from CSC " << hitsFromSegmCsc << endl;
259 DetId id = (*recHit)->geographicalId();
273 hitTkrProvenance->Fill(1);
275 hitTkrProvenance->Fill(2);
277 hitTkrProvenance->Fill(3);
279 hitTkrProvenance->Fill(4);
281 hitTkrProvenance->Fill(5);
283 hitTkrProvenance->Fill(6);
288 hitsNotUsed->Fill(hitsFromSegmDt + hitsFromSegmCsc + hitsFromRpc + hitsFromTk - hitsFromTrack);
289 hitsNotUsedPercentual->Fill(
double(hitsFromSegmDt + hitsFromSegmCsc + hitsFromRpc + hitsFromTk - hitsFromTrack) /
292 if (hitsFromDt != 0 && hitsFromCsc != 0)
293 TrackSegm->Fill(1, segmFromDt + segmFromCsc);
294 if (hitsFromDt != 0 && hitsFromCsc == 0)
295 TrackSegm->Fill(2, segmFromDt);
296 if (hitsFromDt == 0 && hitsFromCsc != 0)
297 TrackSegm->Fill(3, segmFromCsc);
299 if (hitsFromDt != 0 && hitsFromCsc == 0 && hitsFromRpc == 0)
300 hitStaProvenance->Fill(1);
301 if (hitsFromCsc != 0 && hitsFromDt == 0 && hitsFromRpc == 0)
302 hitStaProvenance->Fill(2);
303 if (hitsFromRpc != 0 && hitsFromDt == 0 && hitsFromCsc == 0)
304 hitStaProvenance->Fill(3);
305 if (hitsFromDt != 0 && hitsFromCsc != 0 && hitsFromRpc == 0)
306 hitStaProvenance->Fill(4);
307 if (hitsFromDt != 0 && hitsFromRpc != 0 && hitsFromCsc == 0)
308 hitStaProvenance->Fill(5);
309 if (hitsFromCsc != 0 && hitsFromRpc != 0 && hitsFromDt == 0)
310 hitStaProvenance->Fill(6);
311 if (hitsFromDt != 0 && hitsFromCsc != 0 && hitsFromRpc != 0)
312 hitStaProvenance->Fill(7);
314 if (hitsFromSegmDt + hitsFromSegmCsc != 0) {
315 trackHitPercentualVsEta->Fill(recoTrack->eta(),
316 double(hitsFromDt + hitsFromCsc) / (hitsFromSegmDt + hitsFromSegmCsc));
317 trackHitPercentualVsPhi->Fill(recoTrack->phi(),
318 double(hitsFromDt + hitsFromCsc) / (hitsFromSegmDt + hitsFromSegmCsc));
319 trackHitPercentualVsPt->Fill(recoTrack->pt(),
320 double(hitsFromDt + hitsFromCsc) / (hitsFromSegmDt + hitsFromSegmCsc));
323 if (hitsFromSegmDt != 0) {
324 dtTrackHitPercentualVsEta->Fill(recoTrack->eta(), double(hitsFromDt) / hitsFromSegmDt);
325 dtTrackHitPercentualVsPhi->Fill(recoTrack->phi(), double(hitsFromDt) / hitsFromSegmDt);
326 dtTrackHitPercentualVsPt->Fill(recoTrack->pt(), double(hitsFromDt) / hitsFromSegmDt);
329 if (hitsFromSegmCsc != 0) {
330 cscTrackHitPercentualVsEta->Fill(recoTrack->eta(), double(hitsFromCsc) / hitsFromSegmCsc);
331 cscTrackHitPercentualVsPhi->Fill(recoTrack->phi(), double(hitsFromCsc) / hitsFromSegmCsc);
332 cscTrackHitPercentualVsPt->Fill(recoTrack->pt(), double(hitsFromCsc) / hitsFromSegmCsc);
virtual void setCurrentFolder(std::string const &fullpath)
static PFTauRenderPlugin instance
static constexpr auto TID
SegmentTrackAnalyzer(const edm::ParameterSet &)
Constructor.
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
static constexpr auto TOB
void analyze(const edm::Event &, const edm::EventSetup &) override
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
std::vector< DTRecHit1D > specificRecHits() const
Access to specific components.
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
static constexpr auto TIB
SegmentsTrackAssociatorParameters
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
std::vector< MuonRecHitPointer > MuonRecHitContainer
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
static constexpr auto TEC
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)