80 produces<reco::TrackCollection>();
81 produces<TrackingRecHitCollection>();
82 produces<reco::TrackExtraCollection>();
83 produces<std::vector<int> >();
91 seedsToken = consumes<std::vector<TrajectorySeed> >(seedsTag);
103 using namespace reco;
110 auto_ptr<vector<int> > seedToTrack(
new vector<int>());
139 for (
auto const &
seed : *seeds.product()){
144 if(!(tsAtClosestApproachSeed.isValid())){
145 edm::LogVerbatim(
"SeedValidator")<<
"TrajectoryStateClosestToBeamLine not valid";
146 seedToTrack->push_back(-1);
151 tsAtClosestApproachSeed.trackStateAtPCA().position().y(),
152 tsAtClosestApproachSeed.trackStateAtPCA().position().z());
154 tsAtClosestApproachSeed.trackStateAtPCA().momentum().y(),
155 tsAtClosestApproachSeed.trackStateAtPCA().momentum().z());
158 tracks->push_back(
Track(0.,0., vSeed1, pSeed, 1, seedPerigeeErrors.covarianceMatrix()));
159 seedToTrack->push_back(tracks->size()-1);
160 tracks->back().appendHits(
seed.recHits().first,
seed.recHits().second,ttopo);
162 size_t firsthitindex = rechits->size();
163 for(
auto hitit =
seed.recHits().first;hitit !=
seed.recHits().second;++hitit){
164 rechits->push_back(*hitit);
168 trackextras->back().setHits(ref_rechits,firsthitindex,rechits->size() - firsthitindex);
170 tracks->back().setExtra(
TrackExtraRef( ref_trackextras, trackextras->size() - 1) );
174 edm::LogInfo(
"SeedValidator") <<
"failed to create tracks from " << nfailed <<
" out of " << seeds->size() <<
" seeds ";
177 iEvent.
put(seedToTrack);
179 iEvent.
put(trackextras);
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::string tTRHBuilderName
#define DEFINE_FWK_MODULE(type)
std::vector< Track > TrackCollection
collection of Tracks
edm::Ref< TrackExtraCollection > TrackExtraRef
persistent reference to a TrackExtra
void addDefault(ParameterSetDescription const &psetDescription)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
FreeTrajectoryState const * freeState(bool withErrors=true) const
math::XYZPoint Point
point in the space
std::shared_ptr< TrackingRecHit const > RecHitPointer
RefProd< PROD > getRefBeforePut()
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
TrackFromSeedProducer(const edm::ParameterSet &)
edm::EDGetTokenT< std::vector< TrajectorySeed > > seedsToken
PerigeeTrajectoryError ftsToPerigeeError(const FTS &originalFTS)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
math::XYZVector Vector
spatial vector
virtual void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override