39 produces<reco::TrackCollection>();
40 produces<TrackingRecHitCollection>();
41 produces<reco::TrackExtraCollection>();
46 regfactoryPSet, consumesCollector());
73 typedef std::vector<const TrackingRecHit *> RecHits;
94 if(theSeeds->empty()) {
104 typedef std::vector<std::unique_ptr<TrackingRegion> > Regions;
105 typedef Regions::const_iterator IR;
107 for (IR ir=regions.begin(), irEnd=regions.end(); ir < irEnd; ++ir) {
111 TrajectorySeedCollection::const_iterator aSeed = theSeeds->begin();
112 TrajectorySeedCollection::const_iterator lastSeed = theSeeds->end();
113 for ( ; aSeed!=lastSeed; ++aSeed ) {
121 std::vector<const TrackingRecHit*> TripletHits(3,static_cast<const TrackingRecHit*>(
nullptr));
122 for (
unsigned i=0; aSeedingRecHit!=theLastSeedingRecHit; ++
i,++aSeedingRecHit )
123 TripletHits[
i] = &(*aSeedingRecHit);
126 std::unique_ptr<reco::Track>
track = fitter.
run(TripletHits, region);
129 if ( ! theFilter(track.get(), TripletHits) ) {
140 int nTracks = pixeltracks.size();
144 const RecHits &
hits = pixeltracks.at(
i).second;
146 for (
unsigned int k = 0;
k < hits.size();
k++) {
149 recHits->push_back(hit);
152 tracks->push_back(*track);
167 const unsigned nHits = 3;
168 theTrackExtra.
setHits( ohRHProd, cc, nHits);
171 trackExtras->push_back(theTrackExtra);
181 (tracks->at(
k)).setExtra(theTrackExtraRef);
T getParameter(std::string const &) const
void produce(edm::Event &ev, const edm::EventSetup &es) override
const unsigned int nTracks(const reco::Vertex &sv)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
PixelTracksProducer(const edm::ParameterSet &conf)
std::vector< Track > TrackCollection
collection of Tracks
TrackingRegionProducer * theRegionProducer
edm::EDGetTokenT< TrajectorySeedCollection > seedProducerToken
edm::EDGetTokenT< PixelTrackFilter > filterToken
std::pair< const_iterator, const_iterator > range
std::pair< reco::Track *, std::vector< const TrackingRecHit * > > TrackWithRecHits
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
virtual std::vector< std::unique_ptr< TrackingRegion > > regions(const edm::Event &ev, const edm::EventSetup &es) const =0
std::unique_ptr< reco::Track > run(const std::vector< const TrackingRecHit * > &hits, const TrackingRegion ®ion) const
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
bool appendHitPattern(const TrackingRecHit &hit, const TrackerTopology &ttopo)
append a single hit to the HitPattern
std::vector< TrackWithRecHits > TracksWithRecHits
edm::EDGetTokenT< PixelFitter > fitterToken
T get(const Candidate &c)
~PixelTracksProducer() override