CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
LocalError Class Reference

#include <LocalError.h>

Public Member Functions

bool invalid () const
 
 LocalError ()
 
 LocalError (InvalidError)
 
 LocalError (float xx, float xy, float yy)
 
LocalError rotate (float x, float y) const
 Return a new LocalError, rotated by an angle defined by the direction (x,y) More...
 
LocalError rotate (float phi) const
 Return a new LocalError, rotated by an angle phi. More...
 
LocalError rotateCosSin (float c, float s, float mag2i=1.f) const
 Return a new LocalError, rotated by an angle defined by it's cosine and sine. More...
 
LocalError scale (float s) const
 
bool valid () const
 
float xx () const
 
float xy () const
 
float yy () const
 

Private Attributes

float thexx
 
float thexy
 
float theyy
 

Detailed Description

A very simple class for 2D error matrix components, used for the local frame.

Definition at line 12 of file LocalError.h.

Constructor & Destructor Documentation

◆ LocalError() [1/3]

LocalError::LocalError ( )
inline

Definition at line 14 of file LocalError.h.

Referenced by rotateCosSin(), and scale().

14 : thexx(0), thexy(0), theyy(0) {}
float thexy
Definition: LocalError.h:51
float thexx
Definition: LocalError.h:50
float theyy
Definition: LocalError.h:52

◆ LocalError() [2/3]

LocalError::LocalError ( InvalidError  )
inline

Definition at line 15 of file LocalError.h.

15 : thexx(-9999.e10f), thexy(0), theyy(-9999.e10f) {}
float thexy
Definition: LocalError.h:51
float thexx
Definition: LocalError.h:50
float theyy
Definition: LocalError.h:52

◆ LocalError() [3/3]

LocalError::LocalError ( float  xx,
float  xy,
float  yy 
)
inline

Definition at line 17 of file LocalError.h.

17 : thexx(xx), thexy(xy), theyy(yy) {}
float thexy
Definition: LocalError.h:51
float yy() const
Definition: LocalError.h:24
float xy() const
Definition: LocalError.h:23
float thexx
Definition: LocalError.h:50
float theyy
Definition: LocalError.h:52
float xx() const
Definition: LocalError.h:22

Member Function Documentation

◆ invalid()

bool LocalError::invalid ( ) const
inline

Definition at line 19 of file LocalError.h.

References thexx.

Referenced by valid().

19 { return thexx < -1.e10f; }
float thexx
Definition: LocalError.h:50

◆ rotate() [1/2]

LocalError LocalError::rotate ( float  x,
float  y 
) const
inline

Return a new LocalError, rotated by an angle defined by the direction (x,y)

Definition at line 37 of file LocalError.h.

References f, rotateCosSin(), x, and y.

Referenced by CaloDetIdAssociator::crossedElement(), CachedTrajectory::getWideTrajectory(), DiskSectorBounds::inside(), TkClonerImpl::operator()(), TkClonerImpl::project(), and FastTrackerRecHitMatcher::projectOnly().

37 { return rotateCosSin(x, y, 1.f / (x * x + y * y)); }
LocalError rotateCosSin(float c, float s, float mag2i=1.f) const
Return a new LocalError, rotated by an angle defined by it&#39;s cosine and sine.
Definition: LocalError.h:43
double f[11][100]

◆ rotate() [2/2]

LocalError LocalError::rotate ( float  phi) const
inline

Return a new LocalError, rotated by an angle phi.

Definition at line 40 of file LocalError.h.

References funct::cos(), phi, rotateCosSin(), and funct::sin().

40 { return rotateCosSin(cos(phi), sin(phi)); }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
LocalError rotateCosSin(float c, float s, float mag2i=1.f) const
Return a new LocalError, rotated by an angle defined by it&#39;s cosine and sine.
Definition: LocalError.h:43
Cos< T >::type cos(const T &t)
Definition: Cos.h:22

◆ rotateCosSin()

LocalError LocalError::rotateCosSin ( float  c,
float  s,
float  mag2i = 1.f 
) const
inline

Return a new LocalError, rotated by an angle defined by it's cosine and sine.

Definition at line 43 of file LocalError.h.

References c, f, LocalError(), alignCSCRings::s, xx(), xy(), and yy().

Referenced by rotate().

43  {
44  return LocalError(mag2i * ((c * c) * xx() + (s * s) * yy() - 2.f * (c * s) * xy()),
45  mag2i * ((c * s) * (xx() - yy()) + (c * c - s * s) * xy()),
46  mag2i * ((s * s) * xx() + (c * c) * yy() + 2.f * (c * s) * xy()));
47  }
float yy() const
Definition: LocalError.h:24
double f[11][100]
float xy() const
Definition: LocalError.h:23
float xx() const
Definition: LocalError.h:22

◆ scale()

