#include <MuonChamberResidual.h>
Public Types | |
enum | { kDT13, kDT2, kCSC } |
Public Member Functions | |
virtual void | addResidual (const TrajectoryStateOnSurface *tsos, const TransientTrackingRecHit *hit)=0 |
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 |
virtual double | signConvention (const unsigned int rawId=0) const =0 |
double | trackdxdz () const |
double | trackdydz () const |
double | trackx () const |
double | tracky () const |
virtual int | type () const =0 |
virtual | ~MuonChamberResidual () |
Protected Attributes | |
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< DetId > | m_localIDs |
std::vector< double > | m_localResids |
AlignableNavigator * | m_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 |
anonymous enum |
Definition at line 51 of file MuonChamberResidual.h.
MuonChamberResidual::MuonChamberResidual | ( | edm::ESHandle< GlobalTrackingGeometry > | globalGeometry, |
AlignableNavigator * | navigator, | ||
DetId | chamberId, | ||
AlignableDetOrUnitPtr | chamberAlignable | ||
) | [inline] |
Definition at line 26 of file MuonChamberResidual.h.
: m_globalGeometry(globalGeometry) , m_navigator(navigator) , m_chamberId(chamberId) , m_chamberAlignable(chamberAlignable) , m_numHits(0) , m_residual_1(0.) , m_residual_x(0.) , m_residual_y(0.) , m_residual_xx(0.) , m_residual_xy(0.) , m_trackx_1(0.) , m_trackx_x(0.) , m_trackx_y(0.) , m_trackx_xx(0.) , m_trackx_xy(0.) , m_tracky_1(0.) , m_tracky_x(0.) , m_tracky_y(0.) , m_tracky_xx(0.) , m_tracky_xy(0.) {};
virtual MuonChamberResidual::~MuonChamberResidual | ( | ) | [inline, virtual] |
Definition at line 49 of file MuonChamberResidual.h.
{};
virtual void MuonChamberResidual::addResidual | ( | const TrajectoryStateOnSurface * | tsos, |
const TransientTrackingRecHit * | hit | ||
) | [pure virtual] |
Implemented in MuonCSCChamberResidual, MuonDT13ChamberResidual, and MuonDT2ChamberResidual.
AlignableDetOrUnitPtr MuonChamberResidual::chamberAlignable | ( | ) | const [inline] |
Definition at line 61 of file MuonChamberResidual.h.
References m_chamberAlignable.
Referenced by AlignmentMonitorSegmentDifferences::event(), global_trackpos(), and MuonAlignmentFromReference::run().
{ return m_chamberAlignable; };
DetId MuonChamberResidual::chamberId | ( | ) | const [inline] |
Definition at line 60 of file MuonChamberResidual.h.
References m_chamberId.
{ return m_chamberId; };
double MuonChamberResidual::chi2 | ( | ) | const [inline] |
Definition at line 90 of file MuonChamberResidual.h.
References a, b, m_individual_weight, m_individual_x, m_individual_y, convertSQLitetoXML_cfg::output, funct::pow(), residual(), resslope(), ExpressReco_HICollisions_FallBack::x, and ExpressReco_HICollisions_FallBack::y.
Referenced by AlignmentMonitorMuonSystemMap1D::event(), and MuonAlignmentFromReference::run().
{ double output = 0.; double a = residual(); double b = resslope(); std::vector<double>::const_iterator x = m_individual_x.begin(); std::vector<double>::const_iterator y = m_individual_y.begin(); std::vector<double>::const_iterator w = m_individual_weight.begin(); for (; x != m_individual_x.end(); ++x, ++y, ++w) { output += pow((*y) - a - b*(*x), 2) * (*w); } return output; };
double MuonChamberResidual::global_hitresid | ( | int | i | ) | const [inline] |
Definition at line 149 of file MuonChamberResidual.h.
References hitresid(), m_localIDs, and signConvention().
Referenced by AlignmentMonitorMuonVsCurvature::event().
{ return hitresid(i) * signConvention(m_localIDs[i].rawId()); };
double MuonChamberResidual::global_residual | ( | ) | const [inline] |
Definition at line 141 of file MuonChamberResidual.h.
References residual(), and signConvention().
Referenced by AlignmentMonitorSegmentDifferences::event(), and AlignmentMonitorMuonSystemMap1D::event().
{ return residual() * signConvention(); };
double MuonChamberResidual::global_resslope | ( | ) | const [inline] |
Definition at line 145 of file MuonChamberResidual.h.
References resslope(), and signConvention().
Referenced by AlignmentMonitorSegmentDifferences::event(), AlignmentMonitorMuonVsCurvature::event(), and AlignmentMonitorMuonSystemMap1D::event().
{ return resslope() * signConvention(); };
GlobalPoint MuonChamberResidual::global_trackpos | ( | ) | [inline] |
Definition at line 132 of file MuonChamberResidual.h.
References chamberAlignable(), trackx(), and tracky().
Referenced by AlignmentMonitorMuonSystemMap1D::event().
{ return chamberAlignable()->surface().toGlobal(LocalPoint(trackx(), tracky(), 0.)); };
int MuonChamberResidual::hitlayer | ( | int | i | ) | const [inline] |
Definition at line 153 of file MuonChamberResidual.h.
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 [inline] |
Definition at line 166 of file MuonChamberResidual.h.
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) { 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 [inline] |
Definition at line 136 of file MuonChamberResidual.h.
References i, m_localIDs, and m_localResids.
Referenced by AlignmentMonitorMuonVsCurvature::event(), and global_hitresid().
{ assert(0 <= i && i < int(m_localIDs.size())); return m_localResids[i]; }
DetId MuonChamberResidual::localid | ( | int | i | ) | const [inline] |
Definition at line 178 of file MuonChamberResidual.h.
References i, and m_localIDs.
Referenced by AlignmentMonitorMuonVsCurvature::event().
{ return m_localIDs[i]; };
int MuonChamberResidual::ndof | ( | ) | const [inline] |
Definition at line 104 of file MuonChamberResidual.h.
References m_individual_x.
Referenced by AlignmentMonitorMuonSystemMap1D::event(), and MuonAlignmentFromReference::run().
{ return m_individual_x.size() - 2; };
int MuonChamberResidual::numHits | ( | ) | const [inline] |
Definition at line 64 of file MuonChamberResidual.h.
References m_numHits.
Referenced by AlignmentMonitorSegmentDifferences::event(), AlignmentMonitorMuonVsCurvature::event(), AlignmentMonitorMuonSystemMap1D::event(), and MuonAlignmentFromReference::run().
{ return m_numHits; };
double MuonChamberResidual::residual | ( | ) | const [inline] |
Definition at line 66 of file MuonChamberResidual.h.
References delta, m_numHits, m_residual_1, m_residual_x, m_residual_xx, m_residual_xy, and m_residual_y.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), chi2(), global_residual(), and MuonAlignmentFromReference::run().
{ assert(m_numHits > 1); double delta = m_residual_1*m_residual_xx - m_residual_x*m_residual_x; return (m_residual_xx*m_residual_y - m_residual_x*m_residual_xy) / delta; };
double MuonChamberResidual::residual_error | ( | ) | const [inline] |
Definition at line 72 of file MuonChamberResidual.h.
References delta, m_numHits, m_residual_1, m_residual_x, m_residual_xx, and mathSSE::sqrt().
{ assert(m_numHits > 1); double delta = m_residual_1*m_residual_xx - m_residual_x*m_residual_x; return sqrt(m_residual_xx / delta); };
double MuonChamberResidual::resslope | ( | ) | const [inline] |
Definition at line 78 of file MuonChamberResidual.h.
References delta, m_numHits, m_residual_1, m_residual_x, m_residual_xx, m_residual_xy, and m_residual_y.
Referenced by chi2(), AlignmentMonitorMuonVsCurvature::event(), global_resslope(), and MuonAlignmentFromReference::run().
{ assert(m_numHits > 1); double delta = m_residual_1*m_residual_xx - m_residual_x*m_residual_x; return (m_residual_1*m_residual_xy - m_residual_x*m_residual_y) / delta; };
double MuonChamberResidual::resslope_error | ( | ) | const [inline] |
Definition at line 84 of file MuonChamberResidual.h.
References delta, m_numHits, m_residual_1, m_residual_x, m_residual_xx, and mathSSE::sqrt().
{ assert(m_numHits > 1); double delta = m_residual_1*m_residual_xx - m_residual_x*m_residual_x; return sqrt(m_residual_1 / delta); };
virtual double MuonChamberResidual::signConvention | ( | const unsigned int | rawId = 0 | ) | const [pure virtual] |
Implemented in MuonCSCChamberResidual, MuonDT13ChamberResidual, and MuonDT2ChamberResidual.
Referenced by global_hitresid(), global_residual(), and global_resslope().
double MuonChamberResidual::trackdxdz | ( | ) | const [inline] |
Definition at line 108 of file MuonChamberResidual.h.
References delta, m_numHits, m_trackx_1, m_trackx_x, m_trackx_xx, m_trackx_xy, and m_trackx_y.
Referenced by MuonAlignmentFromReference::run().
{ assert(m_numHits > 0); double delta = m_trackx_1*m_trackx_xx - m_trackx_x*m_trackx_x; return (m_trackx_1*m_trackx_xy - m_trackx_x*m_trackx_y) / delta; };
double MuonChamberResidual::trackdydz | ( | ) | const [inline] |
Definition at line 114 of file MuonChamberResidual.h.
References delta, m_numHits, m_tracky_1, m_tracky_x, m_tracky_xx, m_tracky_xy, and m_tracky_y.
Referenced by MuonAlignmentFromReference::run().
{ assert(m_numHits > 0); double delta = m_tracky_1*m_tracky_xx - m_tracky_x*m_tracky_x; return (m_tracky_1*m_tracky_xy - m_tracky_x*m_tracky_y) / delta; };
double MuonChamberResidual::trackx | ( | ) | const [inline] |
Definition at line 120 of file MuonChamberResidual.h.
References delta, m_numHits, m_trackx_1, m_trackx_x, m_trackx_xx, m_trackx_xy, and m_trackx_y.
Referenced by global_trackpos(), and MuonAlignmentFromReference::run().
{ assert(m_numHits > 0); double delta = m_trackx_1*m_trackx_xx - m_trackx_x*m_trackx_x; return (m_trackx_xx*m_trackx_y - m_trackx_x*m_trackx_xy) / delta; };
double MuonChamberResidual::tracky | ( | ) | const [inline] |
Definition at line 126 of file MuonChamberResidual.h.
References delta, m_numHits, m_tracky_1, m_tracky_x, m_tracky_xx, m_tracky_xy, and m_tracky_y.
Referenced by global_trackpos(), and MuonAlignmentFromReference::run().
{ assert(m_numHits > 0); double delta = m_tracky_1*m_tracky_xx - m_tracky_x*m_tracky_x; return (m_tracky_xx*m_tracky_y - m_tracky_x*m_tracky_xy) / delta; };
virtual int MuonChamberResidual::type | ( | ) | const [pure virtual] |
Implemented in MuonCSCChamberResidual, MuonDT13ChamberResidual, and MuonDT2ChamberResidual.
Definition at line 186 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), and chamberAlignable().
DetId MuonChamberResidual::m_chamberId [protected] |
Definition at line 185 of file MuonChamberResidual.h.
Referenced by chamberId(), hitlayer(), hitposition(), MuonDT13ChamberResidual::signConvention(), MuonDT2ChamberResidual::signConvention(), and MuonCSCChamberResidual::signConvention().
Definition at line 180 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), hitposition(), MuonDT13ChamberResidual::signConvention(), MuonDT2ChamberResidual::signConvention(), and MuonCSCChamberResidual::signConvention().
std::vector<double> MuonChamberResidual::m_individual_weight [protected] |
Definition at line 208 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), and chi2().
std::vector<double> MuonChamberResidual::m_individual_x [protected] |
Definition at line 206 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), chi2(), and ndof().
std::vector<double> MuonChamberResidual::m_individual_y [protected] |
Definition at line 207 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), and chi2().
std::vector<DetId> MuonChamberResidual::m_localIDs [protected] |
Definition at line 204 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), global_hitresid(), hitlayer(), hitposition(), hitresid(), and localid().
std::vector<double> MuonChamberResidual::m_localResids [protected] |
Definition at line 205 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), and hitresid().
AlignableNavigator* MuonChamberResidual::m_navigator [protected] |
Definition at line 184 of file MuonChamberResidual.h.
int MuonChamberResidual::m_numHits [protected] |
Definition at line 188 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), numHits(), residual(), residual_error(), resslope(), resslope_error(), trackdxdz(), trackdydz(), trackx(), and tracky().
double MuonChamberResidual::m_residual_1 [protected] |
Definition at line 189 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), residual(), residual_error(), resslope(), and resslope_error().
double MuonChamberResidual::m_residual_x [protected] |
Definition at line 190 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), residual(), residual_error(), resslope(), and resslope_error().
double MuonChamberResidual::m_residual_xx [protected] |
Definition at line 192 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), residual(), residual_error(), resslope(), and resslope_error().
double MuonChamberResidual::m_residual_xy [protected] |
Definition at line 193 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), residual(), and resslope().
double MuonChamberResidual::m_residual_y [protected] |
Definition at line 191 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), residual(), and resslope().
double MuonChamberResidual::m_trackx_1 [protected] |
Definition at line 194 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), trackdxdz(), and trackx().
double MuonChamberResidual::m_trackx_x [protected] |
Definition at line 195 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), trackdxdz(), and trackx().
double MuonChamberResidual::m_trackx_xx [protected] |
Definition at line 197 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), trackdxdz(), and trackx().
double MuonChamberResidual::m_trackx_xy [protected] |
Definition at line 198 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), trackdxdz(), and trackx().
double MuonChamberResidual::m_trackx_y [protected] |
Definition at line 196 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), trackdxdz(), and trackx().
double MuonChamberResidual::m_tracky_1 [protected] |
Definition at line 199 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), trackdydz(), and tracky().
double MuonChamberResidual::m_tracky_x [protected] |
Definition at line 200 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), trackdydz(), and tracky().
double MuonChamberResidual::m_tracky_xx [protected] |
Definition at line 202 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), trackdydz(), and tracky().
double MuonChamberResidual::m_tracky_xy [protected] |
Definition at line 203 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), trackdydz(), and tracky().
double MuonChamberResidual::m_tracky_y [protected] |
Definition at line 201 of file MuonChamberResidual.h.
Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), trackdydz(), and tracky().