126 ddxyAbsoluteResiduals_tracker_->
setAxisTitle(
"(#delta d_{xy})/#sqrt{2} [#mum]" );
127 ddxyAbsoluteResiduals_tracker_->setAxisTitle(
"(#delta d_{z})/#sqrt{2} [#mum]" );
128 ddxyAbsoluteResiduals_tracker_->setAxisTitle(
"(#delta #phi)/#sqrt{2} [mrad]" );
129 ddxyAbsoluteResiduals_tracker_->setAxisTitle(
"(#delta #theta)/#sqrt{2} [mrad]" );
130 ddxyAbsoluteResiduals_tracker_->setAxisTitle(
"(#delta pT)/#sqrt{2} [GeV]" );
131 ddxyAbsoluteResiduals_tracker_->setAxisTitle(
"(#delta (1/pT))/#sqrt{2} [GeV^{-1}]" );
173 if (!splitTracks.
isValid())
return;
180 if (splitTracks->size() == 2){
182 edm::LogInfo(
"TrackSplittingMonitor") <<
"Split Track size: " << splitTracks->size();
194 double nRechitinBPIX1 =0;
196 if((*iHit)->isValid()) {
198 int type =(*iHit)->geographicalId().subdetId();
204 double nRechitinBPIX2 =0;
206 if((*iHit)->isValid()) {
208 int type =(*iHit)->geographicalId().subdetId();
214 double d01 = track1.
d0();
215 double dz1 = track1.
dz();
216 double d02 = track2.
d0();
217 double dz2 = track2.
dz();
220 double pt1 = track1.
pt();
221 double pt2 = track2.
pt();
233 if ( (pt1+pt2)/2 <
ptCut_){
238 edm::LogInfo(
"TrackSplittingMonitor") <<
" Setected after all cuts ?";
240 double ddxyVal = d01 - d02;
241 double ddzVal = dz1 - dz2;
242 double dphiVal = track1.
phi() - track2.
phi();
243 double dthetaVal = track1.
theta() - track2.
theta();
244 double dptVal = pt1 -
pt2;
245 double dcurvVal = (1/
pt1) - (1/pt2);
247 double d01ErrVal = track1.
d0Error();
248 double d02ErrVal = track2.
d0Error();
249 double dz1ErrVal = track1.
dzError();
250 double dz2ErrVal = track2.
dzError();
251 double phi1ErrVal = track1.
phiError();
252 double phi2ErrVal = track2.
phiError();
255 double pt1ErrVal = track1.
ptError();
256 double pt2ErrVal = track2.
ptError();
276 bool topGlobalMuonFlag =
false;
277 bool bottomGlobalMuonFlag =
false;
278 int topGlobalMuon = -1;
279 int bottomGlobalMuon = -1;
280 double topGlobalMuonNorchi2 = 1e10;
281 double bottomGlobalMuonNorchi2 = 1e10;
284 for (std::vector<reco::Muon>::const_iterator gmI = splitMuons->begin(); gmI != splitMuons->end(); gmI++){
285 if ( gmI->isTrackerMuon() && gmI->isStandAloneMuon() && gmI->isGlobalMuon() ){
290 if (gmI->innerTrack() == trackerTrackRef1){
291 if (gmI->globalTrack()->normalizedChi2() < topGlobalMuonNorchi2){
292 topGlobalMuonFlag =
true;
293 topGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
294 topGlobalMuon = gmCtr;
297 if (gmI->innerTrack() == trackerTrackRef2){
298 if (gmI->globalTrack()->normalizedChi2() < bottomGlobalMuonNorchi2){
299 bottomGlobalMuonFlag =
true;
300 bottomGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
301 bottomGlobalMuon = gmCtr;
308 if (bottomGlobalMuonFlag && topGlobalMuonFlag) {
310 reco::Muon muonTop = splitMuons->at( topGlobalMuon );
311 reco::Muon muonBottom = splitMuons->at( bottomGlobalMuon );
316 double ddxyValGlb = glb1->d0() - glb2->d0();
317 double ddzValGlb = glb1->dz() - glb2->dz();
318 double dphiValGlb = glb1->phi() - glb2->phi();
319 double dthetaValGlb = glb1->theta() - glb2->theta();
320 double dptValGlb = glb1->pt() - glb2->pt();
321 double dcurvValGlb = (1/glb1->pt()) - (1/glb2->pt());
323 double d01ErrValGlb = glb1->d0Error();
324 double d02ErrValGlb = glb2->d0Error();
325 double dz1ErrValGlb = glb1->dzError();
326 double dz2ErrValGlb = glb2->dzError();
327 double phi1ErrValGlb = glb1->phiError();
328 double phi2ErrValGlb = glb2->phiError();
329 double theta1ErrValGlb = glb1->thetaError();
330 double theta2ErrValGlb = glb2->thetaError();
331 double pt1ErrValGlb = glb1->ptError();
332 double pt2ErrValGlb = glb2->ptError();
edm::ESHandle< TrackerGeometry > theGeometry
T getParameter(std::string const &) const
double d0Error() const
error on d0
MonitorElement * dthetaAbsoluteResiduals_global_
MonitorElement * dcurvNormalizedResiduals_global_
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)
MonitorElement * dthetaAbsoluteResiduals_tracker_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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_
edm::ESHandle< RPCGeometry > rpcGeometry
MonitorElement * ddzAbsoluteResiduals_global_
edm::EDGetTokenT< std::vector< reco::Muon > > splitMuonsToken_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * dphiNormalizedResiduals_global_
MonitorElement * dthetaNormalizedResiduals_tracker_
MonitorElement * ddxyNormalizedResiduals_global_
MonitorElement * dthetaNormalizedResiduals_global_
MonitorElement * dphiNormalizedResiduals_tracker_
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 * book1D(Args &&...args)
edm::ESHandle< MagneticField > theMagField
MonitorElement * ddzNormalizedResiduals_tracker_
MonitorElement * dptAbsoluteResiduals_global_
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
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
void setCurrentFolder(const std::string &fullpath)
TrackSplittingMonitor(const edm::ParameterSet &)
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * ddzAbsoluteResiduals_tracker_
MonitorElement * ddxyAbsoluteResiduals_global_
edm::ESHandle< DTGeometry > dtGeometry
MonitorElement * dcurvNormalizedResiduals_tracker_
MonitorElement * dphiAbsoluteResiduals_global_
edm::EDGetTokenT< std::vector< reco::Track > > splitTracksToken_
MonitorElement * dptNormalizedResiduals_tracker_
MonitorElement * dptNormalizedResiduals_global_
edm::ESHandle< CSCGeometry > cscGeometry
MonitorElement * ddxyAbsoluteResiduals_tracker_
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
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
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.