LocalError LocalError::scale ( float  s) const
inline

Return a new LocalError, scaled by a factor interpreted as a number of sigmas (standard deviations). The error matrix components are actually multiplied with the square of the factor.

Definition at line 31 of file LocalError.h.

References LocalError(), alignCSCRings::s, xx(), xy(), and yy().

Referenced by CaloDetIdAssociator::crossedElement(), and CachedTrajectory::getWideTrajectory().

31  {
32  float s2 = s * s;
33  return LocalError(s2 * xx(), s2 * xy(), s2 * yy());
34  }
float yy() const
Definition: LocalError.h:24
float xy() const
Definition: LocalError.h:23
float xx() const
Definition: LocalError.h:22

◆ valid()

bool LocalError::valid ( ) const
inline

◆ xx()

float LocalError::xx ( ) const
inline

Definition at line 22 of file LocalError.h.

References thexx.

Referenced by TrackDetectorAssociator::addTAMuonSegmentMatch(), CkfDebugger::analyseCompatibleMeasurements(), SiPixelPhase1RecHitsV::analyze(), SiPixelRecHitSource::analyze(), MuonIdDQM::analyze(), MuonIdVal::analyze(), SiPixelErrorEstimation::analyze(), BaseTrackerRecHit::BaseTrackerRecHit(), FWCSCRecHitProxyBuilder::build(), ME0ReDigiProducer::buildDigis(), FWME0RecHitProxyBuilder::buildViewType(), FWRPCRecHitProxyBuilder::buildViewType(), FWGEMRecHitProxyBuilder::buildViewType(), TkGluedMeasurementDet::checkHitProjection(), SimpleDAFHitCollector::clone(), Traj2TrackHits::clone(), MTDSectorForwardLayer::compatibleDets(), MTDRingForwardLayer::compatibleDets(), MuRingForwardLayer::compatibleDets(), RPCRecHitStandardAlgo::compute(), geometryXMLparser.Alignable::covariance(), CaloDetIdAssociator::crossedElement(), OutsideInMuonSeeder::doLayer(), DTSegment2DSLPhiQuality::dqmAnalyze(), DTSegment2DQuality::dqmAnalyze(), DTSegment4DQuality::dqmAnalyze(), AlignmentMonitorGeneric::event(), AlignmentMonitorMuonResiduals::event(), SiPixelRecHitsValid::fillBarrel(), SiPixelRecHitsValid::fillForward(), TrackerValidationVariables::fillHitQuantities(), ApeEstimator::fillHitVariables(), ReferenceTrajectory::fillMeasurementAndError(), MuonIdProducer::fillMuonId(), CSCEfficiency::fillRechitsSegments_info(), SETFilter::findChi2(), CollinearFitAtTM::fit(), CollinearFitAtTM2::fit(), DTSegmentUpdator::fit(), VectorHitBuilderAlgorithm::fit2Dzx(), GlobalTrajectoryBuilderBase::fixTEC(), BaseTrackerRecHit::getKfComponents1D(), BaseTrackerRecHit::getKfComponents2D(), TrackDetectorAssociator::getTAMuonChamberMatches(), CachedTrajectory::getWideTrajectory(), TrackerMuonHitExtractor::init(), GeneralNSurfaceDelimitedBounds::inside(), CSCLayerGeometry::inside(), DTSegmentExtendedCand::isCompatible(), MTDThresholdClusterizer::make_cluster(), TwoBodyDecayTrajectoryFactory::match(), GlobalMuonTrackMatcher::match_dist(), Chi2MeasurementEstimatorBase::maximalLocalDisplacement(), RectangularStripTopology::measurementError(), TrapezoidalStripTopology::measurementError(), DTTopology::measurementError(), RectangularMTDTopology::measurementError(), RectangularPixelTopology::measurementError(), TkPixelMeasurementDet::measurements(), MuonResidualsFromTrack::MuonResidualsFromTrack(), TkClonerImpl::operator()(), operator<<(), RecHit2DLocalPos::parametersError(), TRecHit2DPosConstraint::parametersError(), RecHit1D::parametersError(), BeamSpotTransientTrackingRecHit::parametersError(), KFBasedPixelFitter::MyBeamSpotHit::parametersError(), HelpertRecHit2DLocalPos::parError(), DTSLRecCluster::parError(), CSCSegmentValidation::plotResolution(), ApeEstimator::positionAndError2(), HIPAlignmentAlgorithm::processHit1D(), HIPAlignmentAlgorithm::processHit2D(), MuonTrackProducer::produce(), AlignmentMuonHIPTrajectorySelector::produce(), TkClonerImpl::project(), FastTrackerRecHitMatcher::projectOnly(), RecHitPropagator::propagate(), CSCSegAlgoST::prune_bad_hits(), ApeEstimator::rectangularPositionAndError2(), rotateCosSin(), scale(), StateSegmentMatcher::setAPE2d(), StateSegmentMatcher::setAPE4d(), PixelTemplateSmearerBase::smearHit(), TrackEfficiencyMonitor::testTrackerTracks(), trajectoryToResiduals(), ErrorFrameTransformer::transform(), MTDTrayBarrelLayer::xError(), and MuRodBarrelLayer::xError().

