CMS 3D CMS Logo

Public Member Functions | Private Attributes

LocalError Class Reference

#include <LocalError.h>

List of all members.

Public Member Functions

bool invalid () const
 LocalError ()
 LocalError (InvalidError)
 LocalError (float xx, float xy, float yy)
LocalError rotate (float phi) const
 Return a new LocalError, rotated by an angle phi.
LocalError rotate (float x, float y) const
 Return a new LocalError, rotated by an angle defined by the direction (x,y)
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.
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::LocalError ( ) [inline]

Definition at line 14 of file LocalError.h.

Referenced by rotateCosSin(), and scale().

: thexx(0), thexy(0), theyy(0) {}
LocalError::LocalError ( InvalidError  ) [inline]

Definition at line 15 of file LocalError.h.

: thexx(-9999.e10f), thexy(0), theyy(-9999.e10f) {}
LocalError::LocalError ( float  xx,
float  xy,
float  yy 
) [inline]

Definition at line 17 of file LocalError.h.

                                            :
    thexx(xx), thexy(xy), theyy(yy) {}

Member Function Documentation

bool LocalError::invalid ( ) const [inline]

Definition at line 20 of file LocalError.h.

References thexx.

Referenced by valid().

{ return thexx<-1.e10f;}
LocalError LocalError::rotate ( float  phi) const [inline]

Return a new LocalError, rotated by an angle phi.

Definition at line 44 of file LocalError.h.

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

                                     { 
    return rotateCosSin( cos(phi), sin(phi));
  }
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 39 of file LocalError.h.

References f, and rotateCosSin().

Referenced by CaloDetIdAssociator::crossedElement(), GlobalTrajectoryBuilderBase::fixTEC(), CachedTrajectory::getWideTrajectory(), TrackingRecHitProjector< ResultingHit >::project(), and GSRecHitMatcher::projectOnly().

                                            { 
    return rotateCosSin( x, y, 1.f/(x*x+y*y) );
  }
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 49 of file LocalError.h.

References f, LocalError(), xx(), xy(), and yy().

Referenced by rotate().

                                                                    {
    return LocalError( mag2i*( (c*c)*xx() + (s*s)*yy() - 2.f*(c*s)*xy()),
                       mag2i*( (c*s)*(xx() - yy()) +  (c*c-s*s)*xy()) ,
                       mag2i*( (s*s)*xx() + (c*c)*yy() + 2.f*(c*s)*xy())
                     );
  }
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 33 of file LocalError.h.

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

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

                                  { 
    float s2 = s*s;
    return LocalError(s2*xx(), s2*xy(), s2*yy());
  }
bool LocalError::valid ( ) const [inline]
float LocalError::xx ( ) const [inline]

Definition at line 24 of file LocalError.h.

References thexx.

