#include <MuonDT13ChamberResidual.h>
Public Member Functions | |
virtual void | addResidual (const TrajectoryStateOnSurface *tsos, const TransientTrackingRecHit *hit) |
MuonDT13ChamberResidual (edm::ESHandle< GlobalTrackingGeometry > globalGeometry, AlignableNavigator *navigator, DetId chamberId, AlignableDetOrUnitPtr chamberAlignable) | |
virtual void | setSegmentResidual (const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *) |
Implementation of muon chamber residuals for axial DT layers
Definition at line 13 of file MuonDT13ChamberResidual.h.
MuonDT13ChamberResidual::MuonDT13ChamberResidual | ( | edm::ESHandle< GlobalTrackingGeometry > | globalGeometry, |
AlignableNavigator * | navigator, | ||
DetId | chamberId, | ||
AlignableDetOrUnitPtr | chamberAlignable | ||
) |
Definition at line 8 of file MuonDT13ChamberResidual.cc.
References funct::cos(), MuonChamberResidual::kDT13, MuonChamberResidual::m_chamberId, MuonChamberResidual::m_globalGeometry, M_PI, MuonChamberResidual::m_sign, MuonChamberResidual::m_type, and funct::sin().
: MuonHitsChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable) { m_type = MuonChamberResidual::kDT13; double rphiAngle = atan2(m_globalGeometry->idToDet(m_chamberId)->position().y(), m_globalGeometry->idToDet(m_chamberId)->position().x()) + M_PI/2.; align::GlobalVector rphiDirection(cos(rphiAngle), sin(rphiAngle), 0.); m_sign = m_globalGeometry->idToDet(m_chamberId)->toLocal(rphiDirection).x() > 0. ? 1. : -1.; }
void MuonDT13ChamberResidual::addResidual | ( | const TrajectoryStateOnSurface * | tsos, |
const TransientTrackingRecHit * | hit | ||
) | [virtual] |
Implements MuonChamberResidual.
Definition at line 19 of file MuonDT13ChamberResidual.cc.
References TrackingRecHit::geographicalId(), TrackingRecHit::localPosition(), TrajectoryStateOnSurface::localPosition(), TrackingRecHit::localPositionError(), MuonChamberResidual::m_chamberAlignable, MuonChamberResidual::m_globalGeometry, MuonHitsChamberResidual::m_hitx_1, MuonHitsChamberResidual::m_hitx_x, MuonHitsChamberResidual::m_hitx_xx, MuonHitsChamberResidual::m_hitx_xy, MuonHitsChamberResidual::m_hitx_y, MuonHitsChamberResidual::m_hity_1, MuonHitsChamberResidual::m_hity_x, MuonHitsChamberResidual::m_hity_xx, MuonHitsChamberResidual::m_hity_xy, MuonHitsChamberResidual::m_hity_y, MuonChamberResidual::m_individual_weight, MuonChamberResidual::m_individual_x, MuonChamberResidual::m_individual_y, MuonChamberResidual::m_localIDs, MuonChamberResidual::m_localResids, MuonChamberResidual::m_numHits, MuonHitsChamberResidual::m_residual_1, MuonHitsChamberResidual::m_residual_x, MuonHitsChamberResidual::m_residual_xx, MuonHitsChamberResidual::m_residual_xy, MuonHitsChamberResidual::m_residual_y, MuonHitsChamberResidual::m_trackx_1, MuonHitsChamberResidual::m_trackx_x, MuonHitsChamberResidual::m_trackx_xx, MuonHitsChamberResidual::m_trackx_xy, MuonHitsChamberResidual::m_trackx_y, MuonHitsChamberResidual::m_tracky_1, MuonHitsChamberResidual::m_tracky_x, MuonHitsChamberResidual::m_tracky_xx, MuonHitsChamberResidual::m_tracky_xy, MuonHitsChamberResidual::m_tracky_y, MuonChamberResidual::residual(), MuonHitsChamberResidual::segment_fit(), histoStyle::weight, PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
{ DetId id = hit->geographicalId(); align::LocalPoint hitChamberPos = m_chamberAlignable->surface().toLocal(m_globalGeometry->idToDet(id)->toGlobal(hit->localPosition())); align::LocalPoint tsosChamberPos = m_chamberAlignable->surface().toLocal(m_globalGeometry->idToDet(id)->toGlobal(tsos->localPosition())); double residual = tsosChamberPos.x() - hitChamberPos.x(); // residual is hit minus hit double weight = 1. / hit->localPositionError().xx(); // weight linear fit by hit-only local error double layerPosition = tsosChamberPos.z(); // the layer's position in the chamber's coordinate system double layerHitPos = hitChamberPos.z(); m_numHits++; // "x" is the layerPosition, "y" is the residual (this is a linear fit to residual versus layerPosition) m_residual_1 += weight; m_residual_x += weight * layerPosition; m_residual_y += weight * residual; m_residual_xx += weight * layerPosition * layerPosition; m_residual_xy += weight * layerPosition * residual; // "x" is the layerPosition, "y" is chamberx (this is a linear fit to chamberx versus layerPosition) m_trackx_1 += weight; m_trackx_x += weight * layerPosition; m_trackx_y += weight * tsosChamberPos.x(); m_trackx_xx += weight * layerPosition * layerPosition; m_trackx_xy += weight * layerPosition * tsosChamberPos.x(); // "x" is the layerPosition, "y" is chambery (this is a linear fit to chambery versus layerPosition) m_tracky_1 += weight; m_tracky_x += weight * layerPosition; m_tracky_y += weight * tsosChamberPos.y(); m_tracky_xx += weight * layerPosition * layerPosition; m_tracky_xy += weight * layerPosition * tsosChamberPos.y(); m_hitx_1 += weight; m_hitx_x += weight * layerHitPos; m_hitx_y += weight * hitChamberPos.x(); m_hitx_xx += weight * layerHitPos * layerHitPos; m_hitx_xy += weight * layerHitPos * hitChamberPos.x(); m_hity_1 += weight; m_hity_x += weight * layerHitPos; m_hity_y += weight * hitChamberPos.y(); m_hity_xx += weight * layerHitPos * layerPosition; m_hity_xy += weight * layerHitPos * hitChamberPos.y(); m_localIDs.push_back(id); m_localResids.push_back(tsos->localPosition().x() - hit->localPosition().x()); m_individual_x.push_back(layerPosition); m_individual_y.push_back(residual); m_individual_weight.push_back(weight); if (m_numHits>1) segment_fit(); }
virtual void MuonDT13ChamberResidual::setSegmentResidual | ( | const reco::MuonChamberMatch * | , |
const reco::MuonSegmentMatch * | |||
) | [inline, virtual] |