124 ddxyAbsoluteResiduals_tracker_->
setAxisTitle(
"(#delta d_{xy})/#sqrt{2} [#mum]" );
125 ddxyAbsoluteResiduals_tracker_->setAxisTitle(
"(#delta d_{z})/#sqrt{2} [#mum]" );
126 ddxyAbsoluteResiduals_tracker_->setAxisTitle(
"(#delta #phi)/#sqrt{2} [mrad]" );
127 ddxyAbsoluteResiduals_tracker_->setAxisTitle(
"(#delta #theta)/#sqrt{2} [mrad]" );
128 ddxyAbsoluteResiduals_tracker_->setAxisTitle(
"(#delta pT)/#sqrt{2} [GeV]" );
129 ddxyAbsoluteResiduals_tracker_->setAxisTitle(
"(#delta (1/pT))/#sqrt{2} [GeV^{-1}]" );
171 if (!splitTracks.
isValid())
return;
178 if (splitTracks->size() == 2){
180 edm::LogInfo(
"TrackSplittingMonitor") <<
"Split Track size: " << splitTracks->size();
192 double nRechitinBPIX1 =0;
194 if((*iHit)->isValid()) {
196 int type =(*iHit)->geographicalId().subdetId();
202 double nRechitinBPIX2 =0;
204 if((*iHit)->isValid()) {
206 int type =(*iHit)->geographicalId().subdetId();
212 double d01 = track1.
d0();
213 double dz1 = track1.
dz();
214 double d02 = track2.
d0();
215 double dz2 = track2.
dz();
218 double pt1 = track1.
pt();
219 double pt2 = track2.
pt();
231 if ( (pt1+pt2)/2 <
ptCut_){
236 edm::LogInfo(
"TrackSplittingMonitor") <<
" Setected after all cuts ?";
238 double ddxyVal = d01 - d02;
239 double ddzVal = dz1 - dz2;
240 double dphiVal = track1.
phi() - track2.
phi();
241 double dthetaVal = track1.
theta() - track2.
theta();
242 double dptVal = pt1 - pt2;
243 double dcurvVal = (1/pt1) - (1/pt2);
245 double d01ErrVal = track1.
d0Error();
246 double d02ErrVal = track2.
d0Error();
247 double dz1ErrVal = track1.
dzError();
248 double dz2ErrVal = track2.
dzError();
249 double phi1ErrVal = track1.
phiError();
250 double phi2ErrVal = track2.
phiError();
253 double pt1ErrVal = track1.
ptError();
254 double pt2ErrVal = track2.
ptError();
274 bool topGlobalMuonFlag =
false;
275 bool bottomGlobalMuonFlag =
false;
276 int topGlobalMuon = -1;
277 int bottomGlobalMuon = -1;
278 double topGlobalMuonNorchi2 = 1e10;
279 double bottomGlobalMuonNorchi2 = 1e10;
282 for (std::vector<reco::Muon>::const_iterator gmI = splitMuons->begin(); gmI != splitMuons->end(); gmI++){
283 if ( gmI->isTrackerMuon() && gmI->isStandAloneMuon() && gmI->isGlobalMuon() ){
288 if (gmI->innerTrack() == trackerTrackRef1){
289 if (gmI->globalTrack()->normalizedChi2() < topGlobalMuonNorchi2){
290 topGlobalMuonFlag =
true;
291 topGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
292 topGlobalMuon = gmCtr;
295 if (gmI->innerTrack() == trackerTrackRef2){
296 if (gmI->globalTrack()->normalizedChi2() < bottomGlobalMuonNorchi2){
297 bottomGlobalMuonFlag =
true;
298 bottomGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
299 bottomGlobalMuon = gmCtr;
306 if (bottomGlobalMuonFlag && topGlobalMuonFlag) {
308 reco::Muon muonTop = splitMuons->at( topGlobalMuon );
309 reco::Muon muonBottom = splitMuons->at( bottomGlobalMuon );
314 double ddxyValGlb = glb1->d0() - glb2->d0();
315 double ddzValGlb = glb1->dz() - glb2->dz();
316 double dphiValGlb = glb1->phi() - glb2->phi();
317 double dthetaValGlb = glb1->theta() - glb2->theta();
318 double dptValGlb = glb1->pt() - glb2->pt();
319 double dcurvValGlb = (1/glb1->pt()) - (1/glb2->pt());
321 double d01ErrValGlb = glb1->d0Error();
322 double d02ErrValGlb = glb2->d0Error();
323 double dz1ErrValGlb = glb1->dzError();
324 double dz2ErrValGlb = glb2->dzError();
325 double phi1ErrValGlb = glb1->phiError();
326 double phi2ErrValGlb = glb2->phiError();
327 double theta1ErrValGlb = glb1->thetaError();
328 double theta2ErrValGlb = glb2->thetaError();
329 double pt1ErrValGlb = glb1->ptError();
330 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
void setCurrentFolder(const std::string &fullpath)
TrackSplittingMonitor(const edm::ParameterSet &)
virtual 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)
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection
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.