34 theMuTrackCollectionLabel_ = consumes<reco::TrackCollection>(
parameters.getParameter<
edm::InputTag>(
"MuTrackCollection"));
44 etaBin =
parameters.getParameter<
int>(
"etaBin");
47 phiBin =
parameters.getParameter<
int>(
"phiBin");
48 phiMin =
parameters.getParameter<
double>(
"phiMin");
49 phiMax =
parameters.getParameter<
double>(
"phiMax");
52 ptMax =
parameters.getParameter<
double>(
"ptMax");
63 hitsNotUsedPercentual = ibooker.
book1D(
"HitsNotUsedForGlobalTrackingDvHitUsed_"+
trackCollection,
"(recHits_{notUsedForGLB}) / (recHits_{GLB}) ["+
trackCollection+
"]", 100, 0, 1.);
67 TrackSegm->setBinLabel(2,
"DT",1);
68 TrackSegm->setBinLabel(3,
"CSC",1);
72 hitStaProvenance->setBinLabel(2,
"CSC");
73 hitStaProvenance->setBinLabel(3,
"RPC");
74 hitStaProvenance->setBinLabel(4,
"DT+CSC");
75 hitStaProvenance->setBinLabel(5,
"DT+RPC");
76 hitStaProvenance->setBinLabel(6,
"CSC+RPC");
77 hitStaProvenance->setBinLabel(7,
"DT+CSC+RPC");
83 hitTkrProvenance->setBinLabel(2,
"PixEndCap");
84 hitTkrProvenance->setBinLabel(3,
"TIB");
85 hitTkrProvenance->setBinLabel(4,
"TID");
86 hitTkrProvenance->setBinLabel(5,
"TOB");
87 hitTkrProvenance->setBinLabel(6,
"TEC");
94 trackHitPercentualVsPhi = ibooker.
book2D(
"trackHitDivtrackSegmHitVsPhi_"+
trackCollection,
"(recHits_{Track} / recHits_{associatedSegm}) vs #phi [" +
trackCollection+
"]", phiBin, phiMin, phiMax, 20, 0, 1);
96 dtTrackHitPercentualVsPhi = ibooker.
book2D(
"dtTrackHitDivtrackSegmHitVsPhi_"+
trackCollection,
"(recHits_{DTinTrack} / recHits_{associatedSegm}) vs #phi [" +
trackCollection+
"]", phiBin, phiMin, phiMax, 20, 0, 1);
98 cscTrackHitPercentualVsPhi = ibooker.
book2D(
"cscTrackHitDivtrackSegmHitVsPhi_"+
trackCollection,
"(recHits_{CSCinTrack} / recHits_{associatedSegm}) vs #phi [" +
trackCollection+
"]", phiBin, phiMin, phiMax, 20, 0, 1);
101 trackHitPercentualVsPt = ibooker.
book2D(
"trackHitDivtrackSegmHitVsPt_"+
trackCollection,
"(recHits_{Track} / recHits_{associatedSegm}) vs 1/p_{t} [" +
trackCollection+
"]", ptBin,
ptMin, ptMax, 20, 0, 1);
103 dtTrackHitPercentualVsPt = ibooker.
book2D(
"dtTrackHitDivtrackSegmHitVsPt_"+
trackCollection,
"(recHits_{DTinTrack} / recHits_{associatedSegm}) vs 1/p_{t} [" +
trackCollection+
"]", ptBin,
ptMin, ptMax, 20, 0, 1);
105 cscTrackHitPercentualVsPt = ibooker.
book2D(
"cscTrackHitDivtrackSegmHitVsPt_"+
trackCollection,
"(recHits_{CSCinTrack} / recHits_{associatedSegm}) vs 1/p_{t} [" +
trackCollection+
"]", ptBin,
ptMin, ptMax, 20, 0, 1);
111 theService->update(iSetup);
114 iEvent.
getByToken(theMuTrackCollectionLabel_,glbTracks);
116 for (reco::TrackCollection::const_iterator recoTrack = glbTracks->begin(); recoTrack!=glbTracks->end(); ++recoTrack){
120 cout <<
"[SegmentTrackAnalyzer] # of segments associated to the track: "<<(segments).
size() <<endl;
129 int hitsFromSegmDt=0;
130 int hitsFromSegmCsc=0;
135 for (MuonTransientTrackingRecHit::MuonRecHitContainer::const_iterator segment=segments.begin();
136 segment!=segments.end(); segment++) {
138 DetId id = (*segment)->geographicalId();
144 if((*seg4D).hasPhi())
146 if((*seg4D).hasZed())
147 hitsFromSegmDt+=(*seg4D).zSegment()->specificRecHits().size();
153 hitsFromSegmCsc+=(*segment)->recHits().size();
164 DetId id = (*recHit)->geographicalId();
178 hitTkrProvenance->Fill(1);
180 hitTkrProvenance->Fill(2);
182 hitTkrProvenance->Fill(3);
184 hitTkrProvenance->Fill(4);
186 hitTkrProvenance->Fill(5);
188 hitTkrProvenance->Fill(6);
194 hitsNotUsed->Fill(hitsFromSegmDt+hitsFromSegmCsc+hitsFromRpc+hitsFromTk-hitsFromTrack);
195 hitsNotUsedPercentual->Fill(
double(hitsFromSegmDt+hitsFromSegmCsc+hitsFromRpc+hitsFromTk-hitsFromTrack)/hitsFromTrack);
197 if(hitsFromDt!=0 && hitsFromCsc!=0)
198 TrackSegm->Fill(1,segmFromDt+segmFromCsc);
199 if(hitsFromDt!=0 && hitsFromCsc==0)
200 TrackSegm->Fill(2,segmFromDt);
201 if(hitsFromDt==0 && hitsFromCsc!=0)
202 TrackSegm->Fill(3,segmFromCsc);
204 if(hitsFromDt!=0 && hitsFromCsc==0 && hitsFromRpc==0) hitStaProvenance->Fill(1);
205 if(hitsFromCsc!=0 && hitsFromDt==0 && hitsFromRpc==0) hitStaProvenance->Fill(2);
206 if(hitsFromRpc!=0 && hitsFromDt==0 && hitsFromCsc==0) hitStaProvenance->Fill(3);
207 if(hitsFromDt!=0 && hitsFromCsc!=0 && hitsFromRpc==0) hitStaProvenance->Fill(4);
208 if(hitsFromDt!=0 && hitsFromRpc!=0 && hitsFromCsc==0) hitStaProvenance->Fill(5);
209 if(hitsFromCsc!=0 && hitsFromRpc!=0 && hitsFromDt==0) hitStaProvenance->Fill(6);
210 if(hitsFromDt!=0 && hitsFromCsc!=0 && hitsFromRpc!=0) hitStaProvenance->Fill(7);
212 if(hitsFromSegmDt+hitsFromSegmCsc !=0){
213 trackHitPercentualVsEta->Fill(recoTrack->eta(), double(hitsFromDt+hitsFromCsc)/(hitsFromSegmDt+hitsFromSegmCsc));
214 trackHitPercentualVsPhi->Fill(recoTrack->phi(), double(hitsFromDt+hitsFromCsc)/(hitsFromSegmDt+hitsFromSegmCsc));
215 trackHitPercentualVsPt->Fill(recoTrack->pt(), double(hitsFromDt+hitsFromCsc)/(hitsFromSegmDt+hitsFromSegmCsc));
218 if(hitsFromSegmDt!=0){
219 dtTrackHitPercentualVsEta->Fill(recoTrack->eta(), double(hitsFromDt)/hitsFromSegmDt);
220 dtTrackHitPercentualVsPhi->Fill(recoTrack->phi(), double(hitsFromDt)/hitsFromSegmDt);
221 dtTrackHitPercentualVsPt->Fill(recoTrack->pt(), double(hitsFromDt)/hitsFromSegmDt);
224 if(hitsFromSegmCsc!=0){
225 cscTrackHitPercentualVsEta->Fill(recoTrack->eta(), double(hitsFromCsc)/hitsFromSegmCsc);
226 cscTrackHitPercentualVsPhi->Fill(recoTrack->phi(), double(hitsFromCsc)/hitsFromSegmCsc);
227 cscTrackHitPercentualVsPt->Fill(recoTrack->pt(), double(hitsFromCsc)/hitsFromSegmCsc);
static PFTauRenderPlugin instance
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
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)
SegmentTrackAnalyzer(const edm::ParameterSet &)
Constructor.
MonitorElement * book1D(Args &&...args)
std::vector< DTRecHit1D > specificRecHits() const
Access to specific components.
void analyze(const edm::Event &, const edm::EventSetup &)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
std::vector< MuonRecHitPointer > MuonRecHitContainer
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
tuple size
Write out results.
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection