CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
MuonHitsChamberResidual Class Reference

#include <MuonHitsChamberResidual.h>

Inheritance diagram for MuonHitsChamberResidual:
MuonChamberResidual MuonCSCChamberResidual MuonDT13ChamberResidual MuonDT2ChamberResidual

Public Member Functions

 MuonHitsChamberResidual (edm::ESHandle< GlobalTrackingGeometry > globalGeometry, AlignableNavigator *navigator, DetId chamberId, const AlignableDetOrUnitPtr &chamberAlignable)
 
void segment_fit ()
 
- Public Member Functions inherited from MuonChamberResidual
virtual void addResidual (const TrajectoryStateOnSurface *, const TransientTrackingRecHit *)=0
 
AlignableDetOrUnitPtr chamberAlignable () const
 
DetId chamberId () const
 
double chi2 () const
 
double global_hitresid (int i) const
 
double global_residual () const
 
double global_resslope () const
 
align::GlobalPoint global_stubpos ()
 
align::GlobalPoint global_trackpos ()
 
int hitlayer (int i) const
 
double hitposition (int i) const
 
double hitresid (int i) const
 
DetId localid (int i) const
 
 MuonChamberResidual (edm::ESHandle< GlobalTrackingGeometry > globalGeometry, AlignableNavigator *navigator, DetId chamberId, const AlignableDetOrUnitPtr &chamberAlignable)
 
int ndof () const
 
int numHits () const
 
double residual () const
 
double residual_error () const
 
double resslope () const
 
double resslope_error () const
 
double segdxdz () const
 
double segdydz () const
 
double segx () const
 
double segy () const
 
virtual void setSegmentResidual (const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *)=0
 
virtual double signConvention () const
 
double trackdxdz () const
 
double trackdydz () const
 
double trackx () const
 
double tracky () const
 
int type () const
 
virtual ~MuonChamberResidual ()
 

Protected Attributes

double m_hitx_1
 
double m_hitx_x
 
double m_hitx_xx
 
double m_hitx_xy
 
double m_hitx_y
 
double m_hity_1
 
double m_hity_x
 
double m_hity_xx
 
double m_hity_xy
 
double m_hity_y
 
double m_residual_1
 
double m_residual_x
 
double m_residual_xx
 
double m_residual_xy
 
double m_residual_y
 
double m_trackx_1
 
double m_trackx_x
 
double m_trackx_xx
 
double m_trackx_xy
 
double m_trackx_y
 
double m_tracky_1
 
double m_tracky_x
 
double m_tracky_xx
 
double m_tracky_xy
 
double m_tracky_y
 
- Protected Attributes inherited from MuonChamberResidual
AlignableDetOrUnitPtr m_chamberAlignable
 
DetId m_chamberId
 
double m_chi2
 
edm::ESHandle
< GlobalTrackingGeometry
m_globalGeometry
 
std::vector< double > m_individual_weight
 
std::vector< double > m_individual_x
 
std::vector< double > m_individual_y
 
std::vector< DetIdm_localIDs
 
std::vector< double > m_localResids
 
AlignableNavigatorm_navigator
 
int m_ndof
 
int m_numHits
 
double m_residual
 
double m_residual_error
 
double m_resslope
 
double m_resslope_error
 
double m_segdxdz
 
double m_segdydz
 
double m_segx
 
double m_segy
 
double m_sign
 
double m_trackdxdz
 
double m_trackdydz
 
double m_trackx
 
double m_tracky
 
int m_type
 

Additional Inherited Members

- Public Types inherited from MuonChamberResidual
enum  { kDT13, kDT2, kCSC }
 

Detailed Description

Second level abstraction class for muon chamber residulas: for alignment using individual rechits it implements linear segment fit of hits.

Id:
Author
V. Khotilovich - Texas A&M University khoti.nosp@m.lov@.nosp@m.cern..nosp@m.ch
Id:
Author
V. Khotilovich - Texas A&M University khoti.nosp@m.lov@.nosp@m.cern..nosp@m.ch

