80 produces<reco::TrackCollection>();
81 produces<TrackingRecHitCollection>();
82 produces<reco::TrackExtraCollection>();
102 using namespace reco;
117 const auto& seeds = *hseeds;
138 for(
size_t iSeed=0; iSeed < seeds.size(); ++iSeed) {
139 auto const&
seed = seeds[iSeed];
144 if(tsAtClosestApproachSeed.isValid()) {
146 tsAtClosestApproachSeed.trackStateAtPCA().position().y(),
147 tsAtClosestApproachSeed.trackStateAtPCA().position().z());
149 tsAtClosestApproachSeed.trackStateAtPCA().momentum().y(),
150 tsAtClosestApproachSeed.trackStateAtPCA().momentum().z());
153 tracks->emplace_back(0.,0., vSeed1, pSeed, state.
charge(), seedPerigeeErrors.covarianceMatrix());
156 edm::LogVerbatim(
"SeedValidator")<<
"TrajectoryStateClosestToBeamLine not valid";
163 tracks->back().appendHits(
seed.recHits().first,
seed.recHits().second,ttopo);
165 size_t firsthitindex = rechits->size();
166 for(
auto hitit =
seed.recHits().first;hitit !=
seed.recHits().second;++hitit){
167 rechits->push_back(*hitit);
172 trackextras->back().setHits(ref_rechits,firsthitindex,rechits->size() - firsthitindex);
175 tracks->back().setExtra(
TrackExtraRef( ref_trackextras, trackextras->size() - 1) );
179 edm::LogInfo(
"SeedValidator") <<
"failed to create tracks from " << nfailed <<
" out of " << seeds.size() <<
" seeds ";
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
TrackCharge charge() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::string tTRHBuilderName
std::vector< Track > TrackCollection
collection of Tracks
edm::Ref< TrackExtraCollection > TrackExtraRef
persistent reference to a TrackExtra
~TrackFromSeedProducer() override
#define DEFINE_FWK_MODULE(type)
void addDefault(ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< edm::View< TrajectorySeed > > seedsToken
FreeTrajectoryState const * freeState(bool withErrors=true) const
math::XYZPoint Point
point in the space
std::shared_ptr< TrackingRecHit const > RecHitPointer
RefProd< PROD > getRefBeforePut()
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
TrackFromSeedProducer(const edm::ParameterSet &)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
PerigeeTrajectoryError ftsToPerigeeError(const FTS &originalFTS)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
math::XYZVector Vector
spatial vector
T const * product() const
math::Error< dimension >::type CovarianceMatrix
5 parameter covariance matrix