CMS 3D CMS Logo

MuonHitsChamberResidual.cc
Go to the documentation of this file.
1 
7 
10  DetId chamberId,
11  const AlignableDetOrUnitPtr& chamberAlignable)
12  : MuonChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable),
13  m_chamber_width(0.),
14  m_chamber_length(0.),
15  m_residual_1(0.),
16  m_residual_x(0.),
17  m_residual_y(0.),
18  m_residual_xx(0.),
19  m_residual_xy(0.),
20  m_trackx_1(0.),
21  m_trackx_x(0.),
22  m_trackx_y(0.),
23  m_trackx_xx(0.),
24  m_trackx_xy(0.),
25  m_tracky_1(0.),
26  m_tracky_x(0.),
27  m_tracky_y(0.),
28  m_tracky_xx(0.),
29  m_tracky_xy(0.),
30  m_hitx_1(0.),
31  m_hitx_x(0.),
32  m_hitx_y(0.),
33  m_hitx_xx(0.),
34  m_hitx_xy(0.),
35  m_hity_1(0.),
36  m_hity_x(0.),
37  m_hity_y(0.),
38  m_hity_xx(0.),
39  m_hity_xy(0.) {}
40 
42  assert(m_numHits > 1);
43 
46 
49 
52 
55 
56  m_ndof = m_individual_x.size() - 2;
57 
58  m_chi2 = 0.;
59  double a = m_residual;
60  double b = m_resslope;
61  std::vector<double>::const_iterator x = m_individual_x.begin();
62  std::vector<double>::const_iterator y = m_individual_y.begin();
63  std::vector<double>::const_iterator w = m_individual_weight.begin();
64  for (; x != m_individual_x.end(); ++x, ++y, ++w)
65  m_chi2 += pow((*y) - a - b * (*x), 2) * (*w);
66 
69 
72 
75 
78 
81 
84 
87 
90 
93 }
std::vector< double > m_individual_y
T w() const
assert(be >=bs)
std::vector< double > m_individual_x
T sqrt(T t)
Definition: SSEVec.h:19
Definition: DetId.h:17
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119
MuonHitsChamberResidual(edm::ESHandle< GlobalTrackingGeometry > globalGeometry, AlignableNavigator *navigator, DetId chamberId, const AlignableDetOrUnitPtr &chamberAlignable)
std::vector< double > m_individual_weight
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29