#include <SeedFromProtoTrack.h>
Public Member Functions | |
bool | isValid () const |
SeedFromProtoTrack (const reco::Track &proto, const SeedingHitSet &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 const & | trajectoryState () const |
Private Attributes | |
RecHitContainer | theHits |
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 32 of file SeedFromProtoTrack.cc.
References TrackingRecHit::clone(), init(), edm::OwnVector< T, P >::push_back(), reco::Track::recHit(), reco::Track::recHitsSize(), and theHits.
: theValid(true) { const TrackingRecHit* hit = 0; for (unsigned int iHit = 0, nHits = proto.recHitsSize(); iHit < nHits; ++iHit) { TrackingRecHitRef refHit = proto.recHit(iHit); hit = &(*refHit); theHits.push_back( hit->clone() ); } init(proto,es); }
SeedFromProtoTrack::SeedFromProtoTrack | ( | const reco::Track & | proto, |
const SeedingHitSet & | hits, | ||
const edm::EventSetup & | es | ||
) |
Definition at line 21 of file SeedFromProtoTrack.cc.
References TrackingRecHit::clone(), i, init(), n, edm::OwnVector< T, P >::push_back(), SeedingHitSet::size(), and theHits.
SeedFromProtoTrack::~SeedFromProtoTrack | ( | ) | [inline] |
Definition at line 21 of file SeedFromProtoTrack.h.
{}
PropagationDirection SeedFromProtoTrack::direction | ( | ) | const [inline, private] |
Definition at line 31 of file SeedFromProtoTrack.h.
References alongMomentum.
Referenced by trajectorySeed().
{ return alongMomentum; }
const RecHitContainer& SeedFromProtoTrack::hits | ( | ) | const [inline, private] |
Definition at line 37 of file SeedFromProtoTrack.h.
References theHits.
Referenced by trajectorySeed().
{ return theHits; }
void SeedFromProtoTrack::init | ( | const reco::Track & | proto, |
const edm::EventSetup & | es | ||
) | [private] |
Definition at line 45 of file SeedFromProtoTrack.cc.
References edm::OwnVector< T, P >::back(), reco::TrackBase::charge(), reco::TrackBase::covariance(), TrackingRecHit::geographicalId(), edm::EventSetup::get(), TrajectoryStateOnSurface::isValid(), reco::TrackBase::momentum(), trajectoryStateTransform::persistentState(), GloballyPositioned< T >::position(), Propagator::propagate(), LargeD0_PixelPairStep_cff::propagator, DetId::rawId(), reco::TrackBase::referencePoint(), theHits, thePTraj, theValid, and patCandidatesForDimuonsSequences_cff::tracker.
Referenced by SeedFromProtoTrack().
{ edm::ESHandle<TrackerGeometry> tracker; es.get<TrackerDigiGeometryRecord>().get(tracker); edm::ESHandle<Propagator> propagatorHandle; es.get<TrackingComponentsRecord>().get("PropagatorWithMaterial",propagatorHandle); const Propagator* propagator = &(*propagatorHandle); edm::ESHandle<MagneticField> field; es.get<IdealMagneticFieldRecord>().get(field); reco::TrackBase::Point vtx = proto.referencePoint(); reco::TrackBase::Vector mom = proto.momentum(); GlobalTrajectoryParameters gtp( GlobalPoint(vtx.x(),vtx.y(),vtx.z()), GlobalVector(mom.x(),mom.y(),mom.z()), proto.charge(), &(*field) ); CurvilinearTrajectoryError err = proto.covariance(); FreeTrajectoryState fts( gtp, err); const TrackingRecHit & lastHit = theHits.back(); TrajectoryStateOnSurface outerState = propagator->propagate(fts, tracker->idToDet(lastHit.geographicalId())->surface()); if (!outerState.isValid()){ const Surface & surface = tracker->idToDet(lastHit.geographicalId())->surface(); edm::LogError("SeedFromProtoTrack")<<" was trying to create a seed from:\n"<<fts<<"\n propagating to: "<<lastHit.geographicalId()<<surface.position(); theValid = false; return ; } theValid = true; thePTraj = trajectoryStateTransform::persistentState(outerState, lastHit.geographicalId().rawId()); }
bool SeedFromProtoTrack::isValid | ( | void | ) | const [inline] |
Definition at line 25 of file SeedFromProtoTrack.h.
References theValid.
Referenced by TSGFromL1Muon::produce(), and SeedGeneratorFromProtoTracksEDProducer::produce().
{ return theValid; }
TrajectorySeed SeedFromProtoTrack::trajectorySeed | ( | ) | const |
Definition at line 86 of file SeedFromProtoTrack.cc.
References direction(), hits(), and trajectoryState().
Referenced by TSGFromL1Muon::produce(), and SeedGeneratorFromProtoTracksEDProducer::produce().
{ return TrajectorySeed( trajectoryState(), hits(), direction()); }
PTrajectoryStateOnDet const& SeedFromProtoTrack::trajectoryState | ( | ) | const [inline, private] |
Definition at line 33 of file SeedFromProtoTrack.h.
References thePTraj.
Referenced by trajectorySeed().
{ return thePTraj; }
RecHitContainer SeedFromProtoTrack::theHits [private] |
Definition at line 42 of file SeedFromProtoTrack.h.
Referenced by hits(), init(), and SeedFromProtoTrack().
Definition at line 43 of file SeedFromProtoTrack.h.
Referenced by init(), and trajectoryState().
bool SeedFromProtoTrack::theValid [private] |
Definition at line 41 of file SeedFromProtoTrack.h.