Referenced by MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), TrackDetectorAssociator::addTAMuonSegmentMatch(), CkfDebugger::analyseCompatibleMeasurements(), SiStripElectronAnalyzer::analyze(), TrackerDpgAnalysis::analyze(), DTSegment4DQuality::analyze(), DTSegment2DQuality::analyze(), MuonIdVal::analyze(), SiPixelErrorEstimation::analyze(), SiPixelTrackingRecHitsValid::analyze(), SiStripRecHitsValid::analyze(), SiPixelRecHitSource::analyze(), MuonIdDQM::analyze(), DTSegment2DSLPhiQuality::analyze(), SiStripTrackingRecHitsValid::analyze(), FWRPCRecHitProxyBuilder::buildViewType(), CSCPairResidualsConstraint::calculatePhi(), MuRingForwardDoubleLayer::compatible(), ForwardDetLayer::compatible(), MuRingForwardLayer::compatibleDets(), CaloDetIdAssociator::crossedElement(), OutsideInMuonSeeder::doLayer(), CSCValidation::doRecHits(), AlignmentMonitorMuonResiduals::event(), AlignmentMonitorGeneric::event(), RoadSearchTrackCandidateMakerAlgorithm::extrapolateTrajectory(), SiPixelRecHitsValid::fillBarrel(), SiPixelRecHitsValid::fillForward(), TrackerValidationVariables::fillHitQuantities(), ReferenceTrajectory::fillMeasurementAndError(), MuonIdProducer::fillMuonId(), CSCEfficiency::fillRechitsSegments_info(), RoadSearchTrackCandidateMakerAlgorithm::FindBestHits(), SETFilter::findChi2(), CollinearFitAtTM2::fit(), CollinearFitAtTM::fit(), DTSegmentUpdator::fit(), GlobalTrajectoryBuilderBase::fixTEC(), BaseSiTrackerRecHit2DLocalPos::getKfComponents(), HelpertRecHit2DLocalPos::getKfComponents(), GSSiTrackerRecHit2DLocalPos::getKfComponents(), BaseTrackerRecHit::getKfComponents1D(), BaseTrackerRecHit::getKfComponents2D(), TrackDetectorAssociator::getTAMuonChamberMatches(), CachedTrajectory::getWideTrajectory(), TkPixelMeasurementDet::hasBadComponents(), BaseTrackerRecHit::hasPositionAndError(), BaseSiTrackerRecHit2DLocalPos::hasPositionAndError(), TrackerMuonHitExtractor::init(), TrapezoidalPlaneBounds::inside(), CSCLayerGeometry::inside(), DTSegmentExtendedCand::isCompatible(), TrackerRecHit::largerError(), TrackerRecHit::localError(), TwoBodyDecayTrajectoryFactory::match(), GlobalMuonTrackMatcher::match_dist(), BarrelMeasurementEstimator::maximalLocalDisplacement(), ForwardMeasurementEstimator::maximalLocalDisplacement(), Chi2MeasurementEstimatorBase::maximalLocalDisplacement(), DTTopology::measurementError(), CSCRadialStripTopology::measurementError(), MuonResidualsFromTrack::MuonResidualsFromTrack(), operator<<(), GCC11_FINAL< T >::parametersError(), BeamSpotTransientTrackingRecHit::parametersError(), RecHit2DLocalPos::parametersError(), MuonTransientTrackingRecHit::parametersError(), KFBasedPixelFitter::MyBeamSpotHit::parametersError(), RecHit1D::parametersError(), DTSLRecCluster::parError(), HelpertRecHit2DLocalPos::parError(), HIPAlignmentAlgorithm::processHit1D(), HIPAlignmentAlgorithm::processHit2D(), MuonTrackProducer::produce(), AlignmentMuonHIPTrajectorySelector::produce(), TrackingRecHitProjector< ResultingHit >::project(), GSRecHitMatcher::projectOnly(), RecHitPropagator::propagate(), CSCSegAlgoST::prune_bad_hits(), CSCSegAlgoHitPruning::pruneBadHits(), DTRecHitQuality::recHitPositionError(), rotateCosSin(), RoadSearchTrackCandidateMakerAlgorithm::run(), TrackCandidateProducer::sameLocalParameters(), scale(), StateSegmentMatcher::setAPE2d(), StateSegmentMatcher::setAPE4d(), SiTrackerGaussianSmearingRecHitConverter::smearHits(), TrackEfficiencyMonitor::testTrackerTracks(), trajectoryToResiduals(), ErrorFrameTransformer::transform(), HelpertRecHit2DLocalPos::updateWithAPE(), SimpleNavigableLayer::wellInside(), and MuRodBarrelLayer::xError().

{ return thexx;}
float LocalError::xy ( ) const [inline]

Definition at line 25 of file LocalError.h.

References thexy.

Referenced by MuonCSCChamberResidual::addResidual(), TrackDetectorAssociator::addTAMuonSegmentMatch(), SiStripElectronAnalyzer::analyze(), SiStripRecHitsValid::analyze(), SiStripTrackingRecHitsValid::analyze(), CSCPairResidualsConstraint::calculatePhi(), CaloDetIdAssociator::crossedElement(), CSCValidation::doRecHits(), ReferenceTrajectory::fillMeasurementAndError(), CSCEfficiency::fillRechitsSegments_info(), SETFilter::findChi2(), CollinearFitAtTM2::fit(), CollinearFitAtTM::fit(), BaseSiTrackerRecHit2DLocalPos::getKfComponents(), HelpertRecHit2DLocalPos::getKfComponents(), GSSiTrackerRecHit2DLocalPos::getKfComponents(), BaseTrackerRecHit::getKfComponents2D(), CachedTrajectory::getWideTrajectory(), BaseTrackerRecHit::hasPositionAndError(), BaseSiTrackerRecHit2DLocalPos::hasPositionAndError(), TrackerRecHit::largerError(), TrackerRecHit::localError(), StripCPEfromTemplate::localParameters(), GlobalMuonTrackMatcher::match_dist(), CSCRadialStripTopology::measurementError(), operator<<(), GCC11_FINAL< T >::parametersError(), RecHit2DLocalPos::parametersError(), MuonTransientTrackingRecHit::parametersError(), HelpertRecHit2DLocalPos::parError(), HIPAlignmentAlgorithm::processHit2D(), AlignmentMuonHIPTrajectorySelector::produce(), TrackingRecHitProjector< ResultingHit >::project(), GSRecHitMatcher::projectOnly(), RecHitPropagator::propagate(), rotateCosSin(), TrackCandidateProducer::sameLocalParameters(), scale(), SiTrackerGaussianSmearingRecHitConverter::smearHits(), ErrorFrameTransformer::transform(), and HelpertRecHit2DLocalPos::updateWithAPE().

