195 double nRechits1 = 0;
196 double nRechitinBPIX1 = 0;
197 for (
auto const& iHit : track1.
recHits()) {
198 if (iHit->isValid()) {
200 int type = iHit->geographicalId().subdetId();
207 double nRechits2 = 0;
208 double nRechitinBPIX2 = 0;
209 for (
auto const& iHit : track2.
recHits()) {
210 if (iHit->isValid()) {
212 int type = iHit->geographicalId().subdetId();
220 double d01 = track1.
d0();
221 double dz1 = track1.
dz();
222 double d02 = track2.
d0();
223 double dz2 = track2.
dz();
226 double pt1 = track1.
pt();
227 double pt2 = track2.
pt();
245 edm::LogInfo(
"TrackSplittingMonitor") <<
" Setected after all cuts ?";
247 double ddxyVal = d01 - d02;
248 double ddzVal = dz1 - dz2;
249 double dphiVal = track1.
phi() - track2.
phi();
250 double dthetaVal = track1.
theta() - track2.
theta();
251 double dptVal =
pt1 -
pt2;
252 double dcurvVal = (1 /
pt1) - (1 /
pt2);
254 double d01ErrVal = track1.
d0Error();
255 double d02ErrVal = track2.
d0Error();
256 double dz1ErrVal = track1.
dzError();
257 double dz2ErrVal = track2.
dzError();
258 double phi1ErrVal = track1.
phiError();
259 double phi2ErrVal = track2.
phiError();
262 double pt1ErrVal = track1.
ptError();
263 double pt2ErrVal = track2.
ptError();
276 sqrt(theta1ErrVal * theta1ErrVal + theta2ErrVal * theta2ErrVal));
284 bool topGlobalMuonFlag =
false;
285 bool bottomGlobalMuonFlag =
false;
286 int topGlobalMuon = -1;
287 int bottomGlobalMuon = -1;
288 double topGlobalMuonNorchi2 = 1e10;
289 double bottomGlobalMuonNorchi2 = 1e10;
292 for (std::vector<reco::Muon>::const_iterator gmI =
splitMuons->begin(); gmI !=
splitMuons->end(); gmI++) {
293 if (gmI->isTrackerMuon() && gmI->isStandAloneMuon() && gmI->isGlobalMuon()) {
297 if (gmI->innerTrack() == trackerTrackRef1) {
298 if (gmI->globalTrack()->normalizedChi2() < topGlobalMuonNorchi2) {
299 topGlobalMuonFlag =
true;
300 topGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
301 topGlobalMuon = gmCtr;
304 if (gmI->innerTrack() == trackerTrackRef2) {
305 if (gmI->globalTrack()->normalizedChi2() < bottomGlobalMuonNorchi2) {
306 bottomGlobalMuonFlag =
true;
307 bottomGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
308 bottomGlobalMuon = gmCtr;
315 if (bottomGlobalMuonFlag && topGlobalMuonFlag) {
322 double ddxyValGlb = glb1->d0() - glb2->d0();
323 double ddzValGlb = glb1->dz() - glb2->dz();
324 double dphiValGlb = glb1->phi() - glb2->phi();
325 double dthetaValGlb = glb1->theta() - glb2->theta();
326 double dptValGlb = glb1->pt() - glb2->pt();
327 double dcurvValGlb = (1 / glb1->pt()) - (1 / glb2->pt());
329 double d01ErrValGlb = glb1->d0Error();
330 double d02ErrValGlb = glb2->d0Error();
331 double dz1ErrValGlb = glb1->dzError();
332 double dz2ErrValGlb = glb2->dzError();
333 double phi1ErrValGlb = glb1->phiError();
334 double phi2ErrValGlb = glb2->phiError();
335 double theta1ErrValGlb = glb1->thetaError();
336 double theta2ErrValGlb = glb2->thetaError();
337 double pt1ErrValGlb = glb1->ptError();
338 double pt2ErrValGlb = glb2->ptError();
348 sqrt(d01ErrValGlb * d01ErrValGlb + d02ErrValGlb * d02ErrValGlb));
350 sqrt(dz1ErrValGlb * dz1ErrValGlb + dz2ErrValGlb * dz2ErrValGlb));
352 dphiValGlb /
sqrt(phi1ErrValGlb * phi1ErrValGlb + phi2ErrValGlb * phi2ErrValGlb));
354 dthetaValGlb /
sqrt(theta1ErrValGlb * theta1ErrValGlb + theta2ErrValGlb * theta2ErrValGlb));
356 sqrt(pt1ErrValGlb * pt1ErrValGlb + pt2ErrValGlb * pt2ErrValGlb));
MonitorElement * dthetaAbsoluteResiduals_global_
static constexpr double sqrt2
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
const CSCGeometry * cscGeometry
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
static constexpr double cmToUm
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
MonitorElement * dthetaAbsoluteResiduals_tracker_
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_
const RPCGeometry * rpcGeometry
double pt() const
track transverse momentum
auto recHits() const
Access to reconstructed hits on the track.
MonitorElement * dthetaNormalizedResiduals_tracker_
const edm::EDGetTokenT< std::vector< reco::Muon > > splitMuonsToken_
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_
double dzError() const
error on dz
const MagneticField * theMagField
MonitorElement * dphiNormalizedResiduals_tracker_
const TrackerGeometry * theGeometry
MonitorElement * dcurvAbsoluteResiduals_global_
MonitorElement * dphiAbsoluteResiduals_tracker_
Abs< T >::type abs(const T &t)
double phi() const
azimuthal angle of momentum vector
MonitorElement * ddzNormalizedResiduals_tracker_
MonitorElement * dptAbsoluteResiduals_global_
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
MonitorElement * dptAbsoluteResiduals_tracker_
const int pixelHitsPerLeg_
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)
const int totalHitsPerLeg_
MonitorElement * ddzAbsoluteResiduals_tracker_
static constexpr double radToUrad
double theta() const
polar angle
const edm::EDGetTokenT< std::vector< reco::Track > > splitTracksToken_
MonitorElement * ddxyAbsoluteResiduals_global_
MonitorElement * dcurvNormalizedResiduals_tracker_
MonitorElement * dphiAbsoluteResiduals_global_
MonitorElement * dptNormalizedResiduals_tracker_
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_