Definition at line 22 of file MuonHitsChamberResidual.h.

Constructor & Destructor Documentation

MuonHitsChamberResidual::MuonHitsChamberResidual ( edm::ESHandle< GlobalTrackingGeometry globalGeometry,
AlignableNavigator navigator,
DetId  chamberId,
const AlignableDetOrUnitPtr chamberAlignable 
)

Definition at line 8 of file MuonHitsChamberResidual.cc.

12  : MuonChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable)
13  , m_residual_1(0.)
14  , m_residual_x(0.) , m_residual_y(0.)
15  , m_residual_xx(0.) , m_residual_xy(0.)
16  , m_trackx_1(0.)
17  , m_trackx_x(0.) , m_trackx_y(0.)
18  , m_trackx_xx(0.) , m_trackx_xy(0.)
19  , m_tracky_1(0.)
20  , m_tracky_x(0.) , m_tracky_y(0.)
21  , m_tracky_xx(0.) , m_tracky_xy(0.)
22  , m_hitx_1(0.)
23  , m_hitx_x(0.) , m_hitx_y(0.)
24  , m_hitx_xx(0.) , m_hitx_xy(0.)
25  , m_hity_1(0.)
26  , m_hity_x(0.) , m_hity_y(0.)
27  , m_hity_xx(0.) , m_hity_xy(0.)
28 {}
MuonChamberResidual(edm::ESHandle< GlobalTrackingGeometry > globalGeometry, AlignableNavigator *navigator, DetId chamberId, const AlignableDetOrUnitPtr &chamberAlignable)

Member Function Documentation

void MuonHitsChamberResidual::segment_fit ( )

Definition at line 31 of file MuonHitsChamberResidual.cc.

References a, b, delta, MuonChamberResidual::m_chi2, m_hitx_1, m_hitx_x, m_hitx_xx, m_hitx_xy, m_hitx_y, m_hity_1, m_hity_x, m_hity_xx, m_hity_xy, m_hity_y, MuonChamberResidual::m_individual_weight, MuonChamberResidual::m_individual_x, MuonChamberResidual::m_individual_y, MuonChamberResidual::m_ndof, MuonChamberResidual::m_numHits, MuonChamberResidual::m_residual, m_residual_1, MuonChamberResidual::m_residual_error, m_residual_x, m_residual_xx, m_residual_xy, m_residual_y, MuonChamberResidual::m_resslope, MuonChamberResidual::m_resslope_error, MuonChamberResidual::m_segdxdz, MuonChamberResidual::m_segdydz, MuonChamberResidual::m_segx, MuonChamberResidual::m_segy, MuonChamberResidual::m_trackdxdz, MuonChamberResidual::m_trackdydz, MuonChamberResidual::m_trackx, m_trackx_1, m_trackx_x, m_trackx_xx, m_trackx_xy, m_trackx_y, MuonChamberResidual::m_tracky, m_tracky_1, m_tracky_x, m_tracky_xx, m_tracky_xy, m_tracky_y, funct::pow(), mathSSE::sqrt(), w(), x, and detailsBasic3DVector::y.

Referenced by MuonCSCChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), and MuonDT13ChamberResidual::addResidual().

