30 double sinAngle =
sin(angle);
31 double cosAngle =
cos(angle);
33 double residual = cosAngle * (tsosChamberPos.
x() - hitChamberPos.
x()) + sinAngle * (tsosChamberPos.
y() - hitChamberPos.
y());
38 double weight = 1. / (xx*cosAngle*cosAngle + 2.*xy*sinAngle*cosAngle + yy*sinAngle*sinAngle);
40 double layerPosition = tsosChamberPos.
z();
41 double layerHitPos = hitChamberPos.
z();
56 m_trackx_xx += weight * layerPosition * layerPosition;
57 m_trackx_xy += weight * layerPosition * tsosChamberPos.
x();
63 m_tracky_xx += weight * layerPosition * layerPosition;
64 m_tracky_xy += weight * layerPosition * tsosChamberPos.
y();
69 m_hitx_xx += weight * layerHitPos * layerHitPos;
70 m_hitx_xy += weight * layerHitPos * hitChamberPos.
x();
75 m_hity_xx += weight * layerHitPos * layerHitPos;
76 m_hity_xy += weight * layerHitPos * hitChamberPos.
y();
std::vector< double > m_individual_y
LocalPoint localPosition() const
Sin< T >::type sin(const T &t)
std::vector< double > m_individual_x
std::vector< DetId > m_localIDs
align::RotationType toLocal(const align::RotationType &) const
Return in local frame a rotation given in global frame.
std::vector< double > m_localResids
Cos< T >::type cos(const T &t)
AlignableDetOrUnitPtr m_chamberAlignable
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
int nearestStrip(const LocalPoint &lp) const
MuonCSCChamberResidual(edm::ESHandle< GlobalTrackingGeometry > globalGeometry, AlignableNavigator *navigator, DetId chamberId, AlignableDetOrUnitPtr chamberAlignable)
virtual LocalError localPositionError() const =0
virtual void addResidual(const TrajectoryStateOnSurface *tsos, const TransientTrackingRecHit *hit)
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to given DetId.
edm::ESHandle< GlobalTrackingGeometry > m_globalGeometry
DetId geographicalId() const
virtual LocalPoint localPosition() const =0
std::vector< double > m_individual_weight
float stripAngle(int strip) const
const CSCLayerGeometry * geometry() const
T angle(T x1, T y1, T z1, T x2, T y2, T z2)