CMS 3D CMS Logo

Public Types | Public Member Functions | Protected Attributes

MuonChamberResidual Class Reference

#include <MuonChamberResidual.h>

Inheritance diagram for MuonChamberResidual:
MuonHitsChamberResidual MuonTrackCSCChamberResidual MuonTrackDT13ChamberResidual MuonTrackDT2ChamberResidual MuonCSCChamberResidual MuonDT13ChamberResidual MuonDT2ChamberResidual

List of all members.

Public Types

enum  { kDT13, kDT2, kCSC }

Public Member Functions

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, 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

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

Detailed Description

Abstract base class for muon chamber residulas

Id:
MuonChamberResidual.h,v 1.7 2011/10/12 23:40:24 khotilov Exp
Author:
J. Pivarski - Texas A&M University <pivarski@physics.tamu.edu>
Id:
MuonChamberResidual.cc,v 1.1 2011/10/12 23:32:08 khotilov Exp
Author:
V. Khotilovich - Texas A&M University <khotilov@cern.ch>

Definition at line 24 of file MuonChamberResidual.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
kDT13 
kDT2 
kCSC 

Definition at line 28 of file MuonChamberResidual.h.

       {
    kDT13,
    kDT2,
    kCSC
  };

Constructor & Destructor Documentation

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

Definition at line 14 of file MuonChamberResidual.cc.

                                                                                :
    m_globalGeometry(globalGeometry)
  , m_navigator(navigator)
  , m_chamberId(chamberId)
  , m_chamberAlignable(chamberAlignable)
  , m_numHits(0)
  , m_type(-1)
  , m_sign(0.)
  , m_chi2(-999.)
  , m_ndof(-1)
  , m_residual(-999.)
  , m_residual_error(-999.)
  , m_resslope(-999.)
  , m_resslope_error(-999.)
  , m_trackdxdz(-999.)
  , m_trackdydz(-999.)
  , m_trackx(-999.)
  , m_tracky(-999.)
  , m_segdxdz(-999.)
  , m_segdydz(-999.)
  , m_segx(-999.)
  , m_segy(-999.)
{}
virtual MuonChamberResidual::~MuonChamberResidual ( ) [inline, virtual]

Definition at line 37 of file MuonChamberResidual.h.

{}

Member Function Documentation

virtual void MuonChamberResidual::addResidual ( const TrajectoryStateOnSurface ,
const TransientTrackingRecHit  
) [pure virtual]
AlignableDetOrUnitPtr MuonChamberResidual::chamberAlignable ( ) const [inline]
DetId MuonChamberResidual::chamberId ( ) const [inline]

Definition at line 49 of file MuonChamberResidual.h.

References m_chamberId.

Referenced by MuonTrackCSCChamberResidual::setSegmentResidual().

{ return m_chamberId; }
double MuonChamberResidual::chi2 ( ) const [inline]
double MuonChamberResidual::global_hitresid ( int  i) const

Definition at line 66 of file MuonChamberResidual.cc.

References hitresid(), and signConvention().

{
  return hitresid(i) * signConvention();
}
double MuonChamberResidual::global_residual ( ) const
double MuonChamberResidual::global_resslope ( ) const
align::GlobalPoint MuonChamberResidual::global_stubpos ( )

Definition at line 48 of file MuonChamberResidual.cc.

References chamberAlignable(), segx(), and segy().

Referenced by AlignmentMonitorMuonSystemMap1D::processMuonResidualsFromTrack().

{
  return chamberAlignable()->surface().toGlobal(align::LocalPoint(segx(), segy(), 0.));
}
align::GlobalPoint MuonChamberResidual::global_trackpos ( )

Definition at line 42 of file MuonChamberResidual.cc.

References chamberAlignable(), trackx(), and tracky().

Referenced by AlignmentMonitorMuonSystemMap1D::processMuonResidualsFromTrack().

{
  return chamberAlignable()->surface().toGlobal(align::LocalPoint(trackx(), tracky(), 0.));
}
int MuonChamberResidual::hitlayer ( int  i) const

Definition at line 79 of file MuonChamberResidual.cc.

References CSC(), GeomDetEnumerators::DT, DTLayerId::layer(), CSCDetId::layer(), m_chamberId, m_localIDs, DetId::subdetId(), and DTSuperLayerId::superlayer().

{  // only difference between DTs and CSCs is the DetId subclass
  assert(0 <= i  &&  i < int(m_localIDs.size()));
  if (m_chamberId.subdetId() == MuonSubdetId::DT) {
    DTLayerId layerId(m_localIDs[i].rawId());
    return 4*(layerId.superlayer() - 1) + layerId.layer();
  }
  else if (m_chamberId.subdetId() == MuonSubdetId::CSC) {
    CSCDetId layerId(m_localIDs[i].rawId());
    return layerId.layer();
  }
  else assert(false);
}
double MuonChamberResidual::hitposition ( int  i) const