32 {
33  assert(m_numHits > 1);
34 
36  m_residual = (m_residual_xx * m_residual_y - m_residual_x * m_residual_xy) / delta;
37 
38  delta = m_residual_1 * m_residual_xx - m_residual_x * m_residual_x;
40 
41  delta = m_residual_1 * m_residual_xx - m_residual_x * m_residual_x;
42  m_resslope = (m_residual_1 * m_residual_xy - m_residual_x * m_residual_y) / delta;
43 
44  delta = m_residual_1 * m_residual_xx - m_residual_x * m_residual_x;
46 
47  m_ndof = m_individual_x.size() - 2;
48 
49  m_chi2 = 0.;
50  double a = m_residual;
51  double b = m_resslope;
52  std::vector< double >::const_iterator x = m_individual_x.begin();
53  std::vector< double >::const_iterator y = m_individual_y.begin();
54  std::vector< double >::const_iterator w = m_individual_weight.begin();
55  for (; x != m_individual_x.end(); ++x, ++y, ++w) m_chi2 += pow((*y) - a - b * (*x), 2) * (*w);
56 
58  m_trackdxdz = (m_trackx_1 * m_trackx_xy - m_trackx_x * m_trackx_y) / delta;
59 
61  m_trackdydz = (m_tracky_1 * m_tracky_xy - m_tracky_x * m_tracky_y) / delta;
62 
63  delta = m_trackx_1 * m_trackx_xx - m_trackx_x * m_trackx_x;
64  m_trackx = (m_trackx_xx * m_trackx_y - m_trackx_x * m_trackx_xy) / delta;
65 
66  delta = m_tracky_1 * m_tracky_xx - m_tracky_x * m_tracky_x;
67  m_tracky = (m_tracky_xx * m_tracky_y - m_tracky_x * m_tracky_xy) / delta;
68 
69  delta = m_hitx_1 * m_hitx_xx - m_hitx_x * m_hitx_x;
70  m_segdxdz = (m_hitx_1 * m_hitx_xy - m_hitx_x * m_hitx_y) / delta;
71 
72  delta = m_hity_1 * m_hity_xx - m_hity_x * m_hity_x;
73  m_segdydz = (m_hity_1 * m_hity_xy - m_hity_x * m_hity_y) / delta;
74 
75  delta = m_hitx_1 * m_hitx_xx - m_hitx_x * m_hitx_x;
76  m_segx = (m_hitx_xx * m_hitx_y - m_hitx_x * m_hitx_xy) / delta;
77 
78  delta = m_hity_1 * m_hity_xx - m_hity_x * m_hity_x;
79  m_segy = (m_hity_xx * m_hity_y - m_hity_x * m_hity_xy) / delta;
80 }
dbl * delta
Definition: mlp_gen.cc:36
std::vector< double > m_individual_y
std::vector< double > m_individual_x
T sqrt(T t)
Definition: SSEVec.h:48
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
T w() const
Definition: DDAxes.h:10
std::vector< double > m_individual_weight
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40

Member Data Documentation

double MuonHitsChamberResidual::m_hitx_1
protected
double MuonHitsChamberResidual::m_hitx_x
protected
double MuonHitsChamberResidual::m_hitx_xx
protected
double MuonHitsChamberResidual::m_hitx_xy
protected
double MuonHitsChamberResidual::m_hitx_y
protected
double MuonHitsChamberResidual::m_hity_1
protected
double MuonHitsChamberResidual::m_hity_x
protected
double MuonHitsChamberResidual::m_hity_xx
protected
double MuonHitsChamberResidual::m_hity_xy
protected
double MuonHitsChamberResidual::m_hity_y
protected
double MuonHitsChamberResidual::m_residual_1
protected
double MuonHitsChamberResidual::m_residual_x
protected
double MuonHitsChamberResidual::m_residual_xx
protected
double MuonHitsChamberResidual::m_residual_xy
protected
double MuonHitsChamberResidual::m_residual_y
protected
double MuonHitsChamberResidual::m_trackx_1
protected
double MuonHitsChamberResidual::m_trackx_x
protected
double MuonHitsChamberResidual::m_trackx_xx
protected
double MuonHitsChamberResidual::m_trackx_xy
protected
double MuonHitsChamberResidual::m_trackx_y
protected
double MuonHitsChamberResidual::m_tracky_1
protected
double MuonHitsChamberResidual::m_tracky_x
protected
double MuonHitsChamberResidual::m_tracky_xx
protected
double MuonHitsChamberResidual::m_tracky_xy
protected
double MuonHitsChamberResidual::m_tracky_y
protected