Do I understand correctly that you are saying that I should change:
<pre>
NewTrackExtraList_->push_back(tracksExtras->at(track_counter));
</pre>
into:
<pre>
NewTrackExtraList_->push_back( reco::TrackExtra( track.outerPosition(), track.outerMomentum(), track.outerOk(),
                                                       track.innerPosition(), track.innerMomentum(), track.innerOk(),
                                                       track.outerStateCovariance(), track.outerDetId(),
                                                       track.innerStateCovariance(), track.innerDetId(),
                                                       track.seedDirection(), track.seedRef() ) );
</pre>

This was something that I had tried before. If I try that again, I still get:

<pre>
Exception Message:
RefCore: A request to resolve a reference to a product of type 'std::vector<reco::TrackExtra>' with ProductID '1:918'
can not be satisfied because the product cannot be found.
Probably the branch containing the product is not stored in the input file.
</pre>

But maybe I am misinterpreting your suggestion?

Another thing, I don't know if possibly related to the issue: the "for" loop of the TrackingRecHits is only made to have a hit counter, and the hits that are accessed are not those associated to the track, but those in the general hits collection (indeed, the trackingRecHit_iterator is actually never used). This can work only if the ordering of the hits collection is somehow the same as the ordering of the tracks and of the hits associated to the tracks. Is this the case? How to check?