CMS 3D CMS Logo

Functions

trajectoryStateTransform Namespace Reference

Functions

FreeTrajectoryState initialFreeState (const reco::Track &tk, const MagneticField *field)
FreeTrajectoryState innerFreeState (const reco::Track &tk, const MagneticField *field)
TrajectoryStateOnSurface innerStateOnSurface (const reco::Track &tk, const TrackingGeometry &geom, const MagneticField *field)
FreeTrajectoryState outerFreeState (const reco::Track &tk, const MagneticField *field)
TrajectoryStateOnSurface outerStateOnSurface (const reco::Track &tk, const TrackingGeometry &geom, const MagneticField *field)
PTrajectoryStateOnDet persistentState (const TrajectoryStateOnSurface &ts, unsigned int detid)
TrajectoryStateOnSurface transientState (const PTrajectoryStateOnDet &ts, const Surface *surface, const MagneticField *field)

Function Documentation

FreeTrajectoryState trajectoryStateTransform::initialFreeState ( const reco::Track tk,
const MagneticField field 
)
FreeTrajectoryState trajectoryStateTransform::innerFreeState ( const reco::Track tk,
const MagneticField field 
)
TrajectoryStateOnSurface trajectoryStateTransform::innerStateOnSurface ( const reco::Track tk,
const TrackingGeometry geom,
const MagneticField field 
)
FreeTrajectoryState trajectoryStateTransform::outerFreeState ( const reco::Track tk,
const MagneticField field 
)
TrajectoryStateOnSurface trajectoryStateTransform::outerStateOnSurface ( const reco::Track tk,
const TrackingGeometry geom,
const MagneticField field 
)
PTrajectoryStateOnDet trajectoryStateTransform::persistentState ( const TrajectoryStateOnSurface ts,
unsigned int  detid 
)

should check if corresponds to m

should check if corresponds to m

Definition at line 16 of file TrajectoryStateTransform.cc.

References cond::rpcobgas::detid, TrajectoryStateOnSurface::hasError(), i, j, gen::k, TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), m, LocalTrajectoryError::matrix(), and TrajectoryStateOnSurface::surfaceSide().

Referenced by SiStripElectronSeedGenerator::altCheckHitsAndTSOS(), SeedForPhotonConversion1Leg::buildSeed(), SeedFromConsecutiveHitsCreator::buildSeed(), SeedFromGenericPairOrTriplet::buildSeed(), SeedForPhotonConversionFromQuadruplets::buildSeed(), SiStripElectronSeedGenerator::checkHitsAndTSOS(), SeedFromNuclearInteraction::construct(), RPCSeedPattern::createFakeSeed(), MuonSeedCreator::createSeed(), TSGFromPropagation::createSeed(), FastTSGFromPropagation::createSeed(), RPCSeedPattern::createSeed(), OutInConversionSeedFinder::createSeed(), InOutConversionSeedFinder::createSeed(), MuonSeedFromRecHits::createSeed(), RoadSearchTrackCandidateMakerAlgorithm::createSeedTrajectory(), SiStripElectronAlgo::findElectron(), SeedFromProtoTrack::init(), reco::modules::CosmicTrackSplitter::makeCandidate(), reco::modules::TrackerTrackHitFilter::makeCandidate(), SETSeedFinder::makeSeed(), GlobalTrackerMuonAlignment::muonFitter(), ElectronSeedGenerator::prepareElTrackSeed(), FastElectronSeedGenerator::prepareElTrackSeed(), RoadSearchTrackCandidateMakerAlgorithm::PrepareTrackCandidates(), L2MuonSeedGenerator::produce(), TrajectorySeedFromMuonProducer::produce(), TrackCandidateProducer::produce(), SETMuonSeedProducer::produce(), TrackerToMuonPropagator::produce(), cms::CosmicTrackFinder::produce(), ConvBremSeedProducer::produce(), CSCOverlapsTrackPreparation::produce(), cms::CkfTrackCandidateMakerBase::produceBase(), TSGForRoadSearch::pushTrajectorySeed(), KalmanAlignmentTrackRefitter::refitSingleTracklet(), TrackInfoProducerAlgorithm::run(), RoadSearchTrackCandidateMakerAlgorithm::run(), SeedGeneratorForCRack::seeds(), SimpleCosmicBONSeeder::seeds(), SeedGeneratorForCosmics::seeds(), GlobalTrackerMuonAlignment::trackFitter(), OutInConversionTrackFinder::tracks(), InOutConversionTrackFinder::tracks(), StandAloneMuonTrajectoryBuilder::trajectories(), CosmicSeedCreator::trajectorySeed(), and CosmicMuonSeedGenerator::tsosToSeed().

  {
    int surfaceSide = static_cast<int>(ts.surfaceSide());
    
    if (ts.hasError()) {
      AlgebraicSymMatrix55 m = ts.localError().matrix();
      
      int dim = 5; 
      float localErrors[15];
      
      int k = 0;
      for (int i=0; i<dim; i++) {
        for (int j=0; j<=i; j++) {
          localErrors[k++] = m(i,j);
        }
      }
    return PTrajectoryStateOnDet(ts.localParameters(),
                                 localErrors, detid,
                                 surfaceSide);
    }
    return PTrajectoryStateOnDet(ts.localParameters(),
                                 detid,
                                 surfaceSide);
  }
