25 std::unique_ptr<TrackingRecHitCollection>& selHits,
26 std::unique_ptr<reco::TrackCollection>& selTracks,
27 std::unique_ptr<reco::TrackExtraCollection>& selTrackExtras,
28 std::unique_ptr<std::vector<Trajectory> >& selTrajectories,
29 std::unique_ptr<std::vector<int> >& indecesInput,
42 std::map<unsigned int, unsigned int> tjTkMap;
44 selTracks->reserve(algoResults.size());
45 selTrackExtras->reserve(algoResults.size());
48 for(AlgoProductCollection::iterator
i=algoResults.begin();
i!=algoResults.end();
i++){
49 auto theTraj = (*i).trajectory;
50 (*indecesInput).push_back((*i).indexInput);
52 selTrajectories->push_back(*theTraj);
57 auto theTrack = (*i).track;
67 LogDebug(
"TrackProducer") <<
"In KfTrackProducerBase::putInEvt - seedDir=" << seedDir;
70 selTracks->push_back(
std::move(*theTrack));
80 unsigned int innerId, outerId;
85 outertsos = theTraj->lastMeasurement().updatedState();
86 innertsos = theTraj->firstMeasurement().updatedState();
87 outerId = theTraj->lastMeasurement().recHit()->geographicalId().rawId();
88 innerId = theTraj->firstMeasurement().recHit()->geographicalId().rawId();
90 outertsos = theTraj->firstMeasurement().updatedState();
91 innertsos = theTraj->lastMeasurement().updatedState();
92 outerId = theTraj->firstMeasurement().recHit()->geographicalId().rawId();
93 innerId = theTraj->lastMeasurement().recHit()->geographicalId().rawId();
119 selTrackExtras->push_back(
reco::TrackExtra (outpos, outmom,
true, inpos, inmom,
true,
122 seedDir, theTraj->seedRef()));
133 auto ih = selHits->size();
134 t2t(*theTraj,*selHits,trajParams,chi2s);
135 auto ie = selHits->size();
140 auto const &
hit = (*selHits)[ih];
153 for (TrackingRecHitCollection::iterator it = selHits->begin(), ed = selHits->end(); it != ed; ++it) {
154 refSetter.
reKey(&*it);
158 LogTrace(
"TrackingRegressionTest") <<
"========== TrackProducer Info ===================";
159 LogTrace(
"TrackingRegressionTest") <<
"number of finalTracks: " << selTracks->size();
160 for (reco::TrackCollection::const_iterator it = selTracks->begin(); it != selTracks->end(); it++) {
161 LogTrace(
"TrackingRegressionTest") <<
"track's n valid and invalid hit, chi2, pt, eta : "
162 << it->found() <<
" , "
163 << it->lost() <<
" , "
164 << it->normalizedChi2() <<
" , "
168 LogTrace(
"TrackingRegressionTest") <<
"=================================================";
170 selTracks->shrink_to_fit();
171 selTrackExtras->shrink_to_fit();
172 selHits->shrink_to_fit();
173 indecesInput->shrink_to_fit();
174 if(BeforeOrAfter == 1){
178 }
else if (BeforeOrAfter == 2){
191 selTrajectories->shrink_to_fit();
196 for ( std::map<unsigned int, unsigned int>::iterator
i = tjTkMap.begin();
197 i != tjTkMap.end();
i++ ) {
200 trajTrackMap->insert(
edm::Ref<std::vector<Trajectory> >( rTrajs, (*i).first ),
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.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::InputTag clusterRemovalInfo_
const CurvilinearTrajectoryError & curvilinearError() const
void reKey(TrackingRecHit *hit) 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
GlobalVector momentum() const
edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::TrackCollection, unsigned short > > TrajTrackAssociationCollection
RefProd< PROD > getRefBeforePut()
GlobalPoint position() const
edm::EDGetTokenT< MeasurementTrackerEvent > mteSrc_
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
void setExtra(const TrackExtraRef &ref)
set reference to "extra" object
const GlobalTrajectoryParameters & globalParameters() const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
reco::TrackResiduals trajectoryToResiduals(const Trajectory &trajectory)
bool appendHitPattern(const TrackingRecHit &hit, const TrackerTopology &ttopo)
append a single hit to the HitPattern
std::vector< AlgoProduct > AlgoProductCollection
edm::ESHandle< NavigationSchool > theSchool
edm::OrphanHandle< TrackCollection > rTracks_
boost::remove_cv< typename boost::remove_reference< argument_type >::type >::type key_type