116 ddxyAbsoluteResiduals_tracker_->
setAxisTitle(
"(#delta d_{xy})/#sqrt{2} [#mum]" );
117 ddxyAbsoluteResiduals_tracker_->setAxisTitle(
"(#delta d_{z})/#sqrt{2} [#mum]" );
118 ddxyAbsoluteResiduals_tracker_->setAxisTitle(
"(#delta #phi)/#sqrt{2} [mrad]" );
119 ddxyAbsoluteResiduals_tracker_->setAxisTitle(
"(#delta #theta)/#sqrt{2} [mrad]" );
120 ddxyAbsoluteResiduals_tracker_->setAxisTitle(
"(#delta pT)/#sqrt{2} [GeV]" );
121 ddxyAbsoluteResiduals_tracker_->setAxisTitle(
"(#delta (1/pT))/#sqrt{2} [GeV^{-1}]" );
177 if (!splitTracks.
isValid())
return;
184 if (splitTracks->size() == 2){
186 edm::LogInfo(
"TrackSplittingMonitor") <<
"Split Track size: " << splitTracks->size();
198 double nRechitinBPIX1 =0;
200 if((*iHit)->isValid()) {
202 int type =(*iHit)->geographicalId().subdetId();
208 double nRechitinBPIX2 =0;
210 if((*iHit)->isValid()) {
212 int type =(*iHit)->geographicalId().subdetId();
218 double d01 = track1.
d0();
219 double dz1 = track1.
dz();
220 double d02 = track2.
d0();
221 double dz2 = track2.
dz();
224 double pt1 = track1.
pt();
225 double pt2 = track2.
pt();
237 if ( (pt1+pt2)/2 <
ptCut_){
242 edm::LogInfo(
"TrackSplittingMonitor") <<
" Setected after all cuts ?";
244 double ddxyVal = d01 - d02;
245 double ddzVal = dz1 - dz2;
246 double dphiVal = track1.
phi() - track2.
phi();
247 double dthetaVal = track1.
theta() - track2.
theta();
248 double dptVal = pt1 - pt2;
249 double dcurvVal = (1/pt1) - (1/pt2);
251 double d01ErrVal = track1.
d0Error();
252 double d02ErrVal = track2.
d0Error();
253 double dz1ErrVal = track1.
dzError();
254 double dz2ErrVal = track2.
dzError();
255 double phi1ErrVal = track1.
phiError();
256 double phi2ErrVal = track2.
phiError();
259 double pt1ErrVal = track1.
ptError();
260 double pt2ErrVal = track2.
ptError();
280 bool topGlobalMuonFlag =
false;
281 bool bottomGlobalMuonFlag =
false;
282 int topGlobalMuon = -1;
283 int bottomGlobalMuon = -1;
284 double topGlobalMuonNorchi2 = 1e10;
285 double bottomGlobalMuonNorchi2 = 1e10;
288 for (std::vector<reco::Muon>::const_iterator gmI = splitMuons->begin(); gmI != splitMuons->end(); gmI++){
289 if ( gmI->isTrackerMuon() && gmI->isStandAloneMuon() && gmI->isGlobalMuon() ){
294 if (gmI->innerTrack() == trackerTrackRef1){
295 if (gmI->globalTrack()->normalizedChi2() < topGlobalMuonNorchi2){
296 topGlobalMuonFlag =
true;
297 topGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
298 topGlobalMuon = gmCtr;
301 if (gmI->innerTrack() == trackerTrackRef2){
302 if (gmI->globalTrack()->normalizedChi2() < bottomGlobalMuonNorchi2){
303 bottomGlobalMuonFlag =
true;
304 bottomGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
305 bottomGlobalMuon = gmCtr;
312 if (bottomGlobalMuonFlag && topGlobalMuonFlag) {
314 reco::Muon muonTop = splitMuons->at( topGlobalMuon );
315 reco::Muon muonBottom = splitMuons->at( bottomGlobalMuon );
320 double ddxyValGlb = glb1->d0() - glb2->d0();
321 double ddzValGlb = glb1->dz() - glb2->dz();
322 double dphiValGlb = glb1->phi() - glb2->phi();
323 double dthetaValGlb = glb1->theta() - glb2->theta();
324 double dptValGlb = glb1->pt() - glb2->pt();
325 double dcurvValGlb = (1/glb1->pt()) - (1/glb2->pt());
327 double d01ErrValGlb = glb1->d0Error();
328 double d02ErrValGlb = glb2->d0Error();
329 double dz1ErrValGlb = glb1->dzError();
330 double dz2ErrValGlb = glb2->dzError();
331 double phi1ErrValGlb = glb1->phiError();
332 double phi2ErrValGlb = glb2->phiError();
333 double theta1ErrValGlb = glb1->thetaError();
334 double theta2ErrValGlb = glb2->thetaError();
335 double pt1ErrValGlb = glb1->ptError();
336 double pt2ErrValGlb = glb2->ptError();
367 if(outputMEsInRootFile){
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
virtual void analyze(const edm::Event &, const edm::EventSetup &)
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_
virtual void beginJob(void)
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 &)
MonitorElement * ddzAbsoluteResiduals_tracker_
MonitorElement * ddxyAbsoluteResiduals_global_
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE", const bool resetMEsAfterWriting=false)
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
void showDirStructure(void) const
MonitorElement * ddxyAbsoluteResiduals_tracker_
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
virtual void endJob(void)
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.