{ return thexy;}
float LocalError::yy ( ) const [inline]

Definition at line 26 of file LocalError.h.

References theyy.

Referenced by MuonCSCChamberResidual::addResidual(), TrackDetectorAssociator::addTAMuonSegmentMatch(), CkfDebugger::analyseCompatibleMeasurements(), SiStripElectronAnalyzer::analyze(), TrackerDpgAnalysis::analyze(), DTSegment4DQuality::analyze(), MuonIdVal::analyze(), SiPixelErrorEstimation::analyze(), SiPixelTrackingRecHitsValid::analyze(), SiStripRecHitsValid::analyze(), SiPixelRecHitSource::analyze(), MuonIdDQM::analyze(), SiStripTrackingRecHitsValid::analyze(), FWRPCRecHitProxyBuilder::buildViewType(), CSCPairResidualsConstraint::calculatePhi(), MuRingForwardDoubleLayer::compatible(), ForwardDetLayer::compatible(), MuRingForwardLayer::compatibleDets(), CaloDetIdAssociator::crossedElement(), OutsideInMuonSeeder::doLayer(), CSCValidation::doRecHits(), ConversionBarrelEstimator::estimate(), ConversionForwardEstimator::estimate(), AlignmentMonitorMuonResiduals::event(), AlignmentMonitorGeneric::event(), SiPixelRecHitsValid::fillBarrel(), SiPixelRecHitsValid::fillForward(), TrackerValidationVariables::fillHitQuantities(), ReferenceTrajectory::fillMeasurementAndError(), MuonIdProducer::fillMuonId(), CSCEfficiency::fillRechitsSegments_info(), RoadSearchTrackCandidateMakerAlgorithm::FindBestHits(), SETFilter::findChi2(), CollinearFitAtTM2::fit(), CollinearFitAtTM::fit(), GlobalTrajectoryBuilderBase::fixTEC(), BaseSiTrackerRecHit2DLocalPos::getKfComponents(), HelpertRecHit2DLocalPos::getKfComponents(), GSSiTrackerRecHit2DLocalPos::getKfComponents(), BaseTrackerRecHit::getKfComponents2D(), TrackDetectorAssociator::getTAMuonChamberMatches(), CachedTrajectory::getWideTrajectory(), TkPixelMeasurementDet::hasBadComponents(), BaseTrackerRecHit::hasPositionAndError(), BaseSiTrackerRecHit2DLocalPos::hasPositionAndError(), TrackerMuonHitExtractor::init(), RoadSearchTrackCandidateMakerAlgorithm::initialTrajectory(), TrapezoidalPlaneBounds::inside(), GCC11_FINAL< T >::inside(), CSCLayerGeometry::inside(), ShallowGainCalibration::IsFarFromBorder(), DeDxDiscriminatorTools::IsFarFromBorder(), SiStripGainFromData::IsFarFromBorder(), TrackerRecHit::largerError(), TrackerRecHit::localError(), StripCPEfromTemplate::localParameters(), TwoBodyDecayTrajectoryFactory::match(), GlobalMuonTrackMatcher::match_dist(), BarrelMeasurementEstimator::maximalLocalDisplacement(), ForwardMeasurementEstimator::maximalLocalDisplacement(), Chi2MeasurementEstimatorBase::maximalLocalDisplacement(), DTTopology::measurementError(), CSCRadialStripTopology::measurementError(), operator<<(), GCC11_FINAL< T >::parametersError(), RecHit2DLocalPos::parametersError(), MuonTransientTrackingRecHit::parametersError(), HelpertRecHit2DLocalPos::parError(), HIPAlignmentAlgorithm::processHit2D(), MuonTrackProducer::produce(), AlignmentMuonHIPTrajectorySelector::produce(), TrackingRecHitProjector< ResultingHit >::project(), GSRecHitMatcher::projectOnly(), RecHitPropagator::propagate(), rotateCosSin(), RoadSearchTrackCandidateMakerAlgorithm::run(), TrackCandidateProducer::sameLocalParameters(), scale(), StateSegmentMatcher::setAPE4d(), SiTrackerGaussianSmearingRecHitConverter::smearHits(), TrackEfficiencyMonitor::testTrackerTracks(), trajectoryToResiduals(), ErrorFrameTransformer::transform(), HelpertRecHit2DLocalPos::updateWithAPE(), and SimpleNavigableLayer::wellInside().

{ return theyy;}

Member Data Documentation

float LocalError::thexx [private]

Definition at line 58 of file LocalError.h.

Referenced by invalid(), and xx().

float LocalError::thexy [private]

Definition at line 59 of file LocalError.h.

Referenced by xy().

float LocalError::theyy [private]

Definition at line 60 of file LocalError.h.

Referenced by yy().