CMS 3D CMS Logo

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

#include <MuonDT2ChamberResidual.h>

Inheritance diagram for MuonDT2ChamberResidual:
MuonChamberResidual

Public Member Functions

void addResidual (const TrajectoryStateOnSurface *tsos, const TransientTrackingRecHit *hit)
 
 MuonDT2ChamberResidual (edm::ESHandle< GlobalTrackingGeometry > globalGeometry, AlignableNavigator *navigator, DetId chamberId, AlignableDetOrUnitPtr chamberAlignable)
 
double signConvention (const unsigned int rawId=0) const
 
int type () const
 
- Public Member Functions inherited from MuonChamberResidual
AlignableDetOrUnitPtr chamberAlignable () const
 
DetId chamberId () const
 
double chi2 () const
 
double global_hitresid (int i) const
 
double global_residual () const
 
double global_resslope () const
 
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, AlignableDetOrUnitPtr chamberAlignable)
 
int ndof () const
 
int numHits () const
 
double residual () const
 
double residual_error () const
 
double resslope () const
 
double resslope_error () const
 
double trackdxdz () const
 
double trackdydz () const
 
double trackx () const
 
double tracky () const
 
virtual ~MuonChamberResidual ()
 

Additional Inherited Members

- Public Types inherited from MuonChamberResidual
enum  { kDT13, kDT2, kCSC }
 
- Protected Attributes inherited from MuonChamberResidual
AlignableDetOrUnitPtr m_chamberAlignable
 
DetId m_chamberId
 
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_numHits
 
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
 

Detailed Description

Date:
2009/02/27 18:58:29
Revision:
1.1
Author
J. Pivarski - Texas A&M University pivar.nosp@m.ski@.nosp@m.physi.nosp@m.cs.t.nosp@m.amu.e.nosp@m.du

Definition at line 15 of file MuonDT2ChamberResidual.h.

Constructor & Destructor Documentation

MuonDT2ChamberResidual::MuonDT2ChamberResidual ( edm::ESHandle< GlobalTrackingGeometry globalGeometry,
AlignableNavigator navigator,
DetId  chamberId,
AlignableDetOrUnitPtr  chamberAlignable 
)
inline

Definition at line 17 of file MuonDT2ChamberResidual.h.

18  : MuonChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable)
19  {};
MuonChamberResidual(edm::ESHandle< GlobalTrackingGeometry > globalGeometry, AlignableNavigator *navigator, DetId chamberId, AlignableDetOrUnitPtr chamberAlignable)

Member Function Documentation

void MuonDT2ChamberResidual::addResidual ( const TrajectoryStateOnSurface tsos,
const TransientTrackingRecHit hit 
)
virtual

Implements MuonChamberResidual.

Definition at line 3 of file MuonDT2ChamberResidual.cc.

References TrackingRecHit::geographicalId(), TrackingRecHit::localPosition(), TrajectoryStateOnSurface::localPosition(), TrackingRecHit::localPositionError(), MuonChamberResidual::m_chamberAlignable, MuonChamberResidual::m_globalGeometry, MuonChamberResidual::m_individual_weight, MuonChamberResidual::m_individual_x, MuonChamberResidual::m_individual_y, MuonChamberResidual::m_localIDs, MuonChamberResidual::m_localResids, MuonChamberResidual::m_numHits, MuonChamberResidual::m_residual_1, MuonChamberResidual::m_residual_x, MuonChamberResidual::m_residual_xx, MuonChamberResidual::m_residual_xy, MuonChamberResidual::m_residual_y, MuonChamberResidual::m_trackx_1, MuonChamberResidual::m_trackx_x, MuonChamberResidual::m_trackx_xx, MuonChamberResidual::m_trackx_xy, MuonChamberResidual::m_trackx_y, MuonChamberResidual::m_tracky_1, MuonChamberResidual::m_tracky_x, MuonChamberResidual::m_tracky_xx, MuonChamberResidual::m_tracky_xy, MuonChamberResidual::m_tracky_y, MuonChamberResidual::residual(), Alignable::surface(), AlignableSurface::toLocal(), CommonMethods::weight(), PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

3  {
4  DetId id = hit->geographicalId();
5 
6  LocalPoint hitChamberPos = m_chamberAlignable->surface().toLocal(m_globalGeometry->idToDet(id)->toGlobal(hit->localPosition()));
7  LocalPoint tsosChamberPos = m_chamberAlignable->surface().toLocal(m_globalGeometry->idToDet(id)->toGlobal(tsos->localPosition()));
8 
9  double residual = tsosChamberPos.y() - hitChamberPos.y(); // residual is track minus hit
10  double weight = 1. / hit->localPositionError().xx(); // weight linear fit by hit-only local error (yes, xx: layer x is chamber y)
11  double layerPosition = tsosChamberPos.z(); // the layer's position in the chamber's coordinate system
12 
13  m_numHits++;
14 
15  // "x" is the layerPosition, "y" is the residual (this is a linear fit to residual versus layerPosition)
17  m_residual_x += weight * layerPosition;
18  m_residual_y += weight * residual;
19  m_residual_xx += weight * layerPosition * layerPosition;
20  m_residual_xy += weight * layerPosition * residual;
21 
22  // "x" is the layerPosition, "y" is chamberx (this is a linear fit to chamberx versus layerPosition)
23  m_trackx_1 += weight;
24  m_trackx_x += weight * layerPosition;
25  m_trackx_y += weight * tsosChamberPos.x();
26  m_trackx_xx += weight * layerPosition * layerPosition;
27  m_trackx_xy += weight * layerPosition * tsosChamberPos.x();
28 
29  // "x" is the layerPosition, "y" is chambery (this is a linear fit to chambery versus layerPosition)
30  m_tracky_1 += weight;
31  m_tracky_x += weight * layerPosition;
32  m_tracky_y += weight * tsosChamberPos.y();
33  m_tracky_xx += weight * layerPosition * layerPosition;
34  m_tracky_xy += weight * layerPosition * tsosChamberPos.y();
35 
36  m_localIDs.push_back(id);
37  m_localResids.push_back(tsos->localPosition().x() - hit->localPosition().x());
38  m_individual_x.push_back(layerPosition);
39  m_individual_y.push_back(residual);
40  m_individual_weight.push_back(weight);
41 }
float xx() const
Definition: LocalError.h:19
std::vector< double > m_individual_y
T y() const
Definition: PV3DBase.h:57
std::vector< double > m_individual_x
std::vector< DetId > m_localIDs
align::RotationType toLocal(const align::RotationType &) const
Return in local frame a rotation given in global frame.
std::vector< double > m_localResids
T z() const
Definition: PV3DBase.h:58
AlignableDetOrUnitPtr m_chamberAlignable
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:126
Definition: DetId.h:20
virtual LocalError localPositionError() const =0
edm::ESHandle< GlobalTrackingGeometry > m_globalGeometry
DetId geographicalId() const
T x() const
Definition: PV3DBase.h:56
virtual LocalPoint localPosition() const =0
std::vector< double > m_individual_weight
double residual() const
double MuonDT2ChamberResidual::signConvention ( const unsigned int  rawId = 0) const
inlinevirtual

Implements MuonChamberResidual.

Definition at line 28 of file MuonDT2ChamberResidual.h.

References MuonChamberResidual::m_chamberId, and MuonChamberResidual::m_globalGeometry.

28  {
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  };
Definition: DetId.h:20
edm::ESHandle< GlobalTrackingGeometry > m_globalGeometry
int MuonDT2ChamberResidual::type ( ) const
inlinevirtual