CMS 3D CMS Logo

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

#include <MuonTrackDT2ChamberResidual.h>

Inheritance diagram for MuonTrackDT2ChamberResidual:
MuonChamberResidual

Public Member Functions

virtual void addResidual (edm::ESHandle< Propagator > prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit, double, double)=0
 
 MuonTrackDT2ChamberResidual (edm::ESHandle< GlobalTrackingGeometry > globalGeometry, AlignableNavigator *navigator, DetId chamberId, AlignableDetOrUnitPtr chamberAlignable)
 
virtual void setSegmentResidual (const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *)
 
- Public Member Functions inherited from MuonChamberResidual
AlignableDetOrUnitPtr chamberAlignable () const
 
DetId chamberId () const
 
double Chambl () const
 
double ChambW () 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, 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 double signConvention () const
 
double trackdxdz () const
 
double trackdydz () const
 
double trackx () const
 
double tracky () const
 
int type () 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
 
double m_Chambl
 
double m_ChambW
 
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
 

Detailed Description

Implementation of tracker muon chamber residuals for transverse DT layers

Id:

Definition at line 13 of file MuonTrackDT2ChamberResidual.h.

Constructor & Destructor Documentation

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

Definition at line 7 of file MuonTrackDT2ChamberResidual.cc.

References MuonChamberResidual::kDT2, MuonChamberResidual::m_chamberId, MuonChamberResidual::m_globalGeometry, MuonChamberResidual::m_sign, and MuonChamberResidual::m_type.

9  : MuonChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable)
10 {
12  align::GlobalVector zDirection(0., 0., 1.);
13  m_sign = m_globalGeometry->idToDet(m_chamberId)->toLocal(zDirection).y() > 0. ? 1. : -1.;
14 }
MuonChamberResidual(edm::ESHandle< GlobalTrackingGeometry > globalGeometry, AlignableNavigator *navigator, DetId chamberId, AlignableDetOrUnitPtr chamberAlignable)
edm::ESHandle< GlobalTrackingGeometry > m_globalGeometry

Member Function Documentation

virtual void MuonTrackDT2ChamberResidual::addResidual ( edm::ESHandle< Propagator prop,
const TrajectoryStateOnSurface tsos,
const TrackingRecHit hit,
double  ,
double   
)
pure virtual

Implements MuonChamberResidual.

void MuonTrackDT2ChamberResidual::setSegmentResidual ( const reco::MuonChamberMatch trk,
const reco::MuonSegmentMatch seg 
)
virtual

Implements MuonChamberResidual.

Definition at line 17 of file MuonTrackDT2ChamberResidual.cc.

References assert(), reco::MuonSegmentMatch::dtSegmentRef, reco::MuonChamberMatch::dXdZ, reco::MuonSegmentMatch::dXdZ, reco::MuonChamberMatch::dYdZ, reco::MuonSegmentMatch::dYdZ, reco::MuonChamberMatch::dYdZErr, reco::MuonSegmentMatch::dYdZErr, edm::Ref< C, T, F >::get(), DTRecSegment4D::hasZed(), MuonChamberResidual::m_chi2, MuonChamberResidual::m_ndof, MuonChamberResidual::m_numHits, MuonChamberResidual::m_residual, MuonChamberResidual::m_residual_error, 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, MuonChamberResidual::m_tracky, funct::pow(), mathSSE::sqrt(), reco::MuonChamberMatch::x, reco::MuonSegmentMatch::x, reco::MuonChamberMatch::y, reco::MuonSegmentMatch::y, reco::MuonChamberMatch::yErr, and reco::MuonSegmentMatch::yErr.

18 {
19  DTRecSegment4DRef segmentDT = seg->dtSegmentRef;
20  if (segmentDT.get() != 0)
21  {
22  const DTRecSegment4D* segment = segmentDT.get();
23  assert(segment->hasZed());
24  const DTSLRecSegment2D* zSeg = (*segment).zSegment();
25  m_numHits = zSeg->recHits().size();
26  m_ndof = zSeg->degreesOfFreedom();
27  m_chi2 = zSeg->chi2();
28  //std::cout<<"z seg position = "<<zSeg->localPosition()<<" numhits="<<m_numHits<<std::endl;
29  }
30 
31  m_residual = trk->y - seg->y;
32  m_residual_error = sqrt( pow(trk->yErr, 2) + pow(seg->yErr, 2) );
33  m_resslope = trk->dYdZ - seg->dYdZ;
34  m_resslope_error = sqrt( pow(trk->dYdZErr, 2) + pow(seg->dYdZErr, 2) );
35 
36  m_trackx = trk->x;
37  m_tracky = trk->y;
38  m_trackdxdz = trk->dXdZ;
39  m_trackdydz = trk->dYdZ;
40 
41  m_segx = seg->x;
42  m_segy = seg->y;
43  m_segdxdz = seg->dXdZ;
44  m_segdydz = seg->dYdZ;
45 
46  //std::cout<<"d2 res "<<m_residual<<"+-"<<m_residual_error<<" "<<m_resslope<<"+-"<<m_resslope_error<<std::endl;
47  //std::cout<<"d2 trk "<<m_trackx<<" "<<m_tracky<<" "<<m_trackdxdz<<" "<<m_trackdydz<<std::endl;
48  //std::cout<<"d2 seg "<<m_segx<<" "<<m_segy<<" "<<m_segdxdz<<" "<<m_segdydz<<std::endl;
49 }
DTRecSegment4DRef dtSegmentRef
assert(m_qm.get())
T sqrt(T t)
Definition: SSEVec.h:18
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:244
bool hasZed() const
Does it have the Z projection?
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40