00001 #ifndef Alignment_MuonAlignmentAlgorithms_MuonCSCChamberResidual_H 00002 #define Alignment_MuonAlignmentAlgorithms_MuonCSCChamberResidual_H 00003 00010 #include "Alignment/MuonAlignmentAlgorithms/interface/MuonChamberResidual.h" 00011 00012 class MuonCSCChamberResidual: public MuonChamberResidual { 00013 public: 00014 MuonCSCChamberResidual(edm::ESHandle<GlobalTrackingGeometry> globalGeometry, AlignableNavigator *navigator, DetId chamberId, AlignableDetOrUnitPtr chamberAlignable) 00015 : MuonChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable) 00016 {}; 00017 00018 int type() const { return MuonChamberResidual::kCSC; }; 00019 00020 // for CSC, the residual is chamber local x, projected by the strip measurement direction 00021 // for CSC, the resslope is dresx/dz, or tan(phi_y) 00022 void addResidual(const TrajectoryStateOnSurface *tsos, const TransientTrackingRecHit *hit); 00023 00024 double signConvention(const unsigned int rawId=0) const { 00025 DetId id = m_chamberId; 00026 if (rawId != 0) id = DetId(rawId); 00027 GlobalVector zDirection(0., 0., 1.); 00028 return (m_globalGeometry->idToDet(id)->toLocal(zDirection).z() > 0. ? 1. : -1.); 00029 }; 00030 }; 00031 00032 #endif // Alignment_MuonAlignmentAlgorithms_MuonCSCChamberResidual_H