15 using namespace pixeltrackfitting;
19 : theReconstruction(cfg, consumesCollector())
22 produces<reco::TrackCollection>();
23 produces<TrackingRecHitCollection>();
24 produces<reco::TrackExtraCollection>();
41 LogDebug(
"PixelTrackProducer, produce")<<
"event# :"<<ev.
id();
56 int cc = 0, nTracks = tracksWithHits.size();
58 for (
int i = 0;
i < nTracks;
i++)
63 for (
unsigned int k = 0;
k < hits.
size();
k++)
68 recHits->push_back(hit);
70 tracks->push_back(*track);
75 LogDebug(
"TrackProducer") <<
"put the collection of TrackingRecHit in the event" <<
"\n";
79 for (
int k = 0;
k < nTracks;
k++)
84 unsigned int nHits = tracks->at(
k).numberOfValidHits();
85 theTrackExtra.
setHits(hitCollProd, cc, nHits);
87 trackExtras->push_back(theTrackExtra);
90 LogDebug(
"TrackProducer") <<
"put the collection of TrackExtra in the event" <<
"\n";
93 for (
int k = 0;
k < nTracks;
k++)
96 (tracks->at(
k)).setExtra(theTrackExtraRef);
void init(const edm::EventSetup &es)
std::vector< Track > TrackCollection
collection of Tracks
virtual void endRun(const edm::Run &run, const edm::EventSetup &es) override
std::vector< TrackWithTTRHs > TracksWithTTRHs
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual void beginRun(const edm::Run &run, const edm::EventSetup &es) override
bool appendHitPattern(const TrackingRecHit &hit)
append a single hit to the HitPattern
virtual void produce(edm::Event &ev, const edm::EventSetup &es) override
void run(pixeltrackfitting::TracksWithTTRHs &tah, edm::Event &ev, const edm::EventSetup &es)
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
edm::OwnVector< TrackingRecHit > TrackingRecHitCollection
collection of TrackingRecHits
PixelTrackReconstruction theReconstruction
unsigned int size() const
void store(edm::Event &ev, const pixeltrackfitting::TracksWithTTRHs &selectedTracks)
PixelTrackProducer(const edm::ParameterSet &conf)