110 "dthetaNormalizedResiduals_tracker",
"dthetaNormalizedResiduals_tracker",
normBin,
normMin,
normMax);
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();
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));
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) {
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));
T getParameter(std::string const &) const
MonitorElement * dthetaAbsoluteResiduals_global_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
MonitorElement * dcurvNormalizedResiduals_global_
const CSCGeometry * cscGeometry
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
virtual void setCurrentFolder(std::string const &fullpath)
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
MonitorElement * dthetaAbsoluteResiduals_tracker_
MonitorElement * ddzNormalizedResiduals_global_
edm::InputTag splitMuons_
double thetaError() const
error on theta
MonitorElement * ddxyNormalizedResiduals_tracker_
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
const RPCGeometry * rpcGeometry
MonitorElement * dphiNormalizedResiduals_global_
double pt() const
track transverse momentum
MonitorElement * dthetaNormalizedResiduals_tracker_
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...
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > mfToken_
MonitorElement * ddxyNormalizedResiduals_global_
MonitorElement * dthetaNormalizedResiduals_global_
double dzError() const
error on dz
const MagneticField * theMagField
MonitorElement * dphiNormalizedResiduals_tracker_
const TrackerGeometry * theGeometry
MonitorElement * dcurvAbsoluteResiduals_global_
MonitorElement * dphiAbsoluteResiduals_tracker_
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
double phi() const
azimuthal angle of momentum vector
MonitorElement * ddzNormalizedResiduals_tracker_
#define DEFINE_FWK_MODULE(type)
MonitorElement * dptAbsoluteResiduals_global_
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
MonitorElement * dptAbsoluteResiduals_tracker_
edm::InputTag splitTracks_
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
~TrackSplittingMonitor() override
Log< level::Info, false > LogInfo
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
TrackSplittingMonitor(const edm::ParameterSet &)
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * ddzAbsoluteResiduals_tracker_
double theta() const
polar angle
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())
double d0Error() const
error on d0
double phiError() const
error on phi
MonitorElement * ddxyAbsoluteResiduals_tracker_
Power< A, B >::type pow(const A &a, const B &b)
const edm::ESGetToken< RPCGeometry, MuonGeometryRecord > rpcGeomToken_
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)