Definition at line 94 of file MuonChamberResidual.cc.

References CSC(), GeomDetEnumerators::DT, m_chamberId, m_globalGeometry, m_localIDs, pos, funct::pow(), mathSSE::sqrt(), DetId::subdetId(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

{
  assert(0 <= i  &&  i < int(m_localIDs.size()));
  if (m_chamberId.subdetId() == MuonSubdetId::DT) {
    align::GlobalPoint pos = m_globalGeometry->idToDet(m_localIDs[i])->position();
    return sqrt(pow(pos.x(), 2) + pow(pos.y(), 2));                   // R for DTs
  }
  else if (m_chamberId.subdetId() == MuonSubdetId::CSC) {
    return m_globalGeometry->idToDet(m_localIDs[i])->position().z();  // Z for CSCs
  }
  else assert(false);
}
double MuonChamberResidual::hitresid ( int  i) const

Definition at line 72 of file MuonChamberResidual.cc.

References i, m_localIDs, and m_localResids.

Referenced by global_hitresid().

{
  assert(0 <= i  &&  i < int(m_localIDs.size()));
  return m_localResids[i];
}
DetId MuonChamberResidual::localid ( int  i) const [inline]

Definition at line 83 of file MuonChamberResidual.h.

References i, and m_localIDs.

{ return m_localIDs[i];  }
int MuonChamberResidual::ndof ( ) const [inline]
int MuonChamberResidual::numHits ( ) const [inline]
double MuonChamberResidual::residual ( ) const [inline]
double MuonChamberResidual::residual_error ( ) const [inline]

Definition at line 56 of file MuonChamberResidual.h.

References m_residual_error.

{ return m_residual_error; }
double MuonChamberResidual::resslope ( ) const [inline]
double MuonChamberResidual::resslope_error ( ) const [inline]

Definition at line 58 of file MuonChamberResidual.h.

References m_resslope_error.

{ return m_resslope_error; }
double MuonChamberResidual::segdxdz ( ) const [inline]

Definition at line 68 of file MuonChamberResidual.h.

References m_segdxdz.

{ return m_segdxdz; }
double MuonChamberResidual::segdydz ( ) const [inline]

Definition at line 69 of file MuonChamberResidual.h.

References m_segdydz.

{ return m_segdydz; }
double MuonChamberResidual::segx ( ) const [inline]

Definition at line 70 of file MuonChamberResidual.h.

References m_segx.

Referenced by global_stubpos().

{ return m_segx; }
double MuonChamberResidual::segy ( ) const [inline]

Definition at line 71 of file MuonChamberResidual.h.

References m_segy.

Referenced by global_stubpos().

{ return m_segy; }
virtual void MuonChamberResidual::setSegmentResidual ( const reco::MuonChamberMatch ,
const reco::MuonSegmentMatch  
) [pure virtual]
virtual double MuonChamberResidual::signConvention ( ) const [inline, virtual]

Definition at line 47 of file MuonChamberResidual.h.

References m_sign.

Referenced by global_hitresid(), global_residual(), and global_resslope().

{return m_sign; }
double MuonChamberResidual::trackdxdz ( ) const [inline]

Definition at line 63 of file MuonChamberResidual.h.

References m_trackdxdz.

Referenced by MuonAlignmentFromReference::processMuonResidualsFromTrack().

{ return m_trackdxdz; }
double MuonChamberResidual::trackdydz ( ) const [inline]

Definition at line 64 of file MuonChamberResidual.h.

References m_trackdydz.

Referenced by MuonAlignmentFromReference::processMuonResidualsFromTrack().

{ return m_trackdydz; }
double MuonChamberResidual::trackx ( ) const [inline]
double MuonChamberResidual::tracky ( ) const [inline]
int MuonChamberResidual::type ( ) const [inline]

Definition at line 45 of file MuonChamberResidual.h.

References m_type.

{ return m_type; }

Member Data Documentation

double MuonChamberResidual::m_chi2 [protected]
std::vector<double> MuonChamberResidual::m_individual_weight [protected]
std::vector<double> MuonChamberResidual::m_individual_x [protected]
std::vector<double> MuonChamberResidual::m_individual_y [protected]
std::vector<DetId> MuonChamberResidual::m_localIDs [protected]
std::vector<double> MuonChamberResidual::m_localResids [protected]

Definition at line 87 of file MuonChamberResidual.h.

int MuonChamberResidual::m_ndof [protected]
double MuonChamberResidual::m_residual [protected]
double MuonChamberResidual::m_resslope [protected]
double MuonChamberResidual::m_segdxdz [protected]
double MuonChamberResidual::m_segdydz [protected]
double MuonChamberResidual::m_segx [protected]
double MuonChamberResidual::m_segy [protected]
double MuonChamberResidual::m_sign [protected]
double MuonChamberResidual::m_trackx [protected]
double MuonChamberResidual::m_tracky [protected]
int MuonChamberResidual::m_type [protected]