91 ibooker.
book1D(
"ddxyAbsoluteResiduals_tracker",
"ddxyAbsoluteResiduals_tracker", ddxyBin, ddxyMin, ddxyMax);
93 ibooker.
book1D(
"ddzAbsoluteResiduals_tracker",
"ddzAbsoluteResiduals_tracker", ddzBin, ddzMin, ddzMax);
95 ibooker.
book1D(
"dphiAbsoluteResiduals_tracker",
"dphiAbsoluteResiduals_tracker", dphiBin, dphiMin, dphiMax);
97 "dthetaAbsoluteResiduals_tracker",
"dthetaAbsoluteResiduals_tracker", dthetaBin, dthetaMin, dthetaMax);
99 ibooker.
book1D(
"dptAbsoluteResiduals_tracker",
"dptAbsoluteResiduals_tracker", dptBin, dptMin, dptMax);
101 ibooker.
book1D(
"dcurvAbsoluteResiduals_tracker",
"dcurvAbsoluteResiduals_tracker", dcurvBin, dcurvMin, dcurvMax);
104 ibooker.
book1D(
"ddxyNormalizedResiduals_tracker",
"ddxyNormalizedResiduals_tracker", normBin, normMin, normMax);
106 ibooker.
book1D(
"ddzNormalizedResiduals_tracker",
"ddzNormalizedResiduals_tracker", normBin, normMin, normMax);
108 ibooker.
book1D(
"dphiNormalizedResiduals_tracker",
"dphiNormalizedResiduals_tracker", normBin, normMin, normMax);
110 "dthetaNormalizedResiduals_tracker",
"dthetaNormalizedResiduals_tracker", normBin, normMin, normMax);
112 ibooker.
book1D(
"dptNormalizedResiduals_tracker",
"dptNormalizedResiduals_tracker", normBin, normMin, normMax);
114 ibooker.
book1D(
"dcurvNormalizedResiduals_tracker",
"dcurvNormalizedResiduals_tracker", normBin, normMin, normMax);
118 ibooker.
book1D(
"ddxyAbsoluteResiduals_global",
"ddxyAbsoluteResiduals_global", ddxyBin, ddxyMin, ddxyMax);
120 ibooker.
book1D(
"ddzAbsoluteResiduals_global",
"ddzAbsoluteResiduals_global", ddzBin, ddzMin, ddzMax);
122 ibooker.
book1D(
"dphiAbsoluteResiduals_global",
"dphiAbsoluteResiduals_global", dphiBin, dphiMin, dphiMax);
124 "dthetaAbsoluteResiduals_global",
"dthetaAbsoluteResiduals_global", dthetaBin, dthetaMin, dthetaMax);
126 ibooker.
book1D(
"dptAbsoluteResiduals_global",
"dptAbsoluteResiduals_global", dptBin, dptMin, dptMax);
128 ibooker.
book1D(
"dcurvAbsoluteResiduals_global",
"dcurvAbsoluteResiduals_global", dcurvBin, dcurvMin, dcurvMax);
131 ibooker.
book1D(
"ddxyNormalizedResiduals_global",
"ddxyNormalizedResiduals_global", normBin, normMin, normMax);
133 ibooker.
book1D(
"ddzNormalizedResiduals_global",
"ddzNormalizedResiduals_global", normBin, normMin, normMax);
135 ibooker.
book1D(
"dphiNormalizedResiduals_global",
"dphiNormalizedResiduals_global", normBin, normMin, normMax);
137 "dthetaNormalizedResiduals_global",
"dthetaNormalizedResiduals_global", normBin, normMin, normMax);
139 ibooker.
book1D(
"dptNormalizedResiduals_global",
"dptNormalizedResiduals_global", normBin, normMin, normMax);
141 ibooker.
book1D(
"dcurvNormalizedResiduals_global",
"dcurvNormalizedResiduals_global", normBin, normMin, normMax);
144 ddxyAbsoluteResiduals_tracker_->
setAxisTitle(
"(#delta d_{xy})/#sqrt{2} [#mum]");
145 ddxyAbsoluteResiduals_tracker_->setAxisTitle(
"(#delta d_{z})/#sqrt{2} [#mum]");
146 ddxyAbsoluteResiduals_tracker_->setAxisTitle(
"(#delta #phi)/#sqrt{2} [mrad]");
147 ddxyAbsoluteResiduals_tracker_->setAxisTitle(
"(#delta #theta)/#sqrt{2} [mrad]");
148 ddxyAbsoluteResiduals_tracker_->setAxisTitle(
"(#delta pT)/#sqrt{2} [GeV]");
149 ddxyAbsoluteResiduals_tracker_->setAxisTitle(
"(#delta (1/pT))/#sqrt{2} [GeV^{-1}]");
194 if (splitTracks->size() == 2) {
196 edm::LogInfo(
"TrackSplittingMonitor") <<
"Split Track size: " << splitTracks->size();
206 double nRechits1 = 0;
207 double nRechitinBPIX1 = 0;
209 if ((*iHit)->isValid()) {
211 int type = (*iHit)->geographicalId().subdetId();
218 double nRechits2 = 0;
219 double nRechitinBPIX2 = 0;
221 if ((*iHit)->isValid()) {
223 int type = (*iHit)->geographicalId().subdetId();
231 double d01 = track1.
d0();
232 double dz1 = track1.
dz();
233 double d02 = track2.
d0();
234 double dz2 = track2.
dz();
237 double pt1 = track1.
pt();
238 double pt2 = track2.
pt();
251 if ((pt1 + pt2) / 2 <
ptCut_) {
255 edm::LogInfo(
"TrackSplittingMonitor") <<
" Setected after all cuts ?";
257 double ddxyVal = d01 - d02;
258 double ddzVal = dz1 - dz2;
259 double dphiVal = track1.
phi() - track2.
phi();
260 double dthetaVal = track1.
theta() - track2.
theta();
261 double dptVal = pt1 - pt2;
262 double dcurvVal = (1 / pt1) - (1 / pt2);
264 double d01ErrVal = track1.
d0Error();
265 double d02ErrVal = track2.
d0Error();
266 double dz1ErrVal = track1.
dzError();
267 double dz2ErrVal = track2.
dzError();
268 double phi1ErrVal = track1.
phiError();
269 double phi2ErrVal = track2.
phiError();
272 double pt1ErrVal = track1.
ptError();
273 double pt2ErrVal = track2.
ptError();
286 sqrt(theta1ErrVal * theta1ErrVal + theta2ErrVal * theta2ErrVal));
289 dcurvVal /
sqrt(
pow(pt1ErrVal, 2) /
pow(pt1, 4) +
pow(pt2ErrVal, 2) /
pow(pt2, 4)));
294 bool topGlobalMuonFlag =
false;
295 bool bottomGlobalMuonFlag =
false;
296 int topGlobalMuon = -1;
297 int bottomGlobalMuon = -1;
298 double topGlobalMuonNorchi2 = 1e10;
299 double bottomGlobalMuonNorchi2 = 1e10;
302 for (std::vector<reco::Muon>::const_iterator gmI = splitMuons->begin(); gmI != splitMuons->end(); gmI++) {
303 if (gmI->isTrackerMuon() && gmI->isStandAloneMuon() && gmI->isGlobalMuon()) {
307 if (gmI->innerTrack() == trackerTrackRef1) {
308 if (gmI->globalTrack()->normalizedChi2() < topGlobalMuonNorchi2) {
309 topGlobalMuonFlag =
true;
310 topGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
311 topGlobalMuon = gmCtr;
314 if (gmI->innerTrack() == trackerTrackRef2) {
315 if (gmI->globalTrack()->normalizedChi2() < bottomGlobalMuonNorchi2) {
316 bottomGlobalMuonFlag =
true;
317 bottomGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
318 bottomGlobalMuon = gmCtr;
325 if (bottomGlobalMuonFlag && topGlobalMuonFlag) {
326 reco::Muon muonTop = splitMuons->at(topGlobalMuon);
327 reco::Muon muonBottom = splitMuons->at(bottomGlobalMuon);
332 double ddxyValGlb = glb1->d0() - glb2->d0();
333 double ddzValGlb = glb1->dz() - glb2->dz();
334 double dphiValGlb = glb1->phi() - glb2->phi();
335 double dthetaValGlb = glb1->theta() - glb2->theta();
336 double dptValGlb = glb1->pt() - glb2->pt();
337 double dcurvValGlb = (1 / glb1->pt()) - (1 / glb2->pt());
339 double d01ErrValGlb = glb1->d0Error();
340 double d02ErrValGlb = glb2->d0Error();
341 double dz1ErrValGlb = glb1->dzError();
342 double dz2ErrValGlb = glb2->dzError();
343 double phi1ErrValGlb = glb1->phiError();
344 double phi2ErrValGlb = glb2->phiError();
345 double theta1ErrValGlb = glb1->thetaError();
346 double theta2ErrValGlb = glb2->thetaError();
347 double pt1ErrValGlb = glb1->ptError();
348 double pt2ErrValGlb = glb2->ptError();
358 sqrt(d01ErrValGlb * d01ErrValGlb + d02ErrValGlb * d02ErrValGlb));
360 sqrt(dz1ErrValGlb * dz1ErrValGlb + dz2ErrValGlb * dz2ErrValGlb));
362 dphiValGlb /
sqrt(phi1ErrValGlb * phi1ErrValGlb + phi2ErrValGlb * phi2ErrValGlb));
364 dthetaValGlb /
sqrt(theta1ErrValGlb * theta1ErrValGlb + theta2ErrValGlb * theta2ErrValGlb));
366 sqrt(pt1ErrValGlb * pt1ErrValGlb + pt2ErrValGlb * pt2ErrValGlb));
368 dcurvValGlb /
sqrt(
pow(pt1ErrValGlb, 2) /
pow(pt1, 4) +
pow(pt2ErrValGlb, 2) /
pow(pt2, 4)));
double d0Error() const
error on d0
MonitorElement * dthetaAbsoluteResiduals_global_
MonitorElement * dcurvNormalizedResiduals_global_
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
const CSCGeometry * cscGeometry
virtual void setCurrentFolder(std::string const &fullpath)
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
MonitorElement * dthetaAbsoluteResiduals_tracker_
double theta() const
polar angle
#define DEFINE_FWK_MODULE(type)
MonitorElement * ddzNormalizedResiduals_global_
edm::InputTag splitMuons_
MonitorElement * ddxyNormalizedResiduals_tracker_
double phi() const
azimuthal angle of momentum vector
MonitorElement * dcurvAbsoluteResiduals_tracker_
const DTGeometry * dtGeometry
const edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
MonitorElement * ddzAbsoluteResiduals_global_
edm::EDGetTokenT< std::vector< reco::Muon > > splitMuonsToken_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
bool getData(T &iHolder) const
const RPCGeometry * rpcGeometry
MonitorElement * dphiNormalizedResiduals_global_
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
MonitorElement * dthetaNormalizedResiduals_tracker_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > mfToken_
MonitorElement * ddxyNormalizedResiduals_global_
MonitorElement * dthetaNormalizedResiduals_global_
const MagneticField * theMagField
MonitorElement * dphiNormalizedResiduals_tracker_
const TrackerGeometry * theGeometry
double pt() const
track transverse momentum
MonitorElement * dcurvAbsoluteResiduals_global_
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
MonitorElement * dphiAbsoluteResiduals_tracker_
double phiError() const
error on phi
MonitorElement * ddzNormalizedResiduals_tracker_
MonitorElement * dptAbsoluteResiduals_global_
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
MonitorElement * dptAbsoluteResiduals_tracker_
edm::InputTag splitTracks_
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
double dzError() const
error on dz
~TrackSplittingMonitor() override
Log< level::Info, false > LogInfo
T getParameter(std::string const &) const
TrackSplittingMonitor(const edm::ParameterSet &)
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * ddzAbsoluteResiduals_tracker_
MonitorElement * ddxyAbsoluteResiduals_global_
MonitorElement * dcurvNormalizedResiduals_tracker_
MonitorElement * dphiAbsoluteResiduals_global_
edm::EDGetTokenT< std::vector< reco::Track > > splitTracksToken_
MonitorElement * dptNormalizedResiduals_tracker_
MonitorElement * dptNormalizedResiduals_global_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * ddxyAbsoluteResiduals_tracker_
Power< A, B >::type pow(const A &a, const B &b)
double thetaError() const
error on theta
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
const edm::ESGetToken< RPCGeometry, MuonGeometryRecord > rpcGeomToken_
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)