#include <RecoPixelVertexing/PixelLowPtUtilities/interface/SeedGenerator.h>
Public Member Functions | |
TrajectorySeed | seed (const reco::Track &recTrack, const edm::EventSetup &es, const edm::ParameterSet &ps) |
SeedGenerator (const edm::EventSetup &es) | |
~SeedGenerator () | |
Private Attributes | |
const TrackerGeometry * | theTracker |
Definition at line 23 of file SeedGenerator.h.
SeedGenerator::SeedGenerator | ( | const edm::EventSetup & | es | ) |
Definition at line 43 of file SeedGenerator.cc.
References edm::EventSetup::get(), edm::ESHandle< T >::product(), and theTracker.
00044 { 00045 edm::ESHandle<TrackerGeometry> tracker; 00046 es.get<TrackerDigiGeometryRecord>().get(tracker); 00047 theTracker = tracker.product(); 00048 }
SeedGenerator::~SeedGenerator | ( | ) |
TrajectorySeed SeedGenerator::seed | ( | const reco::Track & | recTrack, | |
const edm::EventSetup & | es, | |||
const edm::ParameterSet & | ps | |||
) |
Definition at line 81 of file SeedGenerator.cc.
References SeedFromConsecutiveHits::isValid(), reco::Track::recHit(), reco::Track::recHitsSize(), python::multivaluedict::sort(), theTracker, SeedFromConsecutiveHits::TrajSeed(), and reco::TrackBase::vertex().
Referenced by SeedProducer::produce().
00083 { 00084 vector<const TrackingRecHit *> hits; 00085 for (unsigned int iHit = 0, nHits = track.recHitsSize(); 00086 iHit < nHits; ++iHit) 00087 { 00088 TrackingRecHitRef refHit = track.recHit(iHit); 00089 if(refHit->isValid()) 00090 hits.push_back(&(*refHit)); 00091 } 00092 00093 sort(hits.begin(), hits.end(), SortByRadius(theTracker)); 00094 00095 GlobalPoint vtx(track.vertex().x(), 00096 track.vertex().y(), 00097 track.vertex().z()); 00098 double originRBound = 0.2; 00099 double originZBound = 0.2; 00100 GlobalError vtxerr( originRBound*originRBound, 0, originRBound*originRBound, 00101 0, 0, originZBound*originZBound ); 00102 00103 SeedFromConsecutiveHits seedFromHits(hits, vtx, vtxerr, es,ps); 00104 00105 if(seedFromHits.isValid()) 00106 { 00107 return seedFromHits.TrajSeed(); 00108 } 00109 else 00110 { 00111 return TrajectorySeed(); 00112 } 00113 }
const TrackerGeometry* SeedGenerator::theTracker [private] |
Definition at line 31 of file SeedGenerator.h.
Referenced by SortByRadius::operator()(), seed(), and SeedGenerator().