22 { return thexx; }
float thexx
Definition: LocalError.h:50

◆ xy()

float LocalError::xy ( ) const
inline

◆ yy()

float LocalError::yy ( ) const
inline

Definition at line 24 of file LocalError.h.

References theyy.

Referenced by TrackDetectorAssociator::addTAMuonSegmentMatch(), CkfDebugger::analyseCompatibleMeasurements(), SiPixelPhase1RecHitsV::analyze(), SiPixelRecHitSource::analyze(), MuonIdDQM::analyze(), MuonIdVal::analyze(), SiPixelErrorEstimation::analyze(), BaseTrackerRecHit::BaseTrackerRecHit(), FWCSCRecHitProxyBuilder::build(), ME0ReDigiProducer::buildDigis(), FWME0RecHitProxyBuilder::buildViewType(), FWRPCRecHitProxyBuilder::buildViewType(), FWGEMRecHitProxyBuilder::buildViewType(), TkGluedMeasurementDet::checkHitProjection(), MTDSectorForwardLayer::compatibleDets(), MTDRingForwardLayer::compatibleDets(), MuRingForwardLayer::compatibleDets(), geometryXMLparser.Alignable::covariance(), CaloDetIdAssociator::crossedElement(), OutsideInMuonSeeder::doLayer(), DTSegment4DQuality::dqmAnalyze(), AlignmentMonitorGeneric::event(), AlignmentMonitorMuonResiduals::event(), SiPixelRecHitsValid::fillBarrel(), SiPixelRecHitsValid::fillForward(), TrackerValidationVariables::fillHitQuantities(), ApeEstimator::fillHitVariables(), ReferenceTrajectory::fillMeasurementAndError(), MuonIdProducer::fillMuonId(), CSCEfficiency::fillRechitsSegments_info(), SETFilter::findChi2(), CollinearFitAtTM::fit(), CollinearFitAtTM2::fit(), VectorHitBuilderAlgorithm::fit2Dzy(), GlobalTrajectoryBuilderBase::fixTEC(), BaseTrackerRecHit::getKfComponents2D(), TrackDetectorAssociator::getTAMuonChamberMatches(), CachedTrajectory::getWideTrajectory(), TrackerMuonHitExtractor::init(), GeneralNSurfaceDelimitedBounds::inside(), CSCLayerGeometry::inside(), deDxTools::isFarFromBorder(), ShallowGainCalibration::isFarFromBorder(), SiStripGainFromData::IsFarFromBorder(), BTLRecHitsErrorEstimatorIM::localError(), MTDThresholdClusterizer::make_cluster(), TwoBodyDecayTrajectoryFactory::match(), GlobalMuonTrackMatcher::match_dist(), Chi2MeasurementEstimatorBase::maximalLocalDisplacement(), RectangularStripTopology::measurementError(), TrapezoidalStripTopology::measurementError(), DTTopology::measurementError(), RectangularMTDTopology::measurementError(), RectangularPixelTopology::measurementError(), TkPixelMeasurementDet::measurements(), TkClonerImpl::operator()(), operator<<(), RecHit2DLocalPos::parametersError(), TRecHit2DPosConstraint::parametersError(), HelpertRecHit2DLocalPos::parError(), CSCSegmentValidation::plotResolution(), ApeEstimator::positionAndError2(), HIPAlignmentAlgorithm::processHit2D(), MuonTrackProducer::produce(), AlignmentMuonHIPTrajectorySelector::produce(), TkClonerImpl::project(), FastTrackerRecHitMatcher::projectOnly(), RecHitPropagator::propagate(), TkPhase2OTMeasurementDet::recHits(), ApeEstimator::rectangularPositionAndError2(), rotateCosSin(), scale(), StateSegmentMatcher::setAPE4d(), PixelTemplateSmearerBase::smearHit(), TrackEfficiencyMonitor::testTrackerTracks(), trajectoryToResiduals(), and ErrorFrameTransformer::transform().

24 { return theyy; }
float theyy
Definition: LocalError.h:52

Member Data Documentation

◆ thexx

float LocalError::thexx
private

Definition at line 50 of file LocalError.h.

Referenced by invalid(), and xx().

◆ thexy

float LocalError::thexy
private

Definition at line 51 of file LocalError.h.

Referenced by xy().

◆ theyy

float LocalError::theyy
private

Definition at line 52 of file LocalError.h.

Referenced by yy().