25 double chamber_length) {
29 std::cout <<
"MuonCSCChamberResidual::addResidual 1" << std::endl;
32 std::cout <<
"MuonCSCChamberResidual::addResidual 2" << std::endl;
35 std::cout <<
"MuonCSCChamberResidual::addResidual 3" << std::endl;
39 std::cout <<
" MuonCSCChamberResidual hit->localPosition() x: " <<
hit->localPosition().
x()
40 <<
" tsos->localPosition() x: " << tsos->
localPosition().
x() << std::endl;
41 std::cout <<
" hit->localPosition() y: " <<
hit->localPosition().
y()
42 <<
" tsos->localPosition() y: " << tsos->
localPosition().
y() << std::endl;
43 std::cout <<
" hit->localPosition() z: " <<
hit->localPosition().
z()
44 <<
" tsos->localPosition() z: " << tsos->
localPosition().
z() << std::endl;
60 double residual = cosAngle * (tsosChamberPos.
x() - hitChamberPos.
x()) +
61 sinAngle * (tsosChamberPos.
y() - hitChamberPos.
y());
66 double xx =
hit->localPositionError().xx();
67 double xy =
hit->localPositionError().xy();
68 double yy =
hit->localPositionError().yy();
69 double weight = 1. / (
xx * cosAngle * cosAngle + 2. *
xy * sinAngle * cosAngle +
yy * sinAngle * sinAngle);
71 double layerPosition = tsosChamberPos.
z();
72 double layerHitPos = hitChamberPos.
z();
void addResidual(edm::ESHandle< Propagator > prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit, double, double) override
std::vector< double > m_individual_y
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
LocalPoint localPosition() const
const TrackingGeometry * slaveGeometry(DetId id) const
Return the pointer to the actual geometry for a given DetId.
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
int nearestStrip(const LocalPoint &lp) const
Sin< T >::type sin(const T &t)
const GeomDet * idToDet(DetId) const override
float stripAngle(int strip) const
const CSCLayerGeometry * geometry() const
std::vector< double > m_individual_x
std::vector< DetId > m_localIDs
std::vector< double > m_localResids
Cos< T >::type cos(const T &t)
AlignableDetOrUnitPtr m_chamberAlignable
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
MuonCSCChamberResidual(edm::ESHandle< GlobalTrackingGeometry > globalGeometry, AlignableNavigator *navigator, DetId chamberId, AlignableDetOrUnitPtr chamberAlignable)
align::RotationType toLocal(const align::RotationType &) const
Return in local frame a rotation given in global frame.
edm::ESHandle< GlobalTrackingGeometry > m_globalGeometry
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to given DetId.
std::vector< double > m_individual_weight
T angle(T x1, T y1, T z1, T x2, T y2, T z2)