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),
std::remove_cv< typename std::remove_reference< argument_type >::type >::type key_type
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
virtual void putInEvt(edm::Event &, const Propagator *prop, const MeasurementTracker *measTk, std::unique_ptr< TrackingRecHitCollection > &, std::unique_ptr< reco::TrackCollection > &, std::unique_ptr< reco::TrackExtraCollection > &, std::unique_ptr< std::vector< Trajectory > > &, std::unique_ptr< std::vector< int > > &, AlgoProductCollection &, TransientTrackingRecHitBuilder const *, const TrackerTopology *ttopo, int BeforeOrAfter=0)
Put produced collections in the event.
GlobalPoint position() const
const GlobalTrajectoryParameters & globalParameters() const
void setSecondHitPattern(Trajectory *traj, reco::Track &track, const Propagator *prop, const MeasurementTrackerEvent *measTk, const TrackerTopology *ttopo)
edm::Ref< TrackExtraCollection > TrackExtraRef
persistent reference to a TrackExtra
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
GlobalVector momentum() const
edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::TrackCollection, unsigned short > > TrajTrackAssociationCollection
edm::InputTag clusterRemovalInfo_
RefProd< PROD > getRefBeforePut()
edm::EDGetTokenT< MeasurementTrackerEvent > mteSrc_
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
const CurvilinearTrajectoryError & curvilinearError() const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
std::vector< AlgoProduct > AlgoProductCollection
XYZPointD XYZPoint
point in space with cartesian internal representation
reco::TrackResiduals trajectoryToResiduals(const Trajectory &trajectory)
void reKey(TrackingRecHit *hit) const
edm::ESHandle< NavigationSchool > theSchool
edm::OrphanHandle< TrackCollection > rTracks_