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
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
const CSCGeometry * cscGeometry
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
double theta() const
polar angle
MonitorElement * ddxyNormalizedResiduals_tracker_
double phi() const
azimuthal angle of momentum vector
const DTGeometry * dtGeometry
const edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
edm::EDGetTokenT< std::vector< reco::Muon > > splitMuonsToken_
bool getData(T &iHolder) const
const RPCGeometry * rpcGeometry
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > mfToken_
MonitorElement * ddxyNormalizedResiduals_global_
const MagneticField * theMagField
const TrackerGeometry * theGeometry
double pt() const
track transverse momentum
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
double phiError() const
error on phi
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
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
Log< level::Info, false > LogInfo
MonitorElement * ddxyAbsoluteResiduals_global_
edm::EDGetTokenT< std::vector< reco::Track > > splitTracksToken_
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.