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}]" );
170 if (!splitTracks.
isValid())
return;
177 if (splitTracks->size() == 2){
179 edm::LogInfo(
"TrackSplittingMonitor") <<
"Split Track size: " << splitTracks->size();
191 double nRechitinBPIX1 =0;
193 if((*iHit)->isValid()) {
195 int type =(*iHit)->geographicalId().subdetId();
201 double nRechitinBPIX2 =0;
203 if((*iHit)->isValid()) {
205 int type =(*iHit)->geographicalId().subdetId();
211 double d01 = track1.
d0();
212 double dz1 = track1.
dz();
213 double d02 = track2.
d0();
214 double dz2 = track2.
dz();
217 double pt1 = track1.
pt();
218 double pt2 = track2.
pt();
230 if ( (pt1+pt2)/2 <
ptCut_){
235 edm::LogInfo(
"TrackSplittingMonitor") <<
" Setected after all cuts ?";
237 double ddxyVal = d01 - d02;
238 double ddzVal = dz1 - dz2;
239 double dphiVal = track1.
phi() - track2.
phi();
240 double dthetaVal = track1.
theta() - track2.
theta();
241 double dptVal = pt1 - pt2;
242 double dcurvVal = (1/pt1) - (1/pt2);
244 double d01ErrVal = track1.
d0Error();
245 double d02ErrVal = track2.
d0Error();
246 double dz1ErrVal = track1.
dzError();
247 double dz2ErrVal = track2.
dzError();
248 double phi1ErrVal = track1.
phiError();
249 double phi2ErrVal = track2.
phiError();
252 double pt1ErrVal = track1.
ptError();
253 double pt2ErrVal = track2.
ptError();
273 bool topGlobalMuonFlag =
false;
274 bool bottomGlobalMuonFlag =
false;
275 int topGlobalMuon = -1;
276 int bottomGlobalMuon = -1;
277 double topGlobalMuonNorchi2 = 1e10;
278 double bottomGlobalMuonNorchi2 = 1e10;
281 for (std::vector<reco::Muon>::const_iterator gmI = splitMuons->begin(); gmI != splitMuons->end(); gmI++){
282 if ( gmI->isTrackerMuon() && gmI->isStandAloneMuon() && gmI->isGlobalMuon() ){
287 if (gmI->innerTrack() == trackerTrackRef1){
288 if (gmI->globalTrack()->normalizedChi2() < topGlobalMuonNorchi2){
289 topGlobalMuonFlag =
true;
290 topGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
291 topGlobalMuon = gmCtr;
294 if (gmI->innerTrack() == trackerTrackRef2){
295 if (gmI->globalTrack()->normalizedChi2() < bottomGlobalMuonNorchi2){
296 bottomGlobalMuonFlag =
true;
297 bottomGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
298 bottomGlobalMuon = gmCtr;
305 if (bottomGlobalMuonFlag && topGlobalMuonFlag) {
307 reco::Muon muonTop = splitMuons->at( topGlobalMuon );
308 reco::Muon muonBottom = splitMuons->at( bottomGlobalMuon );
313 double ddxyValGlb = glb1->d0() - glb2->d0();
314 double ddzValGlb = glb1->dz() - glb2->dz();
315 double dphiValGlb = glb1->phi() - glb2->phi();
316 double dthetaValGlb = glb1->theta() - glb2->theta();
317 double dptValGlb = glb1->pt() - glb2->pt();
318 double dcurvValGlb = (1/glb1->pt()) - (1/glb2->pt());
320 double d01ErrValGlb = glb1->d0Error();
321 double d02ErrValGlb = glb2->d0Error();
322 double dz1ErrValGlb = glb1->dzError();
323 double dz2ErrValGlb = glb2->dzError();
324 double phi1ErrValGlb = glb1->phiError();
325 double phi2ErrValGlb = glb2->phiError();
326 double theta1ErrValGlb = glb1->thetaError();
327 double theta2ErrValGlb = glb2->thetaError();
328 double pt1ErrValGlb = glb1->ptError();
329 double pt2ErrValGlb = glb2->ptError();
360 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_
virtual void analyze(const edm::Event &, const edm::EventSetup &)
double theta() const
polar angle
#define DEFINE_FWK_MODULE(type)
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
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_
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_
MonitorElement * dptAbsoluteResiduals_global_
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
MonitorElement * dptAbsoluteResiduals_tracker_
edm::InputTag splitTracks_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
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_
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.