21 trackProducers = ps.
getParameter<vector<string> >(
"trackProducers");
23 produces<reco::TrackCollection>();
24 produces<reco::TrackExtraCollection>();
25 produces<TrackingRecHitCollection>();
26 produces<vector<Trajectory> >();
27 produces<TrajTrackAssociationCollection>();
38 auto_ptr<reco::TrackCollection> recoTracks
40 auto_ptr<reco::TrackExtraCollection> recoTrackExtras
42 auto_ptr<TrackingRecHitCollection> recoHits
44 auto_ptr<vector<Trajectory> > recoTrajectories
45 (
new vector<Trajectory>);
46 auto_ptr<TrajTrackAssociationCollection> recoTrajTrackMap
50 <<
"[TrackListCombiner]";
54 for(vector<string>::iterator trackProducer = trackProducers.begin();
55 trackProducer!= trackProducers.end();
70 ev.
getByLabel(*trackProducer, theTrajectoryCollection);
74 <<
" [TrackListCombiner] " << *trackProducer
75 <<
" : " << theAssoMap->size();
81 anAssociation = theAssoMap->begin();
82 lastAssociation = theAssoMap->end();
85 for ( ; anAssociation != lastAssociation; ++anAssociation )
96 recoTracks->push_back(aRecoTrack);
100 for(
unsigned ih=0; ih<nh; ++ih)
103 recoHits->push_back(hit);
107 recoTrajectories->push_back(*aTrajectoryRef);
113 <<
" [TrackListCombiner] allTracks : " << recoTracks->size()
114 <<
"|" << recoTrajectories->size();
121 unsigned nTracks = recoTracks->size();
122 recoTrackExtras->reserve(nTracks);
140 for (
unsigned int ih=0; ih<nHits; ++ih)
142 recoTrackExtras->push_back(aTrackExtra);
147 ev.
put(recoTrackExtras);
153 (recoTracks->at(
index)).setExtra(theTrackExtraRef);
161 ev.
put(recoTrajectories);
168 recoTrajTrackMap->insert(trajRef,tkRef);
172 ev.
put(recoTrajTrackMap);
T getParameter(std::string const &) const
size_t recHitsSize() const
Get number of RecHits. (Warning, this includes invalid hits, which are not physical hits)...
std::vector< Track > TrackCollection
collection of Tracks
bool innerOk() const
return true if the innermost hit is valid
const math::XYZPoint & outerPosition() const
position of the outermost hit
TrackAlgorithm
track algorithm
const math::XYZPoint & innerPosition() const
position of the innermost hit
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
CovarianceMatrix outerStateCovariance() const
outermost trajectory state curvilinear errors
unsigned int outerDetId() const
DetId of the detector on which surface the outermost state is located.
edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::TrackCollection, unsigned short > > TrajTrackAssociationCollection
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual void produce(edm::Event &ev, const edm::EventSetup &es)
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
edm::RefToBase< TrajectorySeed > seedRef() const
const math::XYZVector & outerMomentum() const
momentum vector at the outermost hit position
bool outerOk() const
return true if the outermost hit is valid
CovarianceMatrix innerStateCovariance() const
innermost trajectory state curvilinear errors
TrackListCombiner(const edm::ParameterSet &ps)
void setAlgorithm(const TrackAlgorithm a, bool set=true)
position index
const math::XYZVector & innerMomentum() const
momentum vector at the innermost hit position
TrackingRecHitRef recHit(size_t i) const
Get i-th hit on the track.
PropagationDirection seedDirection() const
direction of how the hits were sorted in the original seed
unsigned int innerDetId() const
DetId of the detector on which surface the innermost state is located.