25 if (m_debug)
std::cout <<
"MuonCSCChamberResidual::addResidual 1" << std::endl;
27 if (m_debug)
std::cout <<
"MuonCSCChamberResidual::addResidual 2" << std::endl;
29 if (m_debug)
std::cout <<
"MuonCSCChamberResidual::addResidual 3" << std::endl;
46 double sinAngle =
sin(angle);
47 double cosAngle =
cos(angle);
49 double residual = cosAngle * (tsosChamberPos.
x() - hitChamberPos.
x()) + sinAngle * (tsosChamberPos.
y() - hitChamberPos.
y());
51 if (m_debug)
std::cout <<
" MuonCSCChamberResidual residual: " << residual << std::endl;
56 double weight = 1. / (xx*cosAngle*cosAngle + 2.*xy*sinAngle*cosAngle + yy*sinAngle*sinAngle);
58 double layerPosition = tsosChamberPos.
z();
59 double layerHitPos = hitChamberPos.
z();
74 m_trackx_xx += weight * layerPosition * layerPosition;
75 m_trackx_xy += weight * layerPosition * tsosChamberPos.
x();
81 m_tracky_xx += weight * layerPosition * layerPosition;
82 m_tracky_xy += weight * layerPosition * tsosChamberPos.
y();
87 m_hitx_xx += weight * layerHitPos * layerHitPos;
88 m_hitx_xy += weight * layerHitPos * hitChamberPos.
x();
93 m_hity_xx += weight * layerHitPos * layerHitPos;
94 m_hity_xy += weight * layerHitPos * hitChamberPos.
y();
std::vector< double > m_individual_y
LocalPoint localPosition() const
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Sin< T >::type sin(const T &t)
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
virtual const GeomDet * idToDet(DetId) const
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)
const TrackingGeometry * slaveGeometry(DetId id) const
Return the pointer to the actual geometry for a given DetId.
AlignableDetOrUnitPtr m_chamberAlignable
virtual LocalPoint localPosition() const =0
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)
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to given DetId.
edm::ESHandle< GlobalTrackingGeometry > m_globalGeometry
virtual void addResidual(edm::ESHandle< Propagator > prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit, double, double)
DetId geographicalId() const
virtual LocalError localPositionError() 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)