CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MuonDT2ChamberResidual.h
Go to the documentation of this file.
1 #ifndef Alignment_MuonAlignmentAlgorithms_MuonDT2ChamberResidual_H
2 #define Alignment_MuonAlignmentAlgorithms_MuonDT2ChamberResidual_H
3 
14 
16 public:
18  : MuonChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable)
19  {};
20 
21  int type() const { return MuonChamberResidual::kDT2; };
22 
23  // for DT2, the residual is chamber local y
24  // for DT2, the resslope is dresy/dz, or tan(phi_x)
26 
27  // for DT2, the global direction is CMS z (e.g. local y without the sign convention issues)
28  double signConvention(const unsigned int rawId=0) const {
29  DetId id = m_chamberId;
30  if (rawId != 0) id = DetId(rawId);
31  GlobalVector zDirection(0., 0., 1.);
32  return (m_globalGeometry->idToDet(id)->toLocal(zDirection).y() > 0. ? 1. : -1.);
33  };
34 };
35 
36 #endif // Alignment_MuonAlignmentAlgorithms_MuonDT2ChamberResidual_H
double signConvention(const unsigned int rawId=0) const
AlignableDetOrUnitPtr chamberAlignable() const
void addResidual(const TrajectoryStateOnSurface *tsos, const TransientTrackingRecHit *hit)
MuonDT2ChamberResidual(edm::ESHandle< GlobalTrackingGeometry > globalGeometry, AlignableNavigator *navigator, DetId chamberId, AlignableDetOrUnitPtr chamberAlignable)
Definition: DetId.h:20
edm::ESHandle< GlobalTrackingGeometry > m_globalGeometry
DetId chamberId() const