CMS 3D CMS Logo

MuonChamberResidual.cc
Go to the documentation of this file.
1 
7 
12 
13 
16  DetId chamberId,
17  AlignableDetOrUnitPtr chamberAlignable):
18  m_globalGeometry(globalGeometry)
19  , m_navigator(navigator)
20  , m_chamberId(chamberId)
21  , m_chamberAlignable(chamberAlignable)
22  , m_numHits(0)
23  , m_type(-1)
24  , m_sign(0.)
25  , m_chi2(-999.)
26  , m_ndof(-1)
27  , m_residual(-999.)
28  , m_residual_error(-999.)
29  , m_resslope(-999.)
30  , m_resslope_error(-999.)
31  , m_trackdxdz(-999.)
32  , m_trackdydz(-999.)
33  , m_trackx(-999.)
34  , m_tracky(-999.)
35  , m_segdxdz(-999.)
36  , m_segdydz(-999.)
37  , m_segx(-999.)
38  , m_segy(-999.)
39  , m_ChambW(-999)
40  , m_Chambl(-999)
41 {}
42 
43 
45 {
47 }
48 
49 
51 {
53 }
54 
55 
57 {
58  return residual() * signConvention();
59 }
60 
61 
63 {
64  return resslope() * signConvention();
65 }
66 
67 
69 {
70  return hitresid(i) * signConvention();
71 }
72 
73 
75 {
76  assert(0 <= i && i < int(m_localIDs.size()));
77  return m_localResids[i];
78 }
79 
80 
82 { // only difference between DTs and CSCs is the DetId subclass
83  assert(0 <= i && i < int(m_localIDs.size()));
85  DTLayerId layerId(m_localIDs[i].rawId());
86  return 4*(layerId.superlayer() - 1) + layerId.layer();
87  }
88  else if (m_chamberId.subdetId() == MuonSubdetId::CSC) {
89  CSCDetId layerId(m_localIDs[i].rawId());
90  return layerId.layer();
91  }
92  else assert(false);
93 }
94 
95 
97 {
98  assert(0 <= i && i < int(m_localIDs.size()));
101  return sqrt(pow(pos.x(), 2) + pow(pos.y(), 2)); // R for DTs
102  }
103  else if (m_chamberId.subdetId() == MuonSubdetId::CSC) {
104  return m_globalGeometry->idToDet(m_localIDs[i])->position().z(); // Z for CSCs
105  }
106  else assert(false);
107 }
align::GlobalPoint global_trackpos()
MuonChamberResidual(edm::ESHandle< GlobalTrackingGeometry > globalGeometry, AlignableNavigator *navigator, DetId chamberId, AlignableDetOrUnitPtr chamberAlignable)
double global_hitresid(int i) const
T y() const
Definition: PV3DBase.h:63
int layer() const
Return the layer number.
Definition: DTLayerId.h:53
int layer() const
Definition: CSCDetId.h:61
double global_residual() const
double trackx() const
double resslope() const
virtual const GeomDet * idToDet(DetId) const
static const int CSC
Definition: MuonSubdetId.h:13
std::vector< DetId > m_localIDs
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:48
std::vector< double > m_localResids
T sqrt(T t)
Definition: SSEVec.h:18
T z() const
Definition: PV3DBase.h:64
AlignableDetOrUnitPtr chamberAlignable() const
double tracky() const
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:135
int superlayer() const
Return the superlayer number (deprecated method name)
Definition: DetId.h:18
double hitresid(int i) const
int hitlayer(int i) const
align::GlobalPoint global_stubpos()
edm::ESHandle< GlobalTrackingGeometry > m_globalGeometry
align::GlobalPoints toGlobal(const align::LocalPoints &) const
Return in global coord given a set of local points.
double hitposition(int i) const
double global_resslope() const
static const int DT
Definition: MuonSubdetId.h:12
T x() const
Definition: PV3DBase.h:62
double residual() const
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
virtual double signConvention() const