#include <RecoTracker/TkSeedGenerator/interface/SeedFromProtoTrack.h>
Public Member Functions | |
bool | isValid () const |
SeedFromProtoTrack (const reco::Track &proto, const std::vector< ctfseeding::SeedingHit > &hits, const edm::EventSetup &es) | |
SeedFromProtoTrack (const reco::Track &proto, const edm::EventSetup &) | |
TrajectorySeed | trajectorySeed () const |
~SeedFromProtoTrack () | |
Private Types | |
typedef edm::OwnVector < TrackingRecHit > | RecHitContainer |
Private Member Functions | |
PropagationDirection | direction () const |
const RecHitContainer & | hits () const |
void | init (const reco::Track &proto, const edm::EventSetup &es) |
PTrajectoryStateOnDet | trajectoryState () const |
Private Attributes | |
RecHitContainer | theHits |
boost::shared_ptr < PTrajectoryStateOnDet > | thePTraj |
bool | theValid |
Definition at line 13 of file SeedFromProtoTrack.h.
typedef edm::OwnVector<TrackingRecHit> SeedFromProtoTrack::RecHitContainer [private] |
Definition at line 36 of file SeedFromProtoTrack.h.
SeedFromProtoTrack::SeedFromProtoTrack | ( | const reco::Track & | proto, | |
const edm::EventSetup & | es | |||
) |
Definition at line 30 of file SeedFromProtoTrack.cc.
References TrackingRecHit::clone(), init(), edm::OwnVector< T, P >::push_back(), reco::Track::recHit(), reco::Track::recHitsSize(), and theHits.
00031 : theValid(true) 00032 { 00033 const TrackingRecHit* hit = 0; 00034 for (unsigned int iHit = 0, nHits = proto.recHitsSize(); iHit < nHits; ++iHit) { 00035 TrackingRecHitRef refHit = proto.recHit(iHit); 00036 hit = &(*refHit); 00037 theHits.push_back( hit->clone() ); 00038 } 00039 init(proto,es); 00040 }
SeedFromProtoTrack::SeedFromProtoTrack | ( | const reco::Track & | proto, | |
const std::vector< ctfseeding::SeedingHit > & | hits, | |||
const edm::EventSetup & | es | |||
) |
Definition at line 19 of file SeedFromProtoTrack.cc.
References TrackingRecHit::clone(), i, init(), n, edm::OwnVector< T, P >::push_back(), and theHits.
00021 : theValid(true) 00022 { 00023 for (unsigned int i= 0, n = hits.size(); i< n; ++i) { 00024 const TrackingRecHit * trh = hits[i]; 00025 theHits.push_back( trh->clone() ); 00026 } 00027 init(proto, es); 00028 }
SeedFromProtoTrack::~SeedFromProtoTrack | ( | ) | [inline] |
PropagationDirection SeedFromProtoTrack::direction | ( | void | ) | const [inline, private] |
Definition at line 31 of file SeedFromProtoTrack.h.
References alongMomentum.
Referenced by trajectorySeed().
00031 { return alongMomentum; }
const RecHitContainer& SeedFromProtoTrack::hits | ( | ) | const [inline, private] |
Definition at line 37 of file SeedFromProtoTrack.h.
References theHits.
Referenced by trajectorySeed().
00037 { return theHits; }
void SeedFromProtoTrack::init | ( | const reco::Track & | proto, | |
const edm::EventSetup & | es | |||
) | [private] |
Definition at line 43 of file SeedFromProtoTrack.cc.
References edm::OwnVector< T, P >::back(), reco::TrackBase::charge(), reco::TrackBase::covariance(), err, TrackingRecHit::geographicalId(), edm::EventSetup::get(), reco::TrackBase::momentum(), TrajectoryStateTransform::persistentState(), Propagator::propagate(), DetId::rawId(), reco::TrackBase::referencePoint(), theHits, and thePTraj.
Referenced by SeedFromProtoTrack().
00044 { 00045 edm::ESHandle<TrackerGeometry> tracker; 00046 es.get<TrackerDigiGeometryRecord>().get(tracker); 00047 00048 edm::ESHandle<Propagator> propagatorHandle; 00049 es.get<TrackingComponentsRecord>().get("PropagatorWithMaterial",propagatorHandle); 00050 const Propagator* propagator = &(*propagatorHandle); 00051 00052 edm::ESHandle<MagneticField> field; 00053 es.get<IdealMagneticFieldRecord>().get(field); 00054 00055 reco::TrackBase::Point vtx = proto.referencePoint(); 00056 reco::TrackBase::Vector mom = proto.momentum(); 00057 GlobalTrajectoryParameters gtp( 00058 GlobalPoint(vtx.x(),vtx.y(),vtx.z()), 00059 GlobalVector(mom.x(),mom.y(),mom.z()), 00060 proto.charge(), &(*field) ); 00061 00062 CurvilinearTrajectoryError err = proto.covariance(); 00063 00064 FreeTrajectoryState fts( gtp, err); 00065 00066 const TrackingRecHit & lastHit = theHits.back(); 00067 00068 TrajectoryStateOnSurface outerState = 00069 propagator->propagate(fts, tracker->idToDet(lastHit.geographicalId())->surface()); 00070 00071 TrajectoryStateTransform transformer; 00072 thePTraj = boost::shared_ptr<PTrajectoryStateOnDet>( 00073 transformer.persistentState(outerState, lastHit.geographicalId().rawId()) ); 00074 00075 00076 }
Definition at line 25 of file SeedFromProtoTrack.h.
References theValid.
Referenced by TSGFromL1Muon::produce(), and SeedGeneratorFromProtoTracksEDProducer::produce().
00025 { return theValid; }
TrajectorySeed SeedFromProtoTrack::trajectorySeed | ( | ) | const |
Definition at line 78 of file SeedFromProtoTrack.cc.
References direction(), hits(), and trajectoryState().
Referenced by TSGFromL1Muon::produce(), and SeedGeneratorFromProtoTracksEDProducer::produce().
00079 { 00080 return TrajectorySeed( trajectoryState(), hits(), direction()); 00081 }
PTrajectoryStateOnDet SeedFromProtoTrack::trajectoryState | ( | ) | const [inline, private] |
Definition at line 33 of file SeedFromProtoTrack.h.
References thePTraj.
Referenced by trajectorySeed().
00033 { return *thePTraj; }
RecHitContainer SeedFromProtoTrack::theHits [private] |
Definition at line 42 of file SeedFromProtoTrack.h.
Referenced by hits(), init(), and SeedFromProtoTrack().
boost::shared_ptr<PTrajectoryStateOnDet> SeedFromProtoTrack::thePTraj [private] |
bool SeedFromProtoTrack::theValid [private] |