#include <MuonTrackDT2ChamberResidual.h>
Public Member Functions | |
virtual void | addResidual (const TrajectoryStateOnSurface *tsos, const TransientTrackingRecHit *hit) |
MuonTrackDT2ChamberResidual (edm::ESHandle< GlobalTrackingGeometry > globalGeometry, AlignableNavigator *navigator, DetId chamberId, AlignableDetOrUnitPtr chamberAlignable) | |
virtual void | setSegmentResidual (const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *) |
Implementation of tracker muon chamber residuals for transverse DT layers
Definition at line 13 of file MuonTrackDT2ChamberResidual.h.
MuonTrackDT2ChamberResidual::MuonTrackDT2ChamberResidual | ( | edm::ESHandle< GlobalTrackingGeometry > | globalGeometry, |
AlignableNavigator * | navigator, | ||
DetId | chamberId, | ||
AlignableDetOrUnitPtr | chamberAlignable | ||
) |
Definition at line 7 of file MuonTrackDT2ChamberResidual.cc.
References MuonChamberResidual::kDT2, MuonChamberResidual::m_chamberId, MuonChamberResidual::m_globalGeometry, MuonChamberResidual::m_sign, and MuonChamberResidual::m_type.
: MuonChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable) { m_type = MuonChamberResidual::kDT2; align::GlobalVector zDirection(0., 0., 1.); m_sign = m_globalGeometry->idToDet(m_chamberId)->toLocal(zDirection).y() > 0. ? 1. : -1.; }
virtual void MuonTrackDT2ChamberResidual::addResidual | ( | const TrajectoryStateOnSurface * | tsos, |
const TransientTrackingRecHit * | hit | ||
) | [inline, virtual] |
void MuonTrackDT2ChamberResidual::setSegmentResidual | ( | const reco::MuonChamberMatch * | trk, |
const reco::MuonSegmentMatch * | seg | ||
) | [virtual] |
Implements MuonChamberResidual.
Definition at line 17 of file MuonTrackDT2ChamberResidual.cc.
References reco::MuonSegmentMatch::dtSegmentRef, reco::MuonSegmentMatch::dXdZ, reco::MuonChamberMatch::dXdZ, reco::MuonSegmentMatch::dYdZ, reco::MuonChamberMatch::dYdZ, reco::MuonChamberMatch::dYdZErr, reco::MuonSegmentMatch::dYdZErr, edm::Ref< C, T, F >::get(), DTRecSegment4D::hasZed(), MuonChamberResidual::m_chi2, MuonChamberResidual::m_ndof, MuonChamberResidual::m_numHits, MuonChamberResidual::m_residual, MuonChamberResidual::m_residual_error, MuonChamberResidual::m_resslope, MuonChamberResidual::m_resslope_error, MuonChamberResidual::m_segdxdz, MuonChamberResidual::m_segdydz, MuonChamberResidual::m_segx, MuonChamberResidual::m_segy, MuonChamberResidual::m_trackdxdz, MuonChamberResidual::m_trackdydz, MuonChamberResidual::m_trackx, MuonChamberResidual::m_tracky, funct::pow(), mathSSE::sqrt(), reco::MuonSegmentMatch::x, reco::MuonChamberMatch::x, reco::MuonSegmentMatch::y, reco::MuonChamberMatch::y, reco::MuonSegmentMatch::yErr, and reco::MuonChamberMatch::yErr.
{ DTRecSegment4DRef segmentDT = seg->dtSegmentRef; if (segmentDT.get() != 0) { const DTRecSegment4D* segment = segmentDT.get(); assert(segment->hasZed()); const DTSLRecSegment2D* zSeg = (*segment).zSegment(); m_numHits = zSeg->recHits().size(); m_ndof = zSeg->degreesOfFreedom(); m_chi2 = zSeg->chi2(); //std::cout<<"z seg position = "<<zSeg->localPosition()<<" numhits="<<m_numHits<<std::endl; } m_residual = trk->y - seg->y; m_residual_error = sqrt( pow(trk->yErr, 2) + pow(seg->yErr, 2) ); m_resslope = trk->dYdZ - seg->dYdZ; m_resslope_error = sqrt( pow(trk->dYdZErr, 2) + pow(seg->dYdZErr, 2) ); m_trackx = trk->x; m_tracky = trk->y; m_trackdxdz = trk->dXdZ; m_trackdydz = trk->dYdZ; m_segx = seg->x; m_segy = seg->y; m_segdxdz = seg->dXdZ; m_segdydz = seg->dYdZ; //std::cout<<"d2 res "<<m_residual<<"+-"<<m_residual_error<<" "<<m_resslope<<"+-"<<m_resslope_error<<std::endl; //std::cout<<"d2 trk "<<m_trackx<<" "<<m_tracky<<" "<<m_trackdxdz<<" "<<m_trackdydz<<std::endl; //std::cout<<"d2 seg "<<m_segx<<" "<<m_segy<<" "<<m_segdxdz<<" "<<m_segdydz<<std::endl; }