11 selTracks_ = std::make_unique<reco::TrackCollection>();
14 selHits_ = std::make_unique<TrackingRecHitCollection>();
17 selTrajs_ = std::make_unique< std::vector<Trajectory> >();
41 std::vector<Trajectory>
dummy;
45 auto const & tracksIn = tokens.
tracks(
evt);
46 for (
auto k : selected) {
47 auto const & trk = tracksIn[
k];
52 assert(
selTrajs_->back().measurements().size()==trk.recHitsSize());
61 selTrackExtras_->emplace_back( trk.outerPosition(), trk.outerMomentum(), trk.outerOk(),
62 trk.innerPosition(), trk.innerMomentum(), trk.innerOk(),
63 trk.outerStateCovariance(), trk.outerDetId(),
64 trk.innerStateCovariance(), trk.innerDetId(),
65 trk.seedDirection(), trk.seedRef()
69 tx.setResiduals(trk.residuals());
70 auto nh1=trk.recHitsSize();
71 tx.setHits(rHits,
selHits_->size(),nh1);
72 tx.setTrajParams(trk.extra()->trajParams(),trk.extra()->chi2sX5());
73 assert(tx.trajParams().size()==tx.recHitsSize());
75 for(
auto hit = trk.recHitsBegin();
hit != trk.recHitsEnd(); ++
hit ) {
76 selHits_->push_back( (*hit)->clone() );
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
std::unique_ptr< std::vector< Trajectory > > selTrajs_
bool copyExtras_
copy only the tracks, not extras and rechits (for AOD)
std::vector< Track > TrackCollection
collection of Tracks
static void fill(edm::ParameterSetDescription &desc)
std::unique_ptr< reco::TrackExtraCollection > selTrackExtras_
std::unique_ptr< reco::TrackCollection > selTracks_
std::unique_ptr< TrackingRecHitCollection > selHits_
bool copyTrajectories_
copy also trajectories and trajectory->track associations
edm::Event & evt
the event
std::vector< Trajectory > const & trajectories(edm::Event &evt) const
reco::TrackCollection const & tracks(edm::Event &evt) const
RefProd< PROD > getRefBeforePut()
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
bool copyExtras_
copy only the tracks, not extras and rechits (for AOD)
Producer(edm::Event &ievt, TrackCollectionCloner const &cloner)
bool copyTrajectories_
copy also trajectories and trajectory->track associations
void operator()(Tokens const &tokens, std::vector< unsigned int > const &selected)
process one event
std::unique_ptr< TrajTrackAssociationCollection > selTTAss_