1 #ifndef RecoPixelVertexingPixelTrackFittingStoreTracks_H
2 #define RecoPixelVertexingPixelTrackFittingStoreTracks_H
19 template <
typename Ev,
typename TWH>
21 auto tracks = std::make_unique<reco::TrackCollection>();
22 auto recHits = std::make_unique<TrackingRecHitCollection>();
23 auto trackExtras = std::make_unique<reco::TrackExtraCollection>();
25 int cc = 0,
nTracks = tracksWithHits.size();
33 const auto&
hits = tracksWithHits[
i].second;
35 for (
unsigned int k = 0;
k <
hits.size();
k++) {
37 track->appendHitPattern(*
hit, ttopo);
44 LogDebug(
"TrackProducer") <<
"put the collection of TrackingRecHit in the event"
50 auto& aTrackExtra = (*trackExtras)[
k];
53 unsigned int nHits = (*tracks)[
k].numberOfValidHits();
54 aTrackExtra.setHits(hitCollProd,
cc,
nHits);
62 LogDebug(
"TrackProducer") <<
"put the collection of TrackExtra in the event"
68 (*tracks)[
k].setExtra(theTrackExtraRef);