TrajectoryStateOnSurface trajectoryStateTransform::transientState ( const PTrajectoryStateOnDet ts,
const Surface surface,
const MagneticField field 
)

Definition at line 43 of file TrajectoryStateTransform.cc.

References PTrajectoryStateOnDet::error(), PTrajectoryStateOnDet::hasError(), i, j, gen::k, m, PTrajectoryStateOnDet::parameters(), and PTrajectoryStateOnDet::surfaceSide().

Referenced by SiPixelTrackResidualSource::analyze(), TestHits::analyze(), TrackBuildingAnalyzer::analyze(), ElectronSeedAnalyzer::analyze(), TestSmoothHits::analyze(), TrackerSeedCleaner::clean(), MuonCkfTrajectoryBuilder::findCompatibleMeasurements(), BaseCkfTrajectoryBuilder::findStateAndLayers(), MuonTrackAnalyzer::getSeedTSOS(), MuonSeedsAnalyzer::getSeedTSOS(), MuonSeedTrack::getSeedTSOS(), ConversionSeedFilter::getTSOS(), MuonRoadTrajectoryBuilder::makeTrajectories_0(), CtfSpecialSeedGenerator::postCheck(), TrackCandidateProducer::produce(), TrackProducerWithSCAssociation::produce(), ConversionSeedFilterCharge::produce(), BaseCkfTrajectoryBuilder::seedMeasurements(), MuonSeedCleaner::SeedMomentum(), MuonSeedCleaner::SeedPosition(), SeedTransformer::seedTransientState(), StartingLayerFinder::startingLayers(), CRackTrajectoryBuilder::startingTSOS(), CosmicTrajectoryBuilder::startingTSOS(), FastTSGFromPropagation::trackerSeeds(), and CosmicMuonTrajectoryBuilder::trajectories().

  {
    AlgebraicSymMatrix55 m;
    bool errInv=true;
    if (ts.hasError()) {
      errInv = false;
      int dim = 5;
      int k = 0;
      for (int i=0; i<dim; i++) {
        for (int j=0; j<=i; j++) {
          m(i,j) = ts.error(k++);       // NOTE: here we do a cast float => double.     
        }
      }
    }
    
    
    return TrajectoryStateOnSurface( ts.parameters(),
                                     errInv ? LocalTrajectoryError(InvalidError()) : LocalTrajectoryError(m),
                                     *surface, field,
                                     static_cast<SurfaceSide>(ts.surfaceSide()));
    
}