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;
179 if (splitTracks->size() == 2){
181 edm::LogInfo(
"TrackSplittingMonitor") <<
"Split Track size: " << splitTracks->size();
193 double nRechitinBPIX1 =0;
195 if((*iHit)->isValid()) {
197 int type =(*iHit)->geographicalId().subdetId();
203 double nRechitinBPIX2 =0;
205 if((*iHit)->isValid()) {
207 int type =(*iHit)->geographicalId().subdetId();
213 double d01 = track1.
d0();
214 double dz1 = track1.
dz();
215 double d02 = track2.
d0();
216 double dz2 = track2.
dz();
219 double pt1 = track1.
pt();
220 double pt2 = track2.
pt();
232 if ( (pt1+pt2)/2 <
ptCut_){
237 edm::LogInfo(
"TrackSplittingMonitor") <<
" Setected after all cuts ?";
239 double ddxyVal = d01 - d02;
240 double ddzVal = dz1 - dz2;
241 double dphiVal = track1.
phi() - track2.
phi();
242 double dthetaVal = track1.
theta() - track2.
theta();
243 double dptVal = pt1 - pt2;
244 double dcurvVal = (1/pt1) - (1/pt2);
246 double d01ErrVal = track1.
d0Error();
247 double d02ErrVal = track2.
d0Error();
248 double dz1ErrVal = track1.
dzError();
249 double dz2ErrVal = track2.
dzError();
250 double phi1ErrVal = track1.
phiError();
251 double phi2ErrVal = track2.
phiError();
254 double pt1ErrVal = track1.
ptError();
255 double pt2ErrVal = track2.
ptError();
275 bool topGlobalMuonFlag =
false;
276 bool bottomGlobalMuonFlag =
false;
277 int topGlobalMuon = -1;
278 int bottomGlobalMuon = -1;
279 double topGlobalMuonNorchi2 = 1e10;
280 double bottomGlobalMuonNorchi2 = 1e10;
283 for (std::vector<reco::Muon>::const_iterator gmI = splitMuons->begin(); gmI != splitMuons->end(); gmI++){
284 if ( gmI->isTrackerMuon() && gmI->isStandAloneMuon() && gmI->isGlobalMuon() ){
289 if (gmI->innerTrack() == trackerTrackRef1){
290 if (gmI->globalTrack()->normalizedChi2() < topGlobalMuonNorchi2){
291 topGlobalMuonFlag =
true;
292 topGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
293 topGlobalMuon = gmCtr;
296 if (gmI->innerTrack() == trackerTrackRef2){
297 if (gmI->globalTrack()->normalizedChi2() < bottomGlobalMuonNorchi2){
298 bottomGlobalMuonFlag =
true;
299 bottomGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
300 bottomGlobalMuon = gmCtr;
307 if (bottomGlobalMuonFlag && topGlobalMuonFlag) {
309 reco::Muon muonTop = splitMuons->at( topGlobalMuon );
310 reco::Muon muonBottom = splitMuons->at( bottomGlobalMuon );
315 double ddxyValGlb = glb1->d0() - glb2->d0();
316 double ddzValGlb = glb1->dz() - glb2->dz();
317 double dphiValGlb = glb1->phi() - glb2->phi();
318 double dthetaValGlb = glb1->theta() - glb2->theta();
319 double dptValGlb = glb1->pt() - glb2->pt();
320 double dcurvValGlb = (1/glb1->pt()) - (1/glb2->pt());
322 double d01ErrValGlb = glb1->d0Error();
323 double d02ErrValGlb = glb2->d0Error();
324 double dz1ErrValGlb = glb1->dzError();
325 double dz2ErrValGlb = glb2->dzError();
326 double phi1ErrValGlb = glb1->phiError();
327 double phi2ErrValGlb = glb2->phiError();
328 double theta1ErrValGlb = glb1->thetaError();
329 double theta2ErrValGlb = glb2->thetaError();
330 double pt1ErrValGlb = glb1->ptError();
331 double pt2ErrValGlb = glb2->ptError();
362 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)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
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_
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
edm::ESHandle< MagneticField > theMagField
MonitorElement * ddzNormalizedResiduals_tracker_
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
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(const edm::ParameterSet &)
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
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)
void setCurrentFolder(const std::string &fullpath)
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.