CMS 3D CMS Logo

SeedGenerator Class Reference

#include <RecoPixelVertexing/PixelLowPtUtilities/interface/SeedGenerator.h>

List of all members.

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 TrackerGeometrytheTracker


Detailed Description

Definition at line 23 of file SeedGenerator.h.


Constructor & Destructor Documentation

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 (  ) 

Definition at line 51 of file SeedGenerator.cc.

00052 {
00053 }


Member Function Documentation

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 }


Member Data Documentation

const TrackerGeometry* SeedGenerator::theTracker [private]

Definition at line 31 of file SeedGenerator.h.

Referenced by SortByRadius::operator()(), seed(), and SeedGenerator().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:31:15 2009 for CMSSW by  doxygen 1.5.4