24 std::unique_ptr<TrackingRecHitCollection>& selHits,
25 std::unique_ptr<reco::TrackCollection>& selTracks,
26 std::unique_ptr<reco::TrackExtraCollection>& selTrackExtras,
39 std::map<unsigned int, unsigned int> tjTkMap;
41 selTracks->reserve(algoResults.size());
42 selTrackExtras->reserve(algoResults.size());
44 selTrajectories->reserve(algoResults.size());
46 for (AlgoProductCollection::iterator
i = algoResults.begin();
i != algoResults.end();
i++) {
47 auto theTraj = (*i).trajectory;
48 (*indecesInput).push_back((*i).indexInput);
50 selTrajectories->push_back(*theTraj);
54 auto theTrack = (*i).track;
64 LogDebug(
"TrackProducer") <<
"In KfTrackProducerBase::putInEvt - seedDir=" << seedDir;
66 selTracks->push_back(
std::move(*theTrack));
72 tjTkMap[iTjRef - 1] = iTkRef - 1;
77 unsigned int innerId, outerId;
82 outertsos = theTraj->lastMeasurement().updatedState();
83 innertsos = theTraj->firstMeasurement().updatedState();
84 outerId = theTraj->lastMeasurement().recHit()->geographicalId().rawId();
85 innerId = theTraj->firstMeasurement().recHit()->geographicalId().rawId();
87 outertsos = theTraj->firstMeasurement().updatedState();
88 innertsos = theTraj->lastMeasurement().updatedState();
89 outerId = theTraj->firstMeasurement().recHit()->geographicalId().rawId();
90 innerId = theTraj->lastMeasurement().recHit()->geographicalId().rawId();
105 track.setExtra(teref);
126 theTraj->seedRef()));
137 auto ih = selHits->size();
138 t2t(*theTraj, *selHits, trajParams, chi2s);
139 auto ie = selHits->size();
140 tx.
setHits(rHits, ih, ie - ih);
143 for (; ih < ie; ++ih) {
144 auto const&
hit = (*selHits)[ih];
145 track.appendHitPattern(
hit, *ttopo);
157 for (TrackingRecHitCollection::iterator it = selHits->begin(), ed = selHits->end(); it != ed; ++it) {
158 refSetter.
reKey(&*it);
162 LogTrace(
"TrackingRegressionTest") <<
"========== TrackProducer Info ===================";
163 LogTrace(
"TrackingRegressionTest") <<
"number of finalTracks: " << selTracks->size();
164 for (reco::TrackCollection::const_iterator it = selTracks->begin(); it != selTracks->end(); it++) {
165 LogTrace(
"TrackingRegressionTest") <<
"track's n valid and invalid hit, chi2, pt, eta : " << it->found() <<
" , "
166 << it->lost() <<
" , " << it->normalizedChi2() <<
" , " << it->pt() <<
" , "
169 LogTrace(
"TrackingRegressionTest") <<
"=================================================";
171 selTracks->shrink_to_fit();
172 selTrackExtras->shrink_to_fit();
173 selHits->shrink_to_fit();
174 indecesInput->shrink_to_fit();
175 if (BeforeOrAfter == 1) {
179 }
else if (BeforeOrAfter == 2) {
191 selTrajectories->shrink_to_fit();
196 for (std::map<unsigned int, unsigned int>::iterator
i = tjTkMap.begin();
i != tjTkMap.end();
i++) {
199 trajTrackMap->insert(
edm::Ref<std::vector<Trajectory> >(rTrajs